Skip to content

Instantly share code, notes, and snippets.

@oneleo
Last active January 5, 2021 02:05
Show Gist options
  • Save oneleo/98e00e7708be6628dbc58421e32c7e8b to your computer and use it in GitHub Desktop.
Save oneleo/98e00e7708be6628dbc58421e32c7e8b to your computer and use it in GitHub Desktop.
透過 Chocolatey 安裝 Go 環境
:: Run as administrator through CMD.exe
@echo off
@"%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe" -NoProfile -InputFormat None -ExecutionPolicy Bypass -Command " [System.Net.ServicePointManager]::SecurityProtocol = 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))" && SET "PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin"
choco install -y git.install --params "/NoShellIntegration"
choco install -y vscode golang vscode-go googlechrome chrome-remote-desktop-host dontsleep.install winrar notepadplusplus.install
echo RAR registration data> "C:\Program Files\WinRAR\rarreg.key"
echo yaokai.org>> "C:\Program Files\WinRAR\rarreg.key"
echo Unlimited Company License>> "C:\Program Files\WinRAR\rarreg.key"
echo UID=75ced9c73b51fdd111d1>> "C:\Program Files\WinRAR\rarreg.key"
echo 641221225011d14d1c98ba62a152232016b11806608201f0e0460d>> "C:\Program Files\WinRAR\rarreg.key"
echo 951a26a18fa9ce12a5bd60fce6cb5ffde62890079861be57638717>> "C:\Program Files\WinRAR\rarreg.key"
echo 7131ced835ed65cc743d9777f2ea71a8e32c7e593cf66794343565>> "C:\Program Files\WinRAR\rarreg.key"
echo b41bcf56929486b8bcdac33d50ecf77399609796ade6ecb8dcd638>> "C:\Program Files\WinRAR\rarreg.key"
echo f46a6fc0b9d8ae35cb0bdf8c3940c2490447f227849a4161f70fb7>> "C:\Program Files\WinRAR\rarreg.key"
echo 3e7ec80cfdc6eb40a09cd0691c01f60e7b73bd455ad2089160de49>> "C:\Program Files\WinRAR\rarreg.key"
echo 5543789d7c1cedc82fb038e528723c0f943883a6761a0224206159>> "C:\Program Files\WinRAR\rarreg.key"
del /f "%PUBLIC%\Desktop\Google Chrome.lnk"
del /f "%PUBLIC%\Desktop\Visual Studio Code.lnk"
pause
:: Run as administrator through CMD.exe
@echo off
%SystemDrive%\Go\bin\go.exe get -v github.com/acroca/go-symbols
%SystemDrive%\Go\bin\go.exe get -v github.com/cweill/gotests/...
%SystemDrive%\Go\bin\go.exe get -v github.com/davidrjenni/reftools/cmd/fillstruct
%SystemDrive%\Go\bin\go.exe get -v github.com/fatih/gomodifytags
%SystemDrive%\Go\bin\go.exe get -v github.com/go-delve/delve/cmd/dlv
%SystemDrive%\Go\bin\go.exe get -v github.com/godoctor/godoctor
%SystemDrive%\Go\bin\go.exe get -v github.com/haya14busa/goplay/cmd/goplay
%SystemDrive%\Go\bin\go.exe get -v github.com/josharian/impl
%SystemDrive%\Go\bin\go.exe get -v github.com/mdempsky/gocode
%SystemDrive%\Go\bin\go.exe get -v github.com/ramya-rao-a/go-outline
%SystemDrive%\Go\bin\go.exe get -v github.com/rogpeppe/godef
%SystemDrive%\Go\bin\go.exe get -v github.com/sqs/goreturns
%SystemDrive%\Go\bin\go.exe get -v github.com/stamblerre/gocode
%SystemDrive%\Go\bin\go.exe get -v github.com/uudashr/gopkgs/v2/cmd/gopkgs
%SystemDrive%\Go\bin\go.exe get -v github.com/zmb3/gogetdoc
%SystemDrive%\Go\bin\go.exe get -v golang.org/x/lint/golint
%SystemDrive%\Go\bin\go.exe get -v golang.org/x/tools/cmd/goimports
%SystemDrive%\Go\bin\go.exe get -v golang.org/x/tools/cmd/gorename
%SystemDrive%\Go\bin\go.exe get -v golang.org/x/tools/cmd/guru
%SystemDrive%\Go\bin\go.exe get -v golang.org/x/tools/gopls
pause
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment