Skip to content

Commit d15bbbf

Browse files
committed
check if binary prog diyabc and abcranger are missing or not at startup
1 parent 07b8529 commit d15bbbf

1 file changed

Lines changed: 30 additions & 0 deletions

File tree

R-pkg/R/app_index.R

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,36 @@ index_server <- function(input, output, session) {
7979
# home page
8080
home_page <- callModule(home_page_server, "home_page")
8181

82+
## check for binary prog diyabc and abcranger
83+
observe({
84+
# check if binary files are available
85+
diyabc_bin <- tryCatch(
86+
find_bin("diyabc"),
87+
error = function(e) return(e)
88+
)
89+
abcranger_bin <- tryCatch(
90+
find_bin("abcranger"),
91+
error = function(e) return(e)
92+
)
93+
if("error" %in% class(diyabc_bin) | "error" %in% class(abcranger_bin)) {
94+
show_alert(
95+
title = "Error !",
96+
text = tagList(
97+
icon("warning"),
98+
"DIYABC-RF internal engine is missing.",
99+
br(), br(),
100+
"Please navigate to the", tags$b("Preferences"),
101+
"tab (see left sidebar) and click on",
102+
tags$b("Update DIYABC-RF internal engine"), ".",
103+
br(), br(),
104+
"If the issue persists, please contact DIYABC-RF support."
105+
),
106+
type = "error",
107+
html = TRUE
108+
)
109+
}
110+
})
111+
82112
## new analysis project
83113
observeEvent(home_page$new_analysis_project, {
84114
req(home_page$new_analysis_project)

0 commit comments

Comments
 (0)