Central mk.sh script#688
Conversation
Remove Makefile
Align builds to end filenames
|
Builds are here: https://github.com/OoliteProject/oolite/actions/runs/28303563872/attempts/1 I've tested on Windows and Linux and looks good to me. EDIT: builds are here https://github.com/OoliteProject/oolite/actions/runs/28349179837?pr=688 |
Add missing help descriptions
|
I noticed the "Schemata" folder is not being copied into the Resources folder. Which means the verifyOXP option will have difficulty doing anything. I think this has been the case for a little while now, certainly before this PR. I'm happy to create a separate issue to track the resolution, though. |
|
@phkb Good you noticed that. Yes please create a separate issue as it's a bug that precedes this PR. Let me know if you see any other problems. |
|
I'd rather finish a design discussion on the forum first. |
Ensure install depends on build
|
I've set this to draft. While this works well on the command line, I think that there could be problems with IDEs so I'm going to try to move the single version creation into the meson to follow the meson way and be consistent. |
* Add missing Schemata (OoliteProject#691) * appimage working * Remove --clean option as there is a clean target * Flatpak working locally * Fix workflows * Fix Windows * Output meson log on failure * Output parent process Bash parent * Try different way of getting parent process * Try different way of getting parent process 2 * echo $(ps -p $PPID) * echo $(ps -W -p $PPID) * echo $(ps -W -p $(ps -p $PPID -o winpid= | tr -d ' ')) * print lots of debug * print lots of debug * print lots of debug * print lots of debug * print lots of debug * print lots of debug * gwmi debug * gwmi debug 2 * gwmi debug 3 * Fix meson logging * Fix latest clang breaks Windows build due to conflict with ceil function used by SDL3 and Obj-C (OoliteProject#694) * Targeted SDL3 includes * Fix GitHub rate limiting curl * Fix meson folder * ver quad * Maybe we can do this without realpath * Maybe we can do this without realpath * Fix Windows * Wrong path * ver_githash * better flag handling * Echo ver quad * Version quad * Update meson.build to include version variables * Refactor post_build.sh to update version parameters * Rename version variables in generate_manifest function * Remove version_quad echo from manifest script Removed echo statement for version_quad in manifest generation. * Remove echo for ver_quad in create_nsis_fn.sh Remove echo statement for ver_quad variable.
Add configure action to mk.sh Update README
# Conflicts: # .github/workflows/test_builds.yaml # Resources/Schemata/demoshipsSchema.plist # Resources/Schemata/hudSchema.plist # Resources/Schemata/plistschema.plist # Resources/Schemata/shipyardSchema.plist
|
This is now ready for review |
|
I tried just running And that did the build. I assume this is because in the first instance I had some previous build in the deployment folder and the script wasn't able to work with it. It might be worth mentioning in the instructions somewhere. (ie "You should always do a 'clean' before doing a 'build'", or whatever makes more sense) Is the "./" prefix for all the commands necessary? It feels like we're going backwards when the previous iterations were like: |
|
@phkb On clean before build, usually that shouldn't be necessary, but maybe the changes in this PR are large enough that existing build folders won't work. Once the build settles down to something that doesn't change much (hopefully once this PR is merged), running build without clean should be fine. There are a couple of possibilities for avoiding
Here I have aliased both the command and a specific action, but you may prefer to just alias the command, for example
EDIT: edited alias to not alias make (which would cause conflict if system make is needed) |
|
@phkb I've updated the README with: If for some reason the build fails, you can try cleaning the build folder first, although meson should not usually ./mk.sh clean dev |
Windows and Linux are not that much different. Here is an article that explains: The reason why Linux is more aware of security is simply the history of being a multi user system where DOS/Windows used to be a single user system. |
I think the alias with relative path is the better option as it is specific to the script. That way if you have two project folders, it will run the mk.sh in the current working directory of the specific project. On Windows, this could be added to the script that sets up MSYS2 if desired much like how the sourcing of the GNUstep.sh used to be added to .bashrc in that script. |
|
I understand this is a difference in the way Linux works (well, I guess it's "bash" really, but still) to how Windows works. Being a long-time Windows user, I'm used to the expectation that, if a app or script is in my current folder, I can simply type the name to execute it. There's just a disconnect between being on a Windows PC, typing a command into a command line, and not getting what I expect. I also appreciate that we don't want to keep making things work differently on different OS's. The fewer differences, the easier it is to maintain. Do I like having to use "./" in front of the command? No. The point being, as long as the instructions are clear, I'm good. |
|
@phkb I'm happy to add the alias for Windows if it makes things easier. I can also document how to add it on Linux for consistency. That way you could type I would prefer to do that in a separate PR to avoid adding to this already large PR. Please make an issue for it if you'd like that feature (assuming this PR is merged). |
|
@mcarans thank you for trying to separate issues |
|
No, leave it for now. It's a pretty small issue in the grand scheme of things. There are much bigger fish to fry. |
phkb
left a comment
There was a problem hiding this comment.
I know I'm just a Windows user here, and my needs are "Can I compile a working game?" rather than anything more complex. But this looks fine to me.
Versions and build dates all obtained once in meson setup project function
Everything passed by parameter not env var (with necessary exception for Flatpak where host passes env vars in YAML)
Use bash functions rather than scripts where possible
Targets now named deployment, dev, test and debug (no snapshot etc.)
Updated compiler flags to use the same naming for consistency and clarity
Remove Makefile
Fixes #684
Fixes #671
See usage of mk.sh in README: https://github.com/mcarans/oolite/blob/mk_script/README.md
You can type
./mk.sh helpfor help on the actions, targets and options