]> Cypherpunks repositories - gostls13.git/commitdiff
misc/dist/windows: ongoing dev
authorJoe Poirier <jdpoirier@gmail.com>
Mon, 20 Feb 2012 06:29:57 +0000 (00:29 -0600)
committerJoe Poirier <jdpoirier@gmail.com>
Mon, 20 Feb 2012 06:29:57 +0000 (00:29 -0600)
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

misc/dist/windows/README
misc/dist/windows/dist.bat
misc/dist/windows/images/Banner.jpg [new file with mode: 0644]
misc/dist/windows/images/Dialog.jpg [new file with mode: 0644]
misc/dist/windows/images/DialogLeft.jpg [new file with mode: 0644]
misc/dist/windows/images/gopher.ico [new file with mode: 0644]
misc/dist/windows/installer.wxs

index 898940edf5b47e96f1030fef77d8d3ddb34bef2b..a0b0a8a7c139ddfa1414d5e0cd6ed2e797ea2b4c 100644 (file)
@@ -4,7 +4,7 @@ and installer (msi) format.
 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
@@ -13,9 +13,9 @@ Packaging
 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
@@ -26,4 +26,11 @@ TODO
 ----\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
index 0903577ef1318ea7549e11893474f7d336e5bb90..4ae2df58aadb006b3f9470f2639ce02cfa20d53d 100644 (file)
@@ -7,10 +7,14 @@ setlocal
 \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
@@ -35,7 +39,7 @@ xcopy %ROOT%\pkg                   go\pkg /V /E /Y /I
 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
diff --git a/misc/dist/windows/images/Banner.jpg b/misc/dist/windows/images/Banner.jpg
new file mode 100644 (file)
index 0000000..6364796
Binary files /dev/null and b/misc/dist/windows/images/Banner.jpg differ
diff --git a/misc/dist/windows/images/Dialog.jpg b/misc/dist/windows/images/Dialog.jpg
new file mode 100644 (file)
index 0000000..1f0ec0a
Binary files /dev/null and b/misc/dist/windows/images/Dialog.jpg differ
diff --git a/misc/dist/windows/images/DialogLeft.jpg b/misc/dist/windows/images/DialogLeft.jpg
new file mode 100644 (file)
index 0000000..73bab89
Binary files /dev/null and b/misc/dist/windows/images/DialogLeft.jpg differ
diff --git a/misc/dist/windows/images/gopher.ico b/misc/dist/windows/images/gopher.ico
new file mode 100644 (file)
index 0000000..8421829
Binary files /dev/null and b/misc/dist/windows/images/gopher.ico differ
index 62a5e7cc0b9d4e1d30dc270902a8d4daadbdde84..ee5d22c28548b5f70d9b08bc0fd2a7ac3b5897e3 100644 (file)
@@ -25,7 +25,8 @@
     <!-- 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
@@ -82,6 +76,7 @@
         Description="Starts the Go documentation server (http://localhost:6060)"\r
         Show="minimized"\r
         Arguments='/c "start /d[INSTALLDIR]bin godoc.exe -http=:6060 &amp;&amp; start http://localhost:6060"'\r
+        Icon="gopher.ico"\r
         Target="[%ComSpec]" />\r
     <Shortcut\r
         Id="GoDocServerDesktopShortcut"\r
@@ -89,6 +84,7 @@
         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 &amp;&amp; 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