{"id":13705413,"url":"https://github.com/derryleng/Shiny_Desktop_App","last_synced_at":"2025-05-05T16:32:28.356Z","repository":{"id":156810838,"uuid":"243766080","full_name":"derryleng/Shiny_Desktop_App","owner":"derryleng","description":"Deploy your R Shiny app(s) locally on Windows","archived":false,"fork":false,"pushed_at":"2024-03-08T11:16:09.000Z","size":35,"stargazers_count":51,"open_issues_count":2,"forks_count":13,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-11-13T13:37:57.196Z","etag":null,"topics":["browser","deploy","desktop","installer","local","portable","r","shiny","standalone","windows"],"latest_commit_sha":null,"homepage":"","language":"Batchfile","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/derryleng.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2020-02-28T13:15:18.000Z","updated_at":"2024-11-12T13:51:18.000Z","dependencies_parsed_at":"2024-01-17T08:45:01.123Z","dependency_job_id":"59cd1a9a-d57c-48b9-b7e9-4a41e8631a76","html_url":"https://github.com/derryleng/Shiny_Desktop_App","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/derryleng%2FShiny_Desktop_App","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/derryleng%2FShiny_Desktop_App/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/derryleng%2FShiny_Desktop_App/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/derryleng%2FShiny_Desktop_App/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/derryleng","download_url":"https://codeload.github.com/derryleng/Shiny_Desktop_App/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252533976,"owners_count":21763692,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["browser","deploy","desktop","installer","local","portable","r","shiny","standalone","windows"],"created_at":"2024-08-02T22:00:40.484Z","updated_at":"2025-05-05T16:32:28.086Z","avatar_url":"https://github.com/derryleng.png","language":"Batchfile","funding_links":[],"categories":["Batchfile"],"sub_categories":[],"readme":"# Deploy Shiny app(s) locally on Windows\n\nUse this repo as a template for deploying Shiny apps as standalone Windows desktop applications.\n\n- Copy in Shiny apps (each in a separate folder) - see **app** and **app2** folders as example.\n- Optionally bundle in a portable R installation ([see below](#bundle-a-portable-r-installation)).\n- Optionally bundle in a web browser ([see below](#bundle-a-portable-web-browser)).\n- Optionally package as installer executable ([see below](#create-installer-executable)).\n- Double click run.bat to select and launch an app.\n\n## Bundle a portable R installation\n\nThere are two options:\n\n1. Install [R Portable](https://sourceforge.net/projects/rportable/), then copy the contents of **R-Portable\\App\\R-Portable\\\\** into the **R** folder.\n2. Install a fresh installation of R (to avoid including packages the end-user may not use) and copy into the **R** folder.\n\nPut any package dependencies in **req.txt** one per line, these will be loaded in **run.R** or installed if missing on first run.\n\n## Bundle a portable web browser\n\nDownload and install [Google Chrome Portable](https://portableapps.com/apps/internet/google_chrome_portable), then copy the contents of **GoogleChromePortable\\App\\Chrome-bin\\\\** into the **chrome** folder.\n\nOther suitable browsers may be also be used, but make sure to change *browser_path* in **run.R**.\n\n## Create installer executable\n\nSee setup.iss for an example compilation script using [Inno Setup](https://www.jrsoftware.org/isinfo.php).\n\nMake sure to generate a new AppId and change the name, version, etc.\n\n## Extra tips\n\n### Terminating app on window close\n\nTo allow the app to terminate when the browser window is closed, the following should be added to the *server* function:\n\n\u003e Note that *session* must be added as an argument to the *server* function\n\n``` R\nserver \u003c- function(input, output, session) {\n\n  ...\n\n  session$onSessionEnded(function() {\n    stopApp()\n  })\n\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fderryleng%2FShiny_Desktop_App","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fderryleng%2FShiny_Desktop_App","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fderryleng%2FShiny_Desktop_App/lists"}