Giter Site home page Giter Site logo

ficonsulting / rinno Goto Github PK

View Code? Open in Web Editor NEW
307.0 17.0 66.0 3.83 MB

How to install local shiny apps

Home Page: https://ficonsulting.github.io/RInno/

License: Other

R 5.53% HTML 82.32% CSS 10.81% JavaScript 1.09% Inno Setup 0.25%
shiny shiny-apps shinyapps shinydashboard shiny-applications r inno-setup inno pascal jscript

rinno's Introduction

RInno

AppVeyor Build Status codecov CRAN_Status_Badge Downloads Downloads Project Status: Unsupported – The project has reached a stable, usable state but the author(s) have ceased all work on it. A new maintainer may be desired.

RInno makes it easy to install local shiny apps by providing an interface between R, Inno Setup, an installer for Windows programs (sorry Mac and Linux users), and Electron, a modern desktop framework used by companies like Github, Slack, Microsoft, Facebook and Docker. RInno is designed to be simple to use (two lines of code at a minimum), yet comprehensive.

If a user does not have R installed, the RInno installer can be configured to ask them to install R along with a shiny app, include_R = TRUE. And similar to Dr. Lee Pang’s DesktopDeployR project, RInno provides a framework for managing software dependencies and error logging features. However, RInno also supports GitHub package dependencies, continuous installation (auto-update on start up), and it is easier to manage with create_app, the main RInno function. DesktopDeployR requires many manual adjustments and a deep understanding of the entire framework to use, but RInno can be learned incrementally and changes automatically flow down stream. You don’t need to remember the 100+ places impacted by changing app_dir. RInno only requires a high-level understanding of what you’d like to accomplish.

Getting Started

# Get remotes package
install.packages("remotes"); require(remotes)

# Use install_github to get RInno
install_github("ficonsulting/RInno")

# Require Package
require(RInno)

# Use RInno to get Inno Setup
install_inno()

Minimal example

Once you have developed a shiny app, you can build an installer with create_app followed by compile_iss.

# Example app included with RInno package
example_app(app_dir = "app")

# Build an installer
create_app(app_name = "Your appname", app_dir = "app")
compile_iss()

create_app creates an installation framework in your app’s directory, app_dir. The main components are a file called “app_name.iss” and the “nativefier-app” directory. You can perform minor customizations before you call compile_iss. For example, you can replace the default/setup icon at Flaticon.com, or you can customize the pre-/post- install messages, infobefore.txt and infoafter.txt. Just remember, the default values (i.e. create_app(info_after = "infobefore.txt")) for those files have not changed. The Inno Setup Script (ISS), app_name.iss, will look for default.ico and try to use it until you update the script or call create_app with the new icon’s file name (i.e. create_app(app_icon = "new.ico")). Likewise, the Electron app will need to be recompiled to capture any manual changes to files in app_dir.

Electron is now used to render the shiny app’s UI. All other user_browser options will be deprecated in future releases.

ui.R Requirements

In order to replace Electron’s logo with your app’s icon, add something like this to your ui.R file:

fluidPage(
  tags$head(
    tags$link(
      rel = "icon", 
      type = "image/x-icon", 
      href = "http://localhost:1984/default.ico")
  )
)

server.R Requirements

In order to close the app when your user’s session completes:

  1. Add session to your server function
  2. Call stopApp() when the session ends
function(input, output, session) {

  if (!interactive()) {
    session$onSessionEnded(function() {
      stopApp()
      q("no")
    })
  }
}

If you forget to do this, users will complain that their icons are broken and rightly blame you for it (an R session will be running in the background hosting the app, but they will need to press ctrl + alt + delete and use their task manager to close it). Not cool.

Package Dependency Management

Provide a named character vector of packages to create_app, and RInno will download them and install them with your shiny app. RInno downloads windows binaries from CRAN for the listed packages and their dependencies with tools::package_dependencies(packages = pkgs, recursive = TRUE).

create_app(
  app_name = "myapp", 
  app_dir = "app",
  pkgs = c("shiny", "jsonlite", "httr")
)

For remotes, Github source files are compiled into windows binaries. Bitbucket will be supported in a future release.

Custom Installations

If you would like to create a custom installer from within R, you can slowly build up to it with create_app, like this:

create_app(
  app_name    = "My AppName", 
  app_dir     = "My/app/path",
  dir_out     = "wizard",
  pkgs        = c("jsonlite", "shiny", "magrittr", "xkcd"),  # CRAN-like repo packages
  remotes     = c("talgalili/installr", "daattali/shinyjs"), # GitHub packages
  include_R   = TRUE,     # Download R and install it with your app, if necessary
  R_version   = "2.2.1",  # Old versions of R
  privilege   = "high",   # Admin only installation
  default_dir = "pf")     # Install app in to Program Files

