PDA

View Full Version : GPL installer for Linux


l33t_linux_h4x0r
12-05-2007, 04:59 AM
This is now the official thread for MY (hopefully soon to be OUR) GPL linux installer. It works as it should ie. The shortcuts are dynamicly created, It contains the full game (no more redownloading bug), and it is GPL. Currently it is CLI only I am currently adding a md5 check and a GUI.

This post will be edited with updates with the "official" code.

Note to developers: All code has to go through me as I am the head developer. 99% of the time it will be accepted unless I have absolutly no clue what it does and how it works.

When I get 2.0 ready to release it will be posted. I am also going to try to make a sf.net page.

Here is version 1.0 :
#!/bin/sh
#This is a simple user check, you have to be root to run this script.
if [ `whoami` != root ]; then
echo "
You must be root to run this script.
"
read -p "Press Enter to exit ..."
tput clear && exit 1
fi
#END of user check.

### Welcome message ###

echo "
##########################################
### Unofficial Regnum Online Installer ###
### Created by: Brice Collins ###
### e-mail: pitaboy@nerdshack.com ###
##########################################
"
read -p "Press Enter to continue ..."
tput clear

### END Welcome message ###

### Preperation for install ###

#Defaults
Install_dir="/usr/local/games/Regnum"
Archive="`pwd`"
#END of Defaults

### User input ###

#Finding out what the install path is.
echo "Please enter an install path. The default path is /usr/local/games/Regnum
To use the default setting just press Enter."
echo -n "Install Path = "
read User_install_dir
tput clear
#END Finding out what the install path is.

#Finding out where the archive is.

#Finding out where the archive is and checking if it is correct.
echo "Please enter the location of Regnum_Archive.tar.bz2
The default is the same directory that this script is run from.
To use the default setting just press Enter."
echo -n "Archive Directory = "
read User_archive
if [ "${User_archive}" != "" ]; then
until [ "${Test}" = "${User_archive}/Regnum_Archive.tar.bz2" ] || [ "${User_archive}" == "" ]; do
Test="`ls ${User_archive}/Regnum_Archive.tar.bz2`"
if [ "${Test}" != "${Archive}/Regnum_Archive.tar.bz2" ]; then
echo -n "Incorect path, no archive found. Please try again or press enter for default : " & read User_archive
fi
done
fi
echo "Archive accepted continuing ..."
tput clear
#END Finding out where the archive is and checking if it is correct.

### END of User input ###

#Install information.
if [ "${User_install_dir}" == "" ]; then
echo "Regnum Online will be installed to ${Install_dir}"
if [ "${User_archive}" == "" ]; then
echo "Useing files from the archive found in ${Archive}"
else
echo "Useing files from the archive found in ${User_archive}"
fi
else
echo "Regnum Online will be installed to ${User_install_dir}"
if [ "${User_archive}" == "" ]; then
echo "Useing files from the archive found in ${Archive}"
else
echo "Useing files from the archive found in ${User_archive}"
fi
fi

echo ""
read -p "Press Enter to begin installation ..."
tput clear
#END Install information.

#Creating install directory.
if [ "${User_install_dir}" == "" ]; then
mkdir -p ${Install_dir}
else
mkdir -p ${User_install_dir}
fi

if [ "${User_install_dir}" == "" ]; then
echo "Creating ${Install_dir}"
else
echo "Creating ${User_install_dir} "
fi
#END Creating install directory.

### END of Preperation for install ###

### Actual Installation of files ###

#Extracting Archive.
if [ "${User_install_dir}" == "" ]; then
if [ "${User_archive}" == "" ]; then
tar -xvjf ${Archive}/Regnum_Archive.tar.bz2 -C ${Install_dir}/
else
tar -xvjf ${User_archive}/Regnum_Archive.tar.bz2 -C ${Install_dir}/
fi
else
if [ "${User_archive}" == "" ]; then
tar -xvjf ${Archive}/Regnum_Archive.tar.bz2 -C ${User_install_dir}/
else
tar -xvjf ${User_archive}/Regnum_Archive.tar.bz2 -C ${User_install_dir}/
fi
fi
#END Extracting Archive.

#Setting permissions.
if [ "${User_install_dir}" == "" ]; then
chmod 777 ${Install_dir} -R
else
chmod 777 ${User_install_dir} -R
fi
#END Setting permissions.

### END of Actual Installation of files ###

