I rewrote the publishing / packaging script tonight. It was originally a shell script with a bunch of copy-pasted lines for each target. Now it’s a Python script broken up into a couple of functions and a list of target objects / structures that it iterates through. Overall this is a step in the right direction.

Summary:

  • Run all build scripts (see last post), reprocessing all images and re-exporting all Tiled maps
  • Delete all previous contents of the packaging workspace
  • Remove “work” directories that held unprocessed images and maps
  • Zip this codebase into a .love file
  • Objects representing each target were declared and filled out earlier. For each target:
    • Make directory based on target’s name
    • If target needs the .love file, copy it
    • If the target has a path to LÖVE runtime binaries (ex: “love-11.2-win32”), copy all contents
      • If we’re copying the binaries, and the target needs the .love file to be concatenated to the Windows EXE file, do so now
        • If the target requires the Windows console EXE, concatenate to lovec.exe as well
    • Copy “pack-ins”, target-independent documents and resources that are part of the project but not part of the .love file (like readme files, walkthroughs, etc.)
    • If specified by target, format .txt files for Windows so that the newlines display correctly in Windows Notepad
    • Zip the directory

I currently have three targets:

  • “love-file”, which is just the .love file and the pack-ins.
  • “win32”, Windows 32-Bit.
  • “win64”, Windows 64-Bit.

Eventually, I also need to support Linux (I guess via AppImage or Flatpak, but haven’t really dug into it) and MacOS. In the meantime, if users on those platforms are interested in trying the game, I point them to “love-file”, along with downloading a matching version of LÖVE from love2d.org. I intend to update all of my LÖVE games whenever there is a new release of the framework, though I guess it depends on how big the changes are.