1
0
mirror of https://github.com/tobspr/shapez.io.git synced 2025-12-13 02:01:51 +00:00
Commit Graph

40 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
Даниїл Григор'єв
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
cody-ferguson
168e0bcb6d
Fix import assertion 2024-06-19 18:05:46 -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
Даниїл Григор'єв
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
Даниїл Григор'єв
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
Даниїл Григор'єв
6deee07a80
Remove GOG/Wegame source roots 2023-10-06 11:13:26 +03: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
c77e428ffb Fix darwin builds on gog 2022-07-20 18:16:14 +02:00
tobspr
21e37792e0 Minor adjustments 2022-06-06 15:48:21 +02:00
tobspr
737ce41041 Properly write app id 2022-06-06 15:34:19 +02:00
tobspr
b821c7259c refactor steam pipe generation 2022-06-06 15:28:30 +02:00
tobspr
222ea8c261 Merge steam-demo branch 2022-06-06 14:06:09 +02:00
tobspr
50e92bb42f Fix tobspr-osx-sign issues 2022-05-30 07:00:14 +02:00
tobspr
a3a72e95ad MacOS Support 2022-04-13 15:43:58 +02:00
tobspr
c41aaa1fc5
Mod Support - 1.5.0 Update (#1361)
* initial modloader draft

* modloader features

* Refactor mods to use signals

* Add support for modifying and registering new transltions

* Minor adjustments

* Support for string building ids for mods

* Initial support for adding new buildings

* Refactor how mods are loaded to resolve circular dependencies and prepare for future mod loading

* Lazy Load mods to make sure all dependencies are loaded

* Expose all exported members automatically to mods

* Fix duplicate exports

* Allow loading mods from standalone

* update changelog

* Fix mods folder incorrect path

* Fix modloading in standalone

* Fix sprites not getting replaced, update demo mod

* Load dev mod via raw loader

* Improve mod developing so mods are directly ready to be deployed, load mods from local file server

* Proper mods ui

* Allow mods to register game systems and draw stuff

* Change mods path

* Fix sprites not loading

* Minor adjustments, closes #1333

* Add support for loading atlases via mods

* Add support for loading mods from external sources in DEV

* Add confirmation when loading mods

* Fix circular dependency

* Minor Keybindings refactor, add support for keybindings to mods, add support for dialogs to mods

* Add some mod signals

* refactor game loading states

* Make shapez exports global

* Start to make mods safer

* Refactor file system electron event handling

* Properly isolate electron renderer process

* Update to latest electron

* Show errors when loading mods

* Update confirm dialgo

* Minor restructure, start to add mod examples

* Allow adding custom themesw

* Add more examples and allow defining custom item processor operations

* Add interface to register new buildings

* Fixed typescript type errors (#1335)

* Refactor building registry, make it easier for mods to add new buildings

* Allow overriding existing methods

* Add more examples and more features

* More mod examples

* Make mod loading simpler

* Add example how to add custom drawings

* Remove unused code

* Minor modloader adjustments

* Support for rotation variants in mods (was broken previously)

* Allow mods to replace builtin sub shapes

* Add helper methods to extend classes

* Fix menu bar on mac os

* Remember window state

* Add support for paste signals

* Add example how to add custom components and systems

* Support for mod settings

* Add example for adding a new item type

* Update class extensions

* Minor adjustments

* Fix typo

* Add notification blocks mod example

* Add small tutorial

* Update readme

* Add better instructions

* Update JSDoc for Replacing Methods (#1336)

* upgraded types for overriding methods

* updated comments

Co-authored-by: Edward Badel <you@example.com>

* Direction lock now indicates when there is a building inbetween

* Fix mod examples

* Fix linter error

* Game state register (#1341)

* Added a gamestate register helper

Added a gamestate register helper

* Update mod_interface.js

* export build options

* Fix runBeforeMethod and runAfterMethod

* Minor game system code cleanup

* Belt path drawing optimization

* Fix belt path optimization

* Belt drawing improvements, again

* Do not render belts in statics disabled view

* Allow external URL to load more than one mod (#1337)

* Allow external URL to load more than one mod

Instead of loading the text returned from the remote server, load a JSON object with a `mods` field, containing strings of all the mods. This lets us work on more than one mod at a time or without separate repos. This will break tooling such as `create-shapezio-mod` though.

* Update modloader.js

* Prettier fixes

* Added link to create-shapezio-mod npm page (#1339)

Added link to create-shapezio-mod npm page: https://www.npmjs.com/package/create-shapezio-mod

* allow command line switch to load more than one mod (#1342)

* Fixed class handle type (#1345)

* Fixed class handle type

* Fixed import game state

* Minor adjustments

* Refactor item acceptor to allow only single direction slots

* Allow specifying minimumGameVersion

* Add sandbox example

* Replaced concatenated strings with template literals (#1347)

* Mod improvements

* Make wired pins component optional on the storage

* Fix mod examples

* Bind `this` for method overriding JSDoc (#1352)

* fix entity debugger reaching HTML elements (#1353)

* Store mods in savegame and show warning when it differs

* Closes #1357

* Fix All Shapez Exports Being Const (#1358)

* Allowed setting of variables inside webpack modules

* remove console log

* Fix stringification of things inside of eval

Co-authored-by: Edward Badel <you@example.com>

* Fix building placer intersection warning

* Add example for storing data in the savegame

* Fix double painter bug (#1349)

* Add example on how to extend builtin buildings

* update readme

* Disable steam achievements when playing with mods

* Update translations

Co-authored-by: Thomas (DJ1TJOO) <44841260+DJ1TJOO@users.noreply.github.com>
Co-authored-by: Bagel03 <70449196+Bagel03@users.noreply.github.com>
Co-authored-by: Edward Badel <you@example.com>
Co-authored-by: Emerald Block <69981203+EmeraldBlock@users.noreply.github.com>
Co-authored-by: saile515 <63782477+saile515@users.noreply.github.com>
Co-authored-by: Sense101 <67970865+Sense101@users.noreply.github.com>
2022-02-01 16:35:49 +01:00
tobspr
291614cb3c Support for building wegame specific version 2021-05-25 21:29:44 +02:00
tobspr
56214defaf Support for building on non-steam platforms 2021-05-25 13:12:38 +02:00
tobspr
b3d1204d9c Wegame version & DLC Translation in Chinese 2021-05-25 09:19:57 +02:00
Tobias Springer
5a3da57f10 Fix missing dependencies, autoformat 2021-03-14 09:52:15 +01:00
Greg Considine
26b842494f
Achievements (#1087)
* [WIP] Add boilerplate for achievement implementation

* Add config.local.template.js and rm cached copy of config.local.js

* [WIP] Implement painting, cutting, rotating achievements (to log only)

* [WIP] Refactor achievements, jsdoc fixes, add npm script

- Refactor achievements to make use of Signals
- Move implemented achievement interfaces to appropriate
platform folders (SteamAchievements in currently in use
in browser wrapper for testing)
- Fix invalid jsdocs
- Add dev-standalone script to package.json scripts

* Add steam/greenworks IPC calls and optional private-artifact dependency

* Include private artifacts in standalone builds

* Uncomment appid include

* [WIP] Add steam overlay fix, add hash to artifact dependency

* Update electron, greenworks. Add task to add local config if not present

* Add more achievements, refactor achievement code

* Add receiver flexibility and more achievements
- Add check to see if necessary to create achievement and add receiver
- Add remove receiver functionality when achievement is unlocked

* Add achievements and accommodations for switching states
- Fix startup code to avoid clobbering achievements on state switch
- Add a few more achievements

* Add achievements, ids. Update names, keys for consistency

* Add play time achievements

* [WIP] Add more achievements

* Add more achievements. Add bulk achievement check signal

* [WIP] Add achievements. Start savefile migration

* Add achievements. Add savefile migration

* Remove superfluous achievement stat

* Update lock files, fix merge conflict
2021-03-10 07:33:39 +01:00
Tobias Springer
1ee03d7398 Adjustments to support chinese versions 2021-03-09 10:07:19 +01:00
tobspr
c4d709b8e4 Add steampipe files and upgrade electron 2020-09-29 19:07:48 +02:00
LeopoldTal
b9b8592a07
Build, sign, notarise, & upload on OS X (#687)
* sign & notarise darwin package

* upload bundle as github release

* allow unsigned build and full build with release

* deref darwin bundle symlinks only when building on win32

Windows [mangles symlinks](https://github.com/electron/electron-packager/issues/71). Currently we work around this by placing several copies of the frameworks in OS X app bundles (see 1e5aa3867d). However:

- This is invalid: the framework toplevel must [only contain symlinks](https://developer.apple.com/library/archive/documentation/MacOSX/Conceptual/BPFrameworks/Concepts/FrameworkAnatomy.html). `codesign` [refuses to sign](https://stackoverflow.com/questions/25969946/osx-10-9-5-code-signing-v2-signing-a-framework-with-bundle-format-is-ambiguou) this invalid structure.

- It seriously bloats the bundle.

Since there's no fix for the Windows misbehaviour, keep the workaround, but only when cross-building on win32 for darwin; and log a warning.
2020-09-27 23:14:43 +02:00
Bjorn Stromberg
997fabd52c
Remove more unused dependencies (#527)
* Remove more unused dependencies

* Remove gulp-jsbeautifier
2020-08-07 09:16:23 +02:00
tobspr
0d74af92a7 Further mac os fixes 2020-07-06 15:29:17 +02:00
tobspr
1e5aa3867d Allow building mac on windows, closes #355 2020-07-06 15:08:17 +02:00
tobspr
6c6ad6af22 Update standalone build script 2020-07-06 08:14:44 +02:00
tobspr
2c0f0f2152 Fix standalone build 2020-06-17 15:10:14 +02:00
Ivan Demchuk
506193b8c8 Switch to gulp 4 2020-06-13 18:59:25 +03:00
tobspr
3f385b01e0 Update readme and standalone build process 2020-05-31 08:15:07 +02:00
tobspr
e4a8e72edd Add .itch.toml file 2020-05-30 20:25:46 +02:00
tobspr
704b6e14b8 Minor fixes, update changelog, add experimental macosx and linux builds 2020-05-30 20:12:16 +02:00
tobspr
e0c0c45d0b Merge pull request #28 from maxklenk/travis_build_standalone
Add TravisCI config to build standalone bundle on and for multiple platforms
2020-05-28 19:42:55 +02:00
Max Klenk
e6567c15df add travis config to build standalone bundle on multiple platforms 2020-05-28 16:08:08 +02:00
tobspr
5cc6c05c71 Allow changing keybindings in the demo version 2020-05-27 08:00:36 +02:00
tobspr
89d1489ff1 Preparing for the standalone 2020-05-21 13:36:08 +02:00
tobspr
58442eaeec Prepare standalone build 2020-05-21 13:05:21 +02:00
Tobias Springer
93c6ea683d Initial commit 2020-05-09 16:45:23 +02:00