Skip to content

Instantly share code, notes, and snippets.

@rkitover
Created October 22, 2022 21:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rkitover/5a8bab28326419c9791dd3addbbebc30 to your computer and use it in GitHub Desktop.
Save rkitover/5a8bab28326419c9791dd3addbbebc30 to your computer and use it in GitHub Desktop.
Build wxWidgets from source on Linux into /usr/local
#!/bin/sh
set -e
OPWD=$(pwd)
mkdir -p ~/source/repos
cd ~/source/repos
if ! [ -d wxWidgets ]; then
git clone https://github.com/wxWidgets/wxWidgets
cd wxWidgets
else
cd wxWidgets
git checkout -f master
git reset --hard HEAD
git pull --rebase
fi
git submodule update --init --recursive
sh autogen.sh
./configure --prefix=/usr/local --with-opengl --with-expat
make -j$(nproc)
sudo mkdir -p /usr/local/stow
if [ -d /usr/local/stow/wxWidgets-git ]; then
(
cd /usr/local/stow
sudo stow -D wxWidgets-git || :
sudo rm -rf wx-bak
sudo mv wxWidgets-git wx-bak
)
fi
sudo make install prefix=/usr/local/stow/wxWidgets-git
cd /usr/local/stow
sudo stow wxWidgets-git
sudo ldconfig
cd "$OPWD"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment