diff --git a/RBBGCMuso/R/musoExamples.R b/RBBGCMuso/R/musoExamples.R index 91df1c6..9801289 100644 --- a/RBBGCMuso/R/musoExamples.R +++ b/RBBGCMuso/R/musoExamples.R @@ -20,7 +20,7 @@ copyMusoExamleTo <- function(example = NULL, destination = NULL){ choiceValues <- basename(list.dirs(system.file("examples","",package = "RBBGCMuso"),recursive = FALSE)) choices <- tcltk::tkwidget(choiceWin,"ComboBox", editable = FALSE, values = choiceValues, - textvariable = tclVar(choiceValues[1])) + textvariable = tcltk::tclVar(choiceValues[1])) tkpack(choices) choiceValue <- NA closeSelection <- tcltk::tkwidget(choiceWin,"button",text ="Select", command =function (){ @@ -38,15 +38,24 @@ copyMusoExamleTo <- function(example = NULL, destination = NULL){ if(is.null(example)){ - cExample<-chooseExample() + cExample<-paste0(system.file("examples","",package = "RBBGCMuso"),chooseExample()) } if(is.null(destination)){ destination<-tcltk::tk_choose.dir(getwd(), "Choose folder to copy the examples!") } - return(c(cExample,destination)) - - + + currDir <- getwd() + setwd(cExample) + print(getwd()) + if(!WindowsP){ + file.copy("./bin/muso", destination) + } else { + file.copy("./bin/muso.exe", destination) + file.copy("./bin/cygwin.dll") + } + file.copy(grep("bin", list.files(), value = TRUE, invert = TRUE),destination) + setwd(currDir) } ## choiceWin <- tcltk::tktoplevel() ## tclRequire("BWidget") diff --git a/RBBGCMuso/inst/examples/hegyhatsal/bin/cygwin1.dll b/RBBGCMuso/inst/examples/hegyhatsal/bin/cygwin1.dll new file mode 100644 index 0000000..3054de1 Binary files /dev/null and b/RBBGCMuso/inst/examples/hegyhatsal/bin/cygwin1.dll differ diff --git a/RBBGCMuso/inst/examples/hegyhatsal/bin/muso.exe b/RBBGCMuso/inst/examples/hegyhatsal/bin/muso.exe new file mode 100644 index 0000000..bc42e12 Binary files /dev/null and b/RBBGCMuso/inst/examples/hegyhatsal/bin/muso.exe differ