Tool Ren'Py UnRen for MacOS and Linux v0.8.2

5.00 star(s) 1 Vote

Madeddy

Active Member
Dec 17, 2017
838
487
Is there any new fix for the new macOS?
Any workaround for mac users on 12.3?
What fix, which workaround? There cannot be such a thing.
Unren includes two secondary tools, "rpatool" for rpa unpacking and "unrpyc" for decompiling RenPy script. While the rpa-unpacker in both py versions works, depends the decompiler still on python2 because RenPy still in the ancient py2 runs. Simply this.
Like another user 5 posts before this already wrote, you need to install py2 or you wait till everything in the tool chain catches up with modern times.

NOTE: RenPy is about to release in the next weeks/months the first version with Python-3, so the "unrpyc" developer will then also make a app version with python3.
 
  • Like
Reactions: Thermophob

darklink5222

Newbie
Jul 16, 2017
88
259
Alright, I've installed Python2, I extracted everything in the UnRen.zip into the same folder as the game, and nothing happens when I double-click UnRen.command. I try running it in Konsole and it just says "Error - cannot find rpatool or unrpyc in UnRen v0.8.2 Tools. Exiting" even though both of those are in the UnRen Tools folder.

I'm really not sure what I am doing wrong at this point.
 

cold_arctus

Devoted Member
Sep 25, 2018
8,944
10,832
Alright, I've installed Python2, I extracted everything in the UnRen.zip into the same folder as the game, and nothing happens when I double-click UnRen.command. I try running it in Konsole and it just says "Error - cannot find rpatool or unrpyc in UnRen v0.8.2 Tools. Exiting" even though both of those are in the UnRen Tools folder.

I'm really not sure what I am doing wrong at this point.
And you try to run it on what kind of system?
 

cold_arctus

Devoted Member
Sep 25, 2018
8,944
10,832
Linux, PopOS specifically
Strange. I run Ubuntu 20.04 and don't have this issue. But I also don't have unren located inside the actual game folder but in my overall RenPy game folder.

Here is my modified 0.8.2 unren version which includes a newer version of rpatool and unrpyc to unren games made with a never version of RenPy SDK.
 

Madeddy

Active Member
Dec 17, 2017
838
487
... and nothing happens when I double-click UnRen.command. I try running it in Konsole and it just says "Error - cannot find rpatool or unrpyc in UnRen v0.8.2 Tools. Exiting" ...
Please show us screenshots with the rights of these app files. (e.g. right click on unren, rpatool etc. and then the second-tab)

... ...
Here is my modified 0.8.2 unren version which includes a newer version of rpatool and unrpyc...
Thanks for posting the file. However...
Just my two cent:
1) Please do not pack the compiled files along the sources. This files are a) unnecessary and for b) (afaik) just compiled for your systems py version and will possible be compiled anew on the users sys. (Thats not about the extra HUGE ;) extra space these files need)
2) UnRen searches the tools in a subdir alongside the main script(line 72, 74) named ".../UnRen Tools/" and your dir structure misses it. How ever does this manage to be running for you? :unsure:

Greets
 
Last edited:

cold_arctus

Devoted Member
Sep 25, 2018
8,944
10,832
1) Please do not pack the compiled files along the sources. This files are a) unnecessary and for b) (afaik) just compiled for your systems py version and will possible be compiled anew on the users sys. (Thats not about the extra HUGE ;) extra space these files need)
Compiled files? :unsure: I didn't compile anything. All I did was copy and paste files from github.


EDIT: I see... you mean those .pyc files. I think they were created when I run unren.
2) UnRen searches the tools in a subdir alongside the main script(line 72, 74) named ".../UnRen Tools/" and your dir structure misses it. How ever does this manage to be running for you?
No changes were made in the script. Everything should be as Goobdoob coded it.
 

darklink5222

Newbie
Jul 16, 2017
88
259
Strange. I run Ubuntu 20.04 and don't have this issue. But I also don't have unren located inside the actual game folder but in my overall RenPy game folder.

Here is my modified 0.8.2 unren version which includes a newer version of rpatool and unrpyc to unren games made with a never version of RenPy SDK.
Sorry to say that this didn't work for me, same issue as the normal one. It doesn't matter what folder I have UnRen in, it does the same thing. Nothing when double clicked, and opening it with Konsole just says the same as before.


