-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Upgrade to pyside2 and construct 2.10 & working UI again #22
Conversation
This was changed in December 2018 patch, see also: handsomematt/glua-cache-extract@212c4e6
Only issue remaining: Seems like dumping a gma file data or parsing the data with the GMAVerifiedContents struct will return a wrong crc and a MagicNumber. This is just an issue when parsing the data, as the data is still correct when using the old compiled version of gmosh...
This is due to the new SteamUGC addon format, so newer or recently updated addons cannot be downloaded via this method.
Wow, you're throwing me a challenge here. I haven't really touched this project in ages, besides recently upgrading the I've looked at it, and I've got a clue as to what's going wrong with the GMAVerifiedContents = 'GMAVerifiedContents'/Struct(
GMAContents,
'foo'/PaddedString(30, "utf8"),
'addon_crc'/Optional(Int32ul),
'MagicValue'/Optional(Int8ul)
# Don't enforce terminator. Some GMA files appear to have 0-padding after the magic value
# Terminator
) And then dumped the GMA of Advanced Duplicator (pulled from my addons folder 😅). This is what it printed for the
Looks like the contents of some file! I haven't had the time to figure out why, but it looks like the file contents aren't being parsed here. |
Ok, leaving out the |
I've not tested construct 2.10, but, as far as I can gather, A single-element |
Sorry for giving you a challenge then 😅 I just thought it would be nice to at least make a PR with my changes, so it may be used by others and to give something back to this nice addon 👍, as i am regularly using it and would have loved to rebuild it / get to see the UI on Linux :) So about the Lazy, i went through the upgrade guides and they removed the OnDemand function in construct 2.9. As i never used construct before, i just tried to get as close as possible to the original functions and Lazy seemed to be a good replacement, but as @Bo98 already said, the behavior differs significantly. For my understanding: Thanks for the feedback, for now i |
Don't apologize for the challenge. This is a fun one! The |
And it's arguably an even bigger problem now that GMod now supports GMAs up to 2GB. |
…m and magic value to be wrong See #22
Using I've forked this PR in a branch called In gmoshui I'm getting an empty window when I open/extract a file: This empty window seems to be new. |
@FPtje Awesome 👍 Regarding the extra window, i did not specifically add it on purpose at least, this is the QDialog, that was previously also found in the |
So i fixed that, also i found out that if you are searching a big lua cache (~6200 Files) the TreeView model cannot keep up that fast with applying the inefficient name filter for this many files. This will make the UI unresponsive, but it will still finish, it just might take long. So this is not related to the progress UI, just to let you know. Is there anything else you want to be changed? Thanks 👍 |
Awesome! I don't think I do, but I'll check later. |
Sadly i cannot seem to create a usable executable using cxfreeze for the gmoshui, even when using the old method of generating the python code using pyside2-uic from the .ui files. Maybe someone else does know more about the issue, as i am new to cxfreeze as well. |
Oh, you removed the pyside2 stuff. Yeah, you can put it back, we'll figure out a way to get it to work. I'll read into cxfreeze or maybe even something else if that works better. |
`pyside2-uic` is not available anymore, it is now integrated in `uic` with the `-g python` flag
Added it back in and it works, the only thing left would be getting cxfreeze to run again (only has issues with gmoshui) 👍 |
I should see if cx_Freeze ever fixed the Python dependency issue on macOS. Looks like they've done several macOS-specific fixes over the past few months so they may well have. |
I just tested with cx_freeze and came across the following issue (on After trying the suggested fix (installing the master revision of cxfreeze), both gmosh and gmoshui created executables that ran. I ran the following commands:
What problems did you hit with cx_freeze? |
Well i did not try the running the cx_freeze version from master, but that are great news 👍 EDIT: Nice, with the master version of cx_freeze, it builds correctly and works, awesome! |
I took some time to upgrade the code to work with the new pyside2 and the newer construct version, while also using the newer python 3.8 to test it (i suppose it should also work well with python 3.7).
I also made sure, that the UI will work and compile properly again (some small issues are still there, as i first just wanted to upgrade the code).
Even though i tested most features (especially the .gma creation, which seems to be correct or rather provides the same results as before), this might need some more testing and a review.
One thing i could not yet fix is the parsed result for the addon_crc and MagicNumber, which is shown when using the
--dump
parameter. This seems to be an issue only with the parsing, as when i dump the file with the old binary of gmosh, it shows the correct addon_crc value andNone
for the MagicNumber, which i expected.If anybody got some idea on how to fix this, i would be happy :)
I'd appreciate any feedback 👍