create_app passes its arguments to most of the other support functions in RInno. You can (and probably should) specify most things there and they will get passed on. Alternatively, you can provide instructions directly to those support functions like this:

# Copy installation scripts (JavaScript, icons, infobefore.txt, package_manager.R, launch_app.R)
copy_installation(app_dir = "my/app/path")

# If your users need R installed:
get_R(app_dir = "my/app/path", R_version = "2.2.1")

# Create batch file
create_bat(app_name = "My AppName", app_dir = "my/app/path")

# Create app config file
create_config(app_name = "My AppName", R_version = "2.2.1", app_dir = "my/app/path",
  pkgs = c("jsonlite", "shiny", "magrittr", "dplyr", "caret", "xkcd"))

# Build the iss script
start_iss(app_name = "My AppName") %>%

  # C-like directives
  directives_section(R_version   = "2.2.1", 
             include_R   = TRUE,
             app_version = "0.1.2",
             publisher   = "Your Company", 
             main_url    = "yourcompany.com") %>%

  # Setup Section
  setup_section(output_dir  = "wizard", 
        app_version = "0.1.2",
        default_dir = "pf", 
        privilege   = "high",
        inst_readme = "pre-install instructions.txt", 
        setup_icon  = "myicon.ico",
        pub_url     = "mycompany.com", 
        sup_url     = "mycompany.github.com/issues",
        upd_url     = "mycompany.github.com") %>%

  # Languages Section
  languages_section() %>%

  # Tasks Section
  tasks_section(desktop_icon = FALSE) %>%

  # Files Section
  files_section(app_dir = "my/app/path", file_list = "path/to/extra/files") %>%

  # Icons Section
  icons_section(app_desc       = "This is my local shiny app",
        app_icon       = "notdefault.ico",
        prog_menu_icon = FALSE,
        desktop_icon   = FALSE) %>%

  # Execution & Pascal code to check registry during installation
  # If the user has R, don't give them an extra copy
  # If the user needs R, give it to them
  run_section() %>%
  code_section() %>%

  # Write the Inno Setup script
  writeLines(file.path("my/app/path", "My AppName.iss"))

  # Check your files, then
  compile_iss()

Feel free to read the Inno Setup documentation and RInno’s documentation to get a sense for what is possible. Also, please suggest useful features or build them yourself! We have a very positive culture at FI Consulting, and we would love to get your feedback.

Please note that this project has a Contributor Code of Conduct. By participating in this project you agree to abide by its terms.

License

The RInno package is licensed under the GPLv3. See LICENSE for details.

rinno's People

Contributors

bthomasbailey avatar dripdrop12 avatar laurae2 avatar mnhuynh88 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

rinno's Issues

Latest dev version > CRAN version leads to error after new user installs

I debated adding a comment to issue #48 , but I think this is actually a slightly different issue. When I used RInno's create_app function to create the .iss file and all other supporting folders and files, including config.cfg, I had a version of shiny that I had installed using devtools::install_github. As such, its version (1.0.5.900) exceeded that of the latest CRAN version (1.0.5). So when RInno called the create_config() function, which in turn called standardize_pkgs(), "shiny": ">=1.0.5.9000" was written to the config file. Then when I switched to a different computer that didn't have shiny installed, when ensure() was called, it tried to use devtools::install_version where repo was set to "http://cran.rstudio.com" and version was set to the required version of "1.0.5.9000." This, of course, results in an error because this version does not exist on CRAN.

For right now, I know I can easily solve the issue by switching back to shiny v. 1.0.5 on my development computer and re-running RInno. Is passing the package name into the "remotes" argument for create_app a solution to this, or is there something else that needs to be done?

specify location to install R

