A python cross platform port is now in developement, by ngld : http://www.hard-light.net/forums/index.php?topic=86364.msg1769614#msg1769614Grab the code from git :
https://github.com/ngld/fs2mod-py/Hi !
I've worked a while on this little thing, and it's starting to look good enough for a first alpha ! Don't expect a nice GUI, it's only a bash script !
Sorry, the first upload v0.0.3 was broken (some Media VP stuff still hardcoded in the unpacking part). Version 0.0.4 is not OK either, it has download path issues.
Current version is 0.0.29. Supports GOG installer, a few mods.NO BINARIES INSTALL YET ! Add them yourself. And of course this is compatible with pre-existing FS2 installs. Just don't use "clean" option on a mod if you have modified tables and models.innoextract must be installed !
So, this is my FreeSpace 2 bash installer :
[b][v0.0.4+][/b]
- it can set up a FreeSpace 2 install from a GOG installer
- it can manage mods (install/uninstall/put archives in a cache/remember mods for reinstalling later)
- it can retrieve a mod from a SINGLE file !
- it stores its cache and config files in a separate folder so it only works with mod files in the FS2 folder
- it may support gracefully file paths with spaces (i think it's covered, not sure)
[b][v0.0.6+][/b]
- when you change the FS2 root folder, the installer now compares your mod list and the folders in the new root folder and identifies what may be installed or not. This means you can now manage multiple FS2 installs on the same computer.
[b][v0.0.10+][/b]
- handle dependecies. BUT I'M HOSTING ON "UBUNTU ONE" SO LINKS KEEP BREAKING FOR ONLINE UPDATES.
[b][v0.0.12+][/b]
- deps install is now cleaner
- downloads fail with an error message (instead of hanging) when connection is lost
[b][v0.0.14+][/b]
- mod descriptor files can now auto-update when you install or check & update (they need to include an "update" file in "root")
- better offline behaviour (if we already have a mod descriptor and the online update fails, keep going anyway)
- [no difference in the code] Switched to dropbox ! Links do not break anymore when I update mod packages in the repository !
[b][v0.0.16+][/b]
- added a way to clean cache without uninstalling/removing/checking installed files
- added a "clean mod folder option" : remove everything that's not in the zip/7z files from a mod folder (tables, models... typically any user side modification)
[b][v0.0.21+][/b]
- cleaner mod updates, deleting outdated files is now supported. *Without touching user added tables models...* If they manually add stuff to a mod and this mod is broken after update, it is advised to manually run the cleaning tool included in the script : it will remove all unsupported content.
- a lot of small fixes, including texts and menu ordering
[b][v0.0.22+][/b]
- fixed cleaning after update throwing errors if running offline.
[b][v0.0.23+][/b]
- added innoextract detection. If it's not installed, and if we are on Ubuntu, we install it ! I'll add support for other distros soon.
[b][v0.0.24+][/b]
- better/moved innoextract detection (we don't need innoextract if the original game is already installed
- GOG installer search can now be interrupted.
[b][v0.0.25+][/b]
- 7z now updates corrupt files instead of hanging the script
[b][v0.0.27+][/b]
- added RAR archives compatibility
- added subfolders compatibility
- fixed : JADXA install process
[b][v0.0.28+][/b]
- if continued download are corrupt, retry from scratch.
[b][v0.0.29+][/b]
- tweak : delete empty folders on 3 levels inside the mod folder each time we install, update, uninstall, clean user files.
[b][v0.0.30+][/b]
- fixed : download verification error if the archive has spaces in its name (escaped some strings)
- tweak : silenced harmless cleaning errors
Not released yet :- next version will manage binaries (launchers/engine/nightly builds...)
- an "advanced mode" will be added to force cache downloads or override old files even if their checksums are ok.
You will only need to get innoextract to get it running.
Have fun, and please report bugs ! (i think there is no more accidental wipes of FS2 mods, but you may not use it on a FreeSpace 2 that you want to keep safe)
About the code : it's globally uncommented, i have the comments in the few parts of code i used to build this thing. I'll re add them later.
Some parts are duplicated, and some code paths in the download logic are not used (because i found a better implementation mid-way). I'll remove them if it doesn't break anything.
Links : The installer :
https://www.dropbox.com/s/8p7t7yci099ohzd/fs2gogextract.sh?dl=1Mod files (load them in the installer) : (Oh, and don't worry about installing mediavps before derelict or blueplanet : the installer will do it for you !)
Media VP 3612 :
https://www.dropbox.com/s/os2ihzqx8b1c4o9/mediavps_3612.fs2mod?dl=1[NEW !] Media VP 2014 :
https://www.dropbox.com/s/vbcxbblkeedmhdr/mediavps_2014.fs2mod?dl=1Derelict :
https://www.dropbox.com/s/whzbx5uav1s9gvf/Derelict.fs2mod?dl=1Blue Planet: Age of Aquarius :
https://www.dropbox.com/s/blch7bqqq11iywx/blueplanet.fs2mod?dl=1Blue Planet: War in Heaven :
https://www.dropbox.com/s/gjcl7r57x6q5jfj/blueplanet2.fs2mod?dl=1FreeSpace Port :
https://www.dropbox.com/s/qx7ww8a0dddyq52/fsport.fs2mod?dl=1FS Port Media VPs :
https://www.dropbox.com/s/yzcll3dicpwewcl/fsport-mediavps.fs2mod?dl=1Silent Threat: Reborn :
https://www.dropbox.com/s/ofg3ib5nz5iql48/fsport-str.fs2mod?dl=1[NEW !] Just Another Day Xtreme Arcade (JADXA) :
https://www.dropbox.com/s/f4pusp3hrcc05eu/JADXA.fs2mod?dl=1[NEW !] Vassago's Dirge :
https://www.dropbox.com/s/b23gkitwj66pqtb/vassago.fs2mod?dl=1[NEW !] Transcend :
https://www.dropbox.com/s/be2c6xf24gvoeie/Transcend.fs2mod?dl=1[NEW !] Sync :
https://www.dropbox.com/s/g6u5xqznfh0o2oo/sync.fs2mod?dl=1(any contructive critcism on the usability is welcome, i'm going to make other mod installers... please report broken links too...)
Making your own mod files is an easy task ! (mini HOWTO) You will need to have the .zip and/or .7z archives of your mod in a folder.
cd YOUR_MOD_ARCHIVES_FOLDER
md5sum *
The output should look like this example:
c019c57629f352ff68b00c0a5478dca5 MediaVPs_3612.zip
37d110c741e55141f8d71c64f989f850 MV_Advanced_3612.zip
Copy and paste the full output to you favourite text editor.
Then, for each line, replace the 2 spaces (between the MD5 sums and the name of the archives) by semicolons ";" :
c019c57629f352ff68b00c0a5478dca5;MediaVPs_3612.zip
37d110c741e55141f8d71c64f989f850;MV_Advanced_3612.zip
Now, for each line, add your archives download urls, using semicolon ";" separators :
c019c57629f352ff68b00c0a5478dca5;MediaVPs_3612.zip;http://mvp.fsmods.net/3612/MediaVPs_3612.zip
37d110c741e55141f8d71c64f989f850;MV_Advanced_3612.zip;http://mvp.fsmods.net/3612/MV_Advanced_3612.zip
Make sure there is no new line at the end of this file.Save it under the name :
downloadNow you will need to have the .vp and other .ini, .bmp ... files of your mod in a new folder. Extract archives to this folder.
cd YOUR_MOD_FILES_FOLDER
md5sum *
The output should look like this example:
a22db283154c07e5cfb5951c410e3600 FSU-MVP.bmp
ef9c1864ee8d90bd661ebfdc624dc76a mod.ini
Copy and paste the full output to you favourite text editor.
Then, for each line, replace the 2 spaces (between the MD5 sums and the name of the archives) by semicolons ";" :
a22db283154c07e5cfb5951c410e3600;FSU-MVP.bmp
ef9c1864ee8d90bd661ebfdc624dc76a;mod.ini
Now, for each line, add the name of the archive the file has been extracted from, using semicolon ";" separators :
a22db283154c07e5cfb5951c410e3600;FSU-MVP.bmp;MediaVPs_3612.zip
ef9c1864ee8d90bd661ebfdc624dc76a;mod.ini;MediaVPs_3612.zip
Make sure there is no new line at the end of this file.Save it under the name :
vpCreate a new text file.
It has only one line, with the full name of your mod as it will be read by human beings
Media VPs 3612
Save it under the name :
titleCreate a new text file.
This is where the script will get auto updates for the mod. If you leave it blank or write anything that's not a valid address, the script will only complain about failing to auto-update the mod. The file should only have one line.
https://www.dropbox.com/s/os2ihzqx8b1c4o9/mediavps_3612.fs2mod?dl=1
If you are using droppbox, you may need to skip this step, and add this to the archive later, after dropbox gives you the sharing link.
Obviously, many free hosting services won't let you update an already uploaded file, or will change the address each time you update this file. This makes these hosting services incompatible with mod auto-updates. Sorry.
Save it under the name :
updateNow if your mod is depending on other mods (no need to create it if your mod has no dependencies):
Create a new text file.
On each line, write the file name of a mod it's depending on without its extension (fsport-mediavps.fs2mod -> fsport-mediavps). Then add the url of this mod file, separated by a semicolon :
fsport-mediavps;https://www.dropbox.com/s/yzcll3dicpwewcl/fsport-mediavps.fs2mod?dl=1
mediavps_3612;https://www.dropbox.com/s/os2ihzqx8b1c4o9/mediavps_3612.fs2mod?dl=1
Make sure there is no new line at the end of this file.Save it under the name :
depCreate a .zip archive containing files :
title update vp download (and maybe
dep ), all in a folder called
rootThe first part of the name of the archive will be your mod folder name. The second part is the
.fs2mod extension.
For example :
mediavps_3612.fs2modThis file should now be accepted by the script.