Created
September 4, 2023 06:58
-
-
Save anoduck/090363ca659777b26169696a107a873a to your computer and use it in GitHub Desktop.
Sh script to build goneovim and desktop environment for testing goneovim.
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
#!/usr/bin/env sh | |
SNDBX="$HOME/Sandbox" | |
WORKDIR="$HOME/Sandbox/goneovim" | |
export GO111MODULE=off | |
export QT_PKG_CONFIG=true | |
export GOPATH="$(go env GOPATH)" | |
export GOBIN="$GOPATH/bin" | |
export PATH="$PATH:$GOBIN" | |
QSET="$(go env GOPATH)/bin/qtsetup" | |
begin_install () { | |
if [ -d "$WORKDIR" ]; then | |
cd "$WORKDIR" || exit | |
else | |
if [ -d "$SNDBX" ]; then | |
cd "$SNDBX" || exit | |
else | |
mkdir -p "$SNDBX" | |
cd "$SNDBX" || exit | |
fi | |
git clone https://github.com/akiyosi/goneovim | |
cd "$WORKDIR" || exit | |
fi | |
git checkout freebsd-again | |
echo "Installing packages" | |
yes | pkg install git\ | |
go\ | |
pkgconf\ | |
qt5\ | |
qmake\ | |
bash\ | |
bash-completion\ | |
neovim\ | |
xorg\ | |
icewm\ | |
mlterm\ | |
jed\ | |
# virtualbox-ose-additions \ | |
wget | |
} | |
fetch_deps () { | |
echo "Fetching qt libraries" | |
go get github.com/therecipe/qt | |
go get github.com/therecipe/qt/core | |
go get github.com/therecipe/qt/widgets | |
go mod vendor # <-- You can take these out if needed. | |
} | |
install_deps () { | |
echo "Installing dependencies" | |
go get github.com/akiyosi/qt/internal/[email protected] | |
go get github.com/akiyosi/qt/internal/binding/files/docs/5.12.0 | |
go get github.com/akiyosi/qt/internal/binding/files/docs/5.13.0 | |
go get github.com/akiyosi/qt/internal/cmd/[email protected] | |
go get -v -tags=no_env github.com/akiyosi/qt/cmd/... | |
go mod vendor #<-- You can take these out if needed. | |
} | |
set_env () { | |
echo "Setting up environement" | |
git clone https://github.com/akiyosi/env_linux_amd64_513.git vendor/github.com/akiyosi/env_linux_amd64_513 | |
go mod vendor #<-- You can take these out if needed. | |
go get -v github.com/therecipe/qt/cmd/... | |
} | |
setup_qt () { | |
if [ -e "$QSET" ]; then | |
"$QSET" -test=false | |
else | |
echo "Qtsetup failed to install." | |
exit | |
fi | |
if [ -e "$(which qtmoc)" ]; then | |
qtmoc desktop ./cmd/goneovim | |
else | |
echo "Qtmoc not found." | |
exit | |
fi | |
} | |
finalize_install () { | |
go generate | |
echo "Building application" | |
qtdeploy build freebsd ./cmd/goneovim | |
} | |
begin_install | |
fetch_deps | |
install_deps | |
set_env | |
setup_qt | |
finalize_install | |
echo "DONE!" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
per akiyosi/goneovim#464