diff --git a/.github/workflows/linux_cpn_nightly.yml b/.github/workflows/nightly-companion-linux.yml similarity index 72% rename from .github/workflows/linux_cpn_nightly.yml rename to .github/workflows/nightly-companion-linux.yml index d3ca2761c..203f291bf 100644 --- a/.github/workflows/linux_cpn_nightly.yml +++ b/.github/workflows/nightly-companion-linux.yml @@ -1,10 +1,10 @@ -name: Linux nightly Companion +name: Nightly - Linux Companion on: - workflow_run: - workflows: ["MacOSX nightly Companion"] - types: - - completed + # workflow_run: + # workflows: ["MacOSX nightly Companion"] + # types: + # - completed workflow_dispatch: @@ -18,27 +18,28 @@ jobs: # well on Windows or Mac. You can convert this to a matrix build if you need # cross-platform coverage. # See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix - runs-on: ubuntu-18.04 + runs-on: ubuntu-20.04 steps: - name: Init run: sudo apt update - name: Install dependencies - run: sudo apt-get -y install build-essential cmake gcc git lib32ncurses5 lib32z1 libfox-1.6-dev libsdl1.2-dev + run: sudo apt-get -y install build-essential cmake gcc git lib32ncurses6 lib32z1 libfox-1.6-dev libsdl1.2-dev qt5-default qtmultimedia5-dev qttools5-dev qttools5-dev-tools libqt5svg5-dev software-properties-common wget zip libgtest-dev libclang1-7 python3-pip - - name: Install cross compiler - run: wget -q https://launchpad.net/gcc-arm-embedded/4.7/4.7-2013-q3-update/+download/gcc-arm-none-eabi-4_7-2013q3-20130916-linux.tar.bz2 && - tar xjf gcc-arm-none-eabi-4_7-2013q3-20130916-linux.tar.bz2 && - mv gcc-arm-none-eabi-4_7-2013q3 /opt/gcc-arm-none-eabi && - echo "/opt/gcc-arm-none-eabi/bin:/opentx/code/radio/util" >> $GITHUB_PATH + - name: Install ARM toolchain + uses: fiam/arm-none-eabi-gcc@v1 + with: + release: '6-2017-q2' - name: Install pillow run: python -m pip install filelock clang pillow - - uses: actions/checkout@v2 + - name: Check out the repo + uses: actions/checkout@v3 + - name: Create Build Environment # Some projects don't allow in-source building, so create a separate build directory # We'll use this as our working directory for all subsequent commands diff --git a/.github/workflows/macosx_cpn_nightly.yml b/.github/workflows/nightly-companion-osx.yml similarity index 94% rename from .github/workflows/macosx_cpn_nightly.yml rename to .github/workflows/nightly-companion-osx.yml index 0036dda20..750111726 100644 --- a/.github/workflows/macosx_cpn_nightly.yml +++ b/.github/workflows/nightly-companion-osx.yml @@ -1,4 +1,4 @@ -name: MacOSX nightly Companion +name: Nightly - MacOSX Companion on: schedule: @@ -16,10 +16,10 @@ jobs: # well on Windows or Mac. You can convert this to a matrix build if you need # cross-platform coverage. # See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix - runs-on: macos-10.15 + runs-on: macos-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Create Build Environment # Some projects don't allow in-source building, so create a separate build directory @@ -27,13 +27,13 @@ jobs: run: cmake -E make_directory ${{github.workspace}}/build - name: Install Qt - uses: jurplel/install-qt-action@v2 + uses: jurplel/install-qt-action@v3 with: version: '5.12.9' setup-python: 'false' - name: Install dependencies - run: python -m pip install --upgrade pip Pillow + run: python3 -m pip install --upgrade pip Pillow - name: Install ARM toolchain uses: fiam/arm-none-eabi-gcc@v1 @@ -90,7 +90,7 @@ jobs: uses: actions/upload-artifact@v2 with: name: companion-nightly - path: ${{github.workspace}}/output + path: ${{github.workspace}}/output retention-days: 1 publish: diff --git a/.github/workflows/nightly-companion-windows.yml b/.github/workflows/nightly-companion-windows.yml new file mode 100644 index 000000000..51814fc25 --- /dev/null +++ b/.github/workflows/nightly-companion-windows.yml @@ -0,0 +1,117 @@ +name: Nightly - Windows Companion + +on: + workflow_dispatch: + +env: + # Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.) + BUILD_TYPE: Release + CMAKE_GENERATOR: "MSYS Makefiles" + QT_VERSION: "5.12.9" + MINGW_VERSION: "win32_mingw73" + MINGW_PATH: "mingw73_32" + +jobs: + build: + # The CMake configure and build commands are platform agnostic and should work equally + # well on Windows or Mac. You can convert this to a matrix build if you need + # cross-platform coverage. + # See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix + runs-on: windows-latest + defaults: + run: + shell: msys2 {0} + + steps: + - uses: msys2/setup-msys2@v2 + with: + msystem: MINGW32 + update: true + install: git make + + - name: Install GCC 11.2 + run: | + wget https://repo.msys2.org/mingw/mingw32/mingw-w64-i686-gcc-libs-11.2.0-10-any.pkg.tar.zst + wget https://repo.msys2.org/mingw/mingw32/mingw-w64-i686-gcc-11.2.0-10-any.pkg.tar.zst + wget https://repo.msys2.org/mingw/mingw32/mingw-w64-i686-crt-git-9.0.0.6448.b03cbfb95-1-any.pkg.tar.zst + pacman -U --noconfirm mingw-w64-i686-gcc-libs-11.2.0-10-any.pkg.tar.zst \ + mingw-w64-i686-gcc-11.2.0-10-any.pkg.tar.zst \ + mingw-w64-i686-crt-git-9.0.0.6448.b03cbfb95-1-any.pkg.tar.zst + + - name: Install Dependencies + run: | + pacman -S --noconfirm mingw-w64-i686-cmake \ + mingw-w64-i686-python-pip \ + mingw-w64-i686-python-pillow \ + mingw-w64-i686-python-lz4 \ + mingw-w64-i686-libjpeg-turbo \ + mingw-w64-i686-zlib \ + mingw-w64-i686-libtiff \ + mingw-w64-i686-freetype \ + mingw-w64-i686-lcms2 \ + mingw-w64-i686-libwebp \ + mingw-w64-i686-openjpeg2 \ + mingw-w64-i686-libimagequant \ + mingw-w64-i686-libraqm \ + mingw-w64-i686-SDL2 \ + mingw-w64-i686-clang \ + mingw-w64-i686-nsis + python -m pip install clang + + - name: Install Qt + uses: jurplel/install-qt-action@v3 + with: + cache: true + cache-key-prefix: 'install-qt-action-win32' + version: ${{ env.QT_VERSION }} + arch: ${{ env.MINGW_VERSION }} + tools: 'tools_opensslv3_x64' + + - name: Install ARM toolchain + uses: fiam/arm-none-eabi-gcc@v1 + with: + release: '6-2017-q2' + directory: "C:/arm-none-eabi" + + - name: Check out the repo + uses: actions/checkout@v3 + + - name: Create Build Environment + # Some projects don't allow in-source building, so create a separate build directory + # We'll use this as our working directory for all subsequent commands + run: cmake -E make_directory ${{github.workspace}}/build + + - name: Build + working-directory: ${{github.workspace}} + # Execute the build. You can specify a specific target with "--target " + run: | + mkdir output && \ + CMAKE_PREFIX_PATH=$RUNNER_WORKSPACE/Qt/$QT_VERSION/$MINGW_PATH \ + QT_TOOLS_OPENSSL_ROOT_PATH=$RUNNER_WORKSPACE/Qt/Tools/OpenSSL/Win_x86 \ + PATH=$PATH:/c/arm-none-eabi/bin ./tools/build-companion-nightly.sh "${{github.workspace}}" "${{github.workspace}}/output/" + + - name: Archive production artifacts + uses: actions/upload-artifact@v2 + with: + name: companion-nightly + path: ${{github.workspace}}/output + retention-days: 1 + + publish: + needs: build + runs-on: ubuntu-latest + steps: + - uses: actions/download-artifact@v2 + with: + name: companion-nightly + + - name: Display structure of downloaded files + run: ls -R + + - uses: pyTooling/Actions/releaser@main + with: + token: ${{ secrets.GITHUB_TOKEN }} + tag: 'nightly' + files: companion*.* + rm: true + diff --git a/.github/workflows/build-macosx-cpn-release.yml b/.github/workflows/release-companion-osx.yml similarity index 65% rename from .github/workflows/build-macosx-cpn-release.yml rename to .github/workflows/release-companion-osx.yml index d30bb214b..10c6e70a6 100644 --- a/.github/workflows/build-macosx-cpn-release.yml +++ b/.github/workflows/release-companion-osx.yml @@ -1,4 +1,4 @@ -name: Do MacOSX release Companion +name: Release - MacOSX Companion on: workflow_dispatch @@ -15,7 +15,7 @@ jobs: runs-on: macos-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Create Build Environment # Some projects don't allow in-source building, so create a separate build directory @@ -36,34 +36,34 @@ jobs: release: '6-2017-q2' - name: Install dfu-util - run: wget https://downloads.sourceforge.net/project/dfu-util/dfu-util-0.9.tar.gz && - tar xfv dfu-util-0.9.tar.gz && - cd dfu-util-0.9 && - ./configure && - make install + run: wget https://downloads.sourceforge.net/project/dfu-util/dfu-util-0.9.tar.gz && + tar xfv dfu-util-0.9.tar.gz && + cd dfu-util-0.9 && + ./configure && + make install - name: Install libusb - run: wget https://github.com/libusb/libusb/releases/download/v1.0.20/libusb-1.0.20.tar.bz2 && - export MACOSX_DEPLOYMENT_TARGET=10.9 && - tar xfv libusb-1.0.20.tar.bz2 && - cd libusb-1.0.20 && - ./configure && - make install && - cd .. + run: wget https://github.com/libusb/libusb/releases/download/v1.0.20/libusb-1.0.20.tar.bz2 && + export MACOSX_DEPLOYMENT_TARGET=10.9 && + tar xfv libusb-1.0.20.tar.bz2 && + cd libusb-1.0.20 && + ./configure && + make install && + cd .. - name: Install libsdl - run: wget https://www.libsdl.org/release/SDL-1.2.15.tar.gz && - tar xfv SDL-1.2.15.tar.gz && - export MACOSX_DEPLOYMENT_TARGET=10.9 && - cd SDL-1.2.15 && - wget 'https://bugzilla-attachments.libsdl.org/attachment.cgi?id=1320' -O patch1 && - wget 'https://bugzilla-attachments.libsdl.org/attachment.cgi?id=1324' -O patch2 && - wget 'https://hg.libsdl.org/SDL/raw-rev/91ad7b43317a' -O patch3 && - patch -p1 < patch1 && - patch -p1 < patch2 && - patch -p1 < patch3 && - ./configure --without-x && - make install + run: wget https://www.libsdl.org/release/SDL-1.2.15.tar.gz && + tar xfv SDL-1.2.15.tar.gz && + export MACOSX_DEPLOYMENT_TARGET=10.9 && + cd SDL-1.2.15 && + wget 'https://bugzilla-attachments.libsdl.org/attachment.cgi?id=1320' -O patch1 && + wget 'https://bugzilla-attachments.libsdl.org/attachment.cgi?id=1324' -O patch2 && + wget 'https://hg.libsdl.org/SDL/raw-rev/91ad7b43317a' -O patch3 && + patch -p1 < patch1 && + patch -p1 < patch2 && + patch -p1 < patch3 && + ./configure --without-x && + make install - name: Configure CMake # Use a bash shell so we can use the same syntax for environment variable diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml deleted file mode 100644 index cb28a0817..000000000 --- a/.github/workflows/test.yaml +++ /dev/null @@ -1,37 +0,0 @@ -name: OpenTX Commit Tests -on: - push: - workflow_dispatch: - -jobs: - test: - runs-on: ubuntu-latest - strategy: - matrix: - target: - - COMPANION - - MAMBO - - TANGO - - ARM9X - - X9LITE - - X7 - - XLITE - - X9 - - COLORLCD - container: - image: ghcr.io/raphaelcoeffic/opentx-commit-tests - volumes: - - ${{ github.workspace }}:/src - steps: - - - name: Check out the repo - uses: actions/checkout@v2 - with: - submodules: recursive - - - name: Test ${{ matrix.target }} - env: - FLAVOR: ${{ matrix.target }} - run: | - echo "Running commit tests" - ./tools/commit-tests.sh \ No newline at end of file diff --git a/.github/workflows/actions.yml b/.github/workflows/unittests.yml similarity index 95% rename from .github/workflows/actions.yml rename to .github/workflows/unittests.yml index be0684d29..76123edcb 100644 --- a/.github/workflows/actions.yml +++ b/.github/workflows/unittests.yml @@ -25,7 +25,7 @@ jobs: steps: - name: Check out the repo - uses: actions/checkout@v2 + uses: actions/checkout@v3 with: submodules: recursive - diff --git a/CMakeLists.txt b/CMakeLists.txt index b785f7487..f63f1bfb8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2,7 +2,7 @@ project(OpenTX) set(VERSION_MAJOR "2") set(VERSION_MINOR "3") -set(VERSION_REVISION "16") +set(VERSION_REVISION "15") if(TEST_BUILD_WARNING OR ALLOW_NIGHTLY_BUILDS) math(EXPR VERSION_REVISION "${VERSION_REVISION} + 1") endif() diff --git a/companion/src/CMakeLists.txt b/companion/src/CMakeLists.txt index 33931bf75..c54c9a527 100644 --- a/companion/src/CMakeLists.txt +++ b/companion/src/CMakeLists.txt @@ -332,7 +332,7 @@ endif() # Generate list of simulator plugins, used by all platforms if(WIN32) - file(GLOB simulator_plugins "${CMAKE_BINARY_DIR}/Release/*opentx-*simulator${CMAKE_SHARED_LIBRARY_SUFFIX}") + file(GLOB simulator_plugins "${CMAKE_BINARY_DIR}/${CMAKE_BUILD_TYPE}/*opentx-*simulator${CMAKE_SHARED_LIBRARY_SUFFIX}") else() file(GLOB simulator_plugins "${CMAKE_BINARY_DIR}/*opentx-*simulator${CMAKE_SHARED_LIBRARY_SUFFIX}") endif() @@ -407,11 +407,11 @@ if(${CMAKE_SYSTEM_NAME} MATCHES "Linux") elseif(WIN32) if(NOT WIN_DO_FULL_INSTALL) # Just copy supporting DLLs to build folder - set(INSTALL_DESTINATION "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}") + set(INSTALL_DESTINATION "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${CMAKE_BUILD_TYPE}") message(STATUS "Partial install to " ${INSTALL_DESTINATION}) else() # Full Windows installation with all supporting files - set(INSTALL_DESTINATION "${CMAKE_INSTALL_PREFIX}") + set(INSTALL_DESTINATION "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${CMAKE_BUILD_TYPE}") message(STATUS "Full install to " ${INSTALL_DESTINATION}) # companion & simulator binaries install(TARGETS ${COMPANION_NAME} DESTINATION ${INSTALL_DESTINATION}) @@ -433,7 +433,8 @@ elseif(WIN32) if(MSVC) set(wdqtopts ${wdqtopts} --no-compiler-runtime) # --compiler-runtime includes vcredist_x86, but we just copy the required DLLs manually endif() - set(wdqtopts ${wdqtopts} -dir "\"${INSTALL_DESTINATION}\"" "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/Release/${COMPANION_NAME}.exe" "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/Release/${SIMULATOR_NAME}.exe") + set(wdqtopts ${wdqtopts} -dir "\"${INSTALL_DESTINATION}\"" "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${CMAKE_BUILD_TYPE}/${COMPANION_NAME}.exe" "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${CMAKE_BUILD_TYPE}/${SIMULATOR_NAME}.exe") + list(JOIN wdqtopts " " wdqtopts) # Add installer command to execute windeployqt message(STATUS "windeployqt command: ${QT_BIN_DIR}/windeployqt.exe ${wdqtopts}") diff --git a/companion/targets/windows/license.txt b/companion/targets/windows/license.txt index 922a54064..efd88bf37 100644 --- a/companion/targets/windows/license.txt +++ b/companion/targets/windows/license.txt @@ -1,4 +1,4 @@ -Copyright © 2011-2019 OpenTX team +Copyright © 2011-2023 OpenTX team OpenTX Companion is based on code named eePe by author - Erez Raviv diff --git a/radio/src/targets/common/arm/stm32/board_common.h b/radio/src/targets/common/arm/stm32/board_common.h index a576519f1..c474dc37d 100644 --- a/radio/src/targets/common/arm/stm32/board_common.h +++ b/radio/src/targets/common/arm/stm32/board_common.h @@ -36,25 +36,24 @@ #endif #if defined(STM32F4) - -#include "STM32F4xx_DSP_StdPeriph_Lib_V1.4.0/Libraries/CMSIS/Device/ST/STM32F4xx/Include/stm32f4xx.h" -#include "STM32F4xx_DSP_StdPeriph_Lib_V1.4.0/Libraries/STM32F4xx_StdPeriph_Driver/inc/stm32f4xx_rcc.h" -#include "STM32F4xx_DSP_StdPeriph_Lib_V1.4.0/Libraries/STM32F4xx_StdPeriph_Driver/inc/stm32f4xx_syscfg.h" -#include "STM32F4xx_DSP_StdPeriph_Lib_V1.4.0/Libraries/STM32F4xx_StdPeriph_Driver/inc/stm32f4xx_gpio.h" -#include "STM32F4xx_DSP_StdPeriph_Lib_V1.4.0/Libraries/STM32F4xx_StdPeriph_Driver/inc/stm32f4xx_exti.h" -#include "STM32F4xx_DSP_StdPeriph_Lib_V1.4.0/Libraries/STM32F4xx_StdPeriph_Driver/inc/stm32f4xx_tim.h" -#include "STM32F4xx_DSP_StdPeriph_Lib_V1.4.0/Libraries/STM32F4xx_StdPeriph_Driver/inc/stm32f4xx_adc.h" -#include "STM32F4xx_DSP_StdPeriph_Lib_V1.4.0/Libraries/STM32F4xx_StdPeriph_Driver/inc/stm32f4xx_spi.h" -#include "STM32F4xx_DSP_StdPeriph_Lib_V1.4.0/Libraries/STM32F4xx_StdPeriph_Driver/inc/stm32f4xx_i2c.h" -#include "STM32F4xx_DSP_StdPeriph_Lib_V1.4.0/Libraries/STM32F4xx_StdPeriph_Driver/inc/stm32f4xx_rtc.h" -#include "STM32F4xx_DSP_StdPeriph_Lib_V1.4.0/Libraries/STM32F4xx_StdPeriph_Driver/inc/stm32f4xx_pwr.h" -#include "STM32F4xx_DSP_StdPeriph_Lib_V1.4.0/Libraries/STM32F4xx_StdPeriph_Driver/inc/stm32f4xx_dma.h" -#include "STM32F4xx_DSP_StdPeriph_Lib_V1.4.0/Libraries/STM32F4xx_StdPeriph_Driver/inc/stm32f4xx_usart.h" -#include "STM32F4xx_DSP_StdPeriph_Lib_V1.4.0/Libraries/STM32F4xx_StdPeriph_Driver/inc/stm32f4xx_flash.h" -#include "STM32F4xx_DSP_StdPeriph_Lib_V1.4.0/Libraries/STM32F4xx_StdPeriph_Driver/inc/stm32f4xx_dbgmcu.h" -#include "STM32F4xx_DSP_StdPeriph_Lib_V1.4.0/Libraries/STM32F4xx_StdPeriph_Driver/inc/misc.h" + #include "STM32F4xx_DSP_StdPeriph_Lib_V1.4.0/Libraries/CMSIS/Device/ST/STM32F4xx/Include/stm32f4xx.h" + #include "STM32F4xx_DSP_StdPeriph_Lib_V1.4.0/Libraries/STM32F4xx_StdPeriph_Driver/inc/stm32f4xx_rcc.h" + #include "STM32F4xx_DSP_StdPeriph_Lib_V1.4.0/Libraries/STM32F4xx_StdPeriph_Driver/inc/stm32f4xx_syscfg.h" + #include "STM32F4xx_DSP_StdPeriph_Lib_V1.4.0/Libraries/STM32F4xx_StdPeriph_Driver/inc/stm32f4xx_gpio.h" + #include "STM32F4xx_DSP_StdPeriph_Lib_V1.4.0/Libraries/STM32F4xx_StdPeriph_Driver/inc/stm32f4xx_exti.h" + #include "STM32F4xx_DSP_StdPeriph_Lib_V1.4.0/Libraries/STM32F4xx_StdPeriph_Driver/inc/stm32f4xx_tim.h" + #include "STM32F4xx_DSP_StdPeriph_Lib_V1.4.0/Libraries/STM32F4xx_StdPeriph_Driver/inc/stm32f4xx_adc.h" + #include "STM32F4xx_DSP_StdPeriph_Lib_V1.4.0/Libraries/STM32F4xx_StdPeriph_Driver/inc/stm32f4xx_spi.h" + #include "STM32F4xx_DSP_StdPeriph_Lib_V1.4.0/Libraries/STM32F4xx_StdPeriph_Driver/inc/stm32f4xx_i2c.h" + #include "STM32F4xx_DSP_StdPeriph_Lib_V1.4.0/Libraries/STM32F4xx_StdPeriph_Driver/inc/stm32f4xx_rtc.h" + #include "STM32F4xx_DSP_StdPeriph_Lib_V1.4.0/Libraries/STM32F4xx_StdPeriph_Driver/inc/stm32f4xx_pwr.h" + #include "STM32F4xx_DSP_StdPeriph_Lib_V1.4.0/Libraries/STM32F4xx_StdPeriph_Driver/inc/stm32f4xx_dma.h" + #include "STM32F4xx_DSP_StdPeriph_Lib_V1.4.0/Libraries/STM32F4xx_StdPeriph_Driver/inc/stm32f4xx_usart.h" + #include "STM32F4xx_DSP_StdPeriph_Lib_V1.4.0/Libraries/STM32F4xx_StdPeriph_Driver/inc/stm32f4xx_flash.h" + #include "STM32F4xx_DSP_StdPeriph_Lib_V1.4.0/Libraries/STM32F4xx_StdPeriph_Driver/inc/stm32f4xx_dbgmcu.h" + #include "STM32F4xx_DSP_StdPeriph_Lib_V1.4.0/Libraries/STM32F4xx_StdPeriph_Driver/inc/misc.h" #else -#include "STM32F2xx_StdPeriph_Lib_V1.1.0/Libraries/CMSIS/Device/ST/STM32F2xx/Include/stm32f2xx.h" + #include "STM32F2xx_StdPeriph_Lib_V1.1.0/Libraries/CMSIS/Device/ST/STM32F2xx/Include/stm32f2xx.h" #include "STM32F2xx_StdPeriph_Lib_V1.1.0/Libraries/STM32F2xx_StdPeriph_Driver/inc/stm32f2xx_rcc.h" #include "STM32F2xx_StdPeriph_Lib_V1.1.0/Libraries/STM32F2xx_StdPeriph_Driver/inc/stm32f2xx_syscfg.h" #include "STM32F2xx_StdPeriph_Lib_V1.1.0/Libraries/STM32F2xx_StdPeriph_Driver/inc/stm32f2xx_gpio.h" diff --git a/tools/build-companion-nightly.sh b/tools/build-companion-nightly.sh index 6d8255eac..1022d0b88 100755 --- a/tools/build-companion-nightly.sh +++ b/tools/build-companion-nightly.sh @@ -30,7 +30,7 @@ done SRCDIR=$1 OUTDIR=$2 -COMMON_OPTIONS="-DALLOW_NIGHTLY_BUILDS=YES -DTEST_BUILD_WARNING=YES -DGVARS=YES -DHELI=YES -DLUA=YES -DMULTIMODULE=YES -DTELEMETRY=FRSKY -DPPM_LIMITS_SYMETRICAL=YES -DVARIO=YES -DAUTOSWITCH=YES -DAUTOSOURCE=YES -DAUDIO=YES -DGPS=YES -DPPM_CENTER_ADJUSTABLE=YES -DFLIGHT_MODES=YES -DOVERRIDE_CHANNEL_FUNCTION=YES -DFRSKY_STICKS=YES" +COMMON_OPTIONS="-DCMAKE_BUILD_TYPE=Release -DALLOW_NIGHTLY_BUILDS=YES -DTEST_BUILD_WARNING=YES -DGVARS=YES -DHELI=YES -DLUA=YES -DMULTIMODULE=YES -DTELEMETRY=FRSKY -DPPM_LIMITS_SYMETRICAL=YES -DVARIO=YES -DAUTOSWITCH=YES -DAUTOSOURCE=YES -DAUDIO=YES -DGPS=YES -DPPM_CENTER_ADJUSTABLE=YES -DFLIGHT_MODES=YES -DOVERRIDE_CHANNEL_FUNCTION=YES -DFRSKY_STICKS=YES" if [ "$(uname)" = "Darwin" ]; then COMMON_OPTIONS="${COMMON_OPTIONS} -DCMAKE_PREFIX_PATH=~/Qt/5.7/clang_64/ -DCMAKE_OSX_DEPLOYMENT_TARGET='10.9'" fi @@ -146,13 +146,17 @@ cmake ${COMMON_OPTIONS} -DPCB=X10 -DPCBREV=EXPRESS ${SRCDIR} make -j${JOBS} libsimulator rm CMakeCache.txt -cmake ${COMMON_OPTIONS} -DPCB=X12S ${SRCDIR} +cmake ${COMMON_OPTIONS} -DPCB=X12S ${SRCDIR} make -j${JOBS} libsimulator -make -j${JOBS} package - if [ "$(uname)" = "Darwin" ]; then - cp *.dmg ${OUTDIR} + make -j${JOBS} package + cp *.dmg "${OUTDIR}" +elif [ "$(uname)" = "Linux" ]; then + make -j${JOBS} package + cp *.deb "${OUTDIR}" else - cp *.deb ${OUTDIR} + cmake ${COMMON_OPTIONS} -DWIN_DO_FULL_INSTALL=YES -DSIMU_TARGET=NO ${SRCDIR} + make -j${JOBS} installer + cp companion/*.exe "${OUTDIR}" fi