Solved: Break the monolith?

Today I used GDevelop 5-5.0.0-beta101 to create a little arcade game, and it worked like a charm. Everything clicked in place nicely and the game is almost done. Kudos for such a nice tool!

Now this is yet another one of the handful of games I want to expose on my internal website. To do so I need to not only export it, I also need to extend the menu system (which is just another GDevelop Game) and publish that as well.
I wish there were some way to automatically build (aka export) the project so I can script the orchestration of such exports.

There is already Trello, and I understand if running GDevelop is difficult without a window. But then it seems the monolithic architecture of the IDE does not allow the exports to be triggered separately.

Would it make sense to decouple some components? I think it would give greater flexibility and freedom, both for game developers and GDevelop developers…

Hiran

I actually extracted pieces of GDevelop’s source to create this utility: GitHub - arthuro555/gdexporter: A CLI to export a GDevelop Game without the IDE with plugins support.

1 Like

This is very much what I am looking for.
How can I make use of that project?

You will only need node. Install by running npm i -g gdexporter, and run like this: gdexport -p path/to/project.json -o path/to/output/dir -b buildtype
Replace the build type with electron or cordova if you want to do an export to those platforms, for web just leave out the -b buildtype part

Hmmm, something does not work as expected. I am running on Ubuntu 18.10…

sudo apt install npm worked as expected.

It seems to install gdexport I still need root access:
npm i -g gdexporter
loadDep:slugs → 200 ▄ ╢████████████████████████████████████░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░╟
loadDep:universalify → ge ▄ ╢██████████████████████████████████████████░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░╟
loadDep:universalify → ca ▀ ╢██████████████████████████████████████████░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░╟
npm WARN checkPermissions Missing write access to /usr/local/lib
/usr/local/lib
└─┬ gdexporter@2.3.101
├── follow-redirects@1.13.0
├─┬ fs-extra@9.0.1
│ ├── at-least-node@1.0.0
│ ├── graceful-fs@4.2.4
│ ├─┬ jsonfile@6.1.0
│ │ └── universalify@2.0.0
│ └── universalify@1.0.0
├── lodash@4.17.20
├── minimist@1.2.5
└── slugs@0.1.3

npm ERR! Linux 4.15.0-122-generic
npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "i" "-g" "gdexporter"
npm ERR! node v8.10.0
npm ERR! npm  v3.5.2
npm ERR! path /usr/local/lib
npm ERR! code EACCES
npm ERR! errno -13
npm ERR! syscall access

npm ERR! Error: EACCES: permission denied, access '/usr/local/lib'
npm ERR!  { Error: EACCES: permission denied, access '/usr/local/lib'
npm ERR!   errno: -13,
npm ERR!   code: 'EACCES',
npm ERR!   syscall: 'access',
npm ERR!   path: '/usr/local/lib' }
npm ERR! 
npm ERR! Please try running this command again as root/Administrator.

npm ERR! Please include the following file with any support request:
npm ERR!     /home/hiran/npm-debug.log

But even with root access the installation fails:
sudo npm i -g gdexporter
loadDep:slugs → afterAdd ▀ ╢████████████████████████████████████░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░╟
loadDep:follow-redirects ▀ ╢██████████████████████████████████████████░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░╟
loadDep:universalify → ad ▄ ╢██████████████████████████████████████████░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░╟
npm ERR! Linux 4.15.0-122-generic
npm ERR! argv “/usr/bin/node” “/usr/bin/npm” “i” “-g” “gdexporter”
npm ERR! node v8.10.0
npm ERR! npm v3.5.2
npm ERR! path /usr/local/lib/node_modules/gdexporter/bin\cli
npm ERR! code ENOENT
npm ERR! errno -2
npm ERR! syscall chmod

npm ERR! enoent ENOENT: no such file or directory, chmod '/usr/local/lib/node_modules/gdexporter/bin\cli'
npm ERR! enoent ENOENT: no such file or directory, chmod '/usr/local/lib/node_modules/gdexporter/bin\cli'
npm ERR! enoent This is most likely not a problem with npm itself
npm ERR! enoent and is related to npm not being able to find a file.
npm ERR! enoent 

npm ERR! Please include the following file with any support request:
npm ERR!     /home/hiran/npm-debug.log

It seems the last part of the target directory contains a Windows-style backslash. Is this intentional?

All the paths use Linux style slashes:
image
I guess this is a problem with npm, try another node/npm version or to ask for support to the team behind npm

My footprint with JavaScript or Node or NPM so far is zero. Maybe we have to fix this together.
As a first step I will try the installation on the latest versions of Centos 8 and Ubuntu 20 and see wether the problem is repeatable.

So I was able to install the gdexporter package both on fresh installs of Ubuntu 20 and CentOS 8.
It seems the problem is just on my current Ubuntu desktop. For GDevelop that did not pop up as I just used the appimage.

But now I can try experimenting with the exporter itself. :slight_smile:

Having played with the exporter I can say it fulfills my expectations and eases my life a lot.
Now simply changing some part in one project can trigger a build of the whole game suite that gets automatically deployed to a webserver.

With that I guess Trello can be marked as done. At least as far as I was involved when it got created…
:slight_smile:

Be careful, update 3.0.0 that I pushed recently has some breaking changes (but also actual documentation)

Thank you for the warning. So far I have not seen any problems, and the whole site has been generated several times since you posted that message.

On the other hand I cannot tell which version I am running. When my gdexporter container is build, I have a reference f4029356b706443aa9db3255348ce68b8390a734 but nothing that could act as version number. The log output during export points to GDevelop versions that are downloaded - but nothing indicating the GdExporter version.