Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2.9 : Linux CPN AppImage SSL packaging #4533

Merged
merged 14 commits into from
Jan 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion .github/workflows/linux_cpn.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ on:
- '2.6'
- '2.7'
- '2.8'
- '2.9'
- 'main'
paths:
- '.github/workflows/linux_cpn.yml'
Expand All @@ -36,7 +37,7 @@ jobs:
build:
runs-on: ubuntu-latest
container:
image: ghcr.io/edgetx/edgetx-dev:2.9.0
image: ghcr.io/edgetx/edgetx-dev:2.9.1
volumes:
- ${{ github.workspace }}:/src

Expand All @@ -50,6 +51,11 @@ jobs:
working-directory: ${{github.workspace}}
shell: bash
run: |
rm /etc/apt/sources.list.d/kitware.list && apt-get update
apt-get install --yes --no-install-recommends dfu-util libssl-dev awesome && \
rm -rf /var/lib/apt/lists/*
LIBUSB1_ROOT_DIR=/usr/lib/x86_64-linux-gnu && \
LIBSSL1_ROOT_DIR=/usr/lib/x86_64-linux-gnu && \
mkdir output && \
tools/build-companion.sh "$(pwd)" "$(pwd)/output/"

Expand Down
16 changes: 3 additions & 13 deletions .github/workflows/macosx_cpn.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,23 +65,13 @@ jobs:
run: python3 -m pip install --upgrade pip Pillow lz4 clang

- name: Patch GitHub macOS build
run: brew install pkg-config
run: brew install pkg-config

- 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: brew install libusb

- 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: brew install dfu-util

- name: Select XCode version
uses: maxim-lobanov/setup-xcode@v1
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
- x9lite;x9lites
- xlite;xlites
container:
image: ghcr.io/edgetx/edgetx-dev:2.9.0
image: ghcr.io/edgetx/edgetx-dev:2.9.1
volumes:
- ${{ github.workspace }}:/src
steps:
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/win_cpn-32.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,9 @@ jobs:
mingw-w64-i686-SDL2 \
mingw-w64-i686-clang \
mingw-w64-i686-openssl \
mingw-w64-i686-nsis
mingw-w64-i686-nsis \
mingw-w64-i686-dfu-util \
mingw-w64-i686-openssl
SETUPTOOLS_USE_DISTUTILS=stdlib pip install lz4
python -m pip install clang lz4

Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/win_cpn-64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ on:
- '2.6'
- '2.7'
- '2.8'
- '2.9'
- 'main'
paths:
- '.github/workflows/win_cpn-64.yml'
Expand Down Expand Up @@ -71,7 +72,9 @@ jobs:
mingw-w64-x86_64-libraqm \
mingw-w64-x86_64-SDL2 \
mingw-w64-x86_64-clang \
mingw-w64-x86_64-nsis
mingw-w64-x86_64-nsis \
mingw-w64-x86_64-dfu-util \
mingw-w64-x86_64-openssl
python -m pip install clang

- name: Install Qt
Expand All @@ -81,7 +84,6 @@ jobs:
cache-key-prefix: 'install-qt-action-win64'
version: ${{ env.QT_VERSION }}
arch: ${{ env.MINGW_VERSION }}
tools: 'tools_openssl_x64'

- name: Check out the repo
uses: actions/checkout@v3
Expand Down
25 changes: 25 additions & 0 deletions cmake/FindDfuutil.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# - try to find program dfu-util

set(DFU_UTIL_ROOT_DIR
"${DFU_UTIL_ROOT_DIR}"
CACHE
PATH
"Root directory to search for dfu-util")

find_program(DFU_UTIL_PROGRAM
NAMES
dfu-util
HINTS
"${DFU_UTIL_ROOT_DIR}")

include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(DFU_UTIL
DEFAULT_MSG
DFU_UTIL_PROGRAM)

if(DFU_UTIL_FOUND)
set(DFU_UTIL_PATH "${DFU_UTIL_PROGRAM}")
mark_as_advanced(DFU_UTIL_ROOT_DIR)
endif()

mark_as_advanced(DFU_UTIL_PROGRAM)
31 changes: 31 additions & 0 deletions cmake/FindLibusb1.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# - try to find libusb-1 library

set(LIBUSB1_ROOT_DIR
"${LIBUSB1_ROOT_DIR}"
CACHE
PATH
"Root directory to search for libusb-1")

find_library(LIBUSB1_LIBRARY
NAMES
libusb-1.0
libusb-1.0.so
libusb-1.0.so.0
libusb-1.0.dll
libusb-1.0.dylib
HINTS
"${LIBUSB1_ROOT_DIR}")

get_filename_component(LIBUSB1_LIBRARY_PATH ${LIBUSB1_LIBRARY} PATH)

include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(LIBUSB1
DEFAULT_MSG
LIBUSB1_LIBRARY_PATH)

if(LIBUSB1_FOUND)
set(LIBUSB1_LIBRARY_DIR "${LIBUSB1_LIBRARY_PATH}")
mark_as_advanced(LIBUSB1_ROOT_DIR)
endif()

mark_as_advanced(LIBUSB1_LIBRARY_PATH)
18 changes: 16 additions & 2 deletions cmake/NativeTargets.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,27 @@ if(Qt5Core_FOUND OR FOX_FOUND)
set(SDL2_BUILDING_LIBRARY YES) # this prevents FindSDL from appending SDLmain lib to the results, which we don't want
find_package("SDL2")
if(SDL2_FOUND)
message(STATUS "SDL2 Lib: ${SDL2_LIBRARIES}; Headers: ${SDL2_INCLUDE_DIRS}")
# find_package("SDL2") does not set a variable holding the path to the location of the SDL2 shared library
find_file(SDL2_LIB_PATH
NAMES
libSDL2.so
SDL2.dll
SDL2.dylib
HINTS
"/usr/lib/x86_64-linux-gnu"
${SDL2_LIBRARY_PATH})
message(STATUS "SDL2 Lib: ${SDL2_LIB_PATH} Libs: ${SDL2_LIBRARIES}; Headers: ${SDL2_INCLUDE_DIRS}")
else()
message(STATUS "SDL not found! Simulator audio, and joystick inputs, will not work.")
message(STATUS "SDL2 not found! Simulator audio, and joystick inputs, will not work.")
endif()
endif()

if(Qt5Core_FOUND AND NOT DISABLE_COMPANION)
find_package(Libusb1)
if(LIBUSB1_FOUND)
find_package(Dfuutil)
endif()

if(LINUX)
find_package(Libssl1)
endif()
Expand Down
Loading