The International Simutrans Forum

PakSets and Customization => General Resources and Tools => Tools => Topic started by: Mishasama on September 26, 2022, 01:10:28 AM

Title: Pak Helper/Builder
Post by: Mishasama on September 26, 2022, 01:10:28 AM
I can't find where can download these tools.
Is there any new tool can help to build paks easily? Or maybe auto build from SVN like the GitHub Actions?
Title: Re: Pak Helper/Builder
Post by: prissi on September 27, 2022, 04:46:46 AM
There is the online pak compiler
http://simutrans-germany.com/online_dat/
with user anon and password anon you do not need to register.
Title: Re: Pak Helper/Builder
Post by: Mishasama on November 22, 2022, 04:30:26 AM
Quote from: prissi on September 27, 2022, 04:46:46 AMThere is the online pak compiler
http://simutrans-germany.com/online_dat/
with user anon and password anon you do not need to register.
It looks can't build all paks at once like using the BAT command locally. And some functions have not been implemented yet.

Is it possible for the program to automatically traverse all subfolders and compile all resource files at once run?
And is it possible to output to another folder for the pak files? It's annoying to have all the files mixed up.
Title: Re: Pak Helper/Builder
Post by: Flemmbrav on November 22, 2022, 07:02:13 PM
Try cloning this:
https://github.com/Flemmbrav/Pak.Basic
And see if you can compile the pakset with the COMPILE.ps1 file.
If that does work, just adjust the .ps1 file to what you need, and make sure a makeobj.exe is in the very same folder, als the .ps1 file
Title: Re: Pak Helper/Builder
Post by: prissi on November 24, 2022, 02:22:56 PM
Most paks have a Makefile. On windows you would need to install mingw64 or so and then pacman -S automake. Then one can build the paks on the commandline. Pak128 is also built on github: https://github.com/simutrans/pak128
Title: Re: Pak Helper/Builder
Post by: Mishasama on November 25, 2022, 07:14:28 PM
Quote from: prissi on November 24, 2022, 02:22:56 PMPak128 is also built on github: https://github.com/simutrans/pak128
Is that possible for pak64?
Title: Re: Pak Helper/Builder
Post by: Flemmbrav on November 25, 2022, 07:44:09 PM
When taking a look at the MAKEFILE, the possibility for that is already build in.
https://github.com/simutrans/pak128/blob/master/Makefile


After line 21, the dirs of the pakset get added to a list of to-be-build folders.
For that, there's a list for each pak-size the pakset uses.
64 is one of them.
But there also are lists for 128, 176 and 250.


And after line 107 all these lists get thrown into makeobj applying the correct pak size.

All you'd need to do is to make sure that environment runs on your machine, and to add your 64 sized folders to the list of dirs to build in pak64.


----

The Pak.Basic COMPILE.ps1 almost does the very same.
https://github.com/Flemmbrav/Pak.Basic/blob/master/COMPILE.ps1

There's a lot of prozess stuff at the beginning of it, and later (after line 45) all the folders to be build in a certain size are run by the pre defined routine.

The process of making this fit your task is the very same.