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

5.00 star(s) 1 Vote

MrBlack ✌

Member
Jun 4, 2017
386
357
That is the one I'm using, ya that stop it from closing and ya I need python 2 I did try to instill it before with no luck.
I remember also some issues with installation and use of python 2+3. Better search the web for a step by step install guide for installing both versions. Or ask ChatGPT for help.
 

Madeddy

Active Member
Dec 17, 2017
941
607
some issues with installation and use of python 2
Good luck with this.
Py2 is dead for 5 years official and unofficial anther 5 or so. AFAIK there are no install candidates anymore for most *nix distros by now. Means compiling it yourself and installing etc. is the way from here on. So fun! :oops:
 

MrBlack ✌

Member
Jun 4, 2017
386
357
Good luck with this.
Py2 is dead for 5 years official and unofficial anther 5 or so. AFAIK there are no install candidates anymore for most *nix distros by now. Means compiling it yourself and installing etc. is the way from here on. So fun! :oops:
It's no problem to download Python 2.7.18 from python.org and compile and install it. Just for installing and using it side by side with up to date python 3 needs a good step by step guide.
 

Ustal

New Member
Jun 15, 2022
8
8
If you don't want to use python2, do the following:

cd to your local path/to/UnRen\ Tools/ install

git clone or download & extract the zip of in ./UnRen\ Tools/

Note: you need to rename ./decompiler/ and unrpyc.py to avoid a naming conflict when making symlinks

While terminal is in path/to/UnRen\ Tools/:

If installed via git clone, run the following:
Bash:
ln -s ./unrpyc/decompiler/ ./decompiler/
Bash:
ln -s ./unrpyc/unrpyc.py ./unrpyc.py
If installed via extracting a zip, run the following:
Bash:
ln -s path/to/decompiler/ ./decompiler/
Bash:
ln -s path/to/unrpyc.py ./unrpyc.py
Next, open ../UnRen.command with an editor.
(Opening normally may default to running it, right click the file -> 'Open With' -> TextEdit.app or another editor application)

Scroll down to (or META+F) down to:
Bash:
rpatool_raw=`dirname "$0"`"/UnRen Tools/rpatool"
rpatool=`python -c "import os; print(os.path.realpath('$rpatool_raw'))"`
unrpyc_raw=`dirname "$0"`"/UnRen Tools/unrpyc.py"
unrpyc=`python -c "import os; print(os.path.realpath('$unrpyc_raw'))"`
pyver=`python -c 'import sys; print(sys.version_info[0])'`
# Python 3 is not currently supported by unrpyc.
if [ $pyver -eq 2 ]; then
    python='python'
else
    python='python2'
fi
And replace it with:
Bash:
rpatool_raw=`dirname "$0"`"/UnRen Tools/rpatool"
rpatool=`python3 -c "import os; print(os.path.realpath('$rpatool_raw'))"`
unrpyc_raw=`dirname "$0"`"/UnRen Tools/unrpyc.py"
unrpyc=`python3 -c "import os; print(os.path.realpath('$unrpyc_raw'))"`
pyver=`python3 -c 'import sys; print(sys.version_info[0])'`
# Python 3 is now supported by unrpyc.
if [ $pyver -eq 3 ]; then
    python='python'
else
    python='python3'
fi
And tada! That's all you needed to do!