tput clear
echo "All files sucessfully installed. However your installation is not complete."

### Creation of Shortcuts ###

#Menu entry.
echo ""
echo "Would you like to add a Menu entry?"
echo -n "answer: "
read answer
until [ "${answer}" == "yes" ] || [ "${answer}" == "no" ] || [ "${answer}" == "y" ] || [ "${answer}" == "n" ]; do
echo -n 'Please type a valid response, "yes" "no" "y" or "n": '
read answer
done

if [ "${answer}" = "yes" ] || [ "${answer}" = "y" ]; then
if [ "${User_install_dir}" == "" ]; then
echo "[Desktop Entry]
Version=1.0
Encoding=UTF-8
Name=Regnum Online
Comment=Regnum Online launcher
Exec=${Install_dir}/regnum.sh
Icon=${Install_dir}/regnum.xpm
Terminal=false
Type=Application
Categories=Application;Game;X-Red-Hat-Base;
GenericName=" > /usr/share/applications/regnumonlinemenu.desktop && echo "Menu entry created."
else
echo "[Desktop Entry]
Version=1.0
Encoding=UTF-8
Name=Regnum Online
Comment=Regnum Online launcher
Exec=${User_install_dir}/regnum.sh
Icon=${User_install_dir}/regnum.xpm
Terminal=false
Type=Application
Categories=Application;Game;X-Red-Hat-Base;
GenericName=" > /usr/share/applications/regnumonlinemenu.desktop && echo "Menu entry created."
fi
else [ "${answer}" = "no" ] || [ "${answer}" = "n" ];
echo "Skipping menu entry."
fi
#END Menu entry.

#Desktop shortcut. Currently not working I need to find a simple way to put an icon on the desktop for all users and all future users.
#echo "Would you like to add a Desktop shortcut?"
#echo -n "answer: "
#
#read answer
#until [ "${answer}" == "yes" ] || [ "${answer}" == "no" ] || [ "${answer}" == "y" ] || [ "${answer}" == "n" ];
#do
#echo -n 'Please type a valid response, "yes" "no" "y" or "n":' & read answer
#done
#
#if [ "${answer}" = "yes" ] || [ "${answer}" = "y" ]; then
# if [ "${User_install_dir}" == "" ]; then
# echo "[Desktop Entry]
#Version=1.0
#Encoding=UTF-8
#Name=Regnum Online
#Comment=
#Exec=${Install_dir}/regnum.sh
#Icon=${Install_dir}/rolauncher.png
#Terminal=false
#Type=Application
#Categories=Desktop;
#GenericName=" > /usr/share/applications/regnumonlinedesktop.desktop && echo "Desktop shortcut created."
# else
# echo "[Desktop Entry]
#Version=1.0
#Encoding=UTF-8
#Name=Regnum Online
#Comment=
#Exec=${User_install_dir}/regnum.sh
#Icon=${User_install_dir}/rolauncher.png
#Terminal=false
#Type=Application
#Categories=Desktop;
#GenericName=" > /usr/share/applications/regnumonlinedesktop.desktop && echo "Desktop shortcut created."
# fi
#else [ "${answer}" = "no" ] || [ "${answer}" = "n" ];
# echo "Skipping menu entry."
#fi
#END Desktop shortcut.

### END Creation of Shortcuts ###

### Exit code ###

#Exiting installer.
echo "Install Complete!!!"
read -p "Press Enter to exit ..."
tput clear
exit 1
#END Exiting installer.

### END Exit code ###

I can't continue to add code here as there is a post size limit but I will add a latest version link.

NightTwix
12-05-2007, 05:23 PM
way to go! :thumb_up:

AFAIK you need to add a comment at the beginning of the file, so ppl see the licence. something like this:

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.

taken from http://www.gnu.org/licenses/gpl-howto.html

magnet
12-05-2007, 06:09 PM
For a "leet linux haxor" you fail at licenses class :). The GPL doesn't allow that all changes go through you (like you said in the other thread), hell FREE SOFTWARE doesn't allow it (as demonstrated with ASPL 1 which required all changes to go back to Apple). You can gently ask, but you cannot enforce.

If you modify the GPL, then you can't merge with other GPL code, which defeats the whole purpose of the license.

You can enforce them in YOUR DISTRIBUTION though and that's more than enough. Don't be a control freak :).

Btw, your checking of empty strings is most inelegant ;).

