diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index c409400..e1919f0 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -13,8 +13,8 @@ env: jobs: #======================================================================== - debian11_qhttpserver: - name: "Build the package for Debian 11" + debian12_qhttpserver: + name: "Build the package for Debian 12" runs-on: ubuntu-latest steps: - name: Checkout code @@ -33,12 +33,12 @@ jobs: large-packages: false swap-storage: true - name: Build image - run: docker build -f ./Dockerfile-debian11 -t aymara/qhttpserver-debian11:build . + run: docker build -f ./Dockerfile-debian12 -t aymara/qhttpserver-debian12:build . - name: Extract package and version number from docker image id: extract shell: bash run: | - dockerImage="aymara/qhttpserver-debian11:build" + dockerImage="aymara/qhttpserver-debian12:build" packageDir="/usr/share/apps/qhttpserver/packages/" cicd/extract_package.sh $dockerImage $packageDir $GITHUB_OUTPUT - name: Upload nightly build package diff --git a/CMakeLists.txt b/CMakeLists.txt index 3fdd450..7753e0a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -91,9 +91,9 @@ set(CMAKE_PREFIX_PATH set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC -lpthread") -# It is necessary to define Qt5_INSTALL_DIR in your environment. +# It is necessary to define Qt6_INSTALL_DIR in your environment. set(CMAKE_PREFIX_PATH - "$ENV{Qt5_INSTALL_DIR}" + "$ENV{Qt6_INSTALL_DIR}" "${CMAKE_PREFIX_PATH}" ) @@ -108,15 +108,15 @@ endif() set(CMAKE_INCLUDE_CURRENT_DIR ON) set(CMAKE_AUTOMOC ON) -find_package(Qt5 REQUIRED COMPONENTS Core Network) -set(Qt5_LIBRARIES Qt5::Core Qt5::Network ) -message("Found Qt5 ${Qt5Core_VERSION}") +find_package(Qt6 REQUIRED COMPONENTS Core Network) +set(Qt6_LIBRARIES Qt6::Core Qt6::Network ) +message("Found Qt6 ${Qt6Core_VERSION}") -message("\n\n\n{Qt5_LIBRARIES}=${Qt5_LIBRARIES} ") +message("\n\n\n{Qt6_LIBRARIES}=${Qt6_LIBRARIES} ") if (${CMAKE_SYSTEM_NAME} STREQUAL "Windows") - get_target_property(QtCore_location Qt5::Core LOCATION) - get_target_property(QtNetwork_location Qt5::Network LOCATION) + get_target_property(QtCore_location Qt6::Core LOCATION) + get_target_property(QtNetwork_location Qt6::Network LOCATION) install(FILES ${QtCore_location} ${QtNetwork_location} DESTINATION ${LIB_INSTALL_DIR}) diff --git a/Dockerfile-debian12 b/Dockerfile-debian12 new file mode 100644 index 0000000..52e95eb --- /dev/null +++ b/Dockerfile-debian12 @@ -0,0 +1,24 @@ +FROM debian:12 + +ARG TRAVIS_JOB_NUMBER +ENV DEBIAN_FRONTEND=noninteractive + +# Setup +RUN apt-get update -y -qq && apt-get install -y apt-utils wget bzip2 git gcc g++ cmake cmake-data ninja-build qt6-base-dev-tools qt6-declarative-dev packaging-dev -qq +RUN mkdir -p /src/ +RUN git clone https://github.com/aymara/qhttpserver /src/qhttpserver + +RUN mkdir -p /src/qhttpserver/build + +# Build +WORKDIR /src/qhttpserver/build +RUN cmake -G Ninja -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release .. +RUN ninja all && ninja package +RUN echo "export packagefile=`find /src/qhttpserver/build/ -maxdepth 1 -name *.deb`" > /envfile +RUN echo "export fullname=\$(basename -- \$packagefile)" >> /envfile +RUN echo "export extension=\${fullname##*.}" >> /envfile +RUN echo "export filename=\${fullname%.*}" >> /envfile +RUN . /envfile && install -D ${packagefile} "/usr/share/apps/qhttpserver/packages/${filename}-debian11.deb" + +## install github-release to be able to deploy packages +#RUN wget https://github.com/aktau/github-release/releases/download/v0.7.2/linux-amd64-github-release.tar.bz2 && tar xjf linux-amd64-github-release.tar.bz2 && cp bin/linux/amd64/github-release /usr/bin diff --git a/Dockerfile-ubuntu22.04 b/Dockerfile-ubuntu22.04 index 0cefad9..583ca6c 100644 --- a/Dockerfile-ubuntu22.04 +++ b/Dockerfile-ubuntu22.04 @@ -3,8 +3,7 @@ FROM ubuntu:22.04 ENV DEBIAN_FRONTEND=noninteractive # Setup -RUN apt-get update -y -qq -RUN apt-get install -y apt-utils wget bzip2 git gcc g++ cmake cmake-data ninja-build qtbase5-dev-tools qtdeclarative5-dev packaging-dev -qq +RUN apt-get update -y -qq && apt-get install -y apt-utils wget bzip2 git gcc g++ cmake cmake-data ninja-build qt6-base-dev-tools qt6-declarative-dev packaging-dev -qq RUN mkdir -p /src/ RUN git clone https://github.com/aymara/qhttpserver /src/qhttpserver