From 68c0360b29b0020d9627a75814d9241e1561360d Mon Sep 17 00:00:00 2001 From: Xerbo Date: Sun, 27 Sep 2020 20:05:41 +0100 Subject: [PATCH] Add action for windows debug --- .github/workflows/win_debug.yml | 30 ++++++++++++++++++++++++++++++ CMakeLists.txt | 6 +++--- build_windows.sh | 3 +-- cmake/FindLibSndFile.cmake | 2 +- 4 files changed, 35 insertions(+), 6 deletions(-) create mode 100644 .github/workflows/win_debug.yml diff --git a/.github/workflows/win_debug.yml b/.github/workflows/win_debug.yml new file mode 100644 index 0000000..7b70285 --- /dev/null +++ b/.github/workflows/win_debug.yml @@ -0,0 +1,30 @@ +name: x86 Win Debug + +on: + push: + branches: + - devel +env: + BUILD_TYPE: Debug + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + + - name: Install dependencies + # The user does not run as root + run: sudo apt install wget cmake make mingw-w64 git unzip libsndfile-dev + + - name: Run build script + shell: bash + working-directory: ${{runner.workspace}} + run: cd $GITHUB_WORKSPACE && ./build_windows.sh + + - name: Upload compilied binary + uses: actions/upload-artifact@v2 + with: + name: Debug build + path: ${{runner.workspace}}/winbuild/aptdec-1.7.0.zip diff --git a/CMakeLists.txt b/CMakeLists.txt index c16bbcd..ae6997f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -37,16 +37,16 @@ set(CPACK_PACKAGE_VERSION "${PROJECT_VERSION}") set(CPACK_PACKAGE_NAME "aptdec") set(CPACK_PACKAGE_CONTACT "Xerbo (xerbo@protonmail.com)") set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "NOAA APT satellite imagery decoder") -SET(CPACK_PACKAGE_DESCRIPTION "Aptdec is a FOSS program that decodes images transmitted by NOAA weather satellites. These satellites transmit constantly (among other things) medium resolution (4km/px) images of the earth over a analog mode called APT.") +set(CPACK_PACKAGE_DESCRIPTION "Aptdec is a FOSS program that decodes images transmitted by NOAA weather satellites. These satellites transmit constantly (among other things) medium resolution (4km/px) images of the earth over a analog mode called APT.") set(CPACK_DEBIAN_PACKAGE_ARCHITECTURE "amd64") set(CPACK_DEBIAN_PACKAGE_SHLIBDEPS ON) IF(NOT WIN32) - set(CPACK_GENERATOR "DEB") + set(CPACK_GENERATOR "DEB;TGZ") set(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}.${CMAKE_SYSTEM_PROCESSOR}") install(TARGETS aptdec DESTINATION "bin/") - install(DIRECTORY "${PROJECT_SOURCE_DIR}/palettes/" DESTINATION "lib/aptdec/palettes") + install(DIRECTORY "${PROJECT_SOURCE_DIR}/palettes/" DESTINATION "palettes/") else() #set(CPACK_GENERATOR "ZIP;NSIS") set(CPACK_GENERATOR "ZIP") diff --git a/build_windows.sh b/build_windows.sh index fcfebd0..138b8aa 100755 --- a/build_windows.sh +++ b/build_windows.sh @@ -32,12 +32,11 @@ if [ ! -d "libsndfile-1.0.29-win64" ]; then wget https://github.com/erikd/libsndfile/releases/download/v1.0.29/libsndfile-1.0.29-win64.zip unzip libsndfile-1.0.29-win64.zip fi -cp "libsndfile-1.0.29-win64/bin/sndfile.dll" $TEMP_PATH/bin/libsndfile-1.dll +cp "libsndfile-1.0.29-win64/bin/sndfile.dll" $TEMP_PATH/bin/sndfile.dll cp "libsndfile-1.0.29-win64/include/sndfile.h" $TEMP_PATH/include/sndfile.h # Copy DLL's into root for CPack cp $TEMP_PATH/bin/*.dll ../ -mv ../libsndfile-1.dll ../sndfile.dll # Build aptdec mkdir -p winbuild && cd winbuild diff --git a/cmake/FindLibSndFile.cmake b/cmake/FindLibSndFile.cmake index cd58900..6b381b1 100644 --- a/cmake/FindLibSndFile.cmake +++ b/cmake/FindLibSndFile.cmake @@ -1,7 +1,7 @@ # Find libsndfile FIND_PATH(LIBSNDFILE_INCLUDE_DIR sndfile.h) -SET(LIBSNDFILE_NAMES ${LIBSNDFILE_NAMES} sndfile libsndfile libsndfile-1) +SET(LIBSNDFILE_NAMES ${LIBSNDFILE_NAMES} sndfile libsndfile) FIND_LIBRARY(LIBSNDFILE_LIBRARY NAMES ${LIBSNDFILE_NAMES} PATH) IF(LIBSNDFILE_INCLUDE_DIR AND LIBSNDFILE_LIBRARY)