Please show us screenshots with the rights of these app files. (e.g. right click on unren, rpatool etc. and then the second-tab)
Alright, here you go.
 

cold_arctus

Devoted Member
Sep 25, 2018
8,944
10,832
Sorry to say that this didn't work for me, same issue as the normal one. It doesn't matter what folder I have UnRen in, it does the same thing. Nothing when double clicked, and opening it with Konsole just says the same as before.
Is it possible that your "Unren.command" file is located in your "UnRen Tools" folder? I tried it and I got the same error message as you. As soon as I move the command file next to "UnRen Tools" it starts to work.
Screenshot from 2022-05-31 08-04-05.png
1653977591747.png
 

darklink5222

Newbie
Jul 16, 2017
88
259
Is it possible that your "Unren.command" file is located in your "UnRen Tools" folder? I tried it and I got the same error message as you. As soon as I move the command file next to "UnRen Tools" it starts to work.
Nope, it doesn't seem to matter where the command file is, within the tools folder or next to the tools folder. It just does not work.
 

cold_arctus

Devoted Member
Sep 25, 2018
8,944
10,832
Nope, it doesn't seem to matter where the command file is, within the tools folder or next to the tools folder. It just does not work.
Then it is either related to the code or how your system is set up.
Code:
    fi
    if ! [ -e "$rpatool" ] || ! [ -e "$unrpyc" ]; then
        echo "Error - cannot find rpatool or unrpyc in UnRen v$version Tools. Exiting"
        exit
    fi
    if [ $num_args -ne 1 ]; then
        echo "Please drag + drop the game you are wanting to modify into the terminal."
        read appdir
    else
        echo "Working with directory $ARG1"
        appdir=$ARG1
    fi
    temp="${appdir%\'}"
    appdir="${temp#\'}"
    game=$appdir/Contents/Resources/autorun/game
    if [ ! -d "$game" ]; then
        # Can't find the game directory in the Mac spot; see if it's in the PC spot
        game=$appdir/game
        if [ ! -d "$game" ]; then
            echo "Can't find the game directory in $appdir! Exiting now"
            exit
        fi
    fi
    menu
}
 

Madeddy

Active Member
Dec 17, 2017
838
487
...
EDIT: I see... you mean those .pyc files. I think they were created when I run unren. ...
Exactly. That's python bytecode files made by python itself so it runs more easy/faster. Doesnt hurt, but no need to package them with the source. Just as info.
Up to py3.4 it should be .pyo and from there .pyc extension, so its weird you have the modern extension for a py2 app. It shouldn't. Basically impossible to get this extension if correctly run with py2. REALLY weird.
...
No changes were made in the script. Everything should be as Goobdoob coded it.
I didn say and mean there where changes. You misunderstood or i explained shitty. ;)
The code in this lines shows simply there should be alongside the main script a directory named "Unren Tools" with exactly this inside and your uploaded package has this dir missing. Its shouldn't run without error like this...
...Alright, here you go.
Your file rights are OK. I hoped thats the issue.
...
How do you run UnRen? Just by clicking or did you try to run it directly in the console by command? e.g. "./home/USER/Downloads/unren082/UnRen.command"

Another Q: What do you get if you execute the commands "python" and then "python2" in the console?
 
Last edited:
  • Like
Reactions: cold_arctus

darklink5222

Newbie
Jul 16, 2017
88
259
How do you run UnRen? Just by clicking or did you try to run it directly in the console by command? e.g. "./home/USER/Downloads/unren082/UnRen.command"

Another Q: What do you get if you execute the commands "python" and then "python2" in the console?
Double clicking UnRen does nothing. Just nothing, no pops up, no errors, nothing. And when I right-click and then click "Run In Konsole", I get the error I posted in my first post.

As for the pythons:
 

Madeddy

Active Member
Dec 17, 2017
838
487
As for the pythons: ...
Yeah. python command is empty/missing. That should be the problem.
You're missing a symlink to the "python" command which unren uses instead "python2". Read this:
You can do a symlink from python to python2or you use a shell alias for the same basically. Like described...
 
  • Like
Reactions: darklink5222

darklink5222