When using the option include_R = TRUE; R is installed using /SILENT. This works pretty good but of the options provided (https://cran.r-project.org/bin/windows/base/rw-FAQ.html#Can-I-customize-the-installation_003f) I think /DIR is very important. In enterprise environment the location where R is installed can have devastating effects (admin privileges; mydocs drive that is not available when working locally, etc.). Adding the \DIR option is a must in my opinion. This is a great package by the way!

Allow for Github Authentication via Personal Access Token

The current version of the package allows for authentication to private github repos, but not for accounts that use two factor authentication. It would be helpful to add in authentication to a Github account via an personal access token that could be passed to the auth_token argument in install_github() as well.

Thanks for all the work on this great package!

error, R executable not found: none\bin\R.script.exe

I compile my app follow the readme, but when I run the exe, it turns out an error:

error, R executable not found: none\bin\R.script.exe

I already add the path of R\bin and R64\bin to system path, but it is useless

Removing exe from installer?

I was wondering why you decided to remove exe files from being able to be installed? (I was wondering why I was having to add them to .iss manually)

all_files <- c(file_list, all_files[!grepl("iss$|info.*txt$|exe$|msi$", all_files)])

app.R did not return a shiny.appobj object

First, let me say I'm very grateful for this package! Deploying apps locally is a great option when shinyapps.io or a local shiny server aren't possible.

I've had two users download the app via the installer and both have the following error when launching the application:
app.R did not return a shiny.appobj object.

I would greatly appreciate any help!

Timeout Error - Firewall issue

Hi Jonathan! I was running your example and I got the following error when I ran the setup_myapp.exe file. I get a pop up saying that "Ensuring package dependencies" (with a progress bar) and the a fail popup saying "Startup failed with error(s): Timeout was reached: Connection timed out after 1000 ms". I am sure it has to do with the firewall settings of my organization, is there anything that can be done on my end?

include_R Hangs the Process

I am not sure if that is with low network in India but when It downloads R. it hangs for so long that i have to cut the process. I can download R within 2 minutes. But include_R command takes like forever.

Then at last I put the downloaded version of R in the app directory and it worked just fine. But it shouldn't take that long. it just doesn't download it after a few seconds. and hangs.

Installation directories

Hi,
I am using RInno to compile my Shiny app and wish to install the resulting program on a communal PC on campus. Compilation was fine but installation was not successful as it was trying to install R in drive C. This is not possible as I do not have administration right to this section of the computer. I wonder whether it is possible to direct R installation to somewhere else (e.g. Document).

Thanks in advance for your help,
Kobchai

Add an option to include Google Chrome

IE often causes bugs because of IT security policies that prevent icons and third-party JavaScript libraries from loading properly. Therefore, it would be convenient if RInno provided the ability to include Chrome similar to how it can include R and Pandoc. i.e.

create_app(include_Chrome = TRUE)

Startup failed with error(s): argument is of length zero.

HI John,

As stated on the FI labs website I am having a problem with the package you have developed.

I have run the following code:

library('RInno')

create_app(
  app_name = "Deployment Tool", 
  app_dir = "Deployment_Tool_Local".
  pkgs = c("shiny", "tidyverse")
  )
compile_iss()

Which creates all the necessary files in the projects directory.

I then installed the program via the setup_Deployment Tool exe in Rinno_Installer folder that was created.

When I run the package I get the following error:

Startup failed with error(s):

argument is of length zero

Below is the full error log:

library paths:
... C:/Users/arobinson4/Documents/Deployment Tool/library
... C:/Users/arobinson4/OneDrive/Documents/R/win-library/3.3
... C:/Program Files/R/R-3.3.2/library
working path:
... C:/Users/arobinson4/Documents/Deployment Tool
Loading required package: methods
Warning message:
package 'jsonlite' was built under R version 3.3.3 
Warning message:
package 'devtools' was built under R version 3.3.3 
Warning message:
package 'httr' was built under R version 3.3.3 
ensuring packages: jsonlite, shiny, magrittr

Attaching package: 'shiny'

The following object is masked from 'package:jsonlite':

    validate

Warning message:
package 'shiny' was built under R version 3.3.3 
Startup failed with error(s):

argument is of length zero

Any help would be appreciated. Please note I get the same error if I use the example app outlined on your blog post here: http://www.ficonsulting.com/filabs/RInno

Am I missing some parameters that don't have defaults?

Kind Regards,

Adam

Non-compatibility with flexdashboard framework

RInno framework assumes that Shiny App was developed using conventional ui.R and server.R setup. Should also accommodate flexdashboard markdown files in future.

In compiled folder utils/app.R, this would ensure that it can run the flexdashboard.Rmd format. Having issues with pandoc availability

if (config$app_repo[[1]] != "none") {
  app_path <- file.path(system.file(package = config$appname), "app")
  #shiny::runApp(app_path, launch.browser = T)
  rmarkdown::run(file = list.files(app_path, pattern = ".Rmd") ,dir = app_path, shiny_args =list(launch.browser = T))
  

} else {
 #shiny::runApp("./", launch.browser = T)
  rmarkdown::run(file = list.files("./", pattern = ".Rmd") ,dir = "./", shiny_args =list(launch.browser = T))
}

No shiny application exists

I have followed instructions as outlined here in order to create a continuously installing app. This package has the shiny app in it's inst/app directory. I have created a release with a tag that matches the version in the DESCRIPTION file.

I have run (full code here)

create_app(
    app_name     = "5eInteractiveSheetCI", 
    app_repo_url = "https://github.com/oganm/import5eChar",
    pkgs         = depends,
    app_dir = 'sheetCI',include_R = TRUE
)
compile_iss()

In order to create the installer (depends is a vector of dependencies). Yet when I complete installation and try to run it, I get No shiny application exists at path "/app" error. Am I missing something obvious here?

A non-continuous installation version of the app works just fine.

Thinking on the R_version check

Currently, the .iss script is checking for an exact match of the R_version specified. Would it possible to check the R_version for a set? For example, instead of specifying R_version = '3.4.1', we can specify R_version >= '3.0.0'.

default.ico

Default icon file can't be found in the app directory. Icon is showing up blank

Package not found error

Hey Jon, hope you're doing alright.

So, I updated RInno and re-builded the executable for my app, and ran into a issue. It installs fine, but when it tries to update the packages, it tries to update a package called ">=1.0.5", followed by the error 'package ">=1.0.5" not found'.

I looked back at the old installed version, and noticed that were differences in the utils/config.cfg.

The old version just listed the package names that I set to install separated by commas in the "pkgs" function , while the newer version was like this:

  "appname": "AppInventarioNativas",
  "pkgs": {
    "pkgs": {
      "shiny": ">=1.0.5",
      "DT": ">=0.2",
      "formattable": ">=0.2.0.1",
      "readxl": ">=1.0.0",
      "plyr": ">=1.8.4",
      "tidyr": ">=0.7.2",
      "dplyr": ">=0.7.4",
      "ggplot2": ">=2.2.1.9000",
      "lazyeval": ">=0.2.0",
      "ggdendro": ">=0.1.20",
      "ggthemes": ">=3.4.0",
      "xlsx": ">=0.5.7",
      "httr": ">=1.3.1"
    },

So I imagine the problem lies over there. Do you know how I can solve this? This is the code I am using to build the .exe:

create_app(
  app_name     = "AppInventarioNativas",
  app_dir      = "RInno_files",
  app_repo_url = "https://github.com/sollano/AppInventarioNativas",
  pkgs         = c("shiny", "DT", "formattable", "readxl", "plyr", "tidyr","dplyr", "ggplot2", "lazyeval", "ggdendro","ggthemes","xlsx"),
  app_icon     = "LAB_logo.ico",
  setup_icon   = "LAB_logo.ico",
  publisher    = "treelab ufvjm",
  pub_url      = "http://gorgens.wixsite.com/treelab",
  dir_out      = "exe_folder",
  info_before  = "info_before.txt",
 info_after    = "info_after.txt",
 auth_token   =******

)
compile_iss()

Also, something I tried a while back and noticed is that since this app checks for version updates on my github page, the .exe will not launch without a internet connection. I wasn't sure if I should open a issue for this or not, and this was the reason I rebuild the .exe, to see if it would work offline now. So if you think it is worth it, I'll open another issue and we can take a look at.

Thanks again for this package, cheers!

RInno: 0.2.0
R: 3.4.3
OS: Windows 10

magrittr package dependency

Should we add magrittr to the packages used by RInno so that users can chain functions when doing a custom ISS script w/o having to load magrittr?

Add option to install local source packages

IMVHO it would be nice to have on top of pkgs and remotes parameters of create_app, an additional parameter, say sources, which would execute:

for (i in seq_along(sources)) {
    .... # check here or earlier if the ".tar.gz" source package file is avail in the app folder
    install.packages(sources[i], type="source", repos = NULL)
}

This would allow to easily add package dependencies outside of the CRAN or GitHub, or to install older versions of CRAN packages.

Issue with path to Rscript.exe

Hi,

First of all, thanks for this awesome package !

I have an issue that might be related to #5. When I launch the installer on a computer without any previous version of R , the installer does install the app and R, but when clicking on the app icons, I get an error message (none/bin/RScript.exe not found).

My quick fix for now is to uninstall only the app and then reinstall it and in works just fine, but that is not very practical for my users.

My call to create_app is :

create_app(app_name = "My app",
           include_R = T,
           pkgs = c("shiny", "DT", "shinydashboard","tidyverse", "jsonlite", "stringr", "shinythemes", RPostgreSQL = "0.6-2"))

My sessionInfo() is :

> sessionInfo()
R version 3.4.2 (2017-09-28)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows >= 8 x64 (build 9200)

Matrix products: default

locale:
[1] LC_COLLATE=French_France.1252  LC_CTYPE=French_France.1252    LC_MONETARY=French_France.1252
[4] LC_NUMERIC=C                   LC_TIME=French_France.1252    

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] magrittr_1.5 RInno_0.2.0 

loaded via a namespace (and not attached):
[1] compiler_3.4.2 tools_3.4.2    yaml_2.1.18  

Incorrect installation when R installation is cancelled

Hi again,

if you cancel R installation then installer by default proceeds further and fails to launch the app, even if you do have R already installed (in a different, compatible version). In the latter case the paths are not set correctly. There is no "cancel" nor "back" button in the step following the R installer, nor an automatic rollback/cancellation.

Best possibly would be to attempt to detect another, newer version of R (as a step torwards #24 ), and only if not found auto-rollback/cancel the installer. Independently, a "cancel" button in each step would make sense.

Best,
Mik

Fatal error when include_chrome=T

I found a new bug on the newly released version [the Chrome installation cannot be triggered]. But, I came out with the following solution:
In the *.iss script:
Original (I tried to add {tmp} path, but it wont work):

[Tasks]
...
#if IncludeChrome
              Source: "chrome_installer.exe"; DestDir: "{tmp}"; Check: ChromeNeeded
#endif
....
[Run]
...
#if IncludeChrome
    Filename: "chrome_installer.exe"; Parameters: "/silent /install"; WorkingDir: {tmp}; Check: ChromeNeeded; Flags: skipifdoesntexist; StatusMsg: "Installing Chrome if needed"
#endif
...

Solution:

[Tasks]
#if IncludeChrome
              Source: "googlechromestandaloneenterprise.msi"; DestDir: "{tmp}"; Check: ChromeNeeded
#endif
...
[Run]
#if IncludeChrome
      Filename: "msiexec.exe"; Parameters: "/i ""googlechromestandaloneenterprise.msi"" /qb"; WorkingDir: {tmp}; Check: ChromeNeeded; Flags: skipifdoesntexist; StatusMsg: "Installing Chrome if needed"
#endif
...

In the app.R:
Original:

...
      #Launch Chrome in app-mode
      launch_browser <- function(appUrl) {
        message('Browser path: ', chrome)
        system(sprintf('"%s" --app=%s', chrome, appUrl))
      }
...

Solution:

...
launch_browser=TRUE
...

Version control on package dependency

I am facing some issues caused by the dependency version. For example:

  1. I built the app using RInno with R 3.4.2 last year and distributed to my colleagues.
  2. The dependency libraries worked fine because of the up-to-date R, like ggplot2
  3. However, after 3.4.3 released, when I deployed the app (build on R 3.4.2), it may not be able to start-up correctly.
  4. I checked the log: it seems that some dependencies (like labeling) of ggplot2 cannot be installed correctly and automatically. But, I can install it using R interface, and the problem solved.

Like in Deploy R project, the portable app will carry its own dependencies. Would it be a good idea to integrate it in the RInno? For example, using Packrat.

Rinno doesn't support app.R

It works fine with ui.r and server.r files but that is the old way of writing codes. Now I and most people use modularized code which is very hard to maintain in ui.r and server.r files.

as the code base increases and you create more and more modularized app. the 2 file modal is very hard to maintain.

Thus please let us use app.r or a single file approach as well. Please.

Microsoft JScript compilation error 800A03EE.

I had an error when opening the app. it seems to have trouble running json2.js. This line in particular:
j = eval('(' + text + ')');
i ran the example and everything was fine. Any ideas on what is happening?

image

Can we use shinyproxy along with it

It seems like other than Sunny server open source and pro there is something called shinyproxy which can provide much better authentication to the app and speed enhancements too.

Is there a way you can support that in RInno than we can actually get a framework with security. Please don't discard the idea right off. At least ponder on it.

Creating example shiny application installer included in RInno package produces an error related to 'namespace:jsonlite'

I am following the steps described in https://stackoverflow.com/questions/33513544/deploying-r-shiny-app-as-a-standalone-application/43349551 to create an example Shiny application.

I have already installed "RInno" package from github (ficonsulting/RInno).

In empty R project I executed the following code.

library(shiny)
library(RInno)

example_app(app_dir = "app") 

create_app(app_name = "myapp", app_dir = "app")
#The step above produces an error: 'write_json' is not an exported object from 'namespace:jsonlite'

compile_iss()

Which fails with an error. How to resolve this issue?

    > sessionInfo()
    R version 3.3.2 (2016-10-31)
    Platform: x86_64-w64-mingw32/x64 (64-bit)
    Running under: Windows >= 8 x64 (build 9200)

    locale:
    [1] LC_COLLATE=English_United States.1252  LC_CTYPE=English_United States.1252   
    [3] LC_MONETARY=English_United States.1252 LC_NUMERIC=C                          
    [5] LC_TIME=English_United States.1252    

    attached base packages:
    [1] stats     graphics  grDevices utils     datasets  methods   base     

    other attached packages:
    [1] rjson_0.2.15         jsonlite_1.1         RInno_0.2.0          shiny_1.0.5.9000    
    [5] dplyr_0.7.4.9001     purrr_0.2.4          readr_1.0.0          tidyr_0.6.0         
    [9] tibble_1.4.2         ggplot2_2.2.1.9000   tidyverse_1.0.0      RevoUtilsMath_10.0.0
    [13] RevoUtils_10.0.2     RevoMods_10.0.0      MicrosoftML_1.0.0    mrsdeploy_1.0       
    [17] RevoScaleR_9.0.1     lattice_0.20-34      rpart_4.1-10        

    loaded via a namespace (and not attached):
    [1] Rcpp_0.12.16.1         later_0.7.1            pillar_1.1.0          
    [4] plyr_1.8.4             bindr_0.1.1.9000       iterators_1.0.8       
    [7] tools_3.3.2            digest_0.6.10          mrupdate_1.0.0        
    [10] gtable_0.2.0           pkgconfig_2.0.1        rlang_0.2.0.9001      
    [13] foreach_1.4.3          CompatibilityAPI_1.1.0 curl_2.2              
    [16] yaml_2.1.13            bindrcpp_0.2.0.9000    withr_2.1.1.9000      
    [19] grid_3.3.2             tidyselect_0.2.3       glue_1.2.0            
    [22] R6_2.2.2               magrittr_1.5           promises_0.1.0.9002   
    [25] htmltools_0.3.5        scales_0.5.0.9000      codetools_0.2-15      
    [28] assertthat_0.2.0       xtable_1.8-2           mime_0.5              
    [31] colorspace_1.2-7       httpuv_1.3.6.9006      lazyeval_0.2.0        
    [34] munsell_0.4.3  

utils\regpaths.json file is not created before deployment

This is a minor problem, because it does not allow to test the app before the deployment: running <app_name>.bat causes run.js fail in line 25:

var fRegPaths = oFSO.OpenTextFile('utils\\regpaths.json', 1); // 1 = for reading

because the file is not found.

GPL virality when using RInno

I am wondering about licensing issues with apps distributed with RInno.

As from what I could understand, GPL virality does not apply when distributing R packages as the dependencies are not linked at the moment of distribution. Hadley Wickham's answer on this

However, once distributing an app packaged with RInno, even if the imported packages are installed on the first run of the app, I think one could argue that the app is packaged as one executable and that the app cannot run without the required packages, as the FSF states here then virality of the GPL license would apply.

Because lot of packages on CRAN have license incompatibilities, for example, if one wanted to create a shiny app using shinydashboard and distribute in an RInno packaged installer, there would be a clear license compatibility issue as shiny is GPL-3 only, shinydashboard is GPL-2 only, and these licenses are not compatible as stated here. It could become a big issue for people using RInno to distribute applications.

What do you think?

File not found in run.wsf

After creating an app with compile_iss I can't get the .bat-file to run. The problem seems to be with the run.wsf-script where a file is not found. I get a javascript runtime error on line 25, with code "800A0035" and message "file not found".

image

I got the same error message when I tried with the Cran-version of RInno (0.1.2), so this migth not be a specific problem for RInno 0.2.0. It could also be that I have done something else wrong.

The app on itselft runs fine (from RStudio).

Any idea what the issue migth be?

I'm running R-version 3.4.3 on a Windows 7 x64 computer. Script below.

EDIT: After checking the run.js-script I'm guessing the problem is related to the loading of the registry paths (line 25 tries to open/read utils/regpaths.json). There is no such file in my app's utils-folder. I found this previous issue, but not sure if it is related to mine. It could of course be a problem with finding the path to Chrome, Firefox etc., but I wonder why the file isn't created in the first place.

My operating system and browser is btw in norwegian. If that could be a problem?

require(devtools)
devtools::install_github("ficonsulting/RInno",  build_vignettes = TRUE, force = TRUE)

# Require Package
require(RInno)

# Use RInno to get Inno Setup
RInno::install_inno()

# Example app included with RInno package
setwd("C:/Users/username/Documents/Test")
example_app(wd = getwd())

# Build an installer
create_app(app_name = "Your appname", app_dir = "app")
compile_iss()```

Failure with Chrome (only)

Using Windows 10/64bit, German Version, RInno as of today from github. Default Browsers is Firefox, Chrome and Edge installed and working (this is a developer's machine)

Running the default installation of the sample app, no user_browser given: Chrome starts, no page displayed (black background), and ----- scary ------: all my extensions are disabled, popping up one after the other slowly like popcorn. I have never seen this before. (Added on edit): and the myapp directory is locked, need to restart.

Using user_browser = "firefox", "ie", or even "blub" starts firefox, and shiny runs ok. user_browser="chrome" gives the same as the default above.

Serial Numbers

Hi,
If you were developing an app that you wanted to deploy for an enterprise solution, could you package it in such a way where a serial number would be required to install?
Thanks

Runtime Internal Error: Cannot read an encrypted file before the key has been set.

Hello,

I have followed instructions about placing ISCrypt.dll into my RInno folder [I found it was already there but I copied over it with the file from your link] and have set a password and encryption to YES when I create iss().

However, when I run the installer afterwards I get this error.

Runtime Error
Internal Error: Cannot read an encrypted file before the key has been set.
https://i.imgur.com/Jw3GNLu.png

Followed by this error:
Runetim Error
Could not call proc.
https://i.imgur.com/NfqghEL.png

Googling this error has failed me in terms of finding a solution.

If I do not set a password / encrypt then the installer does function. Any ideas are places to start to evade this error?

This is on Win 8.1 with R 3.4.3 and Rstudio. All packages are up to date. Let me know if you need more information.

R v3.4.2 not working with RInno- possibly a CRAN issue

Currently R version 3.4.2 cannot be used as a possible version.

It looks like this is a CRAN issue with the release of 3.4.3 as 3.4.2 it's not listed on their site as a previous release, but I'm curious if this is a hiccup or a common occurrence

Error
in get_R(app_dir, R_version) :
That version of R (v3.4.2) does not exist.

latest_R_version <- unique(stats::na.omit(stringr::str_extract(readLines("https://cran.rstudio.com/bin/windows/base/", 
                                                                         warn = F), "[1-3]\\.[0-9]+\\.[0-9]+")))
old_R_versions <- stats::na.omit(stringr::str_extract(readLines("https://cran.rstudio.com/bin/windows/base/old/", 
                                                                warn = F), "[1-3]\\.[0-9]+\\.[0-9]+"))

Output:

 latest_R_version
[1] "3.4.3"
old_R_versions
 [1] "3.4.1"  "3.4.0"  "3.3.3"  "3.3.2"  "3.3.1"  "3.3.0"  "3.2.5"  "3.2.4"  "3.2.3"  "3.2.2"  "3.2.1"  "3.2.0"  "3.1.3"  "3.1.2"  "3.1.1" 
[16] "3.1.0"  "3.0.3"  "3.0.2"  "3.0.1"  "3.0.0"  "2.15.3" "2.15.2" "2.15.1" "2.15.0" "2.14.2" "2.14.1" "2.14.0" "2.13.2" "2.13.1" "2.13.0"
[31] "2.12.2" "2.12.1" "2.12.0" "2.11.1" "2.11.0" "2.10.1" "2.10.0" "2.9.2"  "2.9.1"  "2.9.0"  "2.8.1"  "2.8.0"  "2.7.2"  "2.7.1"  "2.7.0" 
[46] "2.6.2"  "2.6.1"  "2.6.0"  "2.5.1"  "2.5.0"  "2.4.1"  "2.4.0"  "2.3.1"  "2.3.0"  "2.2.1"  "2.2.0"  "2.1.1"  "2.1.0"  "2.0.1"  "2.0.0" 
[61] "1.9.1"  "1.8.1"  "1.7.1"  "1.6.2"  "1.5.1"  "1.4.1"  "1.3.1"  "1.2.2"  "1.0.0" 
attr(,"na.action")
 [1]   1   2   3   4   5   6   7   8   9  10  11  12  13  14  15  16  17  18  19  20  21  22  87  93  94  95  96  97  98  99 100 101 102
attr(,"class")
[1] "omit"

sessionInfo()
R version 3.4.2 (2017-09-28)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows >= 8 x64 (build 9200)

Opinion about continuous installation

The package(v.0.1.0) did a great job. In the continuous installation option, it would be useful that the app sync to the online repository when the internet available. Otherwise, the app will start without updating if the internet unavailable. Thanks

Inno Setup Script (.iss) Writes Files Without Periods/Dots

I have been compiling my app with the R packages already in the library folder before I call on compile_iss(). I noticed that my app failed to start because it couldn't find data.table, which turns out was due to an error in the Inno Setup Script. In my example below, you can see that some files that contain dots (.) in their name from the "Source Directory"do not get written with the dots in the "Destination Directory". Although I manually corrected the error when it came to data.table, I still found that this issue occurs with many other files and packages. Is this a bug within the compile_iss function? I would hate to manually search and replace these errant lines.

Example:
image

does it uses Rportable or Normal R

When I use the parameter include_r = TRUE

Does it installs the Rportable or NormalCRAN R or MRANR. Which R does it use and does it impact the authentication of the user.

Please I want to know it. Because if Authentication doesn't matter I would Always want to use MRAN R which is faster else I would normally use Rportable.

Warning message when running create_app()

I get the following warning message when running create_app() from the minimal example.

create_app(app_name = "Your appname", app_dir = "app")
Warning message:
In data.row.names(row.names, rowsi, i) :
  some row.names duplicated: 270,276,279,288 --> row.names NOT used

RInno: 0.2.0
R: 3.4.3
RStudio: 1.0.143
OS: Windows 7

Rscript exe Path

The R executable is not found when launching a newly installed app if R is not located in C:/Program Files/.

Startup failed with error(s): missing value where TRUE/FALSE needed

I was able to use the example app to install on my Desktop (my organization doesn't allow anything installed on Program Files or even My Documents). But when I double-click the shortcut to the desktop app I get a startup error about missing value where TRUE/FALSE needed.
Below is the error log from the example app. Any idea what is happening here? I'm running Windows 7 on 64-bit machine. I used the include_R=TRUE and include_R=FALSE and neither one made a difference.

library paths:
... C:/Users/e525902/Desktop/Your appname/library
... C:/R/R-3.4.0/library
working path:
... C:/Users/e525902/Desktop/Your appname
Loading required package: methods
Warning message:
package 'jsonlite' was built under R version 3.4.3
Warning message:
package 'devtools' was built under R version 3.4.3
Warning message:
package 'httr' was built under R version 3.4.3
ensuring packages: jsonlite, shiny, magrittr

Pinging www.google.com [172.217.5.196] with 32 bytes of data:
Reply from 172.217.5.196: bytes=32 time=5ms TTL=46

Ping statistics for 172.217.5.196:
Packets: Sent = 1, Received = 1, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 5ms, Maximum = 5ms, Average = 5ms
Startup failed with error(s):

missing value where TRUE/FALSE needed

Option for a standalone UI

The package does a great job at what it is designed for (hides complexity of packaging R Shiny standalone app). It would be great to add to it option to ask for a standalone UI, instead of using a browser tab/window. The possible approaches I can think of, from the easiest to the most difficult, are:

  1. use Chrome with --app=URL switch, and make it install system-wide if not avail, like R or Pandoc are now; beware: Chrome is apparently dropping support for the stand-alone apps,
  2. in a browser-indpendent fashion plug-in JavaScript like window.open(APP_URL, APP_NAME, "menubar=no,toolbar=no,location=no") in some point, but also make sure that the default like previously opened tabs, or home page do not open (and are not lost for when user re-opens the browser)
  3. use portable UI solution like previously ChromePortable (discontinued and problematic), or, better, Electron

exe files missing after compiling

I have a dependency on an command line tool executable .exe that is called from shiny. RInno transfers everything really nicely... except any .exe files. Any thoughts on a fix?

copy_installation() function default arg

Calling copy_installation() w/o an input parameter results in this error:
Error in options(RInno.app_dir = app_dir) :
argument "app_dir" is missing, with no default

If it's supposed to default to getwd() for app_dir, shouldn't it be possible to run it w/o including that argument?

continuous installation with private repositories

Hello Jon,
I've created a continuous installation .exe file of an app I'm developing, using a github repository. It worked, and updated successfully. I had to make one change to the vignette code, however. Putting the apps name in the 'pkgs' argument would throw an error. So I moved it to the remotes argument. With that the app installed and launched. The code for creating the app looks like this:

create_app(
  app_name     = "AppInventarioNativas",
  app_repo_url = "https://github.com/sollano/AppInventarioNativas",
  pkgs         = c("shiny", "DT", "formattable", "readxl", "plyr", "tidyr","dplyr", "ggplot2", "lazyeval", "ggdendro","ggthemes","xlsx"),
  remotes      = "sollano/AppInventarioNativas",
  app_icon     = "LAB_logo.ico",
  setup_icon   = "LAB_logo.ico",
  publisher    = "Treelab ufvjm",
  pub_url      = "http://gorgens.wixsite.com/treelab",
  dir_out      = "exe_folder"
)

But, If I use the same code to create another .exe , plus the auth_user and auth_pw arguments using my account credentials, after making that repository private, the app does not run. It throws the error "startup failed with error(s): there is no package called "AppInventarioNativas" ". It does that after loading all the necessary packages.

In the error log, I can see that the the app fails when it tries to download from my private repository:

Error in packageVersion(config$appname[[1]]) : 
  package 'AppInventarioNativas' not found
Downloading GitHub repo sollano/AppInventarioNativas@master
from URL https://api.github.com/repos/sollano/AppInventarioNativas/zipball/master
Installation failed: Not Found (404)

But here's the thing: If I manually install the app on my computer via the main R GUI or RStudio, the .exe updates the app, and launches it normally, but does not add it to apps library folder like it should.

I'll make the repo public again, so you can check it out if you need to. I'm sure I am missing something here.

Thanks again for the great package!

LOGIN PAGE

Is there a way to build a login page in RINNO.

I am not talking about security but at least a simple login page. Can we do it anyhow???

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.