Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Arena Installation on Linux #40

Closed
afritz1 opened this issue Jul 22, 2016 · 21 comments
Closed

Arena Installation on Linux #40

afritz1 opened this issue Jul 22, 2016 · 21 comments

Comments

@afritz1
Copy link
Owner

afritz1 commented Jul 22, 2016

I don't have a Linux computer handy, and I'm not sure how much of an issue this is for Linux users, but the download link on the Bethesda website provides an install file named Arena106.exe, which is (clearly) a Windows executable.

This is essentially how the process is done on Windows:

  • Download the Full Game
  • Extract Arena106Setup.zip
  • Run Arena106.exe
  • Pick a destination folder (anywhere)
  • Install

Is there an easy way for Linux users to use that file to install everything into a new ARENA folder? Maybe with DOSBox? What about Wine? I'm not familiar with Wine, so anyway I'm just looking for suggestions of things I could add to the install instructions in the Readme that would streamline this part for Linux users.

@Ragora
Copy link
Contributor

Ragora commented Jul 23, 2016

WINE should be sufficient enough for something like that to install. Let me run through those instructions to see if there's any hitches.

Edit
Looks like it should work for any reasonably modern version of WINE (its a basic self-extracting RAR more or less, so it should really work on any). Installer up there runs fine in WINE 1.6.2 under Linux Mint AMD64.

If someone doesn't want to use WINE (I've heard of people who don't), it might be possible to have something manually extract the contents but at that point I'd say if they don't want to use WINE for one application that runs totally FOSS afterwards, that's a bit much.

DOSBox is an option for those users above probably, assuming you can obtain a DOS image for the right version of the game but that's more or less just the same thing as just using WINE for that installer.

@afritz1
Copy link
Owner Author

afritz1 commented Jul 23, 2016

Okay, I'll make some changes to the instructions section about that then. I think I should also trim out some of the extra fluff in there, too. Just so it's more to the point. I want to make it as plug-and-play as I can! And the MIDI config is not helping with that. I'll have to iron out some of those things at some point.

@Ragora
Copy link
Contributor

Ragora commented Jul 24, 2016

WINE just won't work for any non x86 users. Those trying to run it on other architectures would need other options (this is a situation where an alternate extractor would be handy), and I'm not even completely sure if DOSBox would work in that instance either.

I mention this because inn theory you can build OpenTESArena for any architecture that has GPU's that can run OpenCL.

@psi29a
Copy link

psi29a commented Jul 26, 2016

As mentioned above, Arena106.exe is a self-extracting rar archive.

We can link against libunrar and make our own installer/launcher. This is similar to how OpenMW works with libunshield to unpack just the 'Data Files' necessary to run OpenMW.

You can be selective of the files you want to extract (only necessary to run, like the data files) and place them where OpenTESArena will find them.

The plus here is that it is OS and architecture independent.

@afritz1
Copy link
Owner Author

afritz1 commented Jul 26, 2016

We can link against libunrar and make our own installer/launcher.

That's interesting. I've always wondered how those install wizards work.

So if we make our own, does that mean users will download our installer package instead of Arena106Setup.zip from the official website? Wouldn't that be affected by the intellectual property issues we discussed before?

You can be selective of the files you want to extract (only necessary to run, like the data files) and place them where OpenTESArena will find them.

Okay. So we can pick a folder on their hard drive to install to, like with C:\Program Files (x86)\OpenMW 0.37.0 on my computer? What if we want to add more files to extract in the future? We just make a new installer then?

@Ragora
Copy link
Contributor

Ragora commented Jul 26, 2016

They'd still download from that website. It would just provide a platform agnostic way to extract it as it would be its own independent piece of programming. Even if it means they still have to download the game itself manually it is still better than having to rely on WINE or DOSBox once they do have the package.

If you want to add files as time marches on, you would need to need to build a new installer if you went some naive route with hardcoding the lists, but I'd probably approach it with an external data file that indicates what should be extracted that way rebuilds of the installer is much, much less frequent if you don't want to extract all data files up front.
But, extracting all the data files regardless of what's actually used would be easier in the long run because then as OpenTESArena needs resources they will just be there in your install directory from months ago (as a hypothetical) instead of having to rerun an installer for every new update or have the game itself check out your install directory or something like that. Not like the game uses remotely any sort of space on disk once extracted.

@psi29a
Copy link

psi29a commented Jul 27, 2016

At no point should OpenTESArena bundle/package/distribute non OpenTESArena IP.

The walkthrough:

  • The assumption is that the user will still need to download the archive.
  • The launcher/wizard whatever would then have two buttons: 'Extract the game from archive.' or 'The game can be located here." (or something like that)
  • The launcher/wizard then validates the archive via checksum, if checksum doesn't match, say so to user and provide link to where they can download it.
  • The launcher/wizard then validates via checksum the files it needs to run, if checksum doesn't match, say so to user and provide link to where they can download it.
  • Once validated, then the launcher will be happy and you can adjust things before playing.

You let the user decide where to install OpenTESArena and the Arena files, and just put the paths in a config file. OpenTESArena will need to carry around the checksums of the archive and files it needs to run. The checksums aren't Bethesda's IP, so that is safe to do in code.

Note: I'm not saying what must be done, just noting how it is done elsewhere so perhaps we can follow the example used by OpenMW.

@jonesmz
Copy link

jonesmz commented Dec 13, 2016

Why bother extracting the contents of the self-extracting rar file to the filesystem?

As said above, OpenTESArena can be told the location of Arena106.exe / Arena106Setup.zip, and handle the "setup" itself. But the entire game is so small that the engine could, if programmed to do so, hold the entire contents of the game files in ram and access them there.

@psi29a
Copy link

psi29a commented Dec 13, 2016

This is a good point, just having the archive is enough. Reading it directly into RAM will remove the need for an 'install wizard'. It would push the need for a unzip and unrar library into opentesarena.

@mdmallardi
Copy link
Contributor

mdmallardi commented Dec 13, 2016 via email

@afritz1
Copy link
Owner Author

afritz1 commented Dec 13, 2016

Reading Arena106.exe into memory and decompressing it there would be an option. I'm not sure how that changes the initialization and behavior of the virtual file system though, because that is set up to work with loose files in an ARENA directory. Wouldn't this change also make it more complicated for modders to change data files? I think I like the idea of doing what OpenMW does instead, so it would just link with libunrar.