(I think I screwed up the methodology, but it'll do.)
 
Last edited:

Pretinaverse

New Member
Jul 29, 2022
12
11
I was getting this error in Ubuntu:

Code:
Cannot find rpatool or unrpyc in UnRen v0.8.2 Tools. Exiting.
I couldn't find the solution on the forum, but in the end I managed to find the solution on my own.
This happens because rpatool and unrpyc try to use the python command. However, if you have python2 installed on your system, you will only have the python2 command available.

The solution is to create a symbolic link for python with the following command:

Code:
sudo ln -s /usr/bin/python2 /usr/bin/python
And that's it. Now it should work for you without any problem. At least it worked for me.

But this is not the only problem I had.

At first, when I wanted to open the application for the first time, I got the following error:

Code:
python is not installed, or not added to your PATH. Please install/reinstall it from python.org
Python 3 is not supported by unrpyc; you need a Python 2 installation
The problem is that the latest versions of ubuntu only bring python 3 in their repositories. And the repositories with python 2 no longer work. The solution is to install manually.

First we have to make sure we have the necessary dependencies for manual installation with the following commands:

Code:
sudo apt update
sudo apt install build-essential zlib1g-dev libncurses5-dev libgdbm-dev libnss3-dev \
libssl-dev libreadline-dev libffi-dev curl
Then we use the following commands to install python2:

Code:
cd /usr/src
sudo curl -O https://www.python.org/ftp/python/2.7.18/Python-2.7.18.tgz
sudo tar xvf Python-2.7.18.tgz
cd Python-2.7.18
sudo ./configure --enable-optimizations
sudo make -j$(nproc)
sudo make altinstall
Next, we verify the installation with:

Code:
python2.7 --version
Now you will have the python2.7 command, but we need the python2 command only, so we create a symbolic link for python2 with the following command:

Code:
sudo ln -s /usr/bin/python2.7 /usr/bin/python2
And that's it.
 

keyNinja

New Member
Feb 21, 2023
8
3
I was getting this error in Ubuntu:

Code:
Cannot find rpatool or unrpyc in UnRen v0.8.2 Tools. Exiting.
I couldn't find the solution on the forum, but in the end I managed to find the solution on my own.
This happens because rpatool and unrpyc try to use the python command. However, if you have python2 installed on your system, you will only have the python2 command available.

The solution is to create a symbolic link for python with the following command:

Code:
sudo ln -s /usr/bin/python2 /usr/bin/python
Although that works i wouldn't recommend it. Manually lning applications might fuck up other applications that you have installed. E.x yt-dlp might not work anymore as it requires python3.

If you wan't to do it manually you can edit your path variable temporrary by executing export PATH=/usr/local/src/pythony2/:$PATH

This will prepend the python2 binaries to your path and allow you to execute the command that needs another runtime.

Personally i also wouldn't do this do, as tools as pyenv exist.

Toolsl ike pyenv can make it easier to swithc between alot of python versions without making it hard to maintain it.



Basicly you could just run this three commands on most linux installations, but read the readme to make sure that it works on your system.


Code:
curl -fsSL https://pyenv.run | bash
pyenv install 2.X
pyenv global 2.X
unren...
[/CODE]
 

Madeddy

Active Member
Dec 17, 2017
941
607
Although that works i wouldn't recommend it. Manually lning applications might fuck up other applications...
Yeah. And its dead. I would rather change this old versions of "unren for mac/lx" to point to python2. In case someone overhauls it for py3 we're already set, so there will be no chaos.
Personally i also wouldn't do this do, as tools as pyenv exist.
And there is also pipx which automatically creates a venv for each pip app install.
 

gopherino

Member
Dec 23, 2021
117
104
This version of unren did not work on a recently issued game. I had to go over to Windows to use the newer versions of unren they have there. Could someone please update unren for mac so it doesn't crash with very new games?
 

mordred93

Well-Known Member
Jul 21, 2017
1,771
2,758
The first one I had crash on me today as well for getting the game to extract the RPA files. I went it and deleted the /lib/py3-windows-x86_64 directory in the game file, and then tried to re-unren it, and it worked on Linux. The error had to do with unable to find a version of python, which there was 4 installed in the /lib directory.
 

gopherino

Member
Dec 23, 2021
117
104
So apparently the problem is the MAC and Linux versions use dead python2. Would someone who understands the relevant code please update to python3 and publish the results. THANKS!
 

Pretinaverse

New Member
Jul 29, 2022
12
11
So apparently the problem is the MAC and Linux versions use dead python2. Would someone who understands the relevant code please update to python3 and publish the results. THANKS!
Could you try this? I don't know how to program, but I used ChatGPT to modify the UnRen.command code to make it compatible with Python 3. I also used the unrpyc versions of CensoredUsername and rpatool from shizmob, which they updated to work with Python 3.
So far it seems to be working fine for me in Linux Mint 22.1, but I would appreciate to know if it works fine on other linux distributions or ubuntu with python 3.
 

MrBlack ✌

Member
Jun 4, 2017
386
357
Could you try this? I don't know how to program, but I used ChatGPT to modify the UnRen.command code to make it compatible with Python 3. I also used the unrpyc versions of CensoredUsername and rpatool from shizmob, which they updated to work with Python 3.
So far it seems to be working fine for me in Linux Mint 22.1, but I would appreciate to know if it works fine on other linux distributions or ubuntu with python 3.
Have you even tried this version: https://f95zone.to/threads/unren-for-macos-and-linux-v0-8-2.16887/post-9236030 instead of the one from the OP?
I recommend it.
 

MrBlack ✌

Member
Jun 4, 2017
386
357
I'm not sure what the issue is, but whenever I put the folder in and press 'Enter', the tool just closes. So that version doesn't work for me too.
Just the parent folder with the game's .sh and .py directly in it?
I assume, you're running it by 'run as application' from a file explorer.
Try to run it from terminal, then it won't close and you'll see the error. Do you know how?
 

Pretinaverse

New Member
Jul 29, 2022
12
11
Just the parent folder with the game's .sh and .py directly in it?
I assume, you're running it by 'run as application' from a file explorer.
Try to run it from terminal, then it won't close and you'll see the error. Do you know how?
I think it's a compatibility issue with the game's renpy version.
I just tried it with another game and it worked fine. But with Dark or Light v0.10, I received the following error message:
Unable to locate the game's Python libraries. Exiting...'
I think the tool needs to be updated to include new coding for rpatool and unrpyc.

For now, I will continue to use the version I modified with the help of ChatGPT. There don't seem to be any problems, and I haven't experienced any issues with library detection either because rpatool and unrpyc are not coded inside of the UnRen.command file, instead they are in separate folders and can be easily updated by downloading the new versions from github.
 
  • Like
Reactions: MrBlack ✌

gopherino

Member
Dec 23, 2021
117
104
Could you try this? I don't know how to program, but I used ChatGPT to modify the UnRen.command code to make it compatible with Python 3. I also used the unrpyc versions of CensoredUsername and rpatool from shizmob, which they updated to work with Python 3.
So far it seems to be working fine for me in Linux Mint 22.1, but I would appreciate to know if it works fine on other linux distributions or ubuntu with python 3.
It doesn't work on mac. I got the error: Module not found: deobfuscate.
 

gopherino

Member
Dec 23, 2021
117
104
[EDIT] Updated to v0.17.0: Update Unrpyc.py and rpatool from the VepsrP UnRen-forall v.8.8
======


Here is an updated UnRen for Mac and also works for Linux. Based on the latest UnRen-forall.

View attachment 2119057

You don't have permission to view the spoiler content. Log in or register now.
This one (17) did what it was supposed to do, added SHFT-O and other, and decompiled the .rpyc files, but the game with the new stuff would not start. If fact, the error came out "Could not find 'start'".
 

Pretinaverse

New Member
Jul 29, 2022
12
11
It doesn't work on mac. I got the error: Module not found: deobfuscate.
Apparently I forgot to add the deobfuscate.py file.
I hadn't noticed it because I hadn't encountered that error in linux, which is the operating system I use. Now I added it. Try it and let me know.
 
5.00 star(s) 1 Vote