Regarding packaging a proper .dmg file: Yes, the skeleton for the Mac package is already part of the repo, but the main build script is still missing, mainly because it is a big and dirty shell script with lots of hardcoded stuff. Even though it works great for me (I can package, upload and deploy a new game version of both R'n'D and also of spin-offs like Mirror Magic for all five platforms and architectures like win32/win64 with one single shell command), it really needs a lot of cleanup before I can release that beast to the public (and before it is even remotely useful for somebody else).
I had a look again, and even though it's ugly, it might work well also for others. So I will attach my current version here.
It is not as bad as I thought, and it even has a config file, so you shouldn't have to change too much in the main script, but just edit the config file.
You mainly have to specify a Git repo to fetch the code from (can be a local one, or the official one, if you don't have code changes, but just want to build the latest version for a new platform, for example). Then you have to specify a hostname and username to build the code (can also be the local host). The following is still hardcoded in the script:
Code: Select all
PROJECTS_SUBDIR="projects"
RELEASE_SUBDIR="$PROJECTS_SUBDIR/RELEASES/incoming"
PACKAGE_SUBDIR="Packages"
SHARED_LIBS_SUBDIR="$PROJECTS_SUBDIR/libs/SDL2"
That is, you should probably have a directory hierarchy like this in the home directory of the user used to build the game on the host used to build, and on the host where the packaging is initiated:
~/projects/rocksndiamonds/BUILD/ <-- game will be build here on the remote host
~/projects/libs/SDL2/ <-- SDL libraries will be copied from this location when packaging on the remote host
~/projects/RELEASES/incoming/ <-- packages will be downloaded to this local directory
For building all required SDL libraries (SDL, SDL_image, SDL_mixer with sub-libraries for MOD and MP3 support, and SDL_net) in Mac framework format, I have another dirty, non-generic script with hardcoded rubbish, which I also hesitate to release at its current state.
Same here. You will have to have a look at it to make it work (especially how to name directories and such), but then it should do.
I use "SDL2.clean" with all cleanly extracted libraries and "SDL2.build" to build them, so I don't have to extract again for a clean rebuild. Should look like this:
Code: Select all
holger@eriador:~/src/SDL2/SDL2.BUILD$ ll SDL2.clean/
total 0
drwxr-xr-x 12 holger staff 384 10 Feb 2022 .
drwxr-xr-x 8 holger staff 256 10 Feb 2022 ..
lrwxr-xr-x 1 holger staff 11 10 Feb 2022 SDL2 -> SDL2-2.0.20
drwxr-xr-x@ 44 holger staff 1408 10 Jan 2022 SDL2-2.0.20
lrwxr-xr-x 1 holger staff 16 1 Jul 2020 SDL2_image -> SDL2_image-2.0.5
drwxr-xr-x@ 57 holger staff 1824 30 Jun 2019 SDL2_image-2.0.5
lrwxr-xr-x 1 holger staff 16 1 Jul 2020 SDL2_mixer -> SDL2_mixer-2.0.4
drwxr-xr-x@ 64 holger staff 2048 31 Okt 2018 SDL2_mixer-2.0.4
lrwxr-xr-x 1 holger staff 44 1 Jul 2020 SDL2_mixer_mod -> SDL2_mixer-2.0.4/external/libmodplug-0.8.9.0
lrwxr-xr-x 1 holger staff 39 1 Jul 2020 SDL2_mixer_mp3 -> SDL2_mixer-2.0.4/external/mpg123-1.25.6
lrwxr-xr-x 1 holger staff 14 1 Jul 2020 SDL2_net -> SDL2_net-2.0.1
drwxr-xr-x@ 41 holger staff 1312 3 Jan 2016 SDL2_net-2.0.1
holger@eriador:~/src/SDL2/SDL2.BUILD$
I think it's best to post all that stuff here rather than sending and explaining in private messages, so others can see it, too, and questions are answered in public.
I think I should add all that stuff to the official repo soon...
Please let me know of any major show stoppers when using these scripts! And if you should have any questions, of course!
