1
0
mirror of https://github.com/tobspr/shapez.io.git synced 2025-12-11 09:11:50 +00:00
Commit Graph

179 Commits

Author SHA1 Message Date
Даниїл Григор'єв
9906397170
Build tools cleanup pass (#81)
* 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.
2025-06-19 04:51:34 +03:00
Даниїл Григор'єв
36a3ae2da9
Do not compress translation files
Remove the compressjson loader and related defines in webpack config.
Also remove the remaining lz-string usages in the project and a local
copy.
2025-06-14 06:02:58 +03:00
Даниїл Григор'єв
06cfc3d29a
Remove unused G_HAVE_ASSERT define
Not used anywhere except exposing BUILD_OPTIONS for mods.
2025-06-14 04:55:15 +03:00
Даниїл Григор'єв
75e306ec59
Migrate from Yarn Classic to npm (#65)
* 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.
2025-04-10 23:22:03 +03:00
Даниїл Григор'єв
5bbbcceb18
Remove unused build pipeline code 2025-04-08 14:18:20 +03:00
Даниїл Григор'єв
c265145c19
Clean up SCSS stylesheets
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.
2025-04-08 14:17:16 +03:00
Даниїл Григор'єв
0f7201c232
Remove unused build variants
Only remove a small amount of code, other changes to build variants are
pending.
2025-04-08 14:15:20 +03:00
Даниїл Григор'єв
6695aa0fa0
Remove most of "preloader" code (#60)
Make the build process less complicated and reduce scatter
of renderer source code.
2025-04-06 23:13:13 +03:00
Даниїл Григор'єв
c836589d9b
Rewrite the Electron wrapper (#47)
* 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.
2025-03-21 16:30:13 +02:00
Даниїл Григор'єв
7dac0baa6b
Merge pull request #39 from tobspr-games/dengr1065/textual-game-state-work
Basic support for JSX/TSX in GameStates
2024-09-22 11:21:26 +03:00
Ecconia
241f166989
Fix runnable-textpacker.jar download
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.
2024-08-29 22:16:51 +02:00
Даниїл Григор'єв
3a20244e38
Use @ exclusively for root imports
Remove "root" resolve alias and now-redundant jsx-runtime alias.
2024-07-21 01:38:08 +03:00
Даниїл Григор'єв
ee11931c9f
Resolve @/jsx-runtime in webpack
TypeScript compiler on its own will only inject this import, but not
resolve it. The bundler is supposed to resolve the import, so just do
that.
2024-07-11 12:52:03 +03:00
Даниїл Григор'єв
f5d8b73d8a
Remove FTP tasks 2024-06-20 19:48:57 +03:00
Даниїл Григор'єв
a7ec1e53bf
Remove more unused styles 2024-06-20 19:43:59 +03:00
Даниїл Григор'єв
903b196e1e
Remove unused webpack files 2024-06-20 16:05:06 +03:00
Даниїл Григор'єв
5ff15f3029
Apply formatting to gulp 2024-06-20 13:00:58 +03:00
Даниїл Григор'єв
392b4cad13
Merge .gitignore files
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.
2024-06-20 12:50:37 +03:00
cody-ferguson
168e0bcb6d
Fix import assertion 2024-06-19 18:05:46 -05:00
cody-ferguson
894ceab854 Remove folders and steam stuff 2024-06-19 17:12:08 -05:00
cody-ferguson
6662cb2694 Remove all references of "G_IS_STANDALONE" 2024-06-19 13:47:50 -05:00
Даниїл Григор'єв
60b2727b42
Merge pull request #30 from tobspr-games/dengr1065/eslint-tsc-revamp
Redo ESLint and TypeScript configuration
2024-06-18 18:27:18 +03:00
EmeraldBlock
b4bbfcb4f0 remove mod_examples 2024-06-18 04:14:21 -05:00
Даниїл Григор'єв
d8f378d7e1
Redo ESLint and TypeScript compiler config
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
2024-04-27 00:23:34 +03:00
EmeraldBlock
dac3a6b935 improve dev watching 2024-04-24 21:19:31 -05:00
EmeraldBlock
39b7e6cb59 Squashed commit of the following:
commit 176343785eea110e529f26027bf864ae04068384
Author: EmeraldBlock <yygengjunior@gmail.com>
Date:   Fri Dec 8 23:03:51 2023 -0600

    update readme

commit 8c1c3a0c47f5125126cb00d32a48f4f9344a3fb3
Author: EmeraldBlock <yygengjunior@gmail.com>
Date:   Fri Dec 8 23:00:05 2023 -0600

    fix bugs

commit ea881e68c693a447e0698a3a6e7cfb1f25ccb6cc
Author: EmeraldBlock <yygengjunior@gmail.com>
Date:   Fri Dec 8 22:46:46 2023 -0600

    expose all tasks with old api

commit fa6d7a3920ff573eadb61425cc077f0e00406164
Author: EmeraldBlock <yygengjunior@gmail.com>
Date:   Fri Dec 8 21:51:20 2023 -0600

    switch to exported gulp tasks

commit 348b19a0171e65400bcd434cf7b7432f3488a411
Author: EmeraldBlock <yygengjunior@gmail.com>
Date:   Mon Nov 20 22:55:38 2023 -0600

    parallelize dev build

commit 56de73e2d18d20e5ea7202afc021573a746e5012
Author: EmeraldBlock <yygengjunior@gmail.com>
Date:   Mon Nov 20 20:44:10 2023 -0600

    use promises in gulpfile

commit 6ab54372482f26acb4769428eefbdc48240a12a1
Author: EmeraldBlock <yygengjunior@gmail.com>
Date:   Mon Nov 20 20:33:36 2023 -0600

    make java -version print again

commit b0e4cf57bdc404bb3b0e45b7b233d5f7648c800e
Author: EmeraldBlock <yygengjunior@gmail.com>
Date:   Mon Nov 20 20:14:13 2023 -0600

    use promises for gulp tasks
2024-04-24 17:57:30 -05:00
Danyil Hryhoriev
f2596ef845 Remove cache busting
Cache busting is not required in standalone context.
2024-04-20 13:23:02 +03:00
Даниїл Григор'єв
e10edca73e
Add more packaging tasks and fix localConfig not being created (#22)
* 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.
2024-04-16 21:50:36 +03:00
Даниїл Григор'єв
aa49f063c3
Remove ads, analytics and Steam SSO, simplify HTML tasks (#21)
* 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.
2024-04-16 10:25:16 +03:00
Даниїл Григор'єв
c2855d528d
Slight improvements for the build process (#19)
* 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.
2024-04-14 19:03:27 +03:00
Bagel03
81df743334
Add support for JSX
Allows usage of JSX across the codebase, JSX is turned into regular HTML elements.
2023-10-24 16:58:53 +03:00
Даниїл Григор'єв
6deee07a80
Remove GOG/Wegame source roots 2023-10-06 11:13:26 +03:00
Bagel03
1eb264716a Add ts support 2023-03-04 21:32:47 -06:00
EmeraldBlock
bd781f8750 build fixes 2023-03-04 21:23:14 -06:00
EmeraldBlock
24ceb6664d ES modules and config refactor
- switches to ES modules in gulp and src
- uses dengr's webpack configs and package.json, with modifications
- removes gulp/package.json
- removes babel stuff
- removes gulp-load-plugins, instead importing gulp plugins manually
- removes unused and trivial packages
- upgrades packages
- uses path/posix, for gulp
- removes __dirname in favor of relative urls
2023-03-04 00:46:55 -06:00
Thomas (DJ1TJOO)
2dc7f963fe
Removed china, wegame, gog and demo (#3)
* Removed build and global variables for china, wegame
* Removed google analitycs
2023-03-04 02:44:19 +02:00
tobspr
b07e04e7b1 Disable GA on shapez for better privacy 2022-10-24 09:54:36 +02:00
tobspr
c77e428ffb Fix darwin builds on gog 2022-07-20 18:16:14 +02:00
tobspr
400ee8e737 Support for GOG 2022-07-18 14:18:02 +02:00
tobspr
4796aec1ff Don't build steam-china on darwin 2022-06-21 14:11:10 +02:00
tobspr
145f734907 Allow playing full version in browser via steam sso 2022-06-20 18:22:23 +02:00
tobspr
0052c30553 Fix gulptasks 2022-06-20 11:24:38 +02:00
tobspr
a065c64baa Also clean build_output on build 2022-06-20 11:18:57 +02:00
tobspr
424a4b8a61 Remove no longer working preload script 2022-06-19 21:18:34 +02:00
tobspr
166b288898 Revert "Fix #1446 (#1447)"
This reverts commit 2d45fa8cd1.
2022-06-19 17:59:32 +02:00
tobspr
1642354f40 Merge branch 'master' of github.com:tobspr/shapez.io 2022-06-19 17:08:38 +02:00
tobspr
3ab5ca99fd 1.5.4 update (polishing + minor rebalancing) 2022-06-19 17:08:35 +02:00
Jasper Meggitt
2d45fa8cd1
Fix #1446 (#1447)
* Fix #1446 by modifying gulp/atlas2json.js

* Clean up gulp/atlas2json.js and add more comments
2022-06-19 16:41:57 +02:00
tobspr
7c77944d43 Multiple preload-adjustments 2022-06-18 17:36:51 +02:00
tobspr
e870317a4f Estimate progress when Content-Length header is missing 2022-06-18 16:47:35 +02:00