Skip to content

Commit

Permalink
Fix #234: un.rpyc README is out of date.
Browse files Browse the repository at this point in the history
  • Loading branch information
CensoredUsername committed Jul 29, 2024
1 parent e16a767 commit 8d3a464
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions un.rpyc/README.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,16 @@
This folder contains the scripts necessary to compile the decompiler into un.rpyc, a file which will
automatically decompile a ren'py game once it's loaded by ren'py. To do this, simply run compile.py
using python 2.7.
using python 3.9 or above.

.rpyc files are gzip compressed pickle files. Using the pickleast module we can exploit this by
creating a pickle which will run the decompiler when ren'py is loading all files, before any .rpy
code normally even runs.

Note that for this to work the module
`pickleast` (from https://github.com/CensoredUsername/picklemagic)
must be in pythons module search path. If it isn't, you can use the -m (--magic) switch to specify the
directory in which pickleast.py is located.
Building un.rpyc requires the `corrupy` package to (from https://github.com/CensoredUsername/corrupy).
This is normally available as a submodule git submodule in this folder.

Via various ways of optimization this module manages to fit the whole decompiler in a file less
than 16 kB in size! This is smaller than some of the unrpyc source files.
than 20 kB in size! This is smaller than some of the unrpyc source files.

The -d (--debug) switch turns on debug results. In this case, three extra files will be produced.

Expand All @@ -31,4 +29,4 @@ don't change the filesize too much but obfuscate the included modules more.

For the best result, use

[python2] compile.py -d -o -p 1
[python3] compile.py -d -o -p 1

0 comments on commit 8d3a464

Please sign in to comment.