Automatic download & build script (Ubuntu)

15 replies [Last post]
Atmostrophic
User offline. Last seen 16 years 6 weeks ago. Offline
Joined: 2008-05-02
Posts: 58

Hello everyone

As for my friends, it's not easy to always have the newest version of hedgewars, because they're not too familiar with terminal and compiling stuff... For this I've wrote a script which installs all the required packages, downloads hedgewars from SVN, makes the config, builds the binaries and installs the finally created hedgewars-executable.

Some of you might be interested, that's the reason why I post it.

I think this works on any system which has apt-get installed.
Here it is:

#!/bin/bash
rm -rf ~/hedgewars
sudo apt-get update
sudo apt-get install cmake
sudo apt-get install subversion
sudo apt-get install build-essential
sudo apt-get install libsdl-console-dev libsdl-gfx1.2-dev libsdl-mixer1.2-dev libsdl-net1.2-dev libsdl-sound1.2-dev libsdl-stretch-dev libsdl-ttf2.0-dev
sudo apt-get install fp-compiler fp-units-base fp-units-db fp-units-gfx fp-units-gnome1 fp-units-gtk fp-units-gtk2 fp-units-misc fp-units-net fp-utils
sudo apt-get install libqt4-core libqt4-dev libqt4-gui
sudo apt-get install libgl1-mesa-dev libgl1-mesa-glx libgl1-mesa-dri libgl1-mesa-swx11 libgl1-mesa-swx11-dev
sudo apt-get install --fix-missing
svn co http://svn.gna.org/svn/hedgewars/trunk hedgewars
cd ~/hedgewars
cmake .
make
sudo make install

I'm not too sure if they're all the packages and all of them are required. But i had a freshly installed Ubuntu machine and I've tested the script on it and hedgewars worked without any problem running this script.

Hope it helps someone...
Best regards

Atmostrophic

Fabioamd87
Fabioamd87's picture
User offline. Last seen 15 years 26 weeks ago. Offline
Joined: 2007-04-29
Posts: 121

why you don't install all in one apt-get line?

Atmostrophic
User offline. Last seen 16 years 6 weeks ago. Offline
Joined: 2008-05-02
Posts: 58

Fabioamd87 allegedly wrote:
why you don't install all in one apt-get line?

Script needs improvements, i know that and I'm currently working on a script where users can choose which version to install.

To answer your question: If one of the package-download fails, it won't continue with the others.
Some friends said to use "apt-get build-dep hedgewars" but I'm not sure how well that one works...

daimadoshi85
daimadoshi85's picture
User offline. Last seen 13 years 42 weeks ago. Offline
Joined: 2008-05-04
Posts: 372

I created this script that use zenity and bash to download, compile and install hedgewars (On Ubuntu). I'm not so sure it installs all dependencies, try it and give me feedback Smile
Before execute it make sure you have installed zenity and xterm with:
sudo apt-get install zenity
EDIT: NEW VERSION and changed file hosting site!!! Download it here

Come to the dark side, we have cookies... - V

Hedgewars script for ubuntu is here...but maybe I have to update it first Smile

Sirsurthur
User offline. Last seen 16 years 5 min ago. Offline
Joined: 2008-05-07
Posts: 21

Hello everybody,

I tried the script on my ubuntu 8.04 but it does not work for me --> CMake error : Qt qmake not found // male:***not specified target and no makefile. stop.

Have you got an idea of the library that I forgot to install ?

Thanks a lot,
Sirsurthur

daimadoshi85
daimadoshi85's picture
User offline. Last seen 13 years 42 weeks ago. Offline
Joined: 2008-05-04
Posts: 372

It should be libqt4-dev. Did you try my script or atmostrophic's?

Come to the dark side, we have cookies... - V

Hedgewars script for ubuntu is here...but maybe I have to update it first Smile

daimadoshi85
daimadoshi85's picture
User offline. Last seen 13 years 42 weeks ago. Offline
Joined: 2008-05-04
Posts: 372

Just updated it now!Download the script here.

Come to the dark side, we have cookies... - V

Hedgewars script for ubuntu is here...but maybe I have to update it first Smile

Sirsurthur
User offline. Last seen 16 years 5 min ago. Offline
Joined: 2008-05-07
Posts: 21

Thanks ! It was mainly due to incompatible qt library. It's corrected now Smile

daimadoshi85
daimadoshi85's picture
User offline. Last seen 13 years 42 weeks ago. Offline
Joined: 2008-05-04
Posts: 372

New version of the zenity script HERE

Come to the dark side, we have cookies... - V

Hedgewars script for ubuntu is here...but maybe I have to update it first Smile

Mikerhinos
User offline. Last seen 15 years 8 weeks ago. Offline
Joined: 2009-11-03
Posts: 1

Hi all , i'm on Ubuntu 9.10 , and the game installed itself very easily using the software store (Applications->Software Store).

Seems to be a great Worms clone ! Big Grin

Anyone know where the game is installed ?
I'm searching for translations , and sound files so i can replace it with french ones :p (my native language).

Thx ! Smile

nemo
nemo's picture
User offline. Last seen 24 weeks 2 days ago. Offline
Joined: 2009-01-28
Posts: 1861

