Created
June 25, 2013 09:05
-
-
Save nickludlam/5857063 to your computer and use it in GitHub Desktop.
This script is designed to accelerate your local workflow when working on ArmA3 content via git
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
:: install.bat | |
:: | |
:: This script has two functions, and is designed to allow easy development | |
:: of your ArmA3 mission from within a git repository clone | |
:: | |
:: 'install.bat test' - Copies the mission to your local MPMissions folder | |
:: 'install.bat package' - Compiles a PBO for testing with a standlone server | |
:: | |
:: Nick Ludlam 15/7/2013 | |
@ECHO OFF | |
:: Set your ArmA3 profile name etc below. The very first time you run this | |
IF "%username%" == "Someone A" ( | |
:: Your profile is assumed to be in "Arma 3 - Other Profiles" | |
SET LOCAL_ARMA_PROFILE=[Clan]SomeoneA | |
:: Your local standalone server directory | |
SET PBO_DESTINATION_DIR="C:\ArmaEditing\ArmA3\A3Master\MPMissions" | |
) | |
IF "%username%" == "Someone B" ( | |
SET LOCAL_ARMA_PROFILE=[Clan]SomeoneB | |
SET PBO_DESTINATION_DIR="G:\Games\a3master\MPMissions" | |
) | |
:: General definitions | |
SET SOURCE_DIR="%USERPROFILE%\Documents\GitHub\Wasteland" | |
SET PBO_TOOL="C:\Program Files (x86)\Bohemia Interactive\Tools\BinPBO Personal Edition\BinPBO.exe" | |
SET LOCAL_MISSION_NAME=Custom_Wasteland.Stratis | |
SET TEST_DESTINATION_DIR="%USERPROFILE%\Documents\Arma 3 - Other Profiles\%LOCAL_ARMA_PROFILE%\MPMissions\%LOCAL_MISSION_NAME%" | |
:: end config | |
IF %1.==. GOTO NOARG | |
IF "%1" == "test" GOTO TEST | |
IF "%1" == "package" GOTO PACKAGE | |
GOTO NOARG | |
:: Package mode - Creates a PBO file of the mission | |
:PACKAGE | |
ECHO "Packaging..." | |
mkdir %TEMP%\%LOCAL_MISSION_NAME% | |
xcopy /q /s /y %SOURCE_DIR%\* %TEMP%\%LOCAL_MISSION_NAME% | |
:: Copy defines_servermode.hpp to the directories which use defines.hpp | |
copy "%USERPROFILE%\Documents\GitHub\Wasteland\defines_servermode.hpp" %TEMP%\%LOCAL_MISSION_NAME%\defines.hpp | |
copy "%USERPROFILE%\Documents\GitHub\Wasteland\defines_servermode.hpp" %TEMP%\%LOCAL_MISSION_NAME%\client\defines.hpp | |
copy "%USERPROFILE%\Documents\GitHub\Wasteland\defines_servermode.hpp" %TEMP%\%LOCAL_MISSION_NAME%\server\defines.hpp | |
copy "%USERPROFILE%\Documents\GitHub\Wasteland\defines_servermode.hpp" %TEMP%\%LOCAL_MISSION_NAME%\server\functions\defines.hpp | |
copy "%USERPROFILE%\Documents\GitHub\Wasteland\defines_servermode.hpp" %TEMP%\%LOCAL_MISSION_NAME%\server\missions\sideMissions\defines.hpp | |
copy "%USERPROFILE%\Documents\GitHub\Wasteland\defines_servermode.hpp" %TEMP%\%LOCAL_MISSION_NAME%\server\missions\mainMissions\defines.hpp | |
echo Copied to %TEMP%\%LOCAL_MISSION_NAME% | |
%PBO_TOOL% %TEMP%\%LOCAL_MISSION_NAME% %PBO_DESTINATION_DIR%\ | |
rmdir %TEMP%\%LOCAL_MISSION_NAME% /s /q | |
GOTO END | |
:: Test mode - Install Wasteland to your MPMissions folder of your profile | |
:TEST | |
ECHO "Building a test install..." | |
mkdir %DESTINATION_DIR% | |
xcopy /q /s /y %SOURCE_DIR% %TEST_DESTINATION_DIR% | |
:: Copy defines_localediting.hpp to the directories which use defines.hpp | |
copy "%USERPROFILE%\Documents\GitHub\Wasteland\defines_localediting.hpp" %TEST_DESTINATION_DIR%\defines.hpp | |
copy "%USERPROFILE%\Documents\GitHub\Wasteland\defines_localediting.hpp" %TEST_DESTINATION_DIR%\client\defines.hpp | |
copy "%USERPROFILE%\Documents\GitHub\Wasteland\defines_localediting.hpp" %TEST_DESTINATION_DIR%\server\defines.hpp | |
copy "%USERPROFILE%\Documents\GitHub\Wasteland\defines_localediting.hpp" %TEST_DESTINATION_DIR%\server\functions\defines.hpp | |
copy "%USERPROFILE%\Documents\GitHub\Wasteland\defines_localediting.hpp" %TEST_DESTINATION_DIR%\server\missions\sideMissions\defines.hpp | |
copy "%USERPROFILE%\Documents\GitHub\Wasteland\defines_localediting.hpp" %TEST_DESTINATION_DIR%\server\missions\mainMissions\defines.hpp | |
GOTO END | |
:NOARG | |
echo "install.bat - Installs the Wasteland mission for testing or packaging" | |
echo Error: You must specify 'test' or 'package' as an argument | |
:END |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment