Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: bx83 on Wed 23/06/2021 23:07:24

Title: Is it possible to compile via command-line?
Post by: bx83 on Wed 23/06/2021 23:07:24
Looking to automate my build process.

(You know - type less :)
Title: Re: Is it possible to compile via command-line?
Post by: Crimson Wizard on Wed 23/06/2021 23:16:30

<PATH TO EDITOR>\AGSEditor.exe /compile <PATH TO PROJECT>\Game.agf


But there's an issue (https://github.com/adventuregamestudio/ags/issues/666) that if there are errors this will likely stop with a message box.

On a separate note, we are currently developing a set of stand-alone game compilation tools to replace internal editor's process.
Title: Re: Is it possible to compile via command-line?
Post by: bx83 on Thu 24/06/2021 10:31:57
Excellent :)

I get the following error when run from the command-line in 3.5.1:

(https://bluekeystudios.com/img/loci_cmd.png)

Still it was via the Mac command-line; when I ran it on Windows 'cmd.exe', it worked well.
However I notice there's no 'force rebuild of every file', it just creates the exe and exits.

In the new build tools, are there options to set the version number, game description etc. as in everything in General Settings?
Title: Re: Is it possible to compile via command-line?
Post by: Crimson Wizard on Thu 24/06/2021 12:23:41
I don't know about error, maybe you have to run from the project directory specifically, but I never tried that command myself.

Quote from: bx83 on Thu 24/06/2021 10:31:57
However I notice there's no 'force rebuild of every file', it just creates the exe and exits.

Do you mean that some files are missing or not updated?


Quote from: bx83 on Thu 24/06/2021 10:31:57
In the new build tools, are there options to set the version number, game description etc. as in everything in General Settings?

These build tools are not for editing general settings or other game content, they are for building the game package, using available game data.
Title: Re: Is it possible to compile via command-line?
Post by: eri0o on Thu 24/06/2021 17:10:02
If you use a CI system that is Windows you can hook AGS on commit pushes.

Here's an example repository that builds and ships directly to Itch io on every commit: https://github.com/ericoporto/dungeonhands

This a different one that makes modules:
https://github.com/ericoporto/ImGi

This one runs tests:
https://github.com/ericoporto/tap

I haven't documented the process of CI with AGS because not sure what is needed to explain - few people if any asked for this, like ever. Ask any questions.


In the future it should be possible to build in any OS once the new command line tools are finished. And they won't have these problems of using a graphical tool in a command line environment.

Beyond AppVeyor and GH Actions, Azure is also other usable Windows CI environment with free options available. All this of these have small catches with closed source projects, small limitations that will cost once they are reached.

Pairing a CI with Steamworks requires familiarity with Steam Guard - and additional account which will be the "builder" account, just for the CI.

Biggest barrier for me currently is the hard to push sprites to git due to spritecache, currently only Azure repositories can tolerate them. So for a HD game currently, if using git, probably best way would be trying with Azure Pipelines + Azure repositories.
Title: Re: Is it possible to compile via command-line?
Post by: bx83 on Fri 25/06/2021 08:28:26
'CI'='Continuous Integration'?
Or is it just 'command line' and I've got the I/L wrong?
Either way - thumbs up. Some kind of fully scriptable compile, with bash/perl/batch/etc. will be so excellent :)