Skip to content

diracesea/desktop

 
 

Repository files navigation

TurboWarp Desktop

TurboWarp as a desktop app.

If you're looking for downloads, head to: https://desktop.turbowarp.org/

Licensed under the GPLv3.0. See LICENSE for more information.

Parts of this repository are based on LLK/scratch-desktop.

Website

The website source code is in the docs folder.

App Architecture

Due to TurboWarp's rather unique security requirements (the existence of custom extensions), our desktop app is more complicated than Scratch's.

  • src-main is what runs in Electron's main process. There is no build step; this code is included as-is.
  • src-renderer-webpack runs in an Electron renderer process to make the editor work. This is built by webpack as dist-renderer-webpack.
  • src-renderer also runs in an Electron renderer process. This is used for things like the privacy policy window where webpack is completely unnecessary.
  • src-preload runs as preload scripts in an Electron renderer process. They export glue functions to allow renderer and main to talk to each other in a somewhat controlled manner.
  • dist-library-files and dist-extensions contain additional static resources managed by manual fetch scripts.

We use submodules, so clone using git clone --recursive https://github.com/TurboWarp/desktop turbowarp-desktop.

Installl dependencies with npm ci and download extra files like the packager and library files with npm run fetch.

Build the webpack portions with npm run webpack:compile or npm run webpack:watch.

For development, use npm run electron:start.

For development using the correct app ID, use npm run electron:package:dir and start the unpacked version in dist.

For final production builds, use electron-builder CLI.

Advanced customizations

TurboWarp Desktop lets you configure custom JS and CSS without rebuilding the app.

Find TurboWarp Desktop's data path by using the list below or by clicking "?" in the top right corner, then "Desktop Settings", then "Open User Data", then opening the highlighted folder.

  • Windows (except Microsoft Store): %APPDATA%/turbowarp-desktop
  • Microsoft Store: Open %LOCALAPPDATA%/Packages, find the folder with the word TurboWarpDesktop in it, then open LocalCache/Roaming/turbowarp-desktop
  • macOS: ~/Library/Application Support/turbowarp-desktop
  • Linux (except Snap, Flatpak): ~/.config/turbowarp-desktop
  • Linux (Snap): ~/snap/turbowarp-desktop/current/.config/turbowarp-desktop
  • Linux (Flatpak): ~/.var/app/org.turbowarp.TurboWarp/config/turbowarp-desktop

Create the file userscript.js in this folder to configure custom JS. Create the file userstyle.css in this folder to configure custom CSS. Completely restart TurboWarp Desktop (including all windows) to apply.

Uninstall

See https://desktop.turbowarp.org/uninstall

About

A better offline editor for Scratch 3.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 55.2%
  • HTML 42.8%
  • Shell 1.3%
  • CSS 0.7%