Permalink
Browse files

Build process error-handling fix + commenting + adding missing depend…

…ency (no functional changes)
  • Loading branch information...
1 parent 8622a09 commit 3a1cc25296cdf5edbd1f38ce9c6240b0293520d4 @TaoK committed Nov 11, 2012
Binary file not shown.
@@ -1,3 +1,5 @@
+REM Merge third-party and satellite (translation) assemblies into a single new executable assembly for easier distribution
+
IF EXIST %1SqlFormatter.exe DEL %1SqlFormatter.exe
"..\..\..\ExternalBuildTools\ILRepack\ILRepack.exe" /t:exe /out:%1SqlFormatterTemp.exe %1SqlFormatterExeAssembly.exe %1PoorMansTSqlFormatterLib.dll %1NDesk.Options.dll %1LinqBridge.dll %1es\SqlFormatterExeAssembly.resources.dll
@@ -1,3 +1,5 @@
+REM Merge third-party and satellite (translation) assemblies into a single new executable assembly for easier distribution
+
IF EXIST %1SqlFormatterWinforms.exe DEL %1SqlFormatterWinforms.exe
"..\..\..\ExternalBuildTools\ILRepack\ILRepack.exe" /t:winexe /out:%1SqlFormatterWinformsTemp.exe %1PoorMansTSqlFormatterDemo.exe %1PoorMansTSqlFormatterLib.dll %1LinqBridge.dll %1es\PoorMansTSqlFormatterDemo.resources.dll
@@ -1,9 +1,15 @@
+REM Preemptively replace class names that are auto-set by Visual Studio designer, where we want to use a custom version
+REM - in this case the Resource Manager that will need to find our translations in the merged output assembly
REM %1 is solution dir, %2 is project dir
%1\ExternalBuildTools\fart\fart.exe -r %2*.cs "System.ComponentModel.ComponentResourceManager" "FrameworkClassReplacements.SingleAssemblyComponentResourceManager"
-REM if errorlevel is 0 or greater, then we theoretically have a success (fart returns number of matches/replacements as return value), so reset errorlevel to 0
-if ERRORLEVEL 1 CMD /C EXIT 0
+REM standard "fart.exe" error-handling block; 9009 (missing program) is bad, anything else above 0 is OK and should be reset to 0 for standard handling
+if ERRORLEVEL 9009 (
+ REM do nothing
+) else (
+ if ERRORLEVEL 1 CMD /C EXIT 0
+)
REM ensure that we exit with the current errorlevel context...
exit %errorlevel%
@@ -1,9 +1,14 @@
+REM Preemptively inject interface name to settings class definition so that these settings can be referenced in other projects
REM %1 is solution dir, %2 is project dir
%1\ExternalBuildTools\fart\fart.exe -r %2Properties\Settings.Designer.cs "global::System.Configuration.ApplicationSettingsBase {" "global::System.Configuration.ApplicationSettingsBase, PoorMansTSqlFormatterPluginShared.ISqlSettings {"
-REM if errorlevel is 0 or greater, then we theoretically have a success (fart returns number of matches/replacements as return value), so reset errorlevel to 0
-if ERRORLEVEL 1 CMD /C EXIT 0
+REM standard "fart.exe" error-handling block; 9009 (missing program) is bad, anything else above 0 is OK and should be reset to 0 for standard handling
+if ERRORLEVEL 9009 (
+ REM do nothing
+) else (
+ if ERRORLEVEL 1 CMD /C EXIT 0
+)
REM ensure that we exit with the current errorlevel context...
exit %errorlevel%
@@ -1,9 +1,14 @@
+REM Preemptively inject interface name to settings class definition so that these settings can be referenced in other projects
REM %1 is solution dir, %2 is project dir
%1\ExternalBuildTools\fart\fart.exe -r %2Properties\Settings.Designer.cs "global::System.Configuration.ApplicationSettingsBase {" "global::System.Configuration.ApplicationSettingsBase, PoorMansTSqlFormatterPluginShared.ISqlSettings {"
-REM if errorlevel is 0 or greater, then we theoretically have a success (fart returns number of matches/replacements as return value), so reset errorlevel to 0
-if ERRORLEVEL 1 CMD /C EXIT 0
+REM standard "fart.exe" error-handling block; 9009 (missing program) is bad, anything else above 0 is OK and should be reset to 0 for standard handling
+if ERRORLEVEL 9009 (
+ REM do nothing
+) else (
+ if ERRORLEVEL 1 CMD /C EXIT 0
+)
REM ensure that we exit with the current errorlevel context...
exit %errorlevel%

0 comments on commit 3a1cc25

Please sign in to comment.