Closed madeddy closed 4 months ago
Admittedly i did beforehand never test the un.rpyc submodule, because it was never my focus. Any file edits in there are from 2to3.py or manual obvious changes for py3 i spotted.
Two of the tests failed because i didn't bother to change the shebang and from a undiscovered unicode-str conversion bug. Both did in local tests never error.
Compilation attempts result in exec block issues because of Python's demand for including parenthesis.
Traceback (most recent call last):
File "../Tools/Ren'Py/unrpyc-py3_port-v1.1.8/un.rpyc/compile.py", line 157, in <module>
decompiler_rpyc = p.ExecTranspile(base + """
File "../Tools/Ren'Py/unrpyc-py3_port-v1.1.8/picklemagic/pickleast.py", line 689, in ExecTranspile
node = ast.parse(string, mode="exec")
File "/usr/lib/python3.10/ast.py", line 50, in parse
return compile(source, filename, mode, flags,
File "<unknown>", line 14
exec '''
^^^^^^^
SyntaxError: Missing parentheses in call to 'exec'. Did you mean exec(...)?
Using python compile.py -d -o -p 1 -r -m ../picklemagic/
. (It hates minimization at the moment.)
I explained in both of my posts that the un.rpyc
submodule does not work.
I explained in both of my posts that the
un.rpyc
submodule does not work.
I wasn't using submodules in this case, manual download and move. I get what you meant, then.
I would sincerely love to get my hands on these changes, since most games fail decompilation now with the existing master branch. I've tried cloning madeddy/unrpyc, but I cannot quite figure out how to merge the py3_port@v1.1.8 and the Renpy_8_7.5_compat_fix@v1.1.8 branches without getting conflicts. And I think we need both, yes? If CensoredUsername is not around to process these pull requests, could you either provide a merged branch in the madeddy fork, or notes on what I need to do myself?
I would sincerely love to get my hands on these changes... ... but I cannot quite figure out how to merge the py3_port@v1.1.8 and the Renpy_8_7.5_compat_fix@v1.1.8 branches without getting conflicts. And I think we need both, yes?
You're correct, you need both parts for RenPy v8.0.x based apps. However for v7.5.x you need just the compat fix, because there is RenPy still on Python 2! Not sure about the new RenPy 7.6.x(Py2) and v8.1.x(Py3), there could be additional changes needed.(We will have to wait and see...)
As for your request, i did already complete branches of this code for RenPy 8/Py3: https://github.com/madeddy/unrpyc/tree/py3_v1.1.8 and the v1.2.0 also but has some extra (non necessary luxus) changes.
You should look at the readme's of the branches. Good luck! Greets
I should say, that most pre-compiled renpy 7.x games works well on RenPy 8.2.x nighlty without any recompilation, Some Python modules obviously won't be working as they have Python2 bytecode. There's not many of them though
@madeddy The decompiller for Python 3.x works well (1.2.0_dev at least) on Python 3.11 and RenPy 7.x and 8.x
I suggest following fixes (could be done in separate smaller PRs)
dict
instead of OrderedDict
as dict
guarantees the order since Python 3.7
OrderedDict
if not needed. if
statement just after file listrpyc
if processing failed and repeat this process if needed.io.BytesIO
instead of file and write when no errors or requestedno-clobber
or -C
decompile_rpyc
in worker
functionrenpy.ast
objects are missing, like renpy.ast.Camera
. There's not many new objects and they are not so popular, but some rpyc
files can't be decompiled because of this.I suggest looking at https://github.com/Gouvernathor/unrpyc/tree/dev3 It's been some time since I worked on it or tried to use it, but I did a lot of tests at the time and made some advances.
I suggest following fixes (could be done in separate smaller PRs)
Sry i missed last year somehow this post with the suggestions. Will look into it. Could you please move this into a separate issue? As this pull here is just the py3 port and your suggestions going more for extension/expansion. Thanks.
I suggest looking at https://github.com/Gouvernathor/unrpyc/tree/dev3
Yes, thank you. I discovered it already last year and used some of the code if that's ok with you.
@madeddy yes, this would make sense after PR is merged
Why PR has been closed?
Why PR has been closed?
Good question. As i was it myself i can only deduct is was some backlash as i set my fork back and the connected branch disappeared accidentally.
I reopen it but its moot as the pull was to old to be integrated as a whole and the port is already done in dev branch.
@eirnym Since the version for py3 almost ready is, you can perhaps offer your list again in GH diss if you want. NOTE: 6) is moot and 4) do we have already in unrpyc ... i think 🤔
We're up to date now, so this pull request is no longer necessary.
un.rpyc
submodule does not work (no changes on it)