Pages: [1]
  Print  
Author Topic: automated installation of (freeware) mods, maps, models  (Read 11313 times)
MilesTeg
Lesser Nub


Cakes 0
Posts: 144



« on: March 31, 2007, 12:42:30 AM »

Hi

I just had an idea to make installation of freeware mods to OA much easier for newbies.
We could simply build an easy script that downloads the zip-files of the mods, extracts it, copys the files to the openarena dir and creates an icon on the users desktop that links directly to the mod.

here you get a simple proof of concept:
it is a quick and dirty solution (and windows only yet) with a simple batch file but it should give you an idea of how this could work.

manual:
1. extract getmods.zip into you OA Directory.
http://opencontentgames.org/oastuff/getmods.zip

2. open \openarena\getmods\menu.bat

future ideas:
- a menu where you can select the mods, maps, models etc. you want to download
- icons for every mod
- make it work under linux/Ubuntu
- integrate the getmods stuff into the oa-release
- use gzip instead of 7zip

what do you think?
« Last Edit: March 31, 2007, 01:51:29 AM by MilesTeg » Logged

"We are all connected"
dmn_clown
Posts a lot
*

Cakes 1
Posts: 1324


« Reply #1 on: March 31, 2007, 05:24:15 AM »

I wouldn't have a problem with it as long as the GNU/Linux script includes sanity checks as not everyone uses Ubuntu.
Logged

MilesTeg
Lesser Nub


Cakes 0
Posts: 144



« Reply #2 on: March 31, 2007, 09:10:58 AM »

I'm not very experienced with linux scripting but I'll do my best to make it secure.

I updated the script and added some stuff (content, menu, functions).

currently you can download+install+start the following content:
1 map            bal3dm2           3 MB
2 modification   Excessive Plus   13 MB
3 modification   XCTF              1 MB
4 modification   SuperheroesArena 12 MB (+24 MB for models)

I'm currently hosting those files on my server but I have only 500 MB webspace. To implement other mods I need the following info:
set filename=     The filename of the mod e.g. map23.pk3 or mycoolmod.zip
set mirror=       The place where the file is stored online (direct link)
set quake3dir=    The directory of your mod. If it's a pk3 use "..\baseoa\"
set quake3start=  The commandline options that starts the mod directly (e.g. +set fs_game )

example excessive plus:
set filename=xp-1.03-full.zip
set mirror=http://opencontentgames.org/oastuff/
set quake3dir=..\excessiveplus\
set quake3start=%quake3exe% +set fs_game excessiveplus
Logged

"We are all connected"
dmn_clown
Posts a lot
*

Cakes 1
Posts: 1324


« Reply #3 on: March 31, 2007, 10:41:30 AM »

There aren't too many ways you can screw up security when you are essentially just unzipping a downloaded file, I was talking about a sanity check (e.g. making sure someone has a program installed)

from a proof of concept bash script of mine that checks if eject is installed in /usr/bin/:

Code:
#!/bin/bash

declare -r SCRIPT=${0##*/}
declare -r eject="/usr/bin/eject"

if test ! -x "$eject" ; then
printf "$SCRIPT:$LINE0: please install eject - \
  aborting\n " >&2
exit 192
fi

The biggest problem on the GNU/Linux side would be finding where the person has the game installed.  You shouldn't assume that everyone has the game in /usr/local/games/ so you'd have to add a little test to find where /openarena/ is and you probably shouldn't use anything that is shell specific as many people use weird shells like ksh and csh as their default.

Something else you might want to do, rather than having the script download something put that on the end user and simply use the script to install it, just an idea that could save your bandwidth and webspace.
Logged

MilesTeg
Lesser Nub


Cakes 0
Posts: 144



« Reply #4 on: March 31, 2007, 11:11:26 AM »

sanity check: yes, as I said security I also meant sanity checks etc.

your script: thx, I'll try it some other day (no linux machine here)

installation path: basically the batch file currently only checks if the exe file in windows is at the right place and give an appropriate error msg. I'll try to make it as easy as possible to the user to install the program. Of course the easiest way would be to include the script in the OA package.

autodownload vs manual download: The idea is to make this script similiar to the debian package system.
But it's also possible to download the content manually. Wget will simply recognize the file and use it.
I want this feature because I always hated downloading rare q3-stuff from fileplanet...
Logged

"We are all connected"
dmn_clown
Posts a lot
*

Cakes 1
Posts: 1324


« Reply #5 on: March 31, 2007, 11:32:49 AM »

My script was just a weak example of a sanity check, but I do like the repository idea of working freeware mods (I hate downloading from File Planet as well).

Logged

kick52
Member


Cakes -1
Posts: 229


« Reply #6 on: April 01, 2007, 03:25:47 AM »

for *nixes, you could have a little script which would find /openarena/ (like in the previous post) and it would ask if it was the right folder and it could have an option where you could specify the location.
Logged
baconfish
Guest
« Reply #7 on: April 01, 2007, 06:58:13 AM »

But what if you install from a package? Couldn't it potentially find you /usr/share/doc/openarena/ instead? I think the best thing to do is have the user enter the path to the OA directory. Not to sound like a dick, but if they can't handle that much with their OS it doesn't sound like they'll be able to do much else.
Logged
MilesTeg
Lesser Nub


Cakes 0
Posts: 144



« Reply #8 on: April 01, 2007, 07:40:58 AM »

I think I will give the user some optiones for this (manual input and search function).
@baconfish: it could search for the executable.

I'm trying to write a small program, but I'm not a good programmer (yet) Wink

Logged

"We are all connected"
dmn_clown
Posts a lot
*

Cakes 1
Posts: 1324


« Reply #9 on: April 01, 2007, 08:55:55 AM »

But what if you install from a package? Couldn't it potentially find you /usr/share/doc/openarena/ instead? I think the best thing to do is have the user enter the path to the OA directory. Not to sound like a dick, but if they can't handle that much with their OS it doesn't sound like they'll be able to do much else.

You'd be surprised what people can't handle with their OS.  Old loki installers with the glibc error and people's tendency to make every script into an executable and not bothering to read the output of --help come to mind.

@milesteg the data path would be the best option to search.
Logged

MilesTeg
Lesser Nub


Cakes 0
Posts: 144



« Reply #10 on: July 17, 2007, 11:53:44 AM »

ok, I just wanna let you all know that I haven't (completely) abondoned the idea..

yesterday I started a little python script (using tkinter for gui). It currently only downloads, installs and starts XCTF but this actually works completely inside python! So you don't need any external software. It only works for ubuntu (haven't tested any other linux-platform yet) but since everything is integrated in python it shouldn't be a big thing to make it work under windows.

