[1.12] Offline instalation on Ubuntu 14.04 LTS

Get help with compiling or installing the game, and discuss announcements of new official releases.

Moderator: Forum Moderators

Post Reply
paxpan
Posts: 6
Joined: December 17th, 2014, 2:19 am

[1.12] Offline instalation on Ubuntu 14.04 LTS

Post by paxpan »

Hi everyone,
I'm in a quite particular situation: I have a desktop in my house, which is in the country-side (i'd rather said: on the forest-side) and has no internet link whatsoever. Here in my office I was able to install wesnoth-1.12 following Elven instructions (http://forums.wesnoth.org/viewtopic.php ... 66#p578444).
I'd like to install wesnoth-1.12 on my home, isolated desktop (Ubuntu 12.04 LTS) without having to unmount it and taking it to my office in town. I'd like also to install the game on computers installed on remote locations where I work (indigenous villages on the amazon), for educational purposes.

Any advice?
User avatar
Dugi
Posts: 4961
Joined: July 22nd, 2010, 10:29 am
Location: Carpathian Mountains
Contact:

Re: [1.12] Offline instalation on Ubuntu 14.04 LTS

Post by Dugi »

On a computer that has internet access, install a program named Synaptic Package Manager (from the official repository, easy). It allows installing programs in a comfortable, yet configurable way without having to deal with the command line environment.

In Synaptic, select the packages you want to download and when you hit apply, you'll see an option to 'download package files only'. Do it, and you'll have the installer packages downloaded.

Then, search the /var/cache/apt/archives folder on your online Ubuntu and you'll see the installer packages, typically named something.deb . Copy these files on an USB stick. You will find there also some installation packages that were downloaded recently, better copy them all, because some of them may be needed by wesnoth. If you want to be absolutely sure that everything you want will be there, install a fresh version of Ubuntu, install all programs you think you would ever need and always make sure that all the files that ever were in that folder are copied (this will also allow you to create have a folder that allows you to install any software you like using on offline machines).

Take the USB stick to the offline machine. Copy them into /var/cache/apt/archives and use the usual way to install software, if it finds the installation packages in that folder, it will not try to download them from internet. You can also try to install them manually for example by double-clicking the archives, but it may cause some trouble with dependencies.

Another method is to compile wesnoth from source (guides can be found on the wiki) and it will create a folder where wesnoth can be run without installing. That folder can be simply copied from one machine to another as long as you have the dynamically linked dependencies installed there (I think that this isn't a problem on Ubuntu) and you're not trying to run a 64-bit executable on a 32-bit OS.
paxpan
Posts: 6
Joined: December 17th, 2014, 2:19 am

Re: [1.12] Offline instalation on Ubuntu 14.04 LTS

Post by paxpan »

:) :) :)
Dugi, I think you have resolved not only my problem with Wesnoth, but also with other programs that we use on those remote locations (mainly QGIS). Tonight I'll try it, I'll report later.
Thousands of thanks from the Amazonia!!!
paxpan
Posts: 6
Joined: December 17th, 2014, 2:19 am

Re: [1.12] Offline instalation on Ubuntu 14.04 LTS

Post by paxpan »

So, Dugi, I've tried to do your way, and it was tricker than it seemed to me. In fact ap-get didn't recognize the .deb packages on the arquives folder, and asked to download them. So I've tried to install the packages by double-clicking them. As you said, dependencies were be a problem here, there is quite a bunch of packges and it's difficult to know which is which and which one should be installed before.
Finally I bring my desktop to the office, and I'm doing a normal installationg, but I will try to discover the right way to do this install offline, as I will need to do it later this year. More to come...
User avatar
Dugi
Posts: 4961
Joined: July 22nd, 2010, 10:29 am
Location: Carpathian Mountains
Contact:

Re: [1.12] Offline instalation on Ubuntu 14.04 LTS

Post by Dugi »

