Jump to content
  • 0

Fixing lwjgl problems


snipertyler

Question

Tested on 64bit & 32bit builds.

 

So the Linux versions, Debs and Tarballs have this on-going problem of not being able to even start.

 

The stand-alone seems to work.

 

However, the Desura, Steam and forum unstable builds have this problem.

 

After a fun time of trial and error, I identified the problem file, liblwjgl.so (and liblwjgl64.so for 64 bit)

 

They need to be replaced by the new stable build of LWJGL. Download the zip and extract the appropriate file to the projectzomboid folder.  It is located in lwjgl-2.9.0.zip/lwjgl-2.9.0/native/linux/liblwjgl.so (and liblwjgl64.so for 64bit)

 

For now, this should fix the problem.

 

 

I developed a terminal command to do this all in one step.

Change the pzfldr variable to your extracted projectzomboid folder (for the forum edition)

Run the command, then enter A<Enter> when indicated for replacing the file.

 

 

Forum Edition: This will work when pz was extracted to a place where you have write permissions. (Try this one first as it lets you easily specify where your pz folder is)

pzfldr="/PATH/TO/projectzomboid/"; if [ ! -f ~/Downloads/lwjgl.zip ]; then (cd ~/Downloads; wget 'http://sourceforge.net/projects/java-game-lib/files/latest/download?source=files' -qO lwjgl.zip); fi && (cd "$pzfldr" && unzip -j ~/Downloads/lwjgl.zip lwjgl-2.9.0/native/linux/liblwjgl64.so lwjgl-2.9.0/native/linux/liblwjgl.so)

If you installed it using Steam

if [ ! -f ~/Downloads/lwjgl.zip ]; then (cd ~/Downloads; wget 'http://sourceforge.net/projects/java-game-lib/files/latest/download?source=files' -qO lwjgl.zip); fi && (cd ~/.local/share/Steam/SteamApps/common/ProjectZomboid/projectzomboid/ && unzip -j "/home/$USER/Downloads/lwjgl.zip" lwjgl-2.9.0/native/linux/liblwjgl64.so lwjgl-2.9.0/native/linux/liblwjgl.so)

If you installed it using a deb file (which installs to /opt/projectzomboid/ and requires root)

if [ ! -f ~/Downloads/lwjgl.zip ]; then (cd ~/Downloads; wget 'http://sourceforge.net/projects/java-game-lib/files/latest/download?source=files' -qO lwjgl.zip); fi && (cd /opt/projectzomboid/ && sudo unzip -j "/home/$USER/Downloads/lwjgl.zip" lwjgl-2.9.0/native/linux/liblwjgl64.so lwjgl-2.9.0/native/linux/liblwjgl.so)

Thank you tazyload for showing me where to find the LWJGL build!

 

CareBearCorpse also made a script that you can simply run as needed inside the projectzomboid folder.

 

I posted this originally here but figured support might be a better place to put this..

Link to comment
Share on other sites

7 answers to this question

Recommended Posts

So the Linux versions, Debs and Tarballs have this on-going problem of not being able to even start.

 

The stand-alone seems to work.

 

However, the Desura and forum unstable builds have this problem.

 

After a fun time of trial and error, I identified the problem file, liblwjgl.so (and liblwjgl64.so for 64 bit)

 

They need to be replaced by the new stable build of LWJGL. Download the zip and extract the appropriate file to the projectzomboid folder.  It is located in lwjgl-2.9.0.zip/lwjgl-2.9.0/native/linux/liblwjgl.so (and liblwjgl64.so for 64bit)

 

 

 

For now, this should fix the problem.

 

I also developed a terminal command to do this all in one step.

Change the pzfldr variable to your extracted projectzomboid folder.

It also requires aria2 (sudo apt-get install aria2)

pzfldr='PATH/TO/projectzomboid/'; aria2c -d ~/Downloads/ 'http://sourceforge.net/projects/java-game-lib/files/latest/download?source=files' && (cd "$pzfldr" ; unzip -j ~/Downloads/lwjgl-2.9.0.zip lwjgl-2.9.0/native/linux/liblwjgl64.so lwjgl-2.9.0/native/linux/liblwjgl.so)

Thank you tazyload for showing me where to find the LWJGL build!

 

I posted this originally here but figured support might be a better place to put this..

Why not use curl or wget instead of aria2c, which most linux users already have?

Link to comment
Share on other sites

Thanks for the script and the thread. Feel nostalgic of the days when we had to edit the lua files and shit...
Here is an imo-simpler-to-use alteration of your script for non privileged use of the tarball :
 
*putting on nerd gear*

## For 32 and 64 bit with tar.gz archive of PZ (no root privileges involved)## To run from the PZ root directory ## if the lib zip file does not exist in the current directoryif ! [ -f lwjgl.zip ]; then  ## download the latest lwjgl zip file and rename it (to avoid arguments errors eg for FAT partition users with '?' unallowed character)  wget 'http://sourceforge.net/projects/java-game-lib/files/latest/download?source=files' -O lwjgl.zip ;  ## extract the needed binaries into current folder  unzip -j lwjgl.zip lwjgl-2.9.0/native/linux/liblwjgl.so lwjgl-2.9.0/native/linux/liblwjgl64.so ;  ## removes the downloaded zip (which makes the if statement useless )  rm lwjgl.zip ;fi

 
=> basically no more need to create and assign a pz path variable
 
How to use :
1. run the script from the extracted PZ root directory.
 
Could be added to bashrc with an alias.

pz-fix.txt

Link to comment
Share on other sites

Thanks for the script and the thread. Feel nostalgic of the days when we had to edit the lua files and shit...

Here is an imo-simpler-to-use alteration of your script for non privileged use of the tarball :

 

*putting on nerd gear*

...

 

=> basically no more need to create and assign a pz path variable

 

How to use :

1. run the script from the extracted PZ root directory.

 

Could be added to bashrc with an alias.

 

I've been building and reading commands from commandlinefu and it blew past me to write a local script lol.

 

I took your script and modified it a little bit,  I hope that's ok :)

1. I re-directed the .zip file back to ~/Downloads and removed the "rm". Now you can run the script in multiple builds without needing to re-download constantly, especially with the frequent forum builds.

2. I added a #!/bin/bash at the top to identify it as a bash script.

 

Thank you for using the -O arguement. I did not know that existed and was ticking me off. I normally use aria2c (aria2) and it doesn't have that weird naming problem..

 

I wouldn't recomend using it as a alias as once it's in place, it's a one time usage.  I would suggest a function. But that gets back to using a variable for the most recently extracted pz folder.

 

Also..

After creating a script, you'll need to run chmod +x pz-fix to let it run as a script

Link to comment
Share on other sites

 

 

I took your script and modified it a little bit,  I hope that's ok  :)

Oh man, i'm so gonna sue you for altering a script that you wrote in the first place.

And you're basically saying i can't waste bandwidth and mess with my config files ? What's wrong with you ?

 

I only realized retrospectively that my script was rubbish ; that's what the nerd mode does to me.

Thanks for these improvements.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...