You might want to adjust your script to run svn-clean instead of the rm -rf if ~/hedgewars exists.
If you don't want to include the svn-clean script, could also script results of svn st to remove unversioned build files.
The data dir is very large, and repeated checkouts to update HEAD is a waste of fireforge bandwidth and slow for people.

Also, might want to specify an alternate install location? People might prefer to use .12 as their system-wide install, and only use trunk for local testing.

Also, might want to offer a script variant for building the .12 tag.

I did a mini-script thingy in comments to Smaxx' recent blog post that might be relevant.

--
Oh, what the heck. 1PLXzL1CBUD1kdEWqMrwNUfGrGiirV1WpH <= tip a hedgewars dev

beothorn
beothorn's picture
User offline. Last seen 14 years 17 weeks ago. Offline
Joined: 2010-07-06
Posts: 15

the svn part should be
hg clone https://hedgewars.googlecode.com/hg/ hedgewars
now that the source code was moved

"First things first, but not necessarily in that order." - Doctor Who

Izack1535
Izack1535's picture
User offline. Last seen 4 years 39 weeks ago. Offline
Joined: 2010-12-13
Posts: 70

Atmostrophic allegedly wrote:

Hello everyone

As for my friends, it's not easy to always have the newest version of hedgewars, because they're not too familiar with terminal and compiling stuff... For this I've wrote a script which installs all the required packages, downloads hedgewars from SVN, makes the config, builds the binaries and installs the finally created hedgewars-executable.

Some of you might be interested, that's the reason why I post it.

I think this works on any system which has apt-get installed.
Here it is:

#!/bin/bash
rm -rf ~/hedgewars
sudo apt-get update
sudo apt-get install cmake
sudo apt-get install subversion
sudo apt-get install build-essential
sudo apt-get install libsdl-console-dev libsdl-gfx1.2-dev libsdl-mixer1.2-dev libsdl-net1.2-dev libsdl-sound1.2-dev libsdl-stretch-dev libsdl-ttf2.0-dev
sudo apt-get install fp-compiler fp-units-base fp-units-db fp-units-gfx fp-units-gnome1 fp-units-gtk fp-units-gtk2 fp-units-misc fp-units-net fp-utils
sudo apt-get install libqt4-core libqt4-dev libqt4-gui
sudo apt-get install libgl1-mesa-dev libgl1-mesa-glx libgl1-mesa-dri libgl1-mesa-swx11 libgl1-mesa-swx11-dev
sudo apt-get install --fix-missing
svn co http://svn.gna.org/svn/hedgewars/trunk hedgewars
cd ~/hedgewars
cmake .
make
sudo make install

I'm not too sure if they're all the packages and all of them are required. But i had a freshly installed Ubuntu machine and I've tested the script on it and hedgewars worked without any problem running this script.

Hope it helps someone...
Best regards

Atmostrophic

how do i use it??? please tell me

nemo
nemo's picture
User offline. Last seen 24 weeks 2 days ago. Offline
Joined: 2009-01-28
Posts: 1861

That script is out of date. Code is no longer on that server.

For debian/ubuntu/mint linux users, I have some commands to copy and paste (they could be turned into a script I suppose by copying them into a file).

http://www.hedgewars.org/node/2215#comment-15049

--
Oh, what the heck. 1PLXzL1CBUD1kdEWqMrwNUfGrGiirV1WpH <= tip a hedgewars dev

sdw195
User offline. Last seen 12 years 7 weeks ago. Offline
Joined: 2010-05-27
Posts: 27

nemo allegedly wrote:

That script is out of date. Code is no longer on that server.

For debian/ubuntu/mint linux users, I have some commands to copy and paste (they could be turned into a script I suppose by copying them into a file).

http://www.hedgewars.org/node/2215#comment-15049


i used that and i got this Sad Smiley
http://pastebin.com/LTr3VYx4

Palewolf sheepluva: heh, havent noticed your donate button before
sheepluva Palewolf: is more of a "for science!" thing
Palewolf sheepluva: you know, one could do a lot more money if you pulled out a photo of a hedgehog and said you would eat it unless you get 10k dollars
sheepluva lol
Sdw195 heh
sheepluva well, as I said. it's more of a science thing
Sdw195 no eat if it he got 10k dollars
sheepluva I don't expect to get more than $1 this year
sheepluva max
sheepluva xD
Sdw195 heh
Palewolf sheepluva: your loss, my way you get to get at least one decent meal XD
Sdw195 hahha
Sdw195 rolf
sheepluva Palewolf: good point.. hmmmmmmm

nemo
nemo's picture
User offline. Last seen 24 weeks 2 days ago. Offline
Joined: 2009-01-28
Posts: 1861

sdw195 allegedly wrote:

nemo allegedly wrote:

That script is out of date. Code is no longer on that server.

For debian/ubuntu/mint linux users, I have some commands to copy and paste (they could be turned into a script I suppose by copying them into a file).

http://www.hedgewars.org/node/2215#comment-15049


i used that and i got this Sad Smiley
http://pastebin.com/LTr3VYx4

Well, you resolved it on IRC, but for the benefit of others. The command lines are long, you have to copy the whole line. Smile

--
Oh, what the heck. 1PLXzL1CBUD1kdEWqMrwNUfGrGiirV1WpH <= tip a hedgewars dev

User login

Copyright © 2004-2024 Hedgewars Project. All rights reserved. [ contact ]