So, Dugi, I've tried to do your way, and it was tricker than it seemed to me. In fact ap-get didn't recognize the .deb packages on the arquives folder, and asked to download them.
I am pretty sure that when I had these files there, I could install stuff offline. But in my case, it wasn't me who put them there, they were installed first, then uninstalled (offline) and installed back (offline). So I guess that the logical explanation here is that they are indexed somewhere. I am not able to find it.
it's difficult to know which is which and which one should be installed before.
Check out the files in /var/lib/apt/lists/ , they contain information about the dependencies. The file with name (something).archive.ubuntu.com_ubuntu_dists_(something)_main_binary_(something)_Packages should contain most of the dependency information needed.

I've searched the Internet a bit and found a few possible solutions. First, probably the easiest one should be to open Synaptic, go into its menu and find Files > Add Downloaded Packages and select all that you are moving (you still have to install synaptic manually). Then you can just install it, but it might need doing it in Synaptic. Second you can try a program named Keryx, which does pretty much what you need, but you need to install it and its dependencies first somehow. Others look somewhat less practical.

You can also try this trick, it should work on programs that don't do things deep with the system (like drivers). Open Terminal (Ctrl+Alt+T), and use the cd command to navigate into the folder where your files are in. You can do that by writing 'cd ' (with a space at the end) into Terminal and dragging and dropping the folder with packages from the file manager into the Terminal window. The command to get there should look like:
cd '/media/Kingston/archives/'
Hit enter. Sorry if I sounded like Captain Obvious so far. Then, when you're in the folder, use this command:
sudo dpkg --force-depends *
It will demand password (and you won't see what you type). It will install all packages in the folder, ignoring dependencies, so it will work regardless of order. Most programs and libraries don't check out for their dependencies in their installation scripts. Again, don't do it for drivers and other programs that dig deep into the system, it may cause serious mess (using dpkg-reconfigure on the package may fix it).
User avatar
Crow_T
Posts: 851
Joined: February 24th, 2011, 4:20 am

Re: [1.12] Offline instalation on Ubuntu 14.04 LTS

Post by Crow_T »

I'm a pretty amateur software compiler, but it seems to me the ideal thing to do would be to put the needed outside libraries (static?) in the source folder, compile wesnoth using those libraries and voila, you have a self contained folder that you can run and hack wesnoth from. It can be done, Blender does it, but I'm not sure of the finer points of the process.

edit: this looks interesting, http://www.pgbovine.net/cde.html
User avatar
Tom_Of_Wesnoth
Posts: 208
Joined: January 14th, 2015, 4:03 pm
Location: Wesnoth 2020 and Wesnoth 2007

Re: [1.12] Offline instalation on Ubuntu 14.04 LTS

Post by Tom_Of_Wesnoth »

I might be missing something really obvious, but why don't you copy the files of Wesnoth 1.12 onto a memory card and install it onto the other devices from that?
If presented with the opportunity, I would take great pleasure in becoming a world ruler.
User avatar
Dugi
Posts: 4961
Joined: July 22nd, 2010, 10:29 am
Location: Carpathian Mountains
Contact:

Re: [1.12] Offline instalation on Ubuntu 14.04 LTS

Post by Dugi »

It's not so easy on Linux. On Windows, it is much easier when you can just find its folder in Program Files and have there everything. On Linux, large parts of code (something like .dll on Windows) are shared among programs and downloaded automatically when programs are installed. Its advantage is that Linux uses much less disk space than Windows, but the disadvantage is what you see here. Still, on Windows you also have the problem that if you just copy a program into Program Files, you don't have it in start menu and so on.

However, the suggestion is actually pretty good. Wesnoth on Ubuntu seems to depend only on its own components (so no libraries, it's may be the static build that Crow_T mentioned), so all its files should be in /usr/share/games/wesnoth and the executables in the /usr/bin folder. Simply copying them should get it working, although it would not show the icon in the program search.
User avatar
Tom_Of_Wesnoth
Posts: 208
Joined: January 14th, 2015, 4:03 pm
Location: Wesnoth 2020 and Wesnoth 2007

Re: [1.12] Offline instalation on Ubuntu 14.04 LTS

Post by Tom_Of_Wesnoth »

Linux seems needlessly complicated...
If presented with the opportunity, I would take great pleasure in becoming a world ruler.
Post Reply