Newbie
Jul 16, 2017
88
259
Yeah. python command is empty/missing. That should be the problem.
You're missing a symlink to the "python" command which unren uses instead "python2". Read this:
You can do a symlink from python to python2or you use a shell alias for the same basically. Like described...
Well I got the shell alias to work well enough. UnRen still doesn't work though. Double-clicking does nothing, and I get the usual error from Run In Konsole.
Screenshot_20220601_192617.png
 

Madeddy

Active Member
Dec 17, 2017
838
487
It gets weirder every time with your system.... :unsure: I mean i am sitting on Kubuntu 20.04 and have no problems to get this running.
... UnRen still doesn't work though. Double-clicking does nothing, and I get the usual error from Run In Konsole.
Like already mentioned, i think you should to start it directly.
1) Open the Konsole application
2a) Try to run it by command? e.g. "./home/<USERNAME>/Downloads/unren082/UnRen.command"
OR
2b) Navigate per "cd ..." to you Unren directory and start it e.g. "./UnRen.command"

I am really curious what this time happens. Possible just again the error. :oops:
 

darklink5222

Newbie
Jul 16, 2017
88
259
It gets weirder every time with your system.... :unsure: I mean i am sitting on Kubuntu 20.04 and have no problems to get this running.
Like already mentioned, i think you should to start it directly.
1) Open the Konsole application
2a) Try to run it by command? e.g. "./home/<USERNAME>/Downloads/unren082/UnRen.command"
OR
2b) Navigate per "cd ..." to you Unren directory and start it e.g. "./UnRen.command"

I am really curious what this time happens. Possible just again the error. :oops:

Yeah both of them result in the same "Error - cannot find rpatool or unrpyc in UnRen v0.8.2 Tools. Exiting" as usual

Having looked in the command file itself, I think whatever is wrong with my system is involving this area: asdf.jpg

Because it does detect python, but it's those two that seem to be the issue, but that's my completely ignorant and uneducated guess.
 

Mack_Kane

Member
May 28, 2022
170
624
Yeah both of them result in the same "Error - cannot find rpatool or unrpyc in UnRen v0.8.2 Tools. Exiting" as usual

Having looked in the command file itself, I think whatever is wrong with my system is involving this area: View attachment 1848045

Because it does detect python, but it's those two that seem to be the issue, but that's my completely ignorant and uneducated guess.


I am in the exact same situation... annoying.
 

stallerlelo12

New Member
Jan 18, 2022
2
1
Yeah both of them result in the same "Error - cannot find rpatool or unrpyc in UnRen v0.8.2 Tools. Exiting" as usual

Having looked in the command file itself, I think whatever is wrong with my system is involving this area: View attachment 1848045

Because it does detect python, but it's those two that seem to be the issue, but that's my completely ignorant and uneducated guess.
I am in the exact same situation... annoying.
I had the same issue. Do this to fix it.

1. Extract the unren files to any location.
2. Open UnRen.command in text editor.
3. Go to line 72 (may be different) where rpatool_raw and unrpyc_raw variables are defined. Your last screenshot shows the exact lines I am referring to. Remove space in this text "UnRen Tools"
4. Remove space from the actual UnRen Tools folder
5. This error will now be gone and will likely get python is not defined.
6. If you get python is not defined, find and replace "python " (that is python with space at the end) to "python2 " (that is python2 with space). Select match case option. Replace all.
7. After this it will work and ask you to drag and drop your game directory.
8. It will give an error after you select an option. Repeat step 5 in rpatool file inside UnRenTools folder.
 
Last edited:
  • Like
Reactions: ArchmageFil

Mack_Kane

Member
May 28, 2022
170
624
I had the same issue. Do this to fix it.

1. Extract the unren files to any location.
2. Open UnRen.command in text editor.
3. Go to line 72 (may be different) where rpatool_raw and unrpyc_raw variables are defined. Your last screenshot shows the exact lines I am referring to. Remove space in this text "UnRen Tools"
4. Remove space from the actual UnRen Tools folder
5. This error will now be gone and will likely get python is not defined.
6. If you get python is not defined, find and replace "python " (that is python with space at the end) to "python2 " (that is python2 with space). Select match case option. Replace all.
7. After this it will work and ask you to drag and drop your game directory.
8. It will give an error after you select an option. Repeat step 5 in rpatool file inside UnRenTools folder.

Sorry, no change for me but thanks for trying.
 
5.00 star(s) 1 Vote