diff --git a/SabreTools.Helper/Tools/ArchiveTools.cs b/SabreTools.Helper/Tools/ArchiveTools.cs index c146ea82..0d6de5ab 100644 --- a/SabreTools.Helper/Tools/ArchiveTools.cs +++ b/SabreTools.Helper/Tools/ArchiveTools.cs @@ -1112,7 +1112,7 @@ namespace SabreTools.Helper.Tools public static bool WriteTAR(List inputFiles, string outDir, List roms, Logger logger, bool date = false) { bool success = false; - string tempFile = Path.GetTempFileName(); + string tempFile = Path.Combine(Path.GetTempPath(), "tmp" + Guid.NewGuid().ToString()); // If either list of roms is null or empty, return if (inputFiles == null || roms == null || inputFiles.Count == 0 || roms.Count == 0) @@ -1231,7 +1231,7 @@ namespace SabreTools.Helper.Tools else { // Get the stream from the original archive - string tempEntry = Path.GetTempFileName(); + string tempEntry = Path.Combine(Path.GetTempPath(), "tmp" + Guid.NewGuid().ToString()); oldTarFile.Entries.Where(e => e.Key == key).ToList()[0].WriteToFile(tempEntry); // Copy the input stream to the output @@ -1527,7 +1527,7 @@ namespace SabreTools.Helper.Tools public static bool WriteTorrentZip(List inputFiles, string outDir, List roms, Logger logger, bool date = false) { bool success = false; - string tempFile = Path.GetTempFileName(); + string tempFile = Path.Combine(Path.GetTempPath(), "tmp" + Guid.NewGuid().ToString()); // If either list of roms is null or empty, return if (inputFiles == null || roms == null || inputFiles.Count == 0 || roms.Count == 0) diff --git a/build.bat b/build.bat new file mode 100644 index 00000000..f9ecc172 --- /dev/null +++ b/build.bat @@ -0,0 +1,46 @@ +@echo off + +set configuration=Mono +set platform=x64 + +echo ------------------------ +echo [ Build SabreTools ] +echo ------------------------ +echo. + +REM Set the configuration +:Configuration + +echo What configuration do you want? +echo 1) Debug +echo 2) Release +echo 3) Mono [Default] + +set /P confgnum="> " + +if "%confignum%"=="1" ( set configuration=Debug ) +if "%confignum%"=="2" ( set configuration=Release ) +if "%confignum%"=="3" ( set configuration=Mono ) +if "%confignum%"=="" ( set configuration=Mono ) + +REM Set the platform +:Platform + +echo. +echo What platform do you want? +echo 1) AnyCPU +echo 2) x64 [Default] + +set /P platnum="> " + +if "%platnum%"=="1" ( set platform=AnyCPU ) +if "%platnum%"=="2" ( set platform=x64 ) +if "%platnum%"=="" ( set platform=x64 ) + +REM Now run the command +:Command + +@echo on +"C:\Program Files (x86)\MSBuild\14.0\Bin\MSBuild.exe" SabreTools.sln /property:Configuration=%configuration% /property:Platform=%platform% + +pause \ No newline at end of file