There aren't too many differences with the CD version... it adds a folder with .VOC files for speech, adds a couple new cinematics such as zooming in on the book at startup, replaces a couple old cinematics, and a couple other little things. I haven't played all the way through either version but I believe they have different ending cinematics (floppy version includes Talin, CD version doesn't). Anyway, it's not hard to check in the code for existence of those files if they are lying around in the file system.

@mdmallardi
Copy link
Contributor

So, I looked at this today. Arena106.exe is simply a RAR compressed SFX exe. 'rar x' extracts this properly

@afritz1
Copy link
Owner Author

afritz1 commented May 2, 2017

Good to know. Does that mean the only dependency we need to add is libunrar? I'd still prefer having an ARENA directory that everything gets unpacked into by some wizard. Would this wizard be the same for all platforms?

@psi29a
Copy link

psi29a commented May 2, 2017

I still would like for OpenTESArena to read the data in place instead of requiring someone to unpack it first.

If we can't do that, we can use libunrar to do it for the end-user without requiring them do it themselves. The whole point is to reduce the number of ways the user can screw things up.

@Yaksinikos
Copy link

Hey guys, just tried out v. 0.4.0 - installed it like the first release, but now they is sth else;
terminal output here;
Game: Initializing (Platform: Linux). KVP Text Map error: Key "ModernInterface" not found.

@afritz1
Copy link
Owner Author

afritz1 commented Jun 8, 2017

@Translator5, the wrong options.txt got into the Linux v0.4.0 releases. I fixed it just now.

@afritz1
Copy link
Owner Author

afritz1 commented Jun 15, 2017

@mdmallardi, can you give me some details on using rar x with the executable? Like, the process a Linux user would follow so that I can put it in the installation instructions. Do they need to install some kind of RAR software or do most distributions have it already? Does rar x produce an ARENA folder with everything unpacked in it? I assume most Linux distributions have no problems with .zip folders (based on my past experience with Ubuntu).

My current plan is to have an interim solution for Linux users who would prefer not to use WINE until we figure out a way to load data straight from the .zip folder as discussed above. Changing the existing data loading method is low priority since I'm still focused on other details in the engine right now, but I would like the installation to be a bit more convenient for Linux users in the meantime.

@mdmallardi
Copy link
Contributor

mdmallardi commented Jun 15, 2017

How I would do it on Ubuntu 16.04

  • sudo apt-get install wget unzip rar
  • wget https://cdnstatic.bethsoft.com/elderscrolls.com/assets/files/tes/extras/Arena106Setup.zip
  • wget https://github.com/afritz1/OpenTESArena/releases/download/opentesarena-0.4.0/opentesarena-0.4.0-Linux64.tar.gz
  • tar xvzf opentesarena-0.4.0-Linux64.tar.gz
  • cd opentesarena-0.4.0/data
  • unzip ../../Arena106Setup.zip
  • rar x Arena106.exe
  • cd ..
  • ./run.sh

(Note, this does not cover installing or configuring sound patchsets for WildMidi)

It's possible to also install the CD version that GOG gives out for free with the purchase of Redguard. Battlespire, Morrowind or Oblivion without Wine, but that does not currently work with OpenTESArena. The steps I just tried:

  • sudo apt-get install wget innoextract
  • wget https://github.com/afritz1/OpenTESArena/releases/download/opentesarena-0.4.0/opentesarena-0.4.0-Linux64.tar.gz
  • tar xvzf opentesarena-0.4.0-Linux64.tar.gz
  • Download Windows Installer from GOG to same directory from a web browser
  • cd opentesarena-0.4.0-Linux64.tar.gz/data
  • innoextract -g ../../setup_tes_arena_2.0.0.5.exe
  • mv app ARENA
  • cd ARENA
  • ln -sf ACD.EXE A.EXE
  • cd ../..
  • ./run.sh

I imagine that these instructions could easily be adapted to most Linux distros.

@Thunderforge
Copy link
Collaborator

Thunderforge commented Jan 27, 2018

The Mac equivalent for getting the freeware floppy version would be this (requires Homebrew to be installed):

brew install unrar
curl -o Arena106Setup.zip http://static.elderscrolls.com/elderscrolls.com/assets/files/tes/extras/Arena106Setup.zip
unzip Arena106Setup.zip -x "Arena106 Setup.pdf"
unrar x Arena106.exe

As I recall, most Linux distros have curl available by default, so you could probably save the trouble of installing wget. The main advantage of wget is that it can download recursively (like every file on a website), but since we're only downloading one file, using the simpler curl that is always available should be fine.

We would probably be better off using libunrar or something in the long run, that way Arena can be downloaded and unpacked without installing stuff to the user's machine.

@mdmallardi
Copy link
Contributor

Oh true. wget is purely personal preference/force of habit for me.

@afritz1
Copy link
Owner Author

afritz1 commented Aug 22, 2018

I think this issue can be closed now since the Linux installation instructions are in the Readme. If any extra instructions are needed then those can be added in a new issue or pull request. Discussion about a libunrar dependency, wizard, etc. should be in a separate issue since those topics are platform-agnostic.

@afritz1 afritz1 closed this as completed Aug 22, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants