Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: installer/msibuild.cmd

Issue 5394579117309952: Installer localization and new build system (Closed)
Patch Set: Created Dec. 10, 2013, 4:11 a.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « installer/installer.gyp ('k') | installer/src/documentation/build_process.dox » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: installer/msibuild.cmd
===================================================================
new file mode 100644
--- /dev/null
+++ b/installer/msibuild.cmd
@@ -0,0 +1,81 @@
+@echo off
+setlocal
+set FLAG=%1
+shift
+set LOCALE_ID=%1
+shift
+set LOCALE_FILE=%1
+shift
+set MSI_LOCALE=%1
+shift
+set MST=%1
+shift
+set MSI_BASE=%1
+shift
+set MSI_INTERIM=%1
+shift
+set WIXOBJ=%1
+shift
+set WIXOBJ=%WIXOBJ% %1
+shift
+set WIXOBJ=%WIXOBJ% %1
+shift
+set WIXOBJ=%WIXOBJ% %1
+if "%WIXOBJ%"=="" goto Help
+if "%FLAG%"=="initial" goto Light
+if "%FLAG%"=="additional" goto Light
+echo First argument must be either 'initial' or 'additional'
+exit /b 1
+goto End
+:Light
+echo on
+light -notidy -nologo -ext WixUIExtension -sval -loc %LOCALE_FILE% -out %MSI_LOCALE% %WIXOBJ%
+if errorlevel 1 GOTO :Error
+@echo off
+if "%FLAG%"=="additional" goto Additional
+:Initial
+echo on
+copy %MSI_LOCALE% %MSI_INTERIM%
+copy %MSI_LOCALE% %MSI_BASE%
+@echo off
+goto End
+:Additional
+echo on
+msitran -g %MSI_BASE% %MSI_LOCALE% %MST%
+if errorlevel 1 GOTO :Error
+cscript ..\..\emb.vbs %LOCALE_ID% %MSI_INTERIM% %MST%
+if errorlevel 1 GOTO :Error
+@echo off
+goto End
+
+:Help
+echo msibuild - A single-language step to create a multi-language MSI
+echo Must be run from an architecture-specific build directory, such as installer/build/ia32
+echo.
+echo usage: msibuild ^<flag^> ^<locale_id^> ^<locale_file^> ^<msi_locale^> ^<mst^> ^<msi_base^> ^<msi_interim^> ^<wix_objects^>
+echo flag - either 'initial' or 'additional'
+echo locale_id - a Microsoft LCID (e.g. 1033)
+echo locale_file - a WiX localization file (e.g. en-us.wxl)
+echo msi_locale - an MSI file as compiled with the given locale_file
+echo mst - an MST file generated by comparing msi_locale against msi_base
+echo msi_base - an MSI file against which to generate a transform
+echo msi_interim - an MSI file into which to embed the MST
+echo wix_objects - a list of WiX object files from which to build the MSI
+echo.
+echo Initial build
+echo - Create ^<msi_locale^>
+echo - Copy it to ^<msi_base^>
+echo - Copy it to ^<msi_interim^>
+echo - Ignores arguments ^<locale_id^> (only needed for embedding) and ^<mst^> (since no transform is needed),
+echo but they must be present on the command line nonetheless
+echo.
+echo Additional build
+echo - Create ^<msi_locale^>
+echo - Generate ^<mst^> by comparing ^<msi_locale^> against ^<msi_base^>
+echo - Embed ^<mst^> into ^<msi_interim^> with storage identifier ^<locale_id^>
+echo.
+
+:Error
+exit /b 1
+
+:End
« no previous file with comments | « installer/installer.gyp ('k') | installer/src/documentation/build_process.dox » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld