The ui.xml file can be added to the cat/dat files using the XRCatTool. I put all the required commands in a batch file (unfortunately one needs to be well versed in using REGEX to get the full effect!!) Here's my batch file for building Enhanced Money Transfer (Including backports for earlier releases):
Code: Select all
REM Build batch file for X-Rebirth - MT Enhanced Money Transfer Mod
REM Version 1.0
REM Date 2014-12-04
set version=%1
rmdir ..\release\%version%\mt_enhanced_money_transfer\
mkdir ..\release\%version%\mt_enhanced_money_transfer\
REM Add current release to ext_01.cat
XRCatTool -in ..\src\%version% -out ..\release\%version%\mt_enhanced_money_transfer\ext_01.cat -exclude "^content" "^readme" "^ego_forum_text" "xpl$" "old$" "^v251/" "^v320/" -dump
REM Now add the v251 release diff ext_v251.cat file
XRCatTool -in ..\src\%version%\v251 -out ..\release\%version%\mt_enhanced_money_transfer\ext_v251.cat -diff ..\src\%version% -exclude "^v251/" "^v320/" "^readme" "^ego_forum_text" "^content" "xpl$" "old$" -dump
REM Now add the v320 release diff ext_320.cat file
XRCatTool -in ..\src\%version%\v320 -out ..\release\%version%\mt_enhanced_money_transfer\ext_v320.cat -diff ..\src\%version% -exclude "^v320/" "^v251/" "^readme" "^ego_forum_text" "^content" "xpl$" "old$" -dump
REM Copy content.xml to release folder
copy ..\src\%version%\content.xml ..\release\%version%\mt_enhanced_money_transfer\content.xml
REM Copy readme.txt to release folder
copy ..\src\%version%\readme.txt ..\release\%version%\mt_enhanced_money_transfer\readme.txt
echo "Done...."
The file is run from a build directory in the same tree as the source code e.g.
../mt_EMT/build/buildemt.bat
../mt_EMT/src/%version%/*.*
../mt_EMT/release/%version%/*.cat, *.dat, *.txt etc.
The batch file takes a single parameter that is the version to be built e.g.
buildemt.bat v115 will build version 1.15 etc.
Just for completeness I then use the following batch file to publish. It takes three parameters:
Param 1 -
publish - publish the mod for the first time
update - updates an already published mod
minor - minor update without version change
Param 2 - version - eg v115
param 3 - "The required update text if using publish or update as Param 1"
Code: Select all
@ECHO OFF
REM Publish X-Rebirth: MT Enhanced Money Transfer Mod
REM Version 1.0
REM 2014/12/04
REM if no parameter then update else first time publish
IF "%1" EQU "update" GOTO Update_mod
IF "%1" EQU "publish" GOTO Publish_mod
IF "%1" EQU "minor" GOTO Update_minor
GOTO Error_args
:Publish_mod
ECHO "Publishing Mod......"
GOTO End_of_prog
:Update_mod
REM Set the changenote text
set change_note="%~3"
set version=%2
IF "%~3" EQU "" GOTO Error_args
ECHO %change_note%
WorkshopTool update -path "..\release\%version%\mt_enhanced_money_transfer" -changenote %change_note%
GOTO End_of_prog
:Update_minor
set change_note="%~3"
set version=%2
IF "%~3" EQU "" GOTO Error_args
ECHO %change_note%
WorkshopTool update -minor -path "..\release\%version%\mt_enhanced_money_transfer" -changenote %change_note%
GOTO End_of_prog
:Error_args
ECHO "Incorrect command line arguments....."
:End_of_prog
ECHO "Done...."
I should get around to making these files universal one of these days so that the same files will work on any mod.
Hopefully you can work out what I did and adapt for your own mods.
Cheers
Wysi