From 4f5ffe568466cdd571a6fbae1c8af56474f3db99 Mon Sep 17 00:00:00 2001 From: Joe Poirier Date: Fri, 17 Feb 2012 11:07:34 -0600 Subject: [PATCH] misc/dist/windows: distro builder updates files moved from misc/windows, bash packager file replaced with Windows batch file R=golang-dev, alex.brainman, rsc CC=golang-dev https://golang.org/cl/5677074 --- misc/{ => dist}/windows/README | 0 misc/dist/windows/dist.bat | 54 +++++++++++++++++++++++ misc/{ => dist}/windows/godocserver.bat | 0 misc/{ => dist}/windows/goenv.bat | 0 misc/{ => dist}/windows/installer.wxs | 0 misc/windows/LICENSE | Bin 1687 -> 0 bytes misc/windows/package.bash | 55 ------------------------ 7 files changed, 54 insertions(+), 55 deletions(-) rename misc/{ => dist}/windows/README (100%) create mode 100755 misc/dist/windows/dist.bat rename misc/{ => dist}/windows/godocserver.bat (100%) rename misc/{ => dist}/windows/goenv.bat (100%) rename misc/{ => dist}/windows/installer.wxs (100%) delete mode 100644 misc/windows/LICENSE delete mode 100755 misc/windows/package.bash diff --git a/misc/windows/README b/misc/dist/windows/README similarity index 100% rename from misc/windows/README rename to misc/dist/windows/README diff --git a/misc/dist/windows/dist.bat b/misc/dist/windows/dist.bat new file mode 100755 index 0000000000..ec8841dbb7 --- /dev/null +++ b/misc/dist/windows/dist.bat @@ -0,0 +1,54 @@ +:: Copyright 2012 The Go Authors. All rights reserved. +:: Use of this source code is governed by a BSD-style +:: license that can be found in the LICENSE file. +@echo off + +setlocal + +:: Requires WiX (candle light heat), 7zip, and hg + +echo # Setting variable info +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 +if errorlevel 1 goto end + +echo # Getting GOARCH +%ROOT%\bin\go tool dist env > env.txt +set GOARCH /p = find "GOARCH" "env.txt">NUL +del /F /Q /S env.txt>NUL +if errorlevel 1 goto end + +rmdir /S /Q go>NUL +mkdir go + +echo # Cloning the go tree +hg clone -r %ID% %ROOT% go +if errorlevel 1 goto end + +rmdir /S /Q go\.hg>NUL +del /F /Q /S go\.hgignore go\.hgtags>NUL + +echo # Copying pkg, bin and src/pkg/runtime/z* +xcopy %ROOT%\pkg go\pkg /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*.go go\src\pkg\runtime /V /E /Y +xcopy %ROOT%\src\pkg\runtime\z*.h go\src\pkg\runtime /V /E /T + +echo # Starting zip packaging +7za a -tzip -mx=9 gowin%GOARCH%"_"%VER%.zip "go/" +if errorlevel 1 goto end + +echo # Starting Go directory file harvesting +heat dir go -nologo -cg AppFiles -gg -g1 -srd -sfrag -template fragment -dr INSTALLDIR -var var.SourceDir -out AppFiles.wxs +if errorlevel 1 goto end + +echo # Starting installer packaging +candle -nologo -dVersion=%VER% -dArch=%GOARCH% -dSourceDir=go installer.wxs AppFiles.wxs +light -nologo -ext WixUIExtension -ext WixUtilExtension installer.wixobj AppFiles.wixobj -o gowin%GOARCH%"_"%VER%.msi +if errorlevel 1 goto end + +del /F /Q /S *.wixobj AppFiles.wxs *.wixpdb>NUL + +:end diff --git a/misc/windows/godocserver.bat b/misc/dist/windows/godocserver.bat similarity index 100% rename from misc/windows/godocserver.bat rename to misc/dist/windows/godocserver.bat diff --git a/misc/windows/goenv.bat b/misc/dist/windows/goenv.bat similarity index 100% rename from misc/windows/goenv.bat rename to misc/dist/windows/goenv.bat diff --git a/misc/windows/installer.wxs b/misc/dist/windows/installer.wxs similarity index 100% rename from misc/windows/installer.wxs rename to misc/dist/windows/installer.wxs diff --git a/misc/windows/LICENSE b/misc/windows/LICENSE deleted file mode 100644 index b2b0be62c0a252cf358b9a8a79d9fe544500c66c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1687 zcmb_d(T?Ia6z%g$`wv(9w6j7KW_P5v^Ar*TmO?^fXIP}XWD*CgLX2WFXf&FC?{OHq zOk1fhl~7{YzUQ2K?ooItI@gSgvbDN@REN#@_U^W*Rnv@KipI3gJ?^j=6-}#mMN@6d z&MG&e&>TChI!e^({`K|ahnM0@u~Dt+N@qG+*v6?^JGvWw8xL>syBm-0UyCQLPJigO z{#G2Tad9ZSy4aQNW<2`(wdb(oUx0jg?(}Bs=yP>Lx1-UoB)5uYhJvHpn$8X>*zKsl zVyRPBbx*1udbE!p&d&_o)^+;v=(K66Y->7NMY<&m*_G;d9(7xG&(xT1ZwGYJZc9+^ z-{$COZ))A>s`LN@Dmz67)$O%ITXg8mldiFF+tT5o0J7VelWsRunHGJc$o55h<$k+X zMnqrey*x{%x#+4)t!RI=4t=>2dOdjgXr2^+FSfMC=}HZ7rY-Hzs0X;_MZ51s!HsHH z>b>gTZ2DIjpu6(qA_L9VM_BfMEAi9tn6;^nd)2z$X+M~sF$IH@j`pQfoi2CwhvWU2 z`m(D5UpJK~3=p;cPFwDk_hx3yW~Yd^)sR}CU(R~xwX@#5b6Sutus+kH@_~VkhE!W) z7dV|)u{RD$=q*8A4SC2OH8=n&#$iq4PChM{9NB}ae2`G2eY`p!q4pdmYmt+8!Ig6^ zNTgG_3Nl7mFSGQ4M=YYrn&g~Om@d~DpUoxB(>P+8pdg8`o5+k$a+zY|Qy@_JsXqvk zHL>r@j0r($Mtrf1IlzFP1&QQL42UOToJTyF4F~{~q>^I3;1btlI_OFNSw`uU7Aym$_s#OVg$4dG+TR6??LbVfL3#ccwoZG z*{Q&rArOktkMpl<;6p~_RgaXgS;|LaP&V_Bo^}<069ECQ4zZfL(DFx93Frv$4j9&1!nDmx~^EbOM>2K`q==`0;f5}gO0`jyM3IG5A diff --git a/misc/windows/package.bash b/misc/windows/package.bash deleted file mode 100755 index 995e47d0ae..0000000000 --- a/misc/windows/package.bash +++ /dev/null @@ -1,55 +0,0 @@ -#!/usr/bin/env bash -# Copyright 2011 The Go Authors. All rights reserved. -# Use of this source code is governed by a BSD-style -# license that can be found in the LICENSE file. -set -e - -PROGS=" - candle - light - heat -" - -echo "%%%%% Checking for WiX executables %%%%%" 1>&2 -for i in $PROGS; do - if ! which -a $1 >/dev/null; then - echo "Cannot find '$i' on search path." 1>$2 - exit 1 - fi -done - -echo "%%%%% Checking the packager's path %%%%%" 1>&2 -if ! test -f ../../src/env.bash; then - echo "package.bash must be run from $GOROOT/misc/windows" 1>&2 -fi - -echo "%%%%% Setting the go package version info %%%%%" 1>&2 -ver="$(bash ../../src/version.bash | sed 's/ .*//')" - -rm -rf go -mkdir go - -echo "%%%%% Cloning the go tree %%%%%" 1>&2 -hg clone -r $(hg id -n | sed 's/+//') $(hg root) go - -rm -rf ./go/.hg ./go/.hgignore ./go/.hgtags - -echo "%%%%% Copying pkg, bin and src/pkg/runtime/z* %%%%%" 1>&2 -cp -a ../../pkg go/pkg -cp -a ../../bin go/bin -cp ../../src/pkg/runtime/z*.c go/src/pkg/runtime/ -cp ../../src/pkg/runtime/z*.go go/src/pkg/runtime/ -cp ../../src/pkg/runtime/z*.h go/src/pkg/runtime/ - -echo "%%%%% Starting zip packaging %%%%%" 1>&2 -7za a -tzip -mx=9 gowin$GOARCH"_"$ver.zip "go/" >/dev/null - -echo "%%%%% Starting Go directory file harvesting %%%%%" 1>&2 -heat dir go -nologo -cg AppFiles -gg -g1 -srd -sfrag -template fragment -dr INSTALLDIR -var var.SourceDir -out AppFiles.wxs - -echo "%%%%% Starting installer packaging %%%%%" 1>&2 -candle -nologo -dVersion=$ver -dArch=$GOARCH -dSourceDir=go installer.wxs AppFiles.wxs -light -nologo -ext WixUIExtension -ext WixUtilExtension installer.wixobj AppFiles.wixobj -o gowin$GOARCH"_"$ver.msi - -rm -f *.wixobj AppFiles.wxs *.wixpdb - -- 2.50.0