diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..a62c792 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,77 @@ +name: Build distributables + +on: + push: + branches: [main] + pull_request: + workflow_dispatch: + +jobs: + windows: + runs-on: windows-latest + steps: + - uses: actions/checkout@v4 + + - name: Cache CMake FetchContent dependencies + uses: actions/cache@v4 + with: + path: build/_deps + key: win-deps-${{ hashFiles('CMakeLists.txt') }} + + - name: Configure + run: cmake -B build -A x64 + + - name: Build (Release) + run: cmake --build build --target neo-processing -j --config Release + + - name: Locate Release output + id: locate + shell: bash + run: | + if [ -f "build/Release/neo-processing.exe" ]; then + echo "dir=build/Release" >> "$GITHUB_OUTPUT" + else + echo "dir=build" >> "$GITHUB_OUTPUT" + fi + + - name: Upload distributable + uses: actions/upload-artifact@v4 + with: + name: neo-processing-windows + path: ${{ steps.locate.outputs.dir }} + if-no-files-found: error + + linux: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Install build dependencies + run: | + sudo apt-get update + sudo apt-get install -y build-essential cmake git libgtk-3-dev libwebkit2gtk-4.1-dev + + - name: Cache CMake FetchContent dependencies + uses: actions/cache@v4 + with: + path: build/_deps + key: linux-deps-${{ hashFiles('CMakeLists.txt') }} + + - name: Configure + run: cmake -B build + + - name: Build (Release) + run: cmake --build build --target neo-processing -j --config Release + + - name: Assemble distributable + run: | + mkdir -p dist/icons + cp build/neo-processing dist/ + cp icons/app_icon.ico icons/app_icon_small.ico dist/icons/ + + - name: Upload distributable + uses: actions/upload-artifact@v4 + with: + name: neo-processing-linux + path: dist + if-no-files-found: error diff --git a/AGENTS.md b/AGENTS.md index 3dd5438..d19edb8 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -19,7 +19,9 @@ The whole product is a single C++ executable that: that local server (WebView2 on Windows, WebKitGTK on Linux). There is no separate backend process and no external network dependency at -runtime. +runtime — the only optional exception is choosing an online p5.js build from +the Libraries panel, which loads that build from a CDN (see "Libraries" +below). The default, bundled build keeps the app fully offline. ## Architecture @@ -55,7 +57,10 @@ runtime. version, url, isLocal }`); see the Libraries section below. - `script.js` — all UI logic: editor setup, menus, file open/save, panel splitter, the sketch runner, and the capture/fullscreen controls. - - `style.css` — styling. + - `style.css` — styling. The `html` element is set to `zoom: 0.8` so the app + starts at 80% of its natural size (more editor/preview space in the same + window); this scales fonts, paddings, and controls together instead of + tuning each dimension by hand. - `libs/` — vendored third-party JS (Ace editor, p5.js). These are committed. The bundled p5 version is declared once as `P5_VERSION` in `script.js`, which drives both the version label and the `