diff --git a/.github/workflows/mingw.yml b/.github/workflows/mingw.yml index 49aeeee2c9..2a510a4441 100644 --- a/.github/workflows/mingw.yml +++ b/.github/workflows/mingw.yml @@ -31,6 +31,22 @@ jobs: if: success() && matrix.type == 'apps-mingw' run: cd lib && MINGW=x86_64-w64-mingw32 make -f Makefile.mingw wrapper + - name: Install Powershell for vcpkg + if: success() && matrix.type == 'apps-mingw-vcpkg' + run: | + POWERSHELL_DEPS="wget apt-transport-https software-properties-common" + # Install pre-requisite packages of PowerShell + sudo apt install -y $POWERSHELL_DEPS doxygen + # Download the Microsoft repository GPG keys + VERSION=$(lsb_release -r -s) + wget -q https://packages.microsoft.com/config/ubuntu/$VERSION/packages-microsoft-prod.deb + # Register the Microsoft repository GPG keys + sudo dpkg -i packages-microsoft-prod.deb + # Update the list of packages after we added packages.microsoft.com + sudo apt update + # Install PowerShell + sudo apt install -y powershell + - name: Automake vcpkg apps if: success() && matrix.type == 'apps-mingw-vcpkg' run: ./_autosetup diff --git a/api/Makefile.am b/api/Makefile.am index 7ec8e28892..074f7ed81e 100644 --- a/api/Makefile.am +++ b/api/Makefile.am @@ -101,7 +101,7 @@ $(LIBBOINC_OPENCL_STATIC): libboinc_opencl.la $(LN) .libs/$(LIBBOINC_OPENCL_STATIC) . clean: - rm -f ${LIBBOINC_API_STATIC} ${LIBBOINC_GRAPHICS2_STATIC} ${LIBBOINC_OPENCL_STATIC} + rm -f ${LIBBOINC_API_STATIC} ${LIBBOINC_GRAPHICS2_STATIC} ${LIBBOINC_OPENCL_STATIC} *.a *.o *.lo *.la endif ## ENABLE_LIBRARIES diff --git a/deploy/prepare_deployment.py b/deploy/prepare_deployment.py index 6df07283dd..4bf43b2150 100644 --- a/deploy/prepare_deployment.py +++ b/deploy/prepare_deployment.py @@ -54,6 +54,8 @@ mingw_apps_vcpkg_list = [ './samples/condor/boinc_gahp.exe', './samples/example_app/uc2.exe', './samples/example_app/ucn.exe', + './samples/example_app/uc2_graphics.exe', + './samples/example_app/slide_show.exe', './samples/multi_thread/multi_thread.exe', './samples/sleeper/sleeper.exe', './samples/worker/worker.exe', diff --git a/lib/Makefile.am b/lib/Makefile.am index b6457eb7a5..448a0670a8 100644 --- a/lib/Makefile.am +++ b/lib/Makefile.am @@ -249,7 +249,7 @@ $(LIBBOINC_FCGI_STATIC): libboinc_fcgi.la $(LN) .libs/$(LIBBOINC_FCGI_STATIC) . clean: clean-am - rm -f $(LIBBOINC_STATIC) $(LIBBOINC_CRYPT_STATIC) $(LIBBOINC_FCGI_STATIC) *.gcno *.gcda *.gcov + rm -f $(LIBBOINC_STATIC) $(LIBBOINC_CRYPT_STATIC) $(LIBBOINC_FCGI_STATIC) *.gcno *.gcda *.gcov *.a *.o *.lo *.la endif # end of "if ENABLE_LIBRARIES" diff --git a/mingw/ci_configure_apps.sh b/mingw/ci_configure_apps.sh index 1d26cba6c8..313b5207f8 100755 --- a/mingw/ci_configure_apps.sh +++ b/mingw/ci_configure_apps.sh @@ -20,4 +20,4 @@ export CXXFLAGS="$ZIP_VCPROJ_FLAGS $ZIP_BOINC_RENAMES $ZIP_MINGW -I$VCPKG_DIR/in export CFLAGS="$CXXFLAGS" export _libcurl_pc="$VCPKG_DIR/lib/pkgconfig/libcurl.pc" -./configure --host=x86_64-w64-mingw32 --with-libcurl=$VCPKG_DIR --with-ssl=$VCPKG_DIR --enable-apps --enable-apps-mingw --enable-apps-vcpkg --disable-server --disable-client --disable-manager +./configure --host=x86_64-w64-mingw32 --with-libcurl=$VCPKG_DIR --with-ssl=$VCPKG_DIR --enable-apps --enable-apps-mingw --enable-apps-vcpkg --enable-apps-gui --disable-server --disable-client --disable-manager diff --git a/mingw/ci_make_apps.sh b/mingw/ci_make_apps.sh index 6c70e3dbfe..f0487ec833 100755 --- a/mingw/ci_make_apps.sh +++ b/mingw/ci_make_apps.sh @@ -24,4 +24,7 @@ if [ ! -f $VCPKG_DIR/lib/libz.a ]; then ln -s $VCPKG_DIR/lib/libzlib.a $VCPKG_DIR/lib/libz.a fi +export CXXFLAGS="-I$VCPKG_DIR/include -L$VCPKG_DIR/lib" +export CFLAGS="$CXXFLAGS" + make diff --git a/mingw/update_vcpkg.sh b/mingw/update_vcpkg.sh index 45ef1ea079..0f45379727 100755 --- a/mingw/update_vcpkg.sh +++ b/mingw/update_vcpkg.sh @@ -20,5 +20,5 @@ fi git -C $VCPKG_ROOT pull $VCPKG_ROOT/bootstrap-vcpkg.sh -$VCPKG_ROOT/vcpkg install rappture curl[core,openssl] --triplet=x64-mingw-static --clean-after-build --overlay-triplets=$VCPKG_PORTS/triplets/ci +$VCPKG_ROOT/vcpkg install curl[core,openssl] rappture ftgl freeglut libjpeg-turbo --triplet=x64-mingw-static --clean-after-build --overlay-triplets=$VCPKG_PORTS/triplets/ci $VCPKG_ROOT/vcpkg upgrade --no-dry-run diff --git a/samples/Makefile.am b/samples/Makefile.am index c239fd6b5c..03b824cb72 100644 --- a/samples/Makefile.am +++ b/samples/Makefile.am @@ -2,6 +2,10 @@ include $(top_srcdir)/Makefile.incl +if BUILD_WITH_MINGW + export BUILD_WITH_MINGW="yes" +endif + if BUILD_WITH_GUI export BUILD_WITH_GUI="yes" endif diff --git a/samples/example_app/Makefile b/samples/example_app/Makefile index 43663d1470..044bdf29f9 100644 --- a/samples/example_app/Makefile +++ b/samples/example_app/Makefile @@ -42,8 +42,19 @@ CXXFLAGS += -g \ LIBGLUT = -lglut LIBGLU = -lGLU +LIBGL= -lGL +LIBUI = -lX11 -lXmu +LIBFTGL = -lftgl LIBJPEG = -ljpeg +ifdef BUILD_WITH_MINGW + LIBGLUT = -lfreeglut_static + LIBGLU = -lglu32 + LIBGL= -lopengl32 + LIBUI = -lgdi32 -lwinmm + LIBFTGL = -lftgl -lfreetype -lpng -lbz2 -lbrotlidec-static -lbrotlienc-static -lbrotlicommon-static -lz +endif + PROGS = uc2 ucn # make this optional so compile doesn't break on systems without OpenGL GUI_PROGS = uc2_graphics slide_show @@ -91,13 +102,14 @@ uc2_graphics: uc2_graphics.o ttfont.o libstdc++.a $(BOINC_LIB_DIR)/libboinc.a $( $(BOINC_API_DIR)/libboinc_api.a \ $(BOINC_LIB_DIR)/libboinc.a \ $(LIBGLUT) $(LIBGLU) $(LIBJPEG) \ - -lftgl -lGL -lX11 -lXmu -lm + $(LIBFTGL) $(LIBGL) $(LIBUI) -lm slide_show: slide_show.o libstdc++.a $(BOINC_LIB_DIR)/libboinc.a $(BOINC_API_DIR)/libboinc_graphics2.a $(CXX) $(CXXFLAGS) -o slide_show slide_show.o libstdc++.a -pthread \ + $(MINGW_ZIP_FIX) \ $(BOINC_API_DIR)/libboinc_graphics2.a \ $(BOINC_API_DIR)/libboinc_api.a \ $(BOINC_LIB_DIR)/libboinc.a \ $(BOINC_ZIP_DIR)/libboinc_zip.a \ $(LIBGLUT) $(LIBGLU) $(LIBJPEG) \ - -lGL -lX11 -lXmu -lm + $(LIBGL) $(LIBUI) -lm diff --git a/zip/Makefile.am b/zip/Makefile.am index d0cdbcd712..f7cfe53963 100644 --- a/zip/Makefile.am +++ b/zip/Makefile.am @@ -82,4 +82,4 @@ $(LIBBOINC_ZIP_STATIC): libboinc_zip.la $(LN) .libs/$(LIBBOINC_ZIP_STATIC) . clean: - rm -f $(LIBBOINC_ZIP_STATIC) + rm -f $(LIBBOINC_ZIP_STATIC) *.a *.o *.lo *.la