MOO2_MKLINK - Space saver
Posted: Sat Jan 23, 2016 12:39 am
I've been a fan of MOO2 for a long time (even making a guide on GameFAQs over a decade ago) but just recently found out about this forum and its mods, thanks to GOG; also thanks to all the wonderful mod authors who continue to work on a 20+ year old game! I installed ICEMOD, Vanilla, and VDC using up a combined total of ~32MB of extra space on Windows (rather than ~332MB per mod) by using this batch file, designed for a GOG install:
Instructions:
- Save the above batch file to a file such as MOO2_MKLINK.BAT one folder above where the "Masters of Orion 2" folder is (such as "C:\Program Files\GalaxyClient\Games").
- Create a folder for the mod such as "Masters of Orion 2 ICEMOD".
- Copy all of the mod files into the previously made folder.
- Open up the Command Prompt as Administrator.
- Navigate to where you made MOO2_MKLINK.BAT and run it like so:
...where you substitute what's in quotes for whatever you named the mod folder.
- Finally, here are Launch_MOO2.cmd and Launch_MOO2_MP.cmd that will work instead of GOG's shortcuts:
All of this helped me save space on the Windows tablet I like to use to play MOO2, and I thought I'd share the little code I made. The code is given freely as public domain. Again, thanks for the mods!
- The General
Code: Select all
@echo off
REM MOO2_MKLINK.BAT - Create symbolic links to original MOO2
echo Dest Path: [%~1]
FOR %%G IN ("Master of Orion 2\*.*") DO (
IF NOT EXIST "%~1\%%~nxG" (
IF /I "%%~xG"==".conf" (
copy /v /a /y "%%~fG" "%~1\%%~nxG"
) ELSE IF /I "%%~xG"==".lnk" (
copy /v /a /y "%%~fG" "%~1\%%~nxG"
) ELSE (
mklink "%~1\%%~nxG" "%%~fG"
)
)
)
FOR /D %%G IN ("Master of Orion 2\*.*") DO (
IF NOT EXIST "%~1\%%~nxG" mklink /D "%~1\%%~nxG" "%%~fG"
)
echo Done.
- Save the above batch file to a file such as MOO2_MKLINK.BAT one folder above where the "Masters of Orion 2" folder is (such as "C:\Program Files\GalaxyClient\Games").
- Create a folder for the mod such as "Masters of Orion 2 ICEMOD".
- Copy all of the mod files into the previously made folder.
- Open up the Command Prompt as Administrator.
- Navigate to where you made MOO2_MKLINK.BAT and run it like so:
Code: Select all
MOO2_MKLINK.BAT "Masters of Orion 2 ICEMOD"
- Finally, here are Launch_MOO2.cmd and Launch_MOO2_MP.cmd that will work instead of GOG's shortcuts:
Code: Select all
REM Launch_MOO2.cmd
cd /d "%~dp0DOSBOX"
DOSBox.exe -conf "%~dp0dosboxMOO2.conf" -conf "%~dp0dosboxMOO2_single.conf" -noconsole -c exit
Code: Select all
REM Launch_MOO2_MP.cmd
cd /d "%~dp0DOSBOX"
"%~dp0GOGDOSConfig.exe" 1207661633 NET
- The General