l33t_linux_h4x0r
12-05-2007, 09:11 PM
Ok no problem but I would like if all patches and changes go through me like they do for the linux kernel all patches go through the head developer/developers. Forks are fine and do not require sending in the code but other than a fork it would be nice if stuff was submitted. Like I said unless I have no idea what it does it will be included unless it is malicious. This is just so that there isn't for example 5 or 6 copies of the code each having different improvements but no release including all of the improvements. I didn't mean to violate the GPL or be forceful I just think that it would be for the best if extra code was added through a central person.

l33t_linux_h4x0r
12-05-2007, 09:43 PM
Version 1.5!!!
Changelog:
Name change Regnum Online GPL Installer or ROGPLI
Now includs the GPL license
Checks the archive with md5


Enjoy :metal: :metal: :metal: :metal:


#!/bin/sh

#NOTES FOR ME THE DEVELOPER
#The archive is created doing a "tar -vjcf /root/Regnum_Archive.tar.bz2 *" from the Regnum directory.
#Please note that this will not work on any Regnum directory. I edited regnum.sh and added a .png icon for when Desktop shortcut function are implimented.
#TODO add a GUI
#END OF MY DEVELOPER NOTES

#Required program check.

#End Required program check.

#This is a simple user check, you have to be root to run this script.
if [ $(whoami) != root ]; then
echo "
You must be root to run this script.
"
read -p "Press Enter to exit ..."
tput clear && exit 1
fi
#END of user check.

### Welcome message ###

echo "
#########################################
### Regnum Online GPL Installer ###
### Created by: Brice Collins ###
### e-mail: pitaboy@nerdshack.com ###
#########################################

Regnum Online GPL Installer also known as ROGPLI license agreement

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
"
read -p "Press Enter to continue ..."
tput clear

### END Welcome message ###

### Preperation for install ###

#Defaults
Install_dir="/usr/local/games/Regnum"
Archive="`pwd`"
#END of Defaults

### User input ###

#Finding out what the install path is.
echo "Please enter an install path. The default path is /usr/local/games/Regnum
To use the default setting just press Enter."
echo -n "Install Path = "
read User_install_dir
tput clear
#END Finding out what the install path is.

#Finding out where the archive is.

### Finding out where the archive is and checking if it is correct then running md5sum verification ###

#Archive location checking.
echo "Please enter the location of Regnum_Archive.tar.bz2
The default is the same directory that this script is run from.
To use the default setting just press Enter."
echo -n "Archive Directory = "
read User_archive
if [ "${User_archive}" != "" ]; then
Test="`ls ${User_archive}/Regnum_Archive.tar.bz2`"
until [ "${Test}" = "${User_archive}/Regnum_Archive.tar.bz2" ] || [ "${User_archive}" == "" ]; do
if [ "${Test}" != "${User_archive}/Regnum_Archive.tar.bz2" ] || [ "${User_archive}" != "" ]; then
echo -n "Incorect path, no archive found. Please try again or press enter for default : " & read User_archive
Test="`ls ${User_archive}/Regnum_Archive.tar.bz2`"
fi
done
fi
echo "Archive found continuing ..."
#Archive location checking.

#Archive md5sum verification.
if [ "${User_archive}" == "" ]; then
md5="`md5sum ${Archive}/Regnum_Archive.tar.bz2`"
if [ "${md5}" == "f5b54f3f6e0275f5760b542bfc7a6f02 ${Archive}/Regnum_Archive.tar.bz2" ]; then
echo "Archive verified continuing ..."
tput clear
else
echo "Archive verification failed. Please re-download the archive."
read -p "Install FAILED press enter to exit ..."
tput clear
exit 1
fi
else
md5="`md5sum ${User_archive}/Regnum_Archive.tar.bz2`"
if [ "${md5}" == "f5b54f3f6e0275f5760b542bfc7a6f02 ${User_archive}/Regnum_Archive.tar.bz2" ]; then
echo "Archive verified continuing ..."
else
echo "Archive verification failed. Please re-download the archive."
read -p "Install FAILED press enter to exit ..."
tput clear
exit 1
fi
fi
tput clear
#END Archive md5sum verification.

### END Finding out where the archive is and checking if it is correct then running md5sum verification ###

### END of User input ###

#Install information.
if [ "${User_install_dir}" == "" ]; then
echo "Regnum Online will be installed to ${Install_dir}"
if [ "${User_archive}" == "" ]; then
echo "Useing files from the archive found in ${Archive}"
else
echo "Useing files from the archive found in ${User_archive}"
fi
else
echo "Regnum Online will be installed to ${User_install_dir}"
if [ "${User_archive}" == "" ]; then
echo "Useing files from the archive found in ${Archive}"
else
echo "Useing files from the archive found in ${User_archive}"
fi
fi

echo ""
read -p "Press Enter to begin installation ..."
tput clear
#END Install information.

#Creating install directory.
if [ "${User_install_dir}" == "" ]; then
mkdir -p ${Install_dir}
else
mkdir -p ${User_install_dir}
fi

if [ "${User_install_dir}" == "" ]; then
echo "Creating ${Install_dir}"
else
echo "Creating ${User_install_dir} "
fi
#END Creating install directory.

### END of Preperation for install ###

### Actual Installation of files ###

#Extracting Archive.
if [ "${User_install_dir}" == "" ]; then
if [ "${User_archive}" == "" ]; then
tar -xvjf ${Archive}/Regnum_Archive.tar.bz2 -C ${Install_dir}/
else
tar -xvjf ${User_archive}/Regnum_Archive.tar.bz2 -C ${Install_dir}/
fi
else
if [ "${User_archive}" == "" ]; then
tar -xvjf ${Archive}/Regnum_Archive.tar.bz2 -C ${User_install_dir}/
else
tar -xvjf ${User_archive}/Regnum_Archive.tar.bz2 -C ${User_install_dir}/
fi
fi
#END Extracting Archive.

#Setting permissions.
if [ "${User_install_dir}" == "" ]; then
chmod 777 ${Install_dir} -R
else
chmod 777 ${User_install_dir} -R
fi
#END Setting permissions.

### END of Actual Installation of files ###

tput clear
echo "All files sucessfully installed. However your installation is not complete."

### Creation of Shortcuts ###

#Menu entry.
echo ""
echo "Would you like to add a Menu entry?"
echo -n "answer: "
read answer
until [ "${answer}" == "yes" ] || [ "${answer}" == "no" ] || [ "${answer}" == "y" ] || [ "${answer}" == "n" ]; do
echo -n 'Please type a valid response, "yes" "no" "y" or "n": '
read answer
done

if [ "${answer}" = "yes" ] || [ "${answer}" = "y" ]; then
if [ "${User_install_dir}" == "" ]; then
echo "[Desktop Entry]
Version=1.0
Encoding=UTF-8
Name=Regnum Online
Comment=Regnum Online launcher
Exec=${Install_dir}/regnum.sh
Icon=${Install_dir}/regnum.xpm
Terminal=false
Type=Application
Categories=Application;Game;X-Red-Hat-Base;
GenericName=" > /usr/share/applications/regnumonlinemenu.desktop && echo "Menu entry created."
else
echo "[Desktop Entry]
Version=1.0
Encoding=UTF-8
Name=Regnum Online
Comment=Regnum Online launcher
Exec=${User_install_dir}/regnum.sh
Icon=${User_install_dir}/regnum.xpm
Terminal=false
Type=Application
Categories=Application;Game;X-Red-Hat-Base;
GenericName=" > /usr/share/applications/regnumonlinemenu.desktop && echo "Menu entry created."
fi
else [ "${answer}" = "no" ] || [ "${answer}" = "n" ];
echo "Skipping menu entry."
fi
#END Menu entry.

#Desktop shortcut. Currently not working I need to find a simple way to put an icon on the desktop for all users and all future users.
#echo "Would you like to add a Desktop shortcut?"
#echo -n "answer: "
#
#read answer
#until [ "${answer}" == "yes" ] || [ "${answer}" == "no" ] || [ "${answer}" == "y" ] || [ "${answer}" == "n" ];
#do
#echo -n 'Please type a valid response, "yes" "no" "y" or "n":' & read answer
#done
#
#if [ "${answer}" = "yes" ] || [ "${answer}" = "y" ]; then
# if [ "${User_install_dir}" == "" ]; then
# echo "[Desktop Entry]
#Version=1.0
#Encoding=UTF-8
#Name=Regnum Online
#Comment=
#Exec=${Install_dir}/regnum.sh
#Icon=${Install_dir}/rolauncher.png
#Terminal=false
#Type=Application
#Categories=Desktop;
#GenericName=" > /usr/share/applications/regnumonlinedesktop.desktop && echo "Desktop shortcut created."
# else
# echo "[Desktop Entry]
#Version=1.0
#Encoding=UTF-8
#Name=Regnum Online
#Comment=
#Exec=${User_install_dir}/regnum.sh
#Icon=${User_install_dir}/rolauncher.png
#Terminal=false
#Type=Application
#Categories=Desktop;
#GenericName=" > /usr/share/applications/regnumonlinedesktop.desktop && echo "Desktop shortcut created."
# fi
#else [ "${answer}" = "no" ] || [ "${answer}" = "n" ];
# echo "Skipping menu entry."
#fi
#END Desktop shortcut.

### END Creation of Shortcuts ###

### Exit code ###

#Exiting installer.
echo "Install Complete!!!"
read -p "Press Enter to exit ..."
tput clear
exit 1
#END Exiting installer.

### END Exit code ###

arlick
12-05-2007, 09:48 PM
mm i like to use this:


if [ $(whoami) != root ]; then
echo "
You must be root to run this script.
"


instead of:


if [ `whoami` != root ]; then
echo "
You must be root to run this script.
"

l33t_linux_h4x0r
12-05-2007, 10:08 PM
mm i like to use this:


if [ $(whoami) != root ]; then
echo "
You must be root to run this script.
"


instead of:


if [ `whoami` != root ]; then
echo "
You must be root to run this script.
"



Cool I have edited version 1.5 and it now has your code. Also I love how you posted your code. I am not very good with diff files and your way tells exactly what is changed.

Also just wondering what is the purpose of writing the code this way as they both do the same thing?

arlick
12-05-2007, 10:11 PM
I think that the second one is drepecated, so is better to use the other :P

arlick
12-05-2007, 10:54 PM
I have a question: Why are you doing this installer? I dont understand why.

l33t_linux_h4x0r
12-06-2007, 02:09 AM
Because the other one has bugs.
Here is a list of ones that I know
*the shortcut doesn't always work.
*the entire game has to be re-downloaded even though it comes with about half of the game
*It uses loki installer which has a very ugly interface and is out of date I think that it was superseeded by something called modoinstaller or something like that I dont remember the name.

Also my installer and the archive are a smaller download and include the entire game with the above bugs fixed.

Miraculix
12-06-2007, 04:49 AM
and if I have understood correctly, isn't it supposed (in the future) to make it possible to have the regnum files ONCE installed, and then have the user files in each user's dir?

l33t_linux_h4x0r
12-06-2007, 05:49 AM
Each user name is already in the users folder. The main game files such as textures images sounds etc. are shared system wide to reduce the load on NGD's servers so that each user doesn't have to download their own copy of these files. I would like to make it so that the file that holds the config for settings such as graphics detail and resolution was also user specific however I am unable to do this currently as NGD has not given me the code to the actual game. I could do a dirty hack something like the following and put it in regnum.sh

OK now all settings are stored per user!!! change your regnum.sh to this and copy the default game.cfg to default_game.cfg in the same directory.

#!/bin/sh
if [ "`ls ~/.ngdstudios/game.cfg`" != ~/.ngdstudios/game.cfg ]; then
cp "`pwd`/default_game.cfg ~/.ngdstudios/game.cfg"
fi
ln -fs ~/.ngdstudios/game.cfg `pwd`/game.cfg
cd "`pwd`"
./rolauncher

Short description what that does is if there is not a game.cfg in the users ngdstudios directory then it makes one using the default regnum settings. Then it makes a shortcut to the game.cfg from the ngdstudios folder. It will allow the game to switch to different configs for each user.
note: with this script you need to copy the default game.cfg from the default install to default_game.cfg in the same location.

This will be included with the archive which will also be updated with the latest regnum release 0.9.24

l33t_linux_h4x0r
12-06-2007, 06:25 AM
Things to be added in the new 2.0 release.
1. The latest files from Regnum Online 0.9.24 (done)
2. The above script to allow different users to have different settings (done)
3. An uninstall script. (done)
4. A GUI (This is the hardest to implement and may be held off until 3.0)
Also changed the archive name from Regnum_Archive.tar.bz2 to Regnum_Archive_0.9.24.tar.bz2 (this will be changed with each release of Regnum to reduce confusion and is very easy to do with find and replace)

As always feel free to add suggestions and improved code.

