mirror of
https://github.com/golang/go
synced 2024-11-25 13:38:00 -07:00
984b4e381d
The installer now: allows a user to select an alternative install directory, it now adds a Go folder to the Programs Menu, and it places two shortcuts on the user's desktop. The Program Menu folder contains shortcuts to the uninstaller and two batch files, go.bat and godoc.bat. The desktop shortcuts also point to go.bat and godoc.bat. go.bat sets the Go environment, including Path, and spawns a Window's shell. godoc.bat starts the godoc server at localhost:6060 then spawns a browser window pointing to the document server. Setting the environment temporarily and spawning a shell, via go.bat, should be safer than messing with the system's environment and it makes the user experience a bit more streamlined. The packager does work in its current state but it still needs some polishing. And yes, the plan is to add a dialogue to allow the user to decline the desktop shortcuts. R=rsc, alex.brainman, tjyang2001 CC=golang-dev https://golang.org/cl/5399042
15 lines
312 B
Batchfile
15 lines
312 B
Batchfile
@echo off
|
|
setlocal
|
|
for /f "delims=" %%i in ('cd') do set cwd=%%i
|
|
|
|
if exist bin\godoc.exe goto ok
|
|
echo Unable to find the godoc executable
|
|
echo This batch file must run from the root Go folder
|
|
pause
|
|
exit
|
|
|
|
:ok
|
|
start bin\godoc -http=localhost:6060 -goroot="%cwd%"
|
|
start http://localhost:6060
|
|
endlocal
|