Welcome, Guest. Please login or register.
Did you miss your activation email?
October 31, 2020, 03:47:27 pm

Login with username, password and session length
Search:     Advanced search
Savage: XR is a new patch for Savage, created by the Newerth.com staff. The XR1.1 Client is out now! Download it now!
190053 Posts in 11007 Topics by 18543 Members
Latest Member: kevin5698
* Home Forum Wiki Help Search Login Register
+  Newerth Forums
|-+  Savage XR
| |-+  General Savage XR Discussion
| | |-+  Unofficial "Savage XR - Battle for Newerth" Linux Flatpak
0 Members and 1 Guest are viewing this topic. « previous next »
Pages: [1] 2 3 4 Go Down Print
Author Topic: Unofficial "Savage XR - Battle for Newerth" Linux Flatpak  (Read 13746 times)
C.I.A.
XR Contributor
Jr. Member
****
Posts: 70


View Profile
« on: August 09, 2018, 06:30:36 pm »

Cheers to DJ for enabling my account, Admins/Mods - if this is posted in the wrong forum apologies and please move it.


Like a few of you playing Savage XR on Linux it can be a time consuming chore to get the 32-bit Savage XR running correctly under a modern 64-bit distro and fix it after the AutoUpdate has run, grrr.

This is certainly discouraging to newbies that would just like to play Savage XR.

So I've created a project on GitLab to get Savage XR running from within a Flatpak, thus (hopefully) making it easier to install:

   * https://gitlab.com/sea-eye-aya/unofficial-savage-xr-flatpak

Latest tagged releases here:
   * https://gitlab.com/sea-eye-aya/unofficial-savage-xr-flatpak/tags/Version-0-9-0

NOTE: NO S2 Games or Savage XR copyrighted resources/material/products are included in the Flatpak, It is only when you run the Flatpak for the first time that Savage XR will be downloaded and installed.

There is now a Flatpak Bundle inside the downloaded archive which makes it very easy to install Savage.

1. Extract the archive
2. Checksum the flatpak matches:
    - sha256sum savagexr-i386-0.9.0.flatpak
    - 3891a96070097d6c64e4375bbc0125316e1a36c09a614fb4cdfb3b9f41d43672
3. Install with:
    - flatpak --user remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
    - flatpak --user install savagexr-i386-0.9.0.flatpak
4. Run Savage for the first time from the CLI which will download and install XR from newerth.com:
    - flatpak run org.newerth.savagexr
5. Enjoy Savage!

Under your Applications "Game" menu you will find a new icon to launch Savage XR, called "Savage XR - Battle for Newerth", or you can launch from the command line.


For those that still want to build the Flatpak locally from source:

I've written a script to handle the install/update/running of Savage XR within a Flatpak, along with the required build environment.