Znurre
12-06-2007, 11:14 AM
Things to be added in the new 2.0 release.
1. The latest files from Regnum Online 0.9.24 (done)
2. The above script to allow different users to have different settings (done)
3. An uninstall script. (done)
4. A GUI (This is the hardest to implement and may be held off until 3.0)
Also changed the archive name from Regnum_Archive.tar.bz2 to Regnum_Archive_0.9.24.tar.bz2 (this will be changed with each release of Regnum to reduce confusion and is very easy to do with find and replace)

As always feel free to add suggestions and improved code.

I could maye help creating a gui.
I am used to create user interfaces with Ruby and Qt.

Miraculix
12-06-2007, 03:37 PM
eeewww, Qt?

gtk ftw.

magnet
12-06-2007, 05:29 PM
eeewww, Qt?

gtk ftw.

Amen brother.

l33t_linux_h4x0r
12-06-2007, 08:11 PM
Znurre Thanks for offering to help i will probably use your help for the QT gui if we decide to use it.

I knew that there would be a GTK vs QT war.
Personally of the two I like GTK however I was thinking so that neither side would win maybe using a desktop independent gui such as tcl/tk. Or we could implement a environment check such as

if the user is running gnome then use gtk
elif the user is running KDE then use QT
else if the user us running in terminal then use CLI

If anyone knows of any desktop independant GUI's other than tcl/tk please let me know. Thanks.

theotherhiveking
12-06-2007, 09:22 PM
Znurre Thanks for offering to help i will probably use your help for the QT gui if we decide to use it.

I knew that there would be a GTK vs QT war.
Personally of the two I like GTK however I was thinking so that neither side would win maybe using a desktop independent gui such as tcl/tk. Or we could implement a environment check such as

if the user is running gnome then use gtk
elif the user is running KDE then use QT
else if the user us running in terminal then use CLI

If anyone knows of any desktop independant GUI's other than tcl/tk please let me know. Thanks.


a python one?


just a though

l33t_linux_h4x0r
12-06-2007, 10:23 PM
I have always wanted to write a program in python. However the syntex is much harder than bash (for me anyway). And this would require an entire rewrite as I want to keep the installer as one file. However if we did use python I would write some code to make the installer work on both Windows and Linux!!! Also the windows installer part would probably be the last priority of the project. This of course would make the uninstall.sh and regnum.sh only be written if using linux which I could do in the current installer but decided to include them in the archive to keep the installer to a minimum.

Also don't python gui's just call gtk,qt,tcl/tk anyway? If so I/We would still need to decide on a gui. Therefore porting the ROGPLI to python would just be extra work although I am sure that there are some benifits of python such as cross platform compatibility.

OK I think that I have decided. I would like to uses wxWidgets as it uses the default gui of the current OS. From what I understand (correct me if I am wrong) If you are using gtk it makes a gtk gui. If you are using qt it makes a qt gui. If you are using MS windows it makes a windows gui. so forth and so on.

If I am unable to figure out how to program this then I will try tcl/gnocl yes it is gtk only but we can impliment an if then like stated earlier and someone else can write a qt gui.

