4.4 KiB
Managing Files
Importing and exporting files
To save your files outside of the browser:
- Select Download from the menu.
- Choose an option:
- Download Source File — download the active source file.
- Download ROM Image — download the compiled ROM, which can be used in a standalone emulator.
- Download Project as ZIP — download the active project as a zip.
- Download All Changes as ZIP — download all files in the active platform.
- Download Debug Symbols — download the debug symbol file produced by the build for use in an external debugger. This option is only available with certain toolchains like NES.
- Choose a location and save the file.
To import source files back into the browser, select Upload from the menu, choose the file, and click Open.
Renaming, deleting, and adding files
The File submenu acts on the file in the active editor window:
- Revert to Original… — restore the active example to its original state, discarding your edits.
- Rename File… — rename the active source file. If it is the main file, the project reloads under the new name.
- Delete File… — remove the active file from the project after confirming.
- Add Include File… — create a new file and add it to the main file
with the include directive appropriate for the platform's toolchain
(
#includefor C,.includefor assembly, and so on). - Add Linked File… — create a new file and link it into the build
with a
//#linkor;#linkdirective.
See Build Directives for how include and linked files are referenced.
Managing browser storage
Browsers may occasionally delete local files. Select File » Request Local Storage Permissions to ask the browser to keep your files permanently.
Sharing projects
You can share playable links and videos (seven-second animated GIFs) with others. Playable links contain the project code inside the URL, so you can share your work without storing it remotely. Some browsers may not support the resulting URL length.
Sharing a playable link
- From the menu, select Share.
- Select Share Playable Link….
- Select Copy Direct Link to copy the link, or Copy IFRAME Tag to copy an embeddable IFRAME snippet.
- Click Close.
Recording a video
- From the menu, select Share.
- Select Record Video…. The emulator background turns red while recording.
- When the preview appears, right-click it and choose Save Image As… to save the animated GIF.
- Click Close.
Making a cassette audio file
For platforms with cassette support, select Share » Make Cassette Audio… to export the compiled program as an audio (WAV) file that can be loaded from a real or emulated cassette drive. This option is hidden on platforms that don't support it.
Syncing with GitHub
You can import projects from GitHub repositories, publish your projects, and push/pull to repositories you have access to. When you publish or push, the IDE uploads your code and a compiled ROM file.
Connecting your account
- From the menu, select Sync » Sign in to GitHub….
- Enter your GitHub username and password.
To sign out, select Sync » Log out.
Importing a project
- From the menu, select Sync, then Import Project from GitHub….
- Enter the repository URL (for example
https://github.com/username/reponame) and click Import Project.
To leave the project, select Leave Repository from the Project Selector drop-down. Imported repositories appear under Repositories in the same drop-down.
Deleting a local repository
- Select the repository from the Project Selector drop-down.
- Select Sync » Delete Local Repository.
- Type YES to confirm, then select OK.
Publishing a project
- From the menu, select Sync » Publish Project on GitHub….
- Enter a project name and description.
- Choose Public or Private visibility.
- Select a license.
- Click Upload Project. If you aren't signed in you'll be prompted to connect first.
Pushing and pulling changes
- Push: select Sync » Push Changes to Repository…, enter a commit message, then Push Changes.
- Pull: select Sync » Pull Latest from Repository, then OK. All local files are overwritten; there is no merge in the browser.