-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstart.R
45 lines (27 loc) · 1.18 KB
/
start.R
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#confirm versions greater than (node 8.4.0 and npm 5.3)
nodeVersion <- system("node -v", intern=TRUE)
npmVersion <- system("npm -v", intern=TRUE)
#if node not available, notify to install node and npm globally
#npm i –g electron-packager
electronPackagerVersion <- system("npm list -g electron-packager", intern=TRUE)
#confirm git is installed and available
gitVersion <- system("git --version", intern=TRUE)
#if git not available, notify to install git
#git clone electron-shiny sample app
# system("git clone https://github.com/ColumbusCollaboratory/electron-quick-start")
system("git clone https://github.com/butcer0/SequenceOne")
#copy app.R and all files
subDir <- "temp"
if (!file.exists(subDir)){
dir.create(file.path(subDir))
}
unlink("temp/*")
file.copy(from=list.files('.', "*.R"), to="./SequenceOne",
overwrite=TRUE, recursive=TRUE, copy.mode=TRUE)
#Run R Portable for platform you are on. Install packages needed for Shiny app
setwd("./SequenceOne/R-Portable-Mac")
system("R")
#npm install
#npm start
#?????? How to run install of packages for Windows if you are on a Mac.
#Run your R Project on Windows and use the Add-In to Install packages need for Shiny app