From 333c15b4aafcf87f842aeac5d0d4105e9da2ee06 Mon Sep 17 00:00:00 2001 From: Darice Date: Mon, 20 May 2024 10:25:43 -0600 Subject: [PATCH] build wx in $HOME --- .github/workflows/ci.yml | 29 +++++++++++++++-------------- CMakeLists.txt | 2 +- 2 files changed, 16 insertions(+), 15 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5d887e1..b3f6109 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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 @@ -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 @@ -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 @@ -86,13 +86,14 @@ 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 @@ -100,9 +101,9 @@ jobs: 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 @@ -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 @@ -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 diff --git a/CMakeLists.txt b/CMakeLists.txt index 4e4b89b..8714d56 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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)