publicstaticreadonlyArgumentFlagArgHelp=newArgumentFlag("--help","-h"){DocString="prints this message"};
publicstaticreadonlyArgumentFlagArgVersion=newArgumentFlag("--version","-v"){DocString="prints the version that will be installed and is currently installed"};
publicstaticreadonlyArgumentFlagArgWaitFor=newArgumentFlag("--waitfor","-w"){DocString="waits for the specified PID to exit",ValueString="PID"};
publicstaticreadonlyArgumentFlagArgForce=newArgumentFlag("--force","-f"){DocString="forces the operation to go through"};
publicstaticreadonlyArgumentFlagArgRevert=newArgumentFlag("--revert","-r"){DocString="reverts the IPA installation"};
publicstaticreadonlyArgumentFlagArgNoRevert=newArgumentFlag("--no-revert","-R"){DocString="prevents a normal installation from first reverting"};
publicstaticreadonlyArgumentFlagArgNoWait=newArgumentFlag("--nowait","-n"){DocString="doesn't wait for user input after the operation"};
publicstaticreadonlyArgumentFlagArgStart=newArgumentFlag("--start","-s"){DocString="uses the specified arguments to start the game after the patch/unpatch",ValueString="ARGUMENTS"};
publicstaticreadonlyArgumentFlagArgLaunch=newArgumentFlag("--launch","-l"){DocString="uses positional parameters as arguments to start the game after patch/unpatch"};
publicstaticreadonlyArgumentFlagArgHelp=new("--help","-h"){DocString="prints this message"};
publicstaticreadonlyArgumentFlagArgVersion=new("--version","-v"){DocString="prints the version that will be installed and is currently installed"};
publicstaticreadonlyArgumentFlagArgWaitFor=new("--waitfor","-w"){DocString="waits for the specified PID to exit",ValueString="PID"};
publicstaticreadonlyArgumentFlagArgForce=new("--force","-f"){DocString="forces the operation to go through"};
publicstaticreadonlyArgumentFlagArgRevert=new("--revert","-r"){DocString="reverts the IPA installation"};
publicstaticreadonlyArgumentFlagArgNoRevert=new("--no-revert","-R"){DocString="prevents a normal installation from first reverting"};
publicstaticreadonlyArgumentFlagArgNoWait=new("--nowait","-n"){DocString="doesn't wait for user input after the operation"};
publicstaticreadonlyArgumentFlagArgStart=new("--start","-s"){DocString="uses the specified arguments to start the game after the patch/unpatch",ValueString="ARGUMENTS"};
publicstaticreadonlyArgumentFlagArgLaunch=new("--launch","-l"){DocString="uses positional parameters as arguments to start the game after patch/unpatch"};
[STAThread]
[STAThread]
publicstaticvoidMain()
publicstaticvoidMain()
@ -57,7 +55,7 @@ namespace IPA
{
{
if(ArgWaitFor.HasValue&&!ArgVersion)
if(ArgWaitFor.HasValue&&!ArgVersion)
{// wait for process if necessary
{// wait for process if necessary
varpid=int.Parse(ArgWaitFor.Value);
varpid=int.Parse(ArgWaitFor.Value!);
try
try
{// wait for beat saber to exit (ensures we can modify the file)
{// wait for beat saber to exit (ensures we can modify the file)