Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
96a8519
WE'RE REWRITE THIS
UnsignedArduino Jul 18, 2026
0262231
finish cleanup
UnsignedArduino Jul 18, 2026
42ed529
actually finish cleanup
UnsignedArduino Jul 18, 2026
5a1267e
Config loading
UnsignedArduino Jul 18, 2026
fffa3e3
Fill out website template
UnsignedArduino Jul 20, 2026
9937cfa
Set up favicon.ico
UnsignedArduino Jul 20, 2026
30ad433
Fix multiple sources of cache busting
UnsignedArduino Jul 21, 2026
386075e
Successfully build website, add missing __main__.py
UnsignedArduino Jul 22, 2026
6297fdc
Add clear cache flag
UnsignedArduino Jul 22, 2026
10e00d6
Return correct build directory
UnsignedArduino Jul 22, 2026
b54a482
Apply monkey patches in separate file
UnsignedArduino Jul 22, 2026
9c15a90
Refactor to not need shell=True
UnsignedArduino Jul 22, 2026
f8ace6d
Make favicon.ico actually optional in schema
UnsignedArduino Jul 22, 2026
264f685
Update package.json with values from config YAML
UnsignedArduino Jul 22, 2026
c81e42e
Inline binary.js
UnsignedArduino Jul 23, 2026
afcfeee
Inline the favicon
UnsignedArduino Jul 23, 2026
96e8ae1
Update the template
UnsignedArduino Jul 23, 2026
cd77b73
Inline ---simulator.html
UnsignedArduino Jul 23, 2026
805214f
Manually code split out binary.js and ---simulator.html for slightly …
UnsignedArduino Jul 23, 2026
b932290
Add singlefile mode in Vite template
UnsignedArduino Jul 23, 2026
03fcb5a
Can build to static singlefile
UnsignedArduino Jul 23, 2026
11b7c93
Don't delete favicon.ico and break cache
UnsignedArduino Jul 23, 2026
7e224eb
Fix black border to be equal in Vite template
UnsignedArduino Jul 24, 2026
cbd1c1b
Update to use uv
UnsignedArduino Jul 24, 2026
a7daf64
Move out argparse stuff into cli.py
UnsignedArduino Jul 24, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
.venv
node_modules
.idea
__pycache__/
*.pyc
examples/*
!examples/*.yaml
!examples/*.png
.idea
95 changes: 0 additions & 95 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,98 +1,3 @@
# MakeCode Arcade to App

Convert your MakeCode Arcade games into a standalone offline executable!

## Install

### Dependencies

* Python (earliest version tested with is 3.12)
* Node (earliest version tested with is v20)
* Rust (earliest version tested with is 1.86) if building with Tauri

### Steps

1. Clone repo.
2. Create virtual environment and install Python dependencies in [
`requirements.txt`](requirements.txt) into it.
3. Install JavaScript dependencies with `yarn`.

## Usage

Quick start:

1. Create a YAML configuration file. See
[`Racers to Electron.yaml`](examples/Racers%20to%20Electron.yaml) for an
example.
2. Run the script with `python src/main.py "examples/Racers to Electron.yaml"`.

### Input

A YAML configuration file is used. Check out the examples in the
[`examples`](examples) directory to see how it's used, as it's
self-explanatory. Pass it as the first positional argument to the script.

### Output

The script will print the path to the output directory, which changes depending
on the output specified.

#### Static files

If the output is set to `static`, you will get HTML, CSS, and JS files that you
can serve from a web server. (maybe on your own website?) The script will print
out something like this:

```commandline
...
dist/assets/index-D3F42Pqm.js 225.78 kB │ gzip: 70.51 kB
✓ built in 532ms
Done in 1.60s.
2025-05-15 20:28:48,660 - __main__ - INFO - Static website files are at C:\Users\ckyiu\Documents\Projects\MakeCode-Arcade-to-App\examples\Racers\racers-website\dist
2025-05-15 20:28:48,660 - __main__ - INFO - Build finished
```

You will find the HTML, CSS, and JS files at the specified path, where
`index.html` is the entry point.

#### Executable with Electron

If the output is set to `electron`, you will get an executable using the
Electron framework. The script will print out something like this:

```commandline
...
› Artifacts available at: C:\Users\ckyiu\Documents\Projects\MakeCode-Arcade-to-App\examples\Racers\racers-electron\out\make
√ Running postMake hook
Done in 50.25s.
2025-05-15 20:32:22,652 - __main__ - INFO - Electron app executables are at C:\Users\ckyiu\Documents\Projects\MakeCode-Arcade-to-App\examples\Racers\racers-electron\out
2025-05-15 20:32:22,652 - __main__ - INFO - Build finished
```

You will find the directory with the executable and supporting files at the
specified path. (all of those files alongside the executable are needed, so
it's recommended to zip up the entire directory to distribute) You will also
find an installer in the `make` subdirectory.

#### Executable with Tauri (recommended option)

> This is the recommended option due to the small size and standalone nature of
> the executable. (~10 mb single executable with Tauri compared to almost 300
> mb
> in files with Electron)

If the output is set to `tauri`, you will get an executable using the Tauri
framework. The script will print out something like this:

```commandline
...
C:\Users\ckyiu\Documents\Projects\MakeCode-Arcade-to-App\examples\Racers\racers-tauri\src-tauri\target\release\bundle\nsis\Racers v1.3.2_1.3.2_x64-setup.exe

Done in 37.90s.
2025-05-15 23:39:14,612 - __main__ - INFO - Tauri app executables are at C:\Users\ckyiu\Documents\Projects\MakeCode-Arcade-to-App\examples\Racers\racers-tauri\src-tauri\target\release
2025-05-15 23:39:14,612 - __main__ - INFO - Build finished
```

You will find the executable at the specified path. (only the executable is
needed, no supporting files necessary) You will also find installers in the
`bundle` subdirectory.
31 changes: 0 additions & 31 deletions examples/Racers to Electron.yaml

This file was deleted.

31 changes: 0 additions & 31 deletions examples/Racers to Tauri.yaml

This file was deleted.

31 changes: 0 additions & 31 deletions examples/Racers to static files.yaml

This file was deleted.

65 changes: 65 additions & 0 deletions examples/Racers.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
# Example configuration file for MakeCode Arcade to App to compile to static
# HTML, CSS, and JS files

# Config version (single number, incremented if breaking change to schema is
# made)
version: 1

project:
name: Racers
path_friendly_name: racers
description: "Enjoy the high-speed thrills of car racing in MakeCode Arcade!
For the MakeCode Arcade Mini Game Jam #3."
author: Cyrus Yiu
version: 1.3.2
# This is what the window title will be
# This will also be used for the executable file name for Electron outputs
# You can use {NAME} or {VERSION} or {AUTHOR} to substitute the correct
# values
title: "{NAME} v{VERSION}"

inputs:
code:
# Can be share_link, github, or path
type: share_link
value: https://arcade.makecode.com/84426-33815-03715-00484

# code:
# type: github
# value: https://github.com/UnsignedArduino/Racers
# checkout: master

# code:
# type: path
# value: "E:/Racers"

assets:
# Icon is optional but highly recommended, it will be used as the favicon
# and app icon
icon:
# Can be url or path
type: url
value: https://raw.githubusercontent.com/UnsignedArduino/MakeCode-Arcade-to-App/refs/heads/main/examples/Racers%20icon.png

# icon:
# type: path
# value: "./examples/Racers icon.png"

# Path where the build process will take place
build_dir: "./examples/Racers-build"

# You can have multiple outputs
# Currently available options are static, static-singlefile, electron, and
# tauri
outputs:
- type: static
- type: static-singlefile
# - type: electron
# window:
# width: 640
# height: 480
# - type: tauri
# identifier: com.unsignedarduino.racers
# window:
# width: 640
# height: 480
6 changes: 0 additions & 6 deletions package.json

This file was deleted.

25 changes: 25 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"

[project]
name = "mkcd2app"
version = "0.1.0"
description = "Convert MakeCode Arcade games into static websites, Electron, or Tauri apps"
readme = "README.md"
requires-python = ">=3.14"
# We are pinning redun because we monkey patch something
dependencies = [
"pydantic",
"pyyaml",
"redun==0.44.1",
"requests",
"beautifulsoup4",
"pillow",
]

[project.scripts]
mkcd2app = "mkcd2app.main:main"

[tool.hatch.build.targets.wheel]
packages = ["src/mkcd2app"]
4 changes: 0 additions & 4 deletions requirements.txt

This file was deleted.

Loading