create_app.Rd
This function manages installation and app start up. To accept all defaults, just provide app_name
. After calling create_app
, call compile_iss
to create an installer in dir_out
.
create_app(app_name = "myapp", app_dir = getwd(), dir_out = "RInno_installer", pkgs = c("jsonlite", "shiny", "magrittr"), pkgs_path = "bin", repo = "https://cran.rstudio.com", remotes = "none", locals = NULL, app_repo_url = "none", auth_user = "none", auth_pw = "none", auth_token = github_pat(), user_browser = "electron", include_R = FALSE, include_Pandoc = FALSE, include_Chrome = FALSE, include_Rtools = FALSE, R_version = paste0(">=", R.version$major, ".", R.version$minor), Pandoc_version = rmarkdown::pandoc_version(), Rtools_version = "3.5", overwrite = TRUE, force_nativefier = TRUE, nativefier_opts = c(), ...)
app_name | The name of the app. It will be displayed throughout the installer's window titles, wizard pages, and dialog boxes. See [Setup]:AppName for details. For continuous installations, |
---|---|
app_dir | Development app's directory, defaults to |
dir_out | Installer's directory. A sub-directory of |
pkgs | Character vector of package dependencies. Remote development versions are supported via |
pkgs_path | Default location inside the app working directory to install package dependencies This defaults to |
repo | Default repository to install CRAN package dependencies. Defaults to |
remotes | Character vector of GitHub repository addresses in the format |
locals | Character vector of local package dependencies. Deprecated as of v1.0.0. Use |
app_repo_url | Repository address for continuous installations in the format |
auth_user | Bitbucket username. It is recommended to create a read-only account for each app. Support for OAuth 2 and tokens is in the works. |
auth_pw | Bitbucket password matching the above username. |
auth_token | To install from a private Github repo, generate a personal access token (PAT) in https://github.com/settings/tokens and supply to this argument. This is safer than using a password because you can easily delete a PAT without affecting any others. |
user_browser | Character for the default browser. Options include "chrome", "firefox", and "ie." |
include_R | To include R in the installer, |
include_Pandoc | To include Pandoc in the installer, |
include_Chrome | To include Chrome in the installer, |
include_Rtools | To include Rtools in the installer, |
R_version | R version to use. Supports inequalities. Defaults to: |
Pandoc_version | Pandoc version to use, defaults to: pandoc_available. |
Rtools_version | Rtools version to include. For more information, see Building R for Windows. |
overwrite | Logical. Should existing installation files be overwritten? See |
force_nativefier | Boolean. Defaults to true and re-builds UI. If false, the UI is not rebuilt. |
nativefier_opts | Character vector. Extra options to pass to nativefier when |
... | Arguments passed on to |
Creates the following files in app_dir
:
Icons for installer and app, setup.ico and default.ico respectively.
Files that manage app start up, utils/package_manager.R, utils/ensure.R, and utils/launch_app.R.
First/last page of the installer, infobefore.txt and infoafter.txt.
Batch support files, utils/wsf/run.wsf, utils/wsf/js/run.js, utils/wsf/js/json2.js, utils/wsf/js/JSON.minify.js.
A configuration file, config.cfg. See create_config
for details.
A batch file, app_name.bat. See create_bat
for details.
An Inno Setup Script, app_name.iss.
get_R
, copy_installation
, create_config
, create_bat
, directives_section
, setup_section
, languages_section
, tasks_section
, files_section
, icons_section
, run_section
, and code_section
.
# NOT RUN { create_app('myapp') create_app( app_name = 'My AppName', app_dir = 'My/app/path', dir_out = 'wizard', pkgs = c('jsonlite', 'shiny', 'magrittr', 'xkcd'), include_R = TRUE, # Download R and install it with the app R_version = "2.2.1", # Old version of R privilege = 'high', # Admin only installation default_dir = 'pf') # Program Files # }