Skip to content

Commit

Permalink
build wx in $HOME
Browse files Browse the repository at this point in the history
  • Loading branch information
dguittet committed May 20, 2024
1 parent 60cd80a commit 333c15b
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 15 deletions.
29 changes: 15 additions & 14 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
- name: Set relative paths
run: |
WXMSW3=$GITHUB_WORKSPACE/wx-3.2.3
WXMSW3=$HOME/wx-3.2.3
echo "WXMSW3=$WXMSW3" >> $GITHUB_ENV
- name: Checkout
Expand All @@ -41,12 +41,12 @@ jobs:
curl -L https://github.com/wxWidgets/wxWidgets/releases/download/v3.2.3/wxWidgets-3.2.3.tar.bz2 -o wxWidgets-3.2.3.tar.bz2
tar jxf wxWidgets-3.2.3.tar.bz2
cd wxWidgets-3.2.3
./configure --prefix=$GITHUB_WORKSPACE/wx-3.2.3 --enable-shared=no --enable-debug=no --with-gtk=2 --with-libjpeg=builtin --with-libpng=builtin --with-regex=builtin --with-libtiff=builtin --with-zlib=builtin --with-expat=builtin --without-libjbig --without-liblzma --without-gtkprint --with-libnotify=no --with-libmspack=no --with-gnomevfs=no --with-opengl=yes --with-sdl=no --with-cxx=11
./configure --prefix=$HOME/wx-3.2.3 --enable-shared=no --enable-debug=no --with-gtk=2 --with-libjpeg=builtin --with-libpng=builtin --with-regex=builtin --with-libtiff=builtin --with-zlib=builtin --with-expat=builtin --without-libjbig --without-liblzma --without-gtkprint --with-libnotify=no --with-libmspack=no --with-gnomevfs=no --with-opengl=yes --with-sdl=no --with-cxx=11
make -j4
make install
sudo ln -s $GITHUB_WORKSPACE/wx-3.2.3/bin/wx-config /usr/local/bin/wx-config-3
sudo ln -s $HOME/wx-3.2.3/bin/wx-config /usr/local/bin/wx-config-3
wx-config-3 --cflags
echo ${GITHUB_WORKSPACE}/wx-3.2.3/bin >> $GITHUB_PATH
echo ${HOME}/wx-3.2.3/bin >> $GITHUB_PATH
- name: Save wxWidgets build
uses: actions/upload-artifact@v4
Expand Down Expand Up @@ -77,7 +77,7 @@ jobs:
- name: Set relative paths
shell: bash
run: |
WXMSW3=$GITHUB_WORKSPACE/wxWidgets-3.2.3
WXMSW3=$HOME/wxWidgets-3.2.3
echo "WXMSW3=$WXMSW3" >> $GITHUB_ENV
- name: Checkout
Expand All @@ -86,23 +86,24 @@ jobs:
- name: Download wxWidgets
shell: bash
run: |
cd $HOME
curl -L https://github.com/wxWidgets/wxWidgets/releases/download/v3.2.3/wxWidgets-3.2.3.tar.bz2 -o wxWidgets-3.2.3.tar.bz2
ls
tar jxf wxWidgets-3.2.3.tar.bz2
- name: Install wxWidgets
run: |
cd wxWidgets-3.2.3
cd $HOME/wxWidgets-3.2.3
msbuild build/msw/wx_vc17.sln /t:Build /p:Configuration=Release /p:Platform=x64
- name: Make wxWidgets archive
shell: bash
run: |
mkdir wx-3.2.3
mkdir -p wx-3.2.3/build/msw
cp -r wxWidgets-3.2.3/build/msw/vc_* wx-3.2.3/build/msw
cp -r wxWidgets-3.2.3/include wx-3.2.3
cp -r wxWidgets-3.2.3/lib wx-3.2.3
cp -r $HOME/wxWidgets-3.2.3/build/msw/vc_* wx-3.2.3/build/msw
cp -r $HOME/wxWidgets-3.2.3/include wx-3.2.3
cp -r $HOME/wxWidgets-3.2.3/lib wx-3.2.3
- name: Save wxWidgets build
uses: actions/upload-artifact@v4
Expand Down Expand Up @@ -135,11 +136,11 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-14-large, macos-13]
os: [macos-14-large, macos-latest]
steps:
- name: Set relative paths
run: |
WXMSW3=$GITHUB_WORKSPACE/wx-3.2.3
WXMSW3=$HOME/wx-3.2.3
echo "WXMSW3=$WXMSW3" >> $GITHUB_ENV
- name: Checkout
Expand All @@ -150,12 +151,12 @@ jobs:
curl -L https://github.com/wxWidgets/wxWidgets/releases/download/v3.2.3/wxWidgets-3.2.3.tar.bz2 -o wxWidgets-3.2.3.tar.bz2
tar jxf wxWidgets-3.2.3.tar.bz2
cd wxWidgets-3.2.3
./configure --prefix=$GITHUB_WORKSPACE/wx-3.2.3 --enable-stl=yes --enable-shared=no --disable-debug_flag --with-cocoa --enable-universal_binary=x86_64,arm64 --enable-unicode --enable-webview --disable-mediactrl --with-cxx=11 --with-macosx-version-min=10.15 --with-libjpeg=builtin --with-libpng=builtin --with-regex=builtin --with-libtiff=builtin --with-zlib=builtin --with-expat=builtin
./configure --prefix=$HOME/wx-3.2.3 --enable-stl=yes --enable-shared=no --disable-debug_flag --with-cocoa --enable-universal_binary=x86_64,arm64 --enable-unicode --enable-webview --disable-mediactrl --with-cxx=11 --with-macosx-version-min=10.15 --with-libjpeg=builtin --with-libpng=builtin --with-regex=builtin --with-libtiff=builtin --with-zlib=builtin --with-expat=builtin
make -j3
make install
sudo ln -s $GITHUB_WORKSPACE/wx-3.2.3/bin/wx-config /usr/local/bin/wx-config-3
sudo ln -s $HOME/wx-3.2.3/bin/wx-config /usr/local/bin/wx-config-3
wx-config-3 --cflags
echo ${GITHUB_WORKSPACE}/wx-3.2.3/bin >> $GITHUB_PATH
echo ${HOME}/wx-3.2.3/bin >> $GITHUB_PATH
- name: Save wxWidgets build
uses: actions/upload-artifact@v4
Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ endif (MSVC)
if (UNIX)
if(EXISTS /usr/local/bin/wx-config-3)
set(wxWidgets_CONFIG_EXECUTABLE /usr/local/bin/wx-config-3)
else ()
else()
set(wxWidgets_CONFIG_EXECUTABLE $ENV{WXMSW3}/bin/wx-config)
endif ()
find_package(wxWidgets REQUIRED xrc stc richtext ribbon propgrid aui gl html qa adv core xml net base)
Expand Down

0 comments on commit 333c15b

Please sign in to comment.