Build an ISO image that runs a portable w64devkit
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
set -xe | |
dir="$(mktemp -d "${TMPDIR:-/tmp}/iso-XXXXXX")" | |
cleanup() { | |
rm -rf -- "$dir" | |
} | |
trap cleanup EXIT | |
todos >$dir/autorun.inf <<EOF | |
[autorun] | |
open=w64devkit\w64devkit.exe | |
icon=w64devkit\w64devkit.exe | |
label=w64devkit | |
EOF | |
export GOOS=windows GOARCH=amd64 GOBIN= | |
( | |
cd $dir | |
mkdir bin | |
cp ~/.vimrc _vimrc | |
cp ~/.gitconfig .gitconfig | |
cp ~/.gdbinit .gdbinit | |
cp ~/dotfiles/w64devkit.profile .profile | |
tar xf ~/software/cppreference-20220201.tar.xz | |
unzip -q ~/software/w64devkit.zip | |
printf 'home = ..\r\n' >>w64devkit/w64devkit.ini | |
7z x -ogit ~/software/PortableGit-*z.exe | |
unzip -q ~/software/SDL2-devel-*-mingw.zip | |
mv SDL2-* sdl | |
go install golang.org/x/tools/cmd/goimports@latest | |
cp "$(go env GOPATH)"/bin/windows_amd64/goimports.exe bin/ | |
tar xf ~/qpkg/go1.*.src.* | |
( | |
cd go/src/ | |
./make.bash | |
mv ../bin/windows_amd64/*.exe ../bin/ | |
rm -rf ../bin/go ../bin/gofmt ../bin/windows_amd64 | |
rm -rf ../pkg/linux_amd64 ../pkg/tool/linux_amd64 | |
) | |
) | |
genisoimage -RJo w64devkit.iso "$dir" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment