mirror of
https://github.com/golang/go
synced 2024-11-25 10:07:56 -07:00
misc/dist/windows: ongoing dev
Embedded Go images in the installer dialog and banner boxes, Go tree cloning uses version info from the Go tool (readme updated), the installer allows up/down-grading and reparing of the version that's installed, added two registry values. R=golang-dev, bradfitz, bradfitz CC=golang-dev https://golang.org/cl/5683048
This commit is contained in:
parent
b5a3bd5ff6
commit
8d7ee2b998
15
misc/dist/windows/README
vendored
15
misc/dist/windows/README
vendored
@ -4,7 +4,7 @@ and installer (msi) format.
|
|||||||
Dependencies
|
Dependencies
|
||||||
============
|
============
|
||||||
- Windows Installer XML (WiX) toolset: http://wix.sourceforge.net/
|
- Windows Installer XML (WiX) toolset: http://wix.sourceforge.net/
|
||||||
- 7Zip (command-line version): http://www.7-zip.org/download.html
|
- 7Zip (command line version): http://www.7-zip.org/download.html
|
||||||
- Mercurial (hg): http://mercurial.selenic.com/
|
- Mercurial (hg): http://mercurial.selenic.com/
|
||||||
|
|
||||||
|
|
||||||
@ -13,9 +13,9 @@ Packaging
|
|||||||
The dependencies must be callable from dist.bat, therefore,
|
The dependencies must be callable from dist.bat, therefore,
|
||||||
they'll need to be in/added to the system's search PATH.
|
they'll need to be in/added to the system's search PATH.
|
||||||
|
|
||||||
Ensure the working directory reflects the toolset version;
|
The packaging needs to be done from within a tracked Go folder.
|
||||||
the packager clones the Go directory it resides in and copies the
|
Packages are built by cloning the same version of the source tree
|
||||||
pre-built toolchain over into the cloned folder.
|
that the Go tools were built from.
|
||||||
|
|
||||||
To create an i386 distribution package on a 64 bit system, set
|
To create an i386 distribution package on a 64 bit system, set
|
||||||
GOARCH=386 prior to calling dist.bat.
|
GOARCH=386 prior to calling dist.bat.
|
||||||
@ -26,4 +26,11 @@ TODO
|
|||||||
----
|
----
|
||||||
- Documentation server shortcut checkbox option
|
- Documentation server shortcut checkbox option
|
||||||
|
|
||||||
|
Misc
|
||||||
|
----
|
||||||
|
WiX box sizes:
|
||||||
|
- banner size: 493x58
|
||||||
|
- left side of dialog: 164x312
|
||||||
|
- full dialog size: 493x312
|
||||||
|
|
||||||
|
|
||||||
|
8
misc/dist/windows/dist.bat
vendored
8
misc/dist/windows/dist.bat
vendored
@ -7,10 +7,14 @@ setlocal
|
|||||||
|
|
||||||
:: Requires Windows Installer XML (WiX), 7zip, and Mercurial (hg)
|
:: Requires Windows Installer XML (WiX), 7zip, and Mercurial (hg)
|
||||||
|
|
||||||
|
echo # Cleaning previous WiX output files
|
||||||
|
del /F /Q /S *.wixobj AppFiles.wxs *.wixpdb>NUL
|
||||||
|
|
||||||
echo # Setting some variables
|
echo # Setting some variables
|
||||||
for /f %%i in ('hg.exe root') do set ROOT=%%i
|
for /f %%i in ('hg.exe root') do set ROOT=%%i
|
||||||
for /f %%i in ('hg.exe id -n') do set ID=%%i
|
|
||||||
for /f "tokens=3" %%i in ('%ROOT%\bin\go.exe version') do set VER=%%i
|
for /f "tokens=3" %%i in ('%ROOT%\bin\go.exe version') do set VER=%%i
|
||||||
|
for /f "tokens=4" %%i in ('%ROOT%\bin\go.exe version') do set ID=%%i
|
||||||
|
set ID=%ID:+=%
|
||||||
if errorlevel 1 goto end
|
if errorlevel 1 goto end
|
||||||
|
|
||||||
echo # Getting GOARCH
|
echo # Getting GOARCH
|
||||||
@ -35,7 +39,7 @@ xcopy %ROOT%\pkg go\pkg /V /E /Y /I
|
|||||||
xcopy %ROOT%\bin go\bin /V /E /Y /I
|
xcopy %ROOT%\bin go\bin /V /E /Y /I
|
||||||
xcopy %ROOT%\src\pkg\runtime\z*.c go\src\pkg\runtime /V /E /Y
|
xcopy %ROOT%\src\pkg\runtime\z*.c go\src\pkg\runtime /V /E /Y
|
||||||
xcopy %ROOT%\src\pkg\runtime\z*.go go\src\pkg\runtime /V /E /Y
|
xcopy %ROOT%\src\pkg\runtime\z*.go go\src\pkg\runtime /V /E /Y
|
||||||
xcopy %ROOT%\src\pkg\runtime\z*.h go\src\pkg\runtime /V /E /T
|
xcopy %ROOT%\src\pkg\runtime\z*.h go\src\pkg\runtime /V /E /Y
|
||||||
|
|
||||||
echo # Starting zip packaging
|
echo # Starting zip packaging
|
||||||
7za a -tzip -mx=9 go.%VER%.windows-%GOARCH%.zip "go/"
|
7za a -tzip -mx=9 go.%VER%.windows-%GOARCH%.zip "go/"
|
||||||
|
BIN
misc/dist/windows/images/Banner.jpg
vendored
Normal file
BIN
misc/dist/windows/images/Banner.jpg
vendored
Normal file
Binary file not shown.
After Width: | Height: | Size: 11 KiB |
BIN
misc/dist/windows/images/Dialog.jpg
vendored
Normal file
BIN
misc/dist/windows/images/Dialog.jpg
vendored
Normal file
Binary file not shown.
After Width: | Height: | Size: 16 KiB |
BIN
misc/dist/windows/images/DialogLeft.jpg
vendored
Normal file
BIN
misc/dist/windows/images/DialogLeft.jpg
vendored
Normal file
Binary file not shown.
After Width: | Height: | Size: 13 KiB |
BIN
misc/dist/windows/images/gopher.ico
vendored
Normal file
BIN
misc/dist/windows/images/gopher.ico
vendored
Normal file
Binary file not shown.
After Width: | Height: | Size: 42 KiB |
58
misc/dist/windows/installer.wxs
vendored
58
misc/dist/windows/installer.wxs
vendored
@ -25,7 +25,8 @@
|
|||||||
<!-- Version="$(var.Version)" TODO: Version requires X.X.X.X format -->
|
<!-- Version="$(var.Version)" TODO: Version requires X.X.X.X format -->
|
||||||
|
|
||||||
<Package
|
<Package
|
||||||
Id='*' Keywords='Installer'
|
Id='*'
|
||||||
|
Keywords='Installer'
|
||||||
Description="The Go Programming Language Installer"
|
Description="The Go Programming Language Installer"
|
||||||
Comments="The Go programming language is an open source project to make programmers more productive."
|
Comments="The Go programming language is an open source project to make programmers more productive."
|
||||||
InstallerVersion="300"
|
InstallerVersion="300"
|
||||||
@ -40,21 +41,11 @@
|
|||||||
<Property Id="ARPHELPLINK" Value="golang.org/doc/community.html" />
|
<Property Id="ARPHELPLINK" Value="golang.org/doc/community.html" />
|
||||||
<Property Id="ARPREADME" Value="golang.org" />
|
<Property Id="ARPREADME" Value="golang.org" />
|
||||||
<Property Id="ARPURLINFOABOUT" Value="golang.org" />
|
<Property Id="ARPURLINFOABOUT" Value="golang.org" />
|
||||||
|
<Icon Id="gopher.ico" SourceFile="images\gopher.ico"/>
|
||||||
<!--
|
<Property Id="ARPPRODUCTICON" Value="gopher.ico" />
|
||||||
<Upgrade Id="">
|
|
||||||
<UpgradeVersion
|
|
||||||
IncludeMaximum="yes"
|
|
||||||
IncludeMinimum="yes"
|
|
||||||
Language="1033"
|
|
||||||
Maximum=""
|
|
||||||
Minimum=""
|
|
||||||
Property="" />
|
|
||||||
</Upgrade>
|
|
||||||
-->
|
|
||||||
|
|
||||||
<Media Id='1' Cabinet="go.cab" EmbedCab="yes" CompressionLevel="high" />
|
<Media Id='1' Cabinet="go.cab" EmbedCab="yes" CompressionLevel="high" />
|
||||||
<Condition Message="Windows 2000 or greater required."> VersionNT >= 500</Condition>
|
<Condition Message="Windows 2000 or greater required."> VersionNT >= 500</Condition>
|
||||||
|
<MajorUpgrade AllowDowngrades="yes" />
|
||||||
<SetDirectory Id="INSTALLDIRROOT" Value="C:\"/>
|
<SetDirectory Id="INSTALLDIRROOT" Value="C:\"/>
|
||||||
|
|
||||||
<CustomAction
|
<CustomAction
|
||||||
@ -70,10 +61,13 @@
|
|||||||
<Directory Id="ProgramMenuFolder">
|
<Directory Id="ProgramMenuFolder">
|
||||||
<Directory Id="GoProgramShortcutsDir" Name="Go Programming Language"/>
|
<Directory Id="GoProgramShortcutsDir" Name="Go Programming Language"/>
|
||||||
</Directory>
|
</Directory>
|
||||||
|
<Directory Id="EnvironmentEntries">
|
||||||
|
<Directory Id="GoEnvironmentEntries" Name="Go Programming Language"/>
|
||||||
|
</Directory>
|
||||||
<Directory Id="DesktopFolder" Name="Desktop"/>
|
<Directory Id="DesktopFolder" Name="Desktop"/>
|
||||||
</Directory>
|
</Directory>
|
||||||
|
|
||||||
<!-- Programs Menu & Desktop Shortcuts, Registry & Environment Settings -->
|
<!-- Programs Menu & Desktop Shortcuts -->
|
||||||
<DirectoryRef Id="GoProgramShortcutsDir">
|
<DirectoryRef Id="GoProgramShortcutsDir">
|
||||||
<Component Id="Component_GoShortCuts" Guid="f5fbfb5e-6c5c-423b-9298-21b0e3c98f4b">
|
<Component Id="Component_GoShortCuts" Guid="f5fbfb5e-6c5c-423b-9298-21b0e3c98f4b">
|
||||||
<Shortcut
|
<Shortcut
|
||||||
@ -82,6 +76,7 @@
|
|||||||
Description="Starts the Go documentation server (http://localhost:6060)"
|
Description="Starts the Go documentation server (http://localhost:6060)"
|
||||||
Show="minimized"
|
Show="minimized"
|
||||||
Arguments='/c "start /d[INSTALLDIR]bin godoc.exe -http=:6060 && start http://localhost:6060"'
|
Arguments='/c "start /d[INSTALLDIR]bin godoc.exe -http=:6060 && start http://localhost:6060"'
|
||||||
|
Icon="gopher.ico"
|
||||||
Target="[%ComSpec]" />
|
Target="[%ComSpec]" />
|
||||||
<Shortcut
|
<Shortcut
|
||||||
Id="GoDocServerDesktopShortcut"
|
Id="GoDocServerDesktopShortcut"
|
||||||
@ -89,6 +84,7 @@
|
|||||||
Name="GoDocServer"
|
Name="GoDocServer"
|
||||||
Description="Starts the godoc server (http://localhost:6060)"
|
Description="Starts the godoc server (http://localhost:6060)"
|
||||||
Show="minimized"
|
Show="minimized"
|
||||||
|
Icon="gopher.ico"
|
||||||
Arguments='/c "start /d[INSTALLDIR]bin godoc.exe -http=:6060 && start http://localhost:6060"'
|
Arguments='/c "start /d[INSTALLDIR]bin godoc.exe -http=:6060 && start http://localhost:6060"'
|
||||||
Target="[%ComSpec]" />
|
Target="[%ComSpec]" />
|
||||||
<Shortcut
|
<Shortcut
|
||||||
@ -102,11 +98,31 @@
|
|||||||
On="uninstall" />
|
On="uninstall" />
|
||||||
<RegistryValue
|
<RegistryValue
|
||||||
Root="HKCU"
|
Root="HKCU"
|
||||||
Key="Software\Microsoft\TheGoProgrammingLanguage"
|
Key="Software\GoProgrammingLanguage"
|
||||||
|
Name="ShortCuts"
|
||||||
|
Type="integer"
|
||||||
|
Value="1"
|
||||||
|
KeyPath="yes" />
|
||||||
|
</Component>
|
||||||
|
</DirectoryRef>
|
||||||
|
|
||||||
|
<!-- Registry & Environment Settings -->
|
||||||
|
<DirectoryRef Id="GoEnvironmentEntries">
|
||||||
|
<Component Id="Component_GoEnvironment" Guid="3ec7a4d5-eb08-4de7-9312-2df392c45993">
|
||||||
|
<RegistryKey
|
||||||
|
Root="HKCU"
|
||||||
|
Key="Software\GoProgrammingLanguage"
|
||||||
|
Action="create" >
|
||||||
|
<RegistryValue
|
||||||
Name="installed"
|
Name="installed"
|
||||||
Type="integer"
|
Type="integer"
|
||||||
Value="1"
|
Value="1"
|
||||||
KeyPath="yes" />
|
KeyPath="yes" />
|
||||||
|
<RegistryValue
|
||||||
|
Name="installLocation"
|
||||||
|
Type="string"
|
||||||
|
Value="[INSTALLDIR]" />
|
||||||
|
</RegistryKey>
|
||||||
<Environment
|
<Environment
|
||||||
Id="Environment"
|
Id="Environment"
|
||||||
Action="set"
|
Action="set"
|
||||||
@ -115,6 +131,9 @@
|
|||||||
Permanent="no"
|
Permanent="no"
|
||||||
System="yes"
|
System="yes"
|
||||||
Value="[INSTALLDIR]bin" />
|
Value="[INSTALLDIR]bin" />
|
||||||
|
<RemoveFolder
|
||||||
|
Id="GoEnvironmentEntries"
|
||||||
|
On="uninstall" />
|
||||||
</Component>
|
</Component>
|
||||||
</DirectoryRef>
|
</DirectoryRef>
|
||||||
|
|
||||||
@ -126,19 +145,20 @@
|
|||||||
Title="Go"
|
Title="Go"
|
||||||
Level="1">
|
Level="1">
|
||||||
|
|
||||||
|
<ComponentRef Id="Component_GoEnvironment" />
|
||||||
<ComponentGroupRef Id="AppFiles" />
|
<ComponentGroupRef Id="AppFiles" />
|
||||||
<ComponentRef Id="Component_GoShortCuts" />
|
<ComponentRef Id="Component_GoShortCuts" />
|
||||||
</Feature>
|
</Feature>
|
||||||
|
|
||||||
<!-- Update the environment -->
|
<!-- Update the environment -->
|
||||||
<InstallExecuteSequence>
|
<InstallExecuteSequence>
|
||||||
<Custom
|
<Custom Action="SetApplicationRootDirectory" Before="InstallFinalize" />
|
||||||
Action="SetApplicationRootDirectory"
|
|
||||||
Before="InstallFinalize" />
|
|
||||||
</InstallExecuteSequence>
|
</InstallExecuteSequence>
|
||||||
|
|
||||||
<!-- Include the user interface -->
|
<!-- Include the user interface -->
|
||||||
<WixVariable Id="WixUILicenseRtf" Value="LICENSE" />
|
<WixVariable Id="WixUILicenseRtf" Value="LICENSE" />
|
||||||
|
<WixVariable Id="WixUIBannerBmp" Value="images\Banner.jpg" />
|
||||||
|
<WixVariable Id="WixUIDialogBmp" Value="images\Dialog.jpg" />
|
||||||
<Property Id="WIXUI_INSTALLDIR" Value="INSTALLDIR" />
|
<Property Id="WIXUI_INSTALLDIR" Value="INSTALLDIR" />
|
||||||
<UIRef Id="WixUI_InstallDir" />
|
<UIRef Id="WixUI_InstallDir" />
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user