don't expect any fancy gui effects, this tool will concentrate on functionality Wink

my own personal wishlist:
a gui - done (tkinter)
downloader integrated - done
unzip integrated - done
direct feedback through gui-console - done
check if file is downloaded -> activate unzip-button - done
check if file is unzipped -> activate start-button -  done
relative paths - done
make a packages-file - done
and let the user select packs - done
info about the pack when selected - done
check if file is ok - done
give it a basic design - done
manual -button that starts a manual (if included) or a readme - done

open:
reduce the amount of buttons / dynamic button
ask(done)/search for OA path (+other sanity checks)
clean up code

scheduled:
make it work on windows
make it work on other  linux-systems
icons for packages
resume downloads
a php script that lets everyone add new packs to the package-file
« Last Edit: July 19, 2007, 10:52:55 AM by MilesTeg » Logged

"We are all connected"
MilesTeg
Lesser Nub


Cakes 0
Posts: 144



« Reply #11 on: July 19, 2007, 01:03:42 PM »

hi
I will release a first (rough) alpha of the program.
the code is crap and it might not work on many systems

anyway, if you want to test is please try it on a config like this:
- OS: ubuntu/kubuntu/xubuntu
- openarena installed with a packet manager

supported mods:
XCTF
ExcessivePlus
SuperheroesArena
Quake 3 Pong
more coming soon

short howto:
1. download: [ offline - was too crappy.. ]
2. untar it
3. start getmod000.py
4. update database

no root or sudo is necessary to run this! Hope it already works for you
« Last Edit: October 21, 2007, 03:07:16 AM by MilesTeg » Logged

"We are all connected"
iLeft.bye
Member


Cakes 1
Posts: 187



« Reply #12 on: July 19, 2007, 02:36:50 PM »

if you allow downloads you download the mods automatically
Logged
MilesTeg
Lesser Nub


Cakes 0
Posts: 144



« Reply #13 on: October 21, 2007, 03:05:53 AM »

Hi, I've tweaked the python script to run under windows.

Posts like this one give me enough reason to continue this little project Smiley

I will most probably release a version that supports the most common mods (including the high quality map pack from     w1zrd) soon (= when it's done).
Logged

"We are all connected"
SlippJigg
Nub


Cakes 0
Posts: 39


« Reply #14 on: December 23, 2007, 06:35:39 PM »

I think that is a great idea making the script.

Where is the Linux version of the script hosted?  I would like to download it and try it on PCLinuxOS 2007.

That would be awesome if the developers of open arena made a new tab in the menu that allowed you to download maps, model, and mods.  Open arena with a built in updater - content management system.

Thanks
SlippJigg
Logged
MilesTeg
Lesser Nub


Cakes 0
Posts: 144



« Reply #15 on: December 27, 2007, 05:22:20 AM »

Hi SlippJigg,
the current script can be found here:
http://opencontentgames.org/oastuff/getmod003.pyw

I have tested it only on windows the last time and it's still not finished but feel free to try it.

Logged

"We are all connected"
ailmanki
Nub


Cakes 0
Posts: 17


« Reply #16 on: December 27, 2007, 04:57:43 PM »

would it be possible to use torrent distribution?
Would be great!
Logged
MilesTeg
Lesser Nub


Cakes 0
Posts: 144



« Reply #17 on: December 28, 2007, 09:34:49 AM »

would it be possible to use torrent distribution?
Would be great!
I looked around for an easy way to integrate a torrent client, but I haven't found a really elegant solution Sad

The original BitTorrent and other programs are pythonbased, but they are all quite complex.

edit: Seems like the BitTornado client works quite well, so it's possible but take some time.
« Last Edit: December 28, 2007, 10:37:02 AM by MilesTeg » Logged

"We are all connected"
ailmanki
Nub


Cakes 0
Posts: 17


« Reply #18 on: December 28, 2007, 04:42:45 PM »

well I just had the idea cause I first wanted to propose to host the files for you mods, maps ...
but I came to conclusion better not, due to bandwith.. But its fearly easy to run rtorrent, and configure it so that it doesnt eat to much bandwith nor cpu ...
Logged
Jorge
Nub


Cakes 0
Posts: 5


« Reply #19 on: January 26, 2008, 01:35:02 AM »

  www.openarena.es os puede ayudar a alojar el contenido que querais y en descarga directa , Sí estais interesados en el proyecto incluso lo podríamos unir con el instalador que Yo hize para Windows en "Descargas" Un saludo , Hasta pronto.
Logged
Pages: [1]
  Print  
 
Jump to: