@ -39,6 +39,7 @@ public partial class ModPacker : Form
var dialog = new SelectFolderDialog ( ) ;
// TODO: .config on linux
dialog . Directory = Environment . GetEnvironmentVariable ( "LocalAppData" ) ;
while ( ! wasSuccessful )
{
@ -94,7 +95,6 @@ public partial class ModPacker : Form
windowsLabel . Visible = false ;
windowsPath = "" ;
}
UpdateCreateButton ( ) ;
}
@ -203,8 +203,11 @@ public partial class ModPacker : Form
createLabel . Text = "Packaging mod(s)... This could take a while!" ;
string output ;
bool successful ;
string errorCode ;
// TODO: make windows optional
if ( windowsCheckBox . Checked . Value )
{
using ( var saveFile = new SaveFileDialog { Title = "Save Windows mod profile" , Filters = { zipFileFilter } } )
{
if ( saveFile . ShowDialog ( this ) = = DialogResult . Ok )
@ -216,13 +219,13 @@ public partial class ModPacker : Form
}
}
LoadProfileParameters ( ProfileOperatingSystems . Windows ) ;
( bool successful , string errorcode ) = Core . CreateModPack ( profile , windowsPath , originalPath , apkPath , output ) ;
( successful , errorCode ) = Core . CreateModPack ( profile , windowsPath , originalPath , apkPath , output ) ;
if ( ! successful )
{
MessageBox . Show ( error c ode, "Error" , MessageBoxButtons . OK , MessageBoxType . Error ) ;
MessageBox . Show ( error C ode, "Error" , MessageBoxButtons . OK , MessageBoxType . Error ) ;
AbortPatch ( ) ;
}
}
if ( linuxCheckBox . Checked . Value )
{
@ -237,10 +240,10 @@ public partial class ModPacker : Form
}
}
LoadProfileParameters ( ProfileOperatingSystems . Linux ) ;
( successful , error c ode) = Core . CreateModPack ( profile , linuxPath , originalPath , apkPath , output ) ;
( successful , error C ode) = Core . CreateModPack ( profile , linuxPath , originalPath , apkPath , output ) ;
if ( ! successful )
{
MessageBox . Show ( error c ode, "Error" , MessageBoxButtons . OK , MessageBoxType . Error ) ;
MessageBox . Show ( error C ode, "Error" , MessageBoxButtons . OK , MessageBoxType . Error ) ;
AbortPatch ( ) ;
}
}