Dependencies\r
============\r
- Windows Installer XML (WiX) toolset: http://wix.sourceforge.net/\r
-- 7Zip (command-line version): http://www.7-zip.org/download.html\r
+- 7Zip (command line version): http://www.7-zip.org/download.html\r
- Mercurial (hg): http://mercurial.selenic.com/\r
\r
\r
The dependencies must be callable from dist.bat, therefore,\r
they'll need to be in/added to the system's search PATH.\r
\r
-Ensure the working directory reflects the toolset version;\r
-the packager clones the Go directory it resides in and copies the\r
-pre-built toolchain over into the cloned folder.\r
+The packaging needs to be done from within a tracked Go folder. \r
+Packages are built by cloning the same version of the source tree\r
+that the Go tools were built from.\r
\r
To create an i386 distribution package on a 64 bit system, set\r
GOARCH=386 prior to calling dist.bat.\r
----\r
- Documentation server shortcut checkbox option\r
\r
+Misc\r
+----\r
+WiX box sizes:\r
+ - banner size: 493x58\r
+ - left side of dialog: 164x312\r
+ - full dialog size: 493x312\r
+\r
\r
\r
:: Requires Windows Installer XML (WiX), 7zip, and Mercurial (hg)\r
\r
+echo # Cleaning previous WiX output files\r
+del /F /Q /S *.wixobj AppFiles.wxs *.wixpdb>NUL\r
+\r
echo # Setting some variables\r
for /f %%i in ('hg.exe root') do set ROOT=%%i\r
-for /f %%i in ('hg.exe id -n') do set ID=%%i\r
for /f "tokens=3" %%i in ('%ROOT%\bin\go.exe version') do set VER=%%i\r
+for /f "tokens=4" %%i in ('%ROOT%\bin\go.exe version') do set ID=%%i\r
+set ID=%ID:+=%\r
if errorlevel 1 goto end\r
\r
echo # Getting GOARCH\r
xcopy %ROOT%\bin go\bin /V /E /Y /I\r
xcopy %ROOT%\src\pkg\runtime\z*.c go\src\pkg\runtime /V /E /Y\r
xcopy %ROOT%\src\pkg\runtime\z*.go go\src\pkg\runtime /V /E /Y\r
-xcopy %ROOT%\src\pkg\runtime\z*.h go\src\pkg\runtime /V /E /T\r
+xcopy %ROOT%\src\pkg\runtime\z*.h go\src\pkg\runtime /V /E /Y\r
\r
echo # Starting zip packaging\r
7za a -tzip -mx=9 go.%VER%.windows-%GOARCH%.zip "go/"\r
<!-- Version="$(var.Version)" TODO: Version requires X.X.X.X format -->\r
\r
<Package\r
- Id='*' Keywords='Installer'\r
+ Id='*' \r
+ Keywords='Installer'\r
Description="The Go Programming Language Installer"\r
Comments="The Go programming language is an open source project to make programmers more productive."\r
InstallerVersion="300"\r
<Property Id="ARPHELPLINK" Value="golang.org/doc/community.html" />\r
<Property Id="ARPREADME" Value="golang.org" />\r
<Property Id="ARPURLINFOABOUT" Value="golang.org" />\r
-\r
-<!--\r
-<Upgrade Id="">\r
- <UpgradeVersion\r
- IncludeMaximum="yes"\r
- IncludeMinimum="yes"\r
- Language="1033"\r
- Maximum=""\r
- Minimum=""\r
- Property="" />\r
-</Upgrade>\r
--->\r
-\r
+<Icon Id="gopher.ico" SourceFile="images\gopher.ico"/>\r
+<Property Id="ARPPRODUCTICON" Value="gopher.ico" />\r
<Media Id='1' Cabinet="go.cab" EmbedCab="yes" CompressionLevel="high" />\r
<Condition Message="Windows 2000 or greater required."> VersionNT >= 500</Condition>\r
+<MajorUpgrade AllowDowngrades="yes" />\r
<SetDirectory Id="INSTALLDIRROOT" Value="C:\"/>\r
\r
<CustomAction\r
<Directory Id="ProgramMenuFolder">\r
<Directory Id="GoProgramShortcutsDir" Name="Go Programming Language"/>\r
</Directory>\r
+ <Directory Id="EnvironmentEntries">\r
+ <Directory Id="GoEnvironmentEntries" Name="Go Programming Language"/>\r
+ </Directory>\r
<Directory Id="DesktopFolder" Name="Desktop"/>\r
</Directory>\r
\r
-<!-- Programs Menu & Desktop Shortcuts, Registry & Environment Settings -->\r
+<!-- Programs Menu & Desktop Shortcuts -->\r
<DirectoryRef Id="GoProgramShortcutsDir">\r
<Component Id="Component_GoShortCuts" Guid="f5fbfb5e-6c5c-423b-9298-21b0e3c98f4b">\r
<Shortcut\r
Description="Starts the Go documentation server (http://localhost:6060)"\r
Show="minimized"\r
Arguments='/c "start /d[INSTALLDIR]bin godoc.exe -http=:6060 && start http://localhost:6060"'\r
+ Icon="gopher.ico"\r
Target="[%ComSpec]" />\r
<Shortcut\r
Id="GoDocServerDesktopShortcut"\r
Name="GoDocServer"\r
Description="Starts the godoc server (http://localhost:6060)"\r
Show="minimized"\r
+ Icon="gopher.ico"\r
Arguments='/c "start /d[INSTALLDIR]bin godoc.exe -http=:6060 && start http://localhost:6060"'\r
Target="[%ComSpec]" />\r
<Shortcut\r
On="uninstall" />\r
<RegistryValue\r
Root="HKCU"\r
- Key="Software\Microsoft\TheGoProgrammingLanguage"\r
+ Key="Software\GoProgrammingLanguage"\r
+ Name="ShortCuts"\r
+ Type="integer" \r
+ Value="1"\r
+ KeyPath="yes" /> \r
+ </Component>\r
+</DirectoryRef>\r
+\r
+<!-- Registry & Environment Settings -->\r
+<DirectoryRef Id="GoEnvironmentEntries">\r
+ <Component Id="Component_GoEnvironment" Guid="3ec7a4d5-eb08-4de7-9312-2df392c45993">\r
+ <RegistryKey \r
+ Root="HKCU"\r
+ Key="Software\GoProgrammingLanguage"\r
+ Action="create" >\r
+ <RegistryValue\r
Name="installed"\r
Type="integer"\r
Value="1"\r
KeyPath="yes" />\r
+ <RegistryValue\r
+ Name="installLocation"\r
+ Type="string"\r
+ Value="[INSTALLDIR]" />\r
+ </RegistryKey>\r
<Environment\r
Id="Environment"\r
Action="set"\r
Permanent="no"\r
System="yes"\r
Value="[INSTALLDIR]bin" />\r
+ <RemoveFolder\r
+ Id="GoEnvironmentEntries"\r
+ On="uninstall" />\r
</Component>\r
</DirectoryRef>\r
\r
Title="Go"\r
Level="1">\r
\r
+ <ComponentRef Id="Component_GoEnvironment" />\r
<ComponentGroupRef Id="AppFiles" />\r
<ComponentRef Id="Component_GoShortCuts" />\r
</Feature>\r
\r
<!-- Update the environment -->\r
<InstallExecuteSequence>\r
- <Custom\r
- Action="SetApplicationRootDirectory"\r
- Before="InstallFinalize" />\r
+ <Custom Action="SetApplicationRootDirectory" Before="InstallFinalize" />\r
</InstallExecuteSequence>\r
\r
<!-- Include the user interface -->\r
<WixVariable Id="WixUILicenseRtf" Value="LICENSE" />\r
+<WixVariable Id="WixUIBannerBmp" Value="images\Banner.jpg" />\r
+<WixVariable Id="WixUIDialogBmp" Value="images\Dialog.jpg" />\r
<Property Id="WIXUI_INSTALLDIR" Value="INSTALLDIR" />\r
<UIRef Id="WixUI_InstallDir" />\r
\r