Created
October 22, 2022 21:06
-
-
Save rkitover/5a8bab28326419c9791dd3addbbebc30 to your computer and use it in GitHub Desktop.
Build wxWidgets from source on Linux into /usr/local
This file contains hidden or 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 -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