Skip to content

Instantly share code, notes, and snippets.

Created December 6, 2022 17:18
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
What would you like to do?
Build an ISO image that runs a portable w64devkit
set -xe
dir="$(mktemp -d "${TMPDIR:-/tmp}/iso-XXXXXX")"
cleanup() {
rm -rf -- "$dir"
trap cleanup EXIT
todos >$dir/autorun.inf <<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/
printf 'home = ..\r\n' >>w64devkit/w64devkit.ini
7z x -ogit ~/software/PortableGit-*z.exe
unzip -q ~/software/SDL2-devel-*
mv SDL2-* sdl
go install
cp "$(go env GOPATH)"/bin/windows_amd64/goimports.exe bin/
tar xf ~/qpkg/go1.*.src.*
cd go/src/
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