Skip to content

Commit

Permalink
Fix openRes bug in \\network
Browse files Browse the repository at this point in the history
  • Loading branch information
Rafael Barrero Rodríguez committed Mar 22, 2022
1 parent b848f29 commit 36122d8
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 8 deletions.
3 changes: 2 additions & 1 deletion Launcher/launch.R
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,5 @@ launch.browser = function(appUrl, browser.path=chrome.portable) {
shell(sprintf('"%s" --app=%s', browser.path, appUrl), wait=FALSE)
}

runApp("ShinyApp", launch.browser = launch.browser)
runApp("ShinyApp", launch.browser = launch.browser)
#runApp("ShinyApp", launch.browser = TRUE)
9 changes: 5 additions & 4 deletions ShinyApp/app.R
Original file line number Diff line number Diff line change
Expand Up @@ -212,9 +212,10 @@ calculatePvalues <- function(obj) {
reportData <- cbind(reportData, pvalues_df)
reportData <- data.frame(mapply('c', header, reportData))

outDir <- dirname(obj$filePath)
outDir <- dirname(obj$filePath) # dirname changes \\ --> /, yielding error in \\tierra...
outDir <- gsub("/", "\\\\", outDir) # fix it //tierra...
outFile <- paste("LIMMA", basename(obj$filePath), sep="_")
outPath <- paste(outDir, outFile, sep="/")
outPath <- paste(outDir, outFile, sep="\\")

write.table(reportData, file = outPath, quote = F, sep = "\t", row.names = F,
col.names = F, na="")
Expand Down Expand Up @@ -279,11 +280,11 @@ server <- function (input, output, session) {
})

observeEvent(input$openRes, {
shell.exec(dirname(input$openRes))
shell.exec(gsub('/', '\\\\', dirname(input$openRes)))
})

observeEvent(input$viewLogs, {
shell.exec(paste(getwd(), "log", paste(input$viewLogs, ".log", sep=""), sep="/"))
shell.exec(paste(getwd(), "log", paste(input$viewLogs, ".log", sep=""), sep="\\"))
})

observeEvent(input$areYouAlive, {
Expand Down
4 changes: 2 additions & 2 deletions ShinyApp/public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>ReportStats-iSanXoT v0.2.1</title>
<title>ReportStats-iSanXoT v0.2.2</title>

<!--
<link rel="stylesheet" href="assets/bootstrap.min.css">
Expand All @@ -26,7 +26,7 @@
<div>
<img src="favicon.ico" height="150">
</div>
<h1 class="display-2 text-center align-self-center ml-2">ReportStats - iSanXoT<span style="font-size:0.3em">v0.2.1</span></h1>
<h1 class="display-2 text-center align-self-center ml-2">ReportStats - iSanXoT<span style="font-size:0.3em">v0.2.2</span></h1>
</div>


Expand Down
5 changes: 4 additions & 1 deletion release.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,16 @@
# main function
if __name__ == "__main__":
version = sys.argv[1] #"vx.y"
mode = sys.argv[2] # "chromium" or "browser"

versionName = f"ReportStats-iSanXoT-{version}"
versionName += "-browser" if mode == "browser" else ""
home = os.getcwd()
version_dir = os.path.join(home, versionName)

os.mkdir(version_dir)

shutil.copytree(os.path.join(home, "ChromiumPortable"), os.path.join(version_dir, "ChromiumPortable"))
if mode == "chromium": shutil.copytree(os.path.join(home, "ChromiumPortable"), os.path.join(version_dir, "ChromiumPortable"))
shutil.copytree(os.path.join(home, "R-Portable"), os.path.join(version_dir, "R-Portable"))
shutil.copytree(os.path.join(home, "ShinyApp"), os.path.join(version_dir, "ShinyApp"))
shutil.copytree(os.path.join(home, "Launcher"), os.path.join(version_dir, "Launcher"))
Expand Down

0 comments on commit 36122d8

Please sign in to comment.