Skip to content

Browser changes#39

Open
thomasballinger wants to merge 2749 commits intomasterfrom
endless-web
Open

Browser changes#39
thomasballinger wants to merge 2749 commits intomasterfrom
endless-web

Conversation

@thomasballinger
Copy link
Copy Markdown
Owner

@thomasballinger thomasballinger commented Oct 16, 2022

Pull request just for reference, a nice place to see and annotate the diff.


Note

High Risk
Large, cross-platform CI/release pipeline and build-system changes (CMake/vcpkg packaging, installers, and artifact layout) are prone to breaking builds or releases if any preset/dependency/install rule is off.

Overview
Major CI/CD rebuild: removes AppVeyor, the .winmake SCons wrapper, and Code::Blocks project files, and rewrites GitHub Actions to build/test/package via CMake + vcpkg + Ninja across Linux, Windows (x64/x86 + clang-cl), macOS (x64 + ARM), plus Steam container builds; adds concurrency/permissions hardening, caching, and a dedicated Windows parse-assets/data-parse job.

Build system added: introduces top-level CMakeLists.txt and an extensive CMakePresets.json, adds CPack/NSIS installer packaging for Windows, AppImage packaging flow updated to install-from-CMake outputs, and adds a Doxygen config + CI job to generate API docs.

Project hygiene/community updates: expands .editorconfig and replaces .ecrc with .editorconfig-checker.json, updates codespell ignore lists (incl. new .codespell.words.exclude), adjusts .gitignore/.gitattributes, refreshes issue/PR templates (new wiki template + extra bug-report fields), adds workflow path filters, and introduces a scheduled wiki-sync workflow plus a new browser.yml workflow for Emscripten/AWS deploys.

Written by Cursor Bugbot for commit 52ff73d. This will update automatically on new commits. Configure here.