So what is a Flatpak? (https://flatpak.org/) It is a wrapper for applications so that they can be installed across distributions with all their required dependences met. It is lighter weight that a Virtual Machine so does not contain the over heads or performance impact of a VM.


There is also a central repository to place these Flatpaks (https://flathub.org/), although I have not placed Savage XR on there on purpose. As hopefully, if successful, we can make an "official" Newerth Savage XR Flatpak and add that instead.


Once Flatpak and Flatpak-builder are installed on your system it is a simple case of:
       * make
       * make install

To install Savage XR.

And to remove:
       * make uninstall

The only major issue so far is installing on a PC with less than 2GB of RAM as the InstallJammer (https://en.wikipedia.org/wiki/InstallJammer) used by Savage XR starts using ALL the RAM (and refuses to use swap) then crashes. Which is also effect other Flatpaks (in 2018) as well and seems to be caused by the OSTree layer, so once that gets fixed and tricks down to distros this wont be an issue.

Instructions for installation are located on GitLab:
       * https://gitlab.com/sea-eye-aya/unofficial-savage-xr-flatpak


Enjoy Smiley

C.I.A.
Certain Death to..... Chain Buffers!!!
« Last Edit: July 16, 2020, 06:02:00 pm by C.I.A. » Logged
drk
Community Serveradmin
XR Coder
Hero Member
***
Posts: 550



View Profile
« Reply #1 on: August 09, 2018, 08:38:28 pm »

Wish that some day we'll manage to update old linux libs for client Smiley
Logged

Hakugei
XR Coder
Legendary Member
***
Posts: 3837



View Profile
« Reply #2 on: August 09, 2018, 09:38:14 pm »

Thank you for the effort.
Linux has always been a pain to deal with; so any tricks to help alleviate the troubles is appreciated.
Logged
Groentjuh
Newerth Serveradmin, German Mirror and Webdeveloper
Administrator
Super Hero Member
*****
Posts: 1379


View Profile WWW
« Reply #3 on: August 10, 2018, 01:06:40 pm »

Nice that you've made something that makes running Savage XR easier on linux.

Quote
# moveBinOutOfWay() Move Savage XR binary out of the way prior to Autoupdater,
# to stop Savage XR starting automatically after update.
This is simple, but can't you edit AU.cfg to have the line 'startApplication "0"' instead of 'startApplication "1"' and change that back afterwards? (Or not change it back so your bootstrap stays in control)

Technically it is also possible to change the applicationFileName to some script that fixes any libs that the AU possibly breaks Wink and starts savage afterwards. That would also simplify your script.
Logged


Before adding any of my IMs, ask yourself: Can I ask it in a PM?
Before sending me a PM with questions, Search the forums!
Wanna be ref? Post on my Server Forum
C.I.A.
XR Contributor
Jr. Member
****
Posts: 70


View Profile
« Reply #4 on: August 10, 2018, 04:33:55 pm »

Very useful information Groentjuh, thanks.

I didn't know there is a config switch for the AutoUpdater, renaming the silverback.bin felt very dirty so I'd be pleased to remove that bit.

Does the AutoUpdater every update the silverback.bin file???


So far I've found dealing with Flatpaks internals unpleasant, verging on the mystical at points. Looks like they switched source code hosting at some point and its been difficult to track down the change logs to find when features were added (you need a fairly new version of Flatpak-builder in order to build the Savage XR Flatpak).

The Flatpak docs aren't that great yet either, hopefully they'll improve, but there is no versioning for their docs only "latest", unlike for example PostgreSQL docs. So again finding out when a command was introduced is difficult:
  * http://docs.flatpak.org/en/latest

Its also easy to think its a VM when its not, you can't just install an old version of Debian and have all the old libs work magically, you have to compile the libs from source (in order too, libglu before libsdl or no 3D and no errors, took a while to find that one! Even though its screamingly obvious!).

It really feels like there should be a Flatpak dev repo for those libs as every Flatpak has to compile them.

For example I couldn't get libfltk1.1 (Fast Light Toolkit) to compile at all, its syntax was rejected by gcc. Fast Light Toolkit, version 1.1.10 was abandoned long ago and they refuse to update it even though software uses it. I did manage to find a patch written by the Debian maintainer which is included in Debian 9 (Stretch). But even after apply this patch gcc still hates it.
  * https://packages.debian.org/stretch/libfltk1.1

So I need to fire off an email to their maintainer, or possibly track down an earlier patch version, or find some "magic" to get it to compile.

I'm assuming that libfltk is only needed by the Savage XR map editor? I have made no effort to get that to run yet.

I can only imagine the nightmare of changes need to compile Savage XR for the latest libs and compilers (I really would love a 64-bit version of Savage XR)!


Anyway feel free to make any changed and create a pull request on gitlab (or pm/message/email me).

I quite happy to hand over control of this "project" to Newerth, or Fork the project.
Logged
C.I.A.
XR Contributor
Jr. Member
****
Posts: 70


View Profile
« Reply #5 on: August 10, 2018, 05:40:38 pm »

Just as an additional after thought.

 Ubuntu's Core Snappy - an alternative to Flatpak did start adding a beta for "base snaps" which are based on different distros, which could have contained old libs, which Savage XR might like:
  * Introducing base snaps  2017-04-24
  * https://forum.snapcraft.io/t/introducing-base-snaps/381/14

However it was/is a beta and the examples given are not old enough, but something worth keeping an eye on.
Logged
drk
Community Serveradmin
XR Coder
Hero Member
***
Posts: 550



View Profile
« Reply #6 on: August 10, 2018, 07:21:52 pm »

I'm just curious aren't you familiar with the cmake? Smiley

ps: tried your launcher at work on 64bit ubuntu 16:

Quote
added flatpak's repo + installed it

~/Downloads/test/unofficial-savage-xr-flatpak$ make

Unofficial Flatpak Bootstrap (installer/update/runner) for
S2 Games, Savage XR 'Battle for Newerth'
By C.I.A.
                         Version: '0.2.0'

   Local Flatpak repo           : 'my-flatpak-repo'
   Local Flatpak build directory: 'savagexr'
   External Flathub repo        : 'https://flathub.org/repo/flathub.flatpakrepo'

flatpak --user remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
flatpak --user install flathub org.freedesktop.Platform/i386 1.6
Installing in user:
org.freedesktop.Platform/i386/1.6             flathub e014d9a2a91c
org.freedesktop.Platform.VAAPI.Intel/i386/1.6 flathub 79562a9f2c69
org.freedesktop.Platform.ffmpeg/i386/1.6      flathub 3a0b926d19f8
org.gtk.Gtk3theme.Ambiance/i386/3.22          flathub 884e04ec51a5
org.freedesktop.Platform.Locale/i386/1.6      flathub f41e2b84d858
Is this ok [y/n]: y
Installing for user: org.freedesktop.Platform/i386/1.6 from flathub
[####################] 8 delta parts, 67 loose fetched; 192747 KiB transferred in 28 seconds
Now at e014d9a2a91c.
Installing for user: org.freedesktop.Platform.VAAPI.Intel/i386/1.6 from flathub
[####################] 1 delta parts, 2 loose fetched; 2585 KiB transferred in 2 seconds
Now at 79562a9f2c69.
Installing for user: org.freedesktop.Platform.ffmpeg/i386/1.6 from flathub
[####################] 1 delta parts, 2 loose fetched; 2783 KiB transferred in 2 seconds
Now at 3a0b926d19f8.
Installing for user: org.gtk.Gtk3theme.Ambiance/i386/3.22 from flathub
[####################] 1 delta parts, 1 loose fetched; 292 KiB transferred in 1 seconds
Now at 884e04ec51a5.
Installing for user: org.freedesktop.Platform.Locale/i386/1.6 from flathub
[####################] 4 metadata, 1 content objects fetched; 14 KiB transferred in 1 seconds
Now at f41e2b84d858.
flatpak --user install flathub org.freedesktop.Sdk/i386 1.6
Installing in user:
org.freedesktop.Sdk/i386/1.6        flathub a4678412ae2c
org.freedesktop.Sdk.Locale/i386/1.6 flathub 337cb6a016ac
Is this ok [y/n]: y
Installing for user: org.freedesktop.Sdk/i386/1.6 from flathub
[####################] 17 delta parts, 100 loose fetched; 220636 KiB transferred in 51 seconds
Now at a4678412ae2c.
Installing for user: org.freedesktop.Sdk.Locale/i386/1.6 from flathub
[####################] 3 metadata, 1 content objects fetched; 13 KiB transferred in 1 seconds
Now at 337cb6a016ac.
flatpak-builder --user --arch=i386 --force-clean --repo=my-flatpak-repo savagexr com.s2games.savagexr.json freedesktop.Platform/i386/1.6 org.freedesktop.Sdk/i386/1.6
make: flatpak-builder: Command not found
makefile:90: recipe for target 'buildFlatpak' failed
make: *** [buildFlatpak] Error 127

~/Downloads/test/unofficial-savage-xr-flatpak$ sudo apt install flatpak-builder
...
~/Downloads/test/unofficial-savage-xr-flatpak$ make

Unofficial Flatpak Bootstrap (installer/update/runner) for
S2 Games, Savage XR 'Battle for Newerth'
By C.I.A.
                         Version: '0.2.0'

   Local Flatpak repo           : 'my-flatpak-repo'
   Local Flatpak build directory: 'savagexr'
   External Flathub repo        : 'https://flathub.org/repo/flathub.flatpakrepo'

flatpak --user remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
flatpak --user install flathub org.freedesktop.Platform/i386 1.6
Skipping: org.freedesktop.Platform/i386/1.6 is already installed
flatpak --user install flathub org.freedesktop.Sdk/i386 1.6
Skipping: org.freedesktop.Sdk/i386/1.6 is already installed
flatpak-builder --user --arch=i386 --force-clean --repo=my-flatpak-repo savagexr com.s2games.savagexr.json freedesktop.Platform/i386/1.6 org.freedesktop.Sdk/i386/1.6
Downloading sources
Downloading https://ftp.gnu.org/gnu/wget/wget-1.19.tar.xz
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 2027k  100 2027k    0     0   928k      0  0:00:02  0:00:02 --:--:--  929k
Downloading http://www.freedesktop.org/software/harfbuzz/release/harfbuzz-1.7.6.tar.bz2
100   345  100   345    0     0    816      0 --:--:-- --:--:-- --:--:--   816
100 2526k  100 2526k    0     0   748k      0  0:00:03  0:00:03 --:--:--  880k
Downloading http://pkgs.fedoraproject.org/repo/pkgs/mesa/glu-9.0.0.tar.bz2/be9249132ff49275461cf92039083030/glu-9.0.0.tar.bz2
100   297  100   297    0     0    380      0 --:--:-- --:--:-- --:--:--   452
  0     0    0     0    0     0      0      0 --:--:--  0:00:01 --:--:--     0
Failed to download sources: module libGLU: gnutls_handshake() failed: The TLS connection was non-properly terminated.
makefile:90: recipe for target 'buildFlatpak' failed
make: *** [buildFlatpak] Error 1

~/Downloads/test/unofficial-savage-xr-flatpak$
Something went wrong with that lib
Logged

C.I.A.
XR Contributor
Jr. Member
****
Posts: 70


View Profile
« Reply #7 on: August 10, 2018, 09:57:42 pm »

Hi drk,


Hmm...

looks like its was a connection issue to the server:
  * Failed to download sources: module libGLU: gnutls_handshake() failed: The TLS connection was non-properly terminated.

I clicked on the link in your post and it downloaded first time:
  * http://pkgs.fedoraproject.org/repo/pkgs/mesa/glu-9.0.0.tar.bz2/be9249132ff49275461cf92039083030/glu-9.0.0.tar.bz2

And have just rebuilt the Savage XR Flatpak successfully.

So..... Try building it again??

If its a flaky connection to that server, I shall try to find another hosting that file (I think it fell over for me once before).

I dont think its possible to adjust the re-tries as its part of the build recipe for the Flatpak, but shall have a look anyway.

Dont forget you need Flatpak-builder v0.99.1 or above, it wont work with v 0.8.x series Sad

Thanks for your input.
Regards,
C.I.A.
Logged
drk
Community Serveradmin
XR Coder
Hero Member
***
Posts: 550



View Profile
« Reply #8 on: August 10, 2018, 10:01:33 pm »

No problem  Afro Will try again on Monday.
I had like 5 min to test it today before I left. Had no time to get into datails.
Logged

Groentjuh
Newerth Serveradmin, German Mirror and Webdeveloper
Administrator
Super Hero Member
*****
Posts: 1379


View Profile WWW
« Reply #9 on: August 11, 2018, 07:23:57 am »

Very useful information Groentjuh, thanks.

I didn't know there is a config switch for the AutoUpdater, renaming the silverback.bin felt very dirty so I'd be pleased to remove that bit.

Does the AutoUpdater every update the silverback.bin file???
Yes, because you move it, the AU will see it as a file it is missing!
Logged


Before adding any of my IMs, ask yourself: Can I ask it in a PM?
Before sending me a PM with questions, Search the forums!
Wanna be ref? Post on my Server Forum
C.I.A.
XR Contributor
Jr. Member
****
Posts: 70


View Profile
« Reply #10 on: August 13, 2018, 04:14:47 pm »

Version 0.3.0 is now committed and tagged, change log:

Version:   0.3.0
Date: 2018/8/13

Enhancements:
  * Thanks to Groentjuh for pointing out that there is a config param to stop the AutoUpdater from automatically start Savage XR. This removed the need for renaming the Savage XR binary before and after AutoUpdates.

And can be located here:
  * https://gitlab.com/sea-eye-aya/unofficial-savage-xr-flatpak/tags
Logged
Daemon
XR Main Developer
Legendary Member
****
Posts: 4822


beware, for this is the everbroken...


View Profile
« Reply #11 on: August 13, 2018, 07:24:42 pm »

Awesome! Thank you!
Logged

drk
Community Serveradmin
XR Coder
Hero Member
***
Posts: 550



View Profile
« Reply #12 on: August 13, 2018, 10:35:09 pm »

@C.I.A. by the way, tested it again today and had to manually download 2 of the libs during the "make" phase: wget-1.19.tar.xz and glu-9.0.0.tar.bz2. Manual download was fine while "make" failed on them.
Logged

C.I.A.
XR Contributor
Jr. Member
****
Posts: 70


View Profile
« Reply #13 on: August 14, 2018, 09:57:34 pm »

Hi Drk,

Very odd, there is no reason why they are failing when built from the "make" file.

We don't want location or flaky internet having an effect on the build process.

So if you've got time here are some mirror locations to try, which should redirect you depending on server load (and hopefully location):
  * http://ftpmirror.gnu.org/wget/wget-1.19.tar.gz
  * sha256 different due to compression dd9523039845f69e8e945e9f2d5a38af6b1e29efa6ff53830507310235ddade8

Alternate libglu.
  * http://ftp://ftp.freedesktop.org/pub/mesa/glu/glu-9.0.0.tar.bz2
  * sha256 is the same

Correct the URLs in the Module section of the Manifest, which is the com.s2games.savagexr.json file:
  * https://gitlab.com/sea-eye-aya/unofficial-savage-xr-flatpak/blob/Version-0-3-0/com.s2games.savagexr.json
 
Basically google for the URL location of any failing packages and paste it into the Manifest (checking that the file type has not changed as this will change the sha256 checksum value).

Although I think Manifest is the wrong term as it is a Recipe and not just a list of contents and can get quite complex very quickly, further info about Manifests located here:
  * http://docs.flatpak.org/en/latest/manifests.html

I just changed these Modules' URLs and built successfully (although SDL was downloading very slowly).

Thanks for your time and hope this helps.

If successful for you I'll add them to the Manifest.

C.I.A.
Logged
drk
Community Serveradmin
XR Coder
Hero Member
***
Posts: 550



View Profile
« Reply #14 on: August 15, 2018, 07:02:47 pm »

Tested yesterday and saw that gnu.org was working while ftp.gnu.org was not responding Smiley (just saying)
Today tried again. It went well with all of the downloads.
Two problems:
first: stucked on launching (I guess so) sav-installer.bin
Terminated it and then tried again "flatpak run sav".
It showed me (because sav was not installed):
Quote
Unable to update Savage XR....
Cannot locate 'savage.sh' to update Savage XR.
Tried to launch install-sav.bin manually from ~/.var/app/sav/ - nothing happens. I think that is the problem at this moment  Wink

ps: VM with Ubuntu 18.
Logged

Pages: [1] 2 3 4 Go Up Print 
« previous next »
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2006-2007, Simple Machines Valid XHTML 1.0! Valid CSS!
Page created in 0.031 seconds with 19 queries.