Myxir
12-06-2007, 10:47 PM
If you would rewrite this into python I think I could help you. I know python but I don't know , yet how good^^
I think there is an independent GUI called Tkinter. As far as I know it's the default GUI library...
There is also a gui builder (http://spectcl.sourceforge.net/) for it.
I did not program a gui yet...

l33t_linux_h4x0r
12-06-2007, 11:07 PM
Tkinter is not just for python it is also known as tcl/tk. The problem with this is that it creates ugly motif guis. However I was planning on converting to python eventually anyway. I just don't have an ETA as I will have to learn python. I have messed with it a little about 4 years ago but never got further than

press enter
display text again
press enter
display more text
press enter
exit

anyway I guess that I could start learning it again.

Before I port the code to python the following things will be done and are almost done being done.
*Getting the creation of desktop shortcuts working
*Cleaning up the code with more syntax instead of calling programs. Such as replacing the file checks with [ -f filename ] instead of [ ls filename = filename ]
*I will be releasing this as 2.0 and begin porting to python before the gui is released.

MAXDDARK
12-07-2007, 09:17 AM
Although I don't have the need to use your installer as I don't suffer from bugs in the old one (I have only one user (+1000)).
But your GPLed script is VERY welcomed addition to Regnum and our Free community.

I wonder when NGD thing about this script.
Maybe they will fix those bugs in their old installer or maybe even adopt your script.

NGD please reply, I'm sure that many people here would like to know what you think about it and your future installers which might change (and please write more then just "you are welcome" ;)).

Znurre
12-07-2007, 01:57 PM
Qt is way more platform independant than gtk...
Run a Qt app on Windows, MacOS and Linux and see which have the best integration with the system.

Also, Qt is lots more powerful, and the Signal/Slots are very good.

Using tk/tcl, is to me a very bad idea.
Just look at aMsn.
That app is slow like hell, and it looks really ugly.

Then I would rather prefer wxWidgets.

Miraculix
12-07-2007, 06:13 PM
screw Qt and their binary pre-compiled modules!

Before you think of doing anything, ask yourself: What would rms do? :p

Anyway, +1 on the NO tkinter, ugly as friggin hell. Also, not much sense in doing an installer that would work both in windows and linux, the win installer is fine as it is. Win is not really built for multi-user usage anyway.

You could still write a gui in python, and use the bash script as it is, just modify it a bit to be parameter based, and make the python script create the gui and call the bash script with the appropriate parameters. Most inelegant, as python can make pretty much anything(*) and you wouldn't need the bash script, but if you're too bored to convert the code (which really isnt much) you could just do that.

(*)http://www.xkcd.com/353/

l33t_linux_h4x0r
12-07-2007, 08:30 PM
I will not be using QT. It is what KDE uses and I absolutely despise KDE. GTK is just as portable as QT it will run on any OS. As I am a gnome user and use GTK this is what I would be programming the GUI in if it was one of the two. I know that this is bold and selfish but that is why I will probably use neither. However there is a plugin for tcl that makes it clone the look of the current GUI so I will probably either use this or wxwidgets.

On a lighter note version 2.0 is very close to release. Just some final testing.

MAXDDARK
12-07-2007, 09:51 PM
You got to be more careful with the version naming.
Version 1.0 should be completely usable and full.
2.0 is a huge progress for a few days ;)

Keep the good work

l33t_linux_h4x0r
12-08-2007, 01:22 AM
Upon further testing everything works except the menu entries and desktop shortcuts. I cant figure out how to get them to be created dynamicly.

Znurre
12-08-2007, 02:00 AM
If you create a tk/wxwidget/Gtk GUI, I promise to make a Qt GUI (for own use :D)

Miraculix
12-08-2007, 02:15 AM
yeah, this is still like version 0.8 or smth, v1.0 should be the full fledged installer in its final form, as the designer (you) meant it. That is, v1.0 should be the version with the GUI and all, that has gone through at least some basic beta testing by other users.

not that its anything important, but it's good to comply to some naming standards so people can have an idea of the stage of a project.

l33t_linux_h4x0r
12-10-2007, 12:02 AM
I don't start with version 0.1 liks some people. My first release is 1.0 and trust me this next version will be a 2.0 ;-)

And for all of you who think that the project might be dead you are wrong. I have been working hard codeing and you are in for a big supprise!!! First of all It is completly rewritten in python and I am really really close to having the desktop shortcut working and the menu entry should be working however I am not going to release this first python version until I have a gui unless there is a high demand for it. The final version of 2.0 will include some code so if you just run the program it will spawn a GUI but if X is not detected it will fall back to the CLI. It is going to be awesome! Hopefully once I release the code for version 2.0 written in python more people will help develop it.

theotherhiveking
12-10-2007, 12:17 AM
I don't start with version 0.1 liks some people. My first release is 1.0 and trust me this next version will be a 2.0 ;-)

And for all of you who think that the project might be dead you are wrong. I have been working hard codeing and you are in for a big supprise!!! First of all It is completly rewritten in python and I am really really close to having the desktop shortcut working and the menu entry should be working however I am not going to release this first python version until I have a gui unless there is a high demand for it. The final version of 2.0 will include some code so if you just run the program it will spawn a GUI but if X is not detected it will fall back to the CLI. It is going to be awesome! Hopefully once I release the code for version 2.0 written in python more people will help develop it.


i will help :thumb_up: :thumb_up:

Myxir
12-10-2007, 09:05 PM
For python, I am in!
I'll help if I can.

bochecha
12-16-2007, 10:09 PM
Hi

One thing is confusing me : front page has version 1.0, later I saw an update,... Finally, which is the most recent version ? I think you should always put the most recent version in the front page, it would be easier to find it ;)

Secondly, about that QT vs GTK, in my opinion, GTK is better than QT for one reason : GTK is less ugly in KDE than QT is in Gnome :biggrin: (that will not be tru with QT4). So if you want to be cross-platform, GTK seems a better compromise.