@thomasballinger thomasballinger temporarily deployed to aws-deploy October 16, 2022 20:43 Inactive
@thomasballinger thomasballinger temporarily deployed to aws-deploy May 29, 2023 20:38 — with GitHub Actions Inactive
@thomasballinger thomasballinger temporarily deployed to aws-deploy May 29, 2023 20:40 — with GitHub Actions Inactive
@thomasballinger thomasballinger temporarily deployed to aws-deploy May 29, 2023 21:03 — with GitHub Actions Inactive
Wedge009 and others added 24 commits October 27, 2025 21:18
…ave his fleet be set instead of randomized (#9933)
…d by the scattered Sestor (#11898)

The marks are removed once the Sestor in that system are destroyed.
… contributing to a faction's strength (#11686)
TomGoodIdea and others added 22 commits February 9, 2026 21:50
* Use the correct method to indicate when thumbnails need to be rechecked
* Avoid possible conflicts when a deferred image is in an unusual folder
…onfirmation dialog when locking gamerules (#12238)
… in-flight missions that aren't offered by a ship (#12278)
…re ignored because no 1x frames exist (#12275)
Add the core changes needed to compile and run Endless Sky under
Emscripten/WebAssembly:

- source/Files.cpp: Hardcode resource/config paths to '/' under Emscripten
- source/main.cpp: Mount IDBFS at /saves for persistent save storage
- source/PlayerInfo.cpp: Sync saves to IndexedDB after save/autosave
- source/LoadPanel.cpp: Sync to IndexedDB after snapshot/delete operations
- source/GameWindow.cpp: Skip resolution warning under Emscripten, add
  printf to ExitWithError for browser console visibility
- Makefile: Web-specific build using emcc, with libjpeg-turbo cross-compile,
  ASYNCIFY for blocking game loop, WebGL2, IDBFS, and all source subdirs

Based on original web port commits by Michał Janiszewski and Thomas Ballinger:
4f8dc37, 0a1597a, 458ea2e, d5e13af, 862875a, c272718
Make the game run without threads under Emscripten:

- source/TaskQueue.cpp: Under __EMSCRIPTEN__, execute async tasks
  synchronously on the calling thread, skip worker thread pool creation,
  and remove mutex usage. This single change replaces the old 12-file
  ES_NO_THREADS approach since all threading now goes through TaskQueue.

- source/audio/Audio.cpp: Load sounds synchronously instead of in a
  background thread. Disable music playback under Emscripten.

- source/audio/Music.cpp: Skip Mp3Supplier/FlacSupplier includes and
  return null from CreateSupplier() under Emscripten, avoiding libmad
  and FLAC++ dependencies.

The Makefile excludes AsyncAudioSupplier.cpp, Mp3Supplier.cpp, and
FlacSupplier.cpp from compilation entirely.

Based on original commits: 2597b58, 4b8fb21
Add the web-specific frontend files:

- endless-sky.html: Shell HTML with loading screen, IndexedDB asset
  caching, plugin support, save upload/download, mobile touch controls
- js/cached-resource.js: IndexedDB-based asset caching with versioning
- js/plugins.js: Plugin management UI for the web build
- js/save-games.js: Save game upload/download functionality
- loading.mp3: Background music for the loading screen
- hash-data.py: Generate content hashes for cache busting
- copy-to-hashed-location.py: Copy files to content-addressed paths
- credits.txt: Add WebAssembly port credits

Based on original commits: 0a1597a, 33c929d, f021f7e, 22d4cf2,
d22e015, da5f15e, 458ea2e, e6eb21b, 5b868ac, b68c917,
0ba92cc
Add GitHub Actions workflow for building the Emscripten/WebAssembly
version in CI.

Based on original commits: d0e5244, 1ef0210, ab64c72, f52f00e
restore-keys: ${{ env.RESTORE_KEYS }}
append-timestamp: 'false'
- name: Adjust version strings
run: ./utils/cd_update_versions.sh
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing shell: bash breaks Windows release build

High Severity

The Adjust version strings step in release_windows_x64 runs ./utils/cd_update_versions.sh without specifying shell: bash. On Windows runners, the default shell is PowerShell, which cannot execute .sh scripts. The equivalent step in cd.yaml for the cd_windows_x64 job correctly includes shell: bash. This will cause the Windows x64 release build to fail.

Fix in Cursor Fix in Web

name: steam-win32-depot
path: |
./install/release/Endless Sky.exe
./install/release/*.dll
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Windows x86 release missing version string adjustment

Medium Severity

The release_windows_x86 job is missing the Adjust version strings step that exists in every other release job (release_appimage_x64, release_windows_x64, release_macos_x64, release_macos_arm). This means Windows x86 releases will ship with incorrect or default version strings. The job is also missing the Find cache keys and Setup ccache steps, suggesting it was incompletely set up.

Fix in Cursor Fix in Web

steam:
value: ${{ jobs.changed.outputs.steam }}
doxygen_config:
value: ${{ jobs.changed.outputs.doxygen_config }}
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing doxygen_config job output breaks CI trigger

Medium Severity

The workflow-level output doxygen_config references jobs.changed.outputs.doxygen_config, but the changed job's outputs section (lines 44–60) never defines doxygen_config. The filter exists in path-filters.yml and is produced by the dorny/paths-filter step, but it's not mapped to a job output. As a result, needs.changed.outputs.doxygen_config is always empty in consuming workflows, so the build_documentation_doxygen job in ci.yml won't trigger when only the Doxyfile changes.

Additional Locations (1)

Fix in Cursor Fix in Web

@@ -0,0 +1,3 @@
{
"Exclude": ["test_datafile.cpp", "\\Shader.cpp$", "Font.cpp", "Mask.cpp"]
}
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed .mp3 exclusion from editorconfig checker config

Medium Severity

The old .ecrc excluded \\.mp3$ from editorconfig checking, but the replacement .editorconfig-checker.json drops this exclusion. The [*] rule in .editorconfig now applies charset = ascii and insert_final_newline = true to all files. When the editorconfig style check runs (triggered by any non-mp3 file change), it will now also check binary .mp3 files in sounds/, which will fail the ASCII charset check.

Fix in Cursor Fix in Web

- Update emsdk from 3.1.24 to 5.0.1 (needed for C++20 support)
- Update GitHub Actions to v4 (checkout, cache, aws-credentials)
- Make sed command in Makefile portable across macOS and Linux
- Restore web build instructions in docs/readme-developer.md
Copy link
Copy Markdown

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.

- name: Extract arm artifact
run: |
cd arm
7z x macos-artifact-arm.zip
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Artifact download paths break macOS universal build

High Severity

The path parameter in actions/download-artifact@v4 specifies a directory, not a file path. Using path: x64/macos-artifact-x64.zip creates a directory named macos-artifact-x64.zip inside x64/, so the actual zip file ends up at x64/macos-artifact-x64.zip/macos-artifact-x64.zip. The subsequent cd x64 && 7z x macos-artifact-x64.zip then tries to extract a directory, not a file, causing the macOS universal binary release job to fail. Same issue applies to the ARM artifact with path: arm/macos-artifact-arm.zip.

Fix in Cursor Fix in Web

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.