@ -232,6 +232,8 @@ plString plClientLauncher::GetAppArgs() const
// optional args
// optional args
if ( hsCheckBits ( fFlags , kClientImage ) )
if ( hsCheckBits ( fFlags , kClientImage ) )
ss < < " -Image " ;
ss < < " -Image " ;
if ( hsCheckBits ( fFlags , kPatchOnly ) )
ss < < " -PatchOnly " ;
return ss . GetString ( ) ;
return ss . GetString ( ) ;
}
}
@ -427,12 +429,13 @@ void plClientLauncher::ParseArguments()
if ( cmdParser . GetBool ( arg ) ) \
if ( cmdParser . GetBool ( arg ) ) \
fFlags | = flag ;
fFlags | = flag ;
enum { kArgServerIni , kArgNoSelfPatch , kArgImage , kArgRepairGame } ;
enum { kArgServerIni , kArgNoSelfPatch , kArgImage , kArgRepairGame , kArgPatchOnly } ;
const CmdArgDef cmdLineArgs [ ] = {
const CmdArgDef cmdLineArgs [ ] = {
{ kCmdArgFlagged | kCmdTypeString , L " ServerIni " , kArgServerIni } ,
{ kCmdArgFlagged | kCmdTypeString , L " ServerIni " , kArgServerIni } ,
{ kCmdArgFlagged | kCmdTypeBool , L " NoSelfPatch " , kArgNoSelfPatch } ,
{ kCmdArgFlagged | kCmdTypeBool , L " NoSelfPatch " , kArgNoSelfPatch } ,
{ kCmdArgFlagged | kCmdTypeBool , L " Image " , kArgImage } ,
{ kCmdArgFlagged | kCmdTypeBool , L " Image " , kArgImage } ,
{ kCmdArgFlagged | kCmdTypeBool , L " Repair " , kArgRepairGame } ,
{ kCmdArgFlagged | kCmdTypeBool , L " Repair " , kArgRepairGame } ,
{ kCmdArgFlagged | kCmdTypeBool , L " PatchOnly " , kArgPatchOnly }
} ;
} ;
CCmdParser cmdParser ( cmdLineArgs , arrsize ( cmdLineArgs ) ) ;
CCmdParser cmdParser ( cmdLineArgs , arrsize ( cmdLineArgs ) ) ;
@ -444,9 +447,12 @@ void plClientLauncher::ParseArguments()
APPLY_FLAG ( kArgNoSelfPatch , kHaveSelfPatched ) ;
APPLY_FLAG ( kArgNoSelfPatch , kHaveSelfPatched ) ;
APPLY_FLAG ( kArgImage , kClientImage ) ;
APPLY_FLAG ( kArgImage , kClientImage ) ;
APPLY_FLAG ( kArgRepairGame , kRepairGame ) ;
APPLY_FLAG ( kArgRepairGame , kRepairGame ) ;
APPLY_FLAG ( kArgPatchOnly , kPatchOnly ) ;
// last chance setup
// last chance setup
if ( hsCheckBits ( fFlags , kRepairGame ) )
if ( hsCheckBits ( fFlags , kPatchOnly ) )
fClientExecutable = " " ;
else if ( hsCheckBits ( fFlags , kRepairGame ) )
fClientExecutable = plManifest : : PatcherExecutable ( ) ;
fClientExecutable = plManifest : : PatcherExecutable ( ) ;
# undef APPLY_FLAG
# undef APPLY_FLAG