* Fix tsconfig scopes affecting html.js
Since it's quite hard to use a DOM library type there, remove the type
entirely.
* Remove environment variables check
Nothing is using them anymore. It can be added back if needed later.
* Refactor Texture Packer downloading
Refactor local-config.js tasks file into a generic "environment"
category consisting of checking if Java is installed, downloading the
runnable Texture Packer if it's not yet downloaded and copying the local
configuration template; update README accordingly.
* Prepare environment only at postinstall
Remove environment.prepare task from default build pipelines, add a
postinstall script that calls the task, using environment.js as the
gulpfile to speed it up.
* Remove "docs" tasks and types generation script
Remove tasks from docs.js as they are unlikely to do anything meaningful
nowadays. Also remove the buildTypes script as it doesn't work anymore.
A better solution will be provided in the future.
* Simplify some globs
Use additional gulp.src options instead of specifying more or complex
globs.
* Extract built-temp location to a variable
Add the src/js/built-temp directory as a new variable in config.js,
replace all existing references to built-temp with this variable.
* Switch to npm in electron/
May change resolved package versions.
* Remove redundant electron-notarize dependency
The number of dependencies stays the same. Only direct mention in
package.json is removed.
* Assume Node.js 22.x and clean up dependencies
Targeting Node.js 22.x allows using the new fs.glob* functions, which
can replace the glob module. It is still downloaded as there are other
packages using it, but is no longer included in devDependencies.
Also remove @types/filesystem, as this API is not used anywhere in the
code, it is non-standard and some of it was removed from Chromium. Was
likely used with Cordova for YORG.io 3 mobile support.
* Update linting stack
Install the latest versions of the following packages:
- @eslint/js (^9.24.0)
- eslint (^9.24.0)
- typescript-eslint (^8.29.1)
and remove packages that are no longer used:
- @types/eslint__js
- yarn
Config files were not modified.
* Switch root package to npm
npm is able to resolve packages using yarn.lock as a resolution hint.
Note that files other than those included in this commit are
intentionally kept outdated, as they may need a bigger change.
Can have minor effect on game appearance, most importantly the removal
of letter-spacing by default. Styles are now much lighter though.
Changes all keybinding code to use kbd instead of code as well.
* Migrate Electron wrapper to ESM
Use ESM syntax for main process, move some fs usages to fs.promises,
switch to import.meta.url/import.meta.dirname to handle file paths;
clean up redundant code.
* Add TypeScript support to Electron wrapper
The support is very basic, tsc is used to transpile code. Build scripts
are modified to not copy any Electron code other than preload.cjs and
use an extremely cursed setup to call the TypeScript compiler.
* [TS] Rename platform/storage
* Rewrite Electron wrapper
MVP, missing some features from the old wrapper and most planned
features. Some of the functionality hasn't been verified.
Adds 'await' to ensure the download will be complete.
Without this the download might never complete. This issue occurred on a Linux OS (which seem to handle file streams a bit different than some other OSs).
Effects of not fixing this are that the java execution following this download fails for funny "corrupted jar" and other reasons - depending on the size and content of the incomplete jar file.
Prettier only takes the root .gitignore into account, which leads to
formatting of auto-generated files. Moving ignore patterns into the root
.gitignore file makes Prettier follow them and cleans up the workspace.
Many configuration files in this repository were created a long time
ago, then were modified as problems occurred. Now that there is
TypeScript support, it makes sense to clean up this mess, at least by
making small steps. This configuration is based on strict settings, but
most of these are currently disabled - otherwise it would be too hard to
work with existing JavaScript code. The downside of this change is
pollution of files with warnings and errors, even though they are valid.
- ESLint/TypeScript upgraded
- TS configuration is now shared between arbitrary Node scripts, Gulp
files and the Electron wrapper
- A few eslint-disable comments are removed
* Update Electron dependencies
This will break some mods and a few things were deprecated, but the
Electron wrapper will be replaced anyway.
* Add macOS and arm64 packaging tasks
As @chunkybanana has tested the general approach to building shapez on
macOS, I can now add these tasks. Aside from that, now there are tasks
to build for the 64-bit ARM variant of each system and a task that
builds packages for all platforms and architectures at once. A bug where
localConfig wasn't created when building for the first time was also
fixed.
* Remove ad support, analytics and Wegame leftovers
The game may be somewhat broken in a few places, but it doesn't matter
for now. This is still not the end.
* Remove Steam SSO and demo stuff
Steam SSO is completely removed, a few things from demo like simplified
level sets are gone as well. Puzzle DLC on the other hand is now always
"owned" and will ask for a token to log in.
Removes
* Use shapez dialogs for Puzzle DLC token input
Yes, this sucks *a lot*. But it's a temporary measure, trust me :P
* Simplify HTML tasks
Removes the web (demo) index.html page and makes HTML tasks independent
of the build variant. This might not be the best solution, but it works
for now.
* Unify the version source
Changes the development config to use version from package.json and
makes the production config use the same utility function. Also removes
the version file as it's no longer needed.
* Remove some Steam references from build process
Removes files needed to publish the game on Steam and related tasks that
can be only used by the developer anyway. Only the build process is
affected, the actual game part still supports Steam integration.
* Refactor/add packaging tasks
Adds new Gulp tasks to create a distributable package of the game. A
task for macOS is not provided because signing needs to be figured out
first. Package creation tasks are also aliased in package.json for
future usage in external tools or CI. Aside from that, alternative
methods of downloading the libGDX Texture Packer are dropped.