Finally, You wrote that the installer should test if it can run the graphic version or a cli if X s not detected. What is the point of installing a 3D game with no X ? So maybe this probe is worthless... An alternative could be to always run the graphical installer, unless a --cli option (or something like that) is specified ;)

So, in a nutshell, where can I found the ROGPLI in its latest version ? :biggrin:

l33t_linux_h4x0r
12-16-2007, 11:06 PM
I have the latest installer in python but I wasn't planning on releasing it until I had a gui but this is proving to be way too difficult for me. I can't find an easy way to write a gui. So I will release the current version of the python installer. All that really needs to be done is for someone to change the parts of the code that ask a question in the command prompt to ask the questions with a gui. I however am no good at programming a gui as there is no program that I know of that lets you make a visual layout of what you want the gui to look like and then assign code to the different parts of the gui.

theotherhiveking
12-16-2007, 11:42 PM
I have the latest installer in python but I wasn't planning on releasing it until I had a gui but this is proving to be way too difficult for me. I can't find an easy way to write a gui. So I will release the current version of the python installer. All that really needs to be done is for someone to change the parts of the code that ask a question in the command prompt to ask the questions with a gui. I however am no good at programming a gui as there is no program that I know of that lets you make a visual layout of what you want the gui to look like and then assign code to the different parts of the gui.

I will have a look.

Miraculix
12-17-2007, 02:04 PM
I have the latest installer in python but I wasn't planning on releasing it until I had a gui but this is proving to be way too difficult for me. I can't find an easy way to write a gui. So I will release the current version of the python installer. All that really needs to be done is for someone to change the parts of the code that ask a question in the command prompt to ask the questions with a gui. I however am no good at programming a gui as there is no program that I know of that lets you make a visual layout of what you want the gui to look like and then assign code to the different parts of the gui.

...glade? ;)

Artemis_Neetcudt
12-28-2007, 09:54 PM
one question......where does Regnum_Archive.tar.bz2 exist?

l33t_linux_h4x0r
01-01-2008, 12:55 PM
I have made it. You could also create one if you want to but you would have to change the hash that verifies the archive. Sorry for lack of updates. I recently broke my foot and was in the hospital and unable to access a computer. I am doing much better now in case you were wondering.

Artemis_Neetcudt
01-01-2008, 07:24 PM
I mean, where do you download that file? I can't find any links to the file, only the fact that the script requires it.

Angelwinged_Devil
01-03-2008, 12:18 AM
wow nice work dude. Kudos to you and you have GoPs support ;) we'll do anything we can to help, I think we'll host the file when we get our homepage up and running.

l33t_linux_h4x0r
01-03-2008, 12:58 AM
Cool thanks for the help with hosting. When you have a homepage with space for the file. I will update the script and tar.bz2 to the latest versions. Do some testing and finally upload it to your site. Thanks again!!!

Miraculix
01-03-2008, 02:51 AM
Are the binaries in the archive for 32bit only? If so, please make an archive for 64bit users. You'd have to find a 64bit machine to get the game to run and download all updates I think.

l33t_linux_h4x0r
01-03-2008, 03:43 AM
currently there is only a 64 bit version because that is the future of computing and what I use. I will include a 32 bit version in the future. I am unsure how I want to implement this though. Either two separate installers or a architecture check. The later would be more work however would make the installer better overall.

Miraculix
01-03-2008, 03:53 AM
I think it depends on the files that need changing. I bet it's only a couple of binaries, but you never know :p You'd have to get all the files from a 32 bit machine and compare hashes from all the files to see which ones are different. If it's only a few, then imo it should be one installer, so I can use it on my pc and then take it to some friend and use it there. If it is a lot of files though, then the installer would probably grow a lot in size, so it wouldn't be practical anymore :p

Angelwinged_Devil
01-03-2008, 09:27 PM
currently there is only a 64 bit version because that is the future of computing and what I use. I will include a 32 bit version in the future. I am unsure how I want to implement this though. Either two separate installers or a architecture check. The later would be more work however would make the installer better overall.
let me give you a coding tip, when you're doing changes ask yourself this "what would be easiest for the user" in this case I think it'll be easiest with an architecture check.
oh and btw, update the changelog and such in the first post ;)

shercipher
01-05-2008, 11:54 PM
Shellcode...needs moar C code.