Help Testing QuMoPa (Quake Mod Packager)

4LT

Member
Jul 8, 2022
80
95
18
Pennsyltucky
Tried asking for this on QM, but it got buried. This is something I've had on the back-burner for a while; the idea is you can take a folder directly from your engine folder and correctly (e.g. not create a tar bomb) package it as a .zip for distribution, minus the config.cfg, screenshots, saves, etc. It's a GUI application without any fluff; it's meant to be easy to use while requiring the fewest clicks necessary to get the job done. Besides warnings, there are only two dialogs: selecting the folder you want to package, and the file you want to save it as.

Mostly I need Windows users to test this as I don't have a Windows installation.

Installation
- Install Python 3.x (https://www.python.org/downloads/)
- Extract QuMoPa (https://github.com/4LT/qumopa/archive/refs/heads/master.zip or from attachment) and double-click qumopa.pyw to run

Things to test:
- packaging a mod folder (should contain a maps folder, a pak0.pak, OR a progs.dat)
- attempting to package a non-mod folder should result in a warning
- Re-running the application after successful packaging should start the mod selection dialog in the same folder as before

Note: if you try packaging something like Arcane Dimensions, it might run a bit slow, so you might not see the .zip for a few seconds. I think the compression is implemented in straight Python. I'm hoping the convenience outweighs the wait time.
 

Attachments

  • qumopa.zip
    5.4 KB · Views: 39
Oops, forgot the magic word

iu



Could someone please help me test this on windows? Instructions in the original post.
 
Ok, i'll test and add some comments later in a free time by editing this post.

edit 26-04-2023 6:15, I see you've got some answers, I did some testing before reading comments below hehe, anyway here are the results so far:

Tests:

Windows 10.

- Test: Double-click on qumopa.pyw.
- Result: Fail: Can't open.
- Action: Install Python with default settings.

- Test: Double-click on qumopa.pyw.
- Result: Fail: "Unable to create process using D:\bin\env python3 D:\(...)".
- Action: Fix shebang (add /usr):
#!/usr/bin/env python3

- Test: Double-click on qumopa.pyw.
- Result: Fail: Nothing happens.
- Action: Run installer again, select Modify, check "Add Python to environment variables".

- Test: Double-click on qumopa.pyw.
- Result: Fail: Nothing happens.
- Action: As a workaround executed cmd, went to script folder and executed: "python qumopa.pyw".

- Test: "python qumopa.pyw". Click "Cancel".
- Result: Warning message "No progs.dat, pak, or maps folder found".
- Action: Click "Cancel" to quit a script.

- Test: "python qumopa.pyw". Click "Cancel".
- Result: Warning message "No progs.dat, pak, or maps folder found".
- Action: CLick "Try Again"/"Ignore". Popup shows again.

- TODO: Test ideas, didn't had time so far, I might test later:
- Check writing to a read-only location.
- Check overwriting .zip file.
- Select file instead of folder.
- Select empty folder.
- Select folder without mod contents.
- Select proper mod.
- ...

Except for testing, here's code review as a bonus and other hints:
- Add to filters:
"!vkQuake.cfg",
- Check PEP-8 compilance (can be done with flake8), you can use formatter like "black" or smth if you care about this things.
- Add arguments handling, so it can be used from command line, for example:
"python qumopa.pyw modname" to package modname. "python qumopa.pyw modname /tmp/mod.zip" to save with a new name somewhere.
One might want to make a automate this script with simple .sh or .bat script to run above command to avoid clicking or recall this line with Ctrl+R.
Might be better to handle params like "python qumopa.pyw --mod modname --out zipname.zip".
 
Last edited:
  • Like
Reactions: 4LT
I looked into this, seems Windows Python installations interpret the "shebang" line (first line starting with #!) for some reason, even though that's a Unix-specific feature.

Try removing the first line, or replacing it with

Bash:
#!/usr/bin/env python

I pushed the latter change to Github as well. This change should result in seeing a console window in addition to the dialog boxes, but I don't think it will hurt anything
 
I now get a very quick (and empty) flash of the CMD window, and no errors to speak of. Do I just click it and follow a GUI, or does it need to be in a specific folder, given arguments, drag/dropped, that kind of thing?
 
No, it's supposed to work from wherever when you click it. Not sure what's going on
If there's an error in the script you would see it if you run

Code:
python path/to/qumopa.pyw

or if python isn't installed to the PATH something like

Code:
C:\Users\xxxxx\AppData\Local\Programs\Python\Python311\python path\to\qumopa.pyw

from CMD
 
@khreathor You've worked with Python, do you have any ideas? My guess is that `.pyw` is correctly getting associated with `pythonw` but fw's installation wasn't set to update the PATH variable (since that's not an option checked by default).

Ideally this should work out-of-the-box as a single file
 
Works fine for me out of the box on Windows 10 Pro build 19045.2908, Python 3.10.4

✅ Packages map folder
✅ Refuses to package non-conformant folder
✅ Re-opens in place
 
  • Like
Reactions: 4LT
Ok, i'll test and add some comments later in a free time by editing this post.

edit 26-04-2023 6:15, I see you've got some answers, I did some testing before reading comments below hehe, anyway here are the results so far:

Tests:

Windows 10.

- Test: Double-click on qumopa.pyw.
- Result: Fail: Can't open.
- Action: Install Python with default settings.

- Test: Double-click on qumopa.pyw.
- Result: Fail: "Unable to create process using D:\bin\env python3 D:\(...)".
- Action: Fix shebang (add /usr):
#!/usr/bin/env python3

- Test: Double-click on qumopa.pyw.
- Result: Fail: Nothing happens.
- Action: Run installer again, select Modify, check "Add Python to environment variables".

- Test: Double-click on qumopa.pyw.
- Result: Fail: Nothing happens.
- Action: As a workaround executed cmd, went to script folder and executed: "python qumopa.pyw".

- Test: "python qumopa.pyw". Click "Cancel".
- Result: Warning message "No progs.dat, pak, or maps folder found".
- Action: Click "Cancel" to quit a script.

- Test: "python qumopa.pyw". Click "Cancel".
- Result: Warning message "No progs.dat, pak, or maps folder found".
- Action: CLick "Try Again"/"Ignore". Popup shows again.

- TODO: Test ideas, didn't had time so far, I might test later:
- Check writing to a read-only location.
- Check overwriting .zip file.
- Select file instead of folder.
- Select empty folder.
- Select folder without mod contents.
- Select proper mod.
- ...

Except for testing, here's code review as a bonus and other hints:
- Add to filters:
"!vkQuake.cfg",
- Check PEP-8 compilance (can be done with flake8), you can use formatter like "black" or smth if you care about this things.
- Add arguments handling, so it can be used from command line, for example:
"python qumopa.pyw modname" to package modname. "python qumopa.pyw modname /tmp/mod.zip" to save with a new name somewhere.
One might want to make a automate this script with simple .sh or .bat script to run above command to avoid clicking or recall this line with Ctrl+R.
Might be better to handle params like "python qumopa.pyw --mod modname --out zipname.zip".
Thanks for the feedback!

Missed this as I didn't get a notification when you updated your post, but I did update the script to fix the shebang and the "cancel" button behavior.

I'll add the !vkQuake.cfg to the filter

With formatting, I don't really care for a project this size, though I may accept a pull request for it. But it's either full-in with CI integration via GitHub Actions or not at all.

[edit] Also, this seems to confirm that Python needs to be added to the PATH variable. I might just add install instructions for that detail.
 
Last edited:
  • Like
Reactions: Anon
More filter that could be filtered out - Zircon engine creates "zircon_history.txt" and QSS-M creates "iplog.dat". I've downloaded newer script version and double-clicking to start works for me now.

(edit: ChadQuake leaves qconsole.log)
 
Last edited:
I think I'll release as-is. Might be nice to have those extra filters if those engines become more popular, but for now... the script should be easy enough to edit for any edge cases.
 
  • Like
Reactions: Anon and zaratzara