diff options
Diffstat (limited to '')
-rw-r--r-- | .github/workflows/release-ci.yml | 41 | ||||
-rw-r--r-- | src/CMakeLists.txt | 2 | ||||
-rw-r--r-- | src/main.cpp | 2 |
3 files changed, 22 insertions, 23 deletions
diff --git a/.github/workflows/release-ci.yml b/.github/workflows/release-ci.yml index 1609a9c5..92a12869 100644 --- a/.github/workflows/release-ci.yml +++ b/.github/workflows/release-ci.yml @@ -2,19 +2,19 @@ name: Build & Package CI Test on: push: - branches: [ develop-ci ] + branches: [develop-ci] paths-ignore: - - '**/README.md' - - '**/README_CN.md' - - 'resource/ts/**' - - 'docs/**' + - "**/README.md" + - "**/README_CN.md" + - "resource/ts/**" + - "docs/**" pull_request: - branches: [ develop-ci ] + branches: [develop-ci] paths-ignore: - - '**/README.md' - - '**/README_CN.md' - - 'resource/ts/**' - - 'docs/**' + - "**/README.md" + - "**/README_CN.md" + - "resource/ts/**" + - "docs/**" env: # Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.) @@ -25,10 +25,9 @@ jobs: build: strategy: matrix: - os: [ 'ubuntu-18.04', 'macos-latest', 'windows-latest' ] + os: ["ubuntu-18.04", "macos-10.15", "windows-latest"] runs-on: ${{ matrix.os }} steps: - - uses: actions/checkout@v2 with: submodules: recursive @@ -57,7 +56,7 @@ jobs: security import certificate.p12 -k build.keychain -P ${{secrets.MAOS_CERTIFICATE_PWD}} -T /usr/bin/codesign security set-key-partition-list -S apple-tool:,apple:,codesign: -s -k gpgfrontend build.keychain security set-keychain-settings -lut 3600 - if: matrix.os == 'macos-latest' + if: matrix.os == 'macos-10.15' - name: Install Dependence (macOS) run: | @@ -67,7 +66,7 @@ jobs: brew link qt@5 brew link gcc brew link openssl --force - if: matrix.os == 'macos-latest' + if: matrix.os == 'macos-10.15' - name: Cache Qt id: cache-qt @@ -122,7 +121,7 @@ jobs: ./configure --enable-maintainer-mode --enable-static=yes --enable-languages=cpp && make -j2 sudo make install cd ${{github.workspace}} - if: matrix.os == 'ubuntu-18.04' || matrix.os == 'macos-latest' + if: matrix.os == 'ubuntu-18.04' || matrix.os == 'macos-10.15' - name: Build GpgME (Windows) shell: msys2 {0} @@ -138,12 +137,12 @@ jobs: # Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make. # See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DEXECUTABLE_OUTPUT_PATH=${{env.EXECUTABLE_OUTPUT_PATH}} - if: matrix.os == 'ubuntu-18.04' || matrix.os == 'macos-latest' + if: matrix.os == 'ubuntu-18.04' || matrix.os == 'macos-10.15' - name: Build GpgFrontend # Build your program with the given configuration run: cmake --build ${{github.workspace}}/build --config $env.BUILD_TYPE}} -- -j 2 - if: matrix.os == 'ubuntu-18.04' || matrix.os == 'macos-latest' + if: matrix.os == 'ubuntu-18.04' || matrix.os == 'macos-10.15' - name: Build & Sign App Bundle (macOS) run: | @@ -151,7 +150,7 @@ jobs: macdeployqt ${{github.workspace}}/build/release/GpgFrontend.app codesign --deep --force --options=runtime -s "Developer ID Application: Yu Hu (4279AWUL3X)" ${{github.workspace}}/build/release/GpgFrontend.app -v mkdir ${{github.workspace}}/build/tmp/ - if: matrix.os == 'macos-latest' + if: matrix.os == 'macos-10.15' - name: Package & Sign App Bundle (macOS) run: | @@ -161,12 +160,12 @@ jobs: hdiutil convert ${{github.workspace}}/build/tmp/tmp.dmg -format UDZO -o ${{github.workspace}}/build/artifactOut/GpgFrontend.dmg codesign -s "Developer ID Application: Yu Hu (4279AWUL3X)" ${{github.workspace}}/build/artifactOut/GpgFrontend.dmg mv ${{github.workspace}}/build/artifactOut/GpgFrontend.dmg ${{github.workspace}}/build/artifactOut/GpgFrontend-${{steps.vars.outputs.sha_short}}-x86_64.dmg - if: matrix.os == 'macos-latest' + if: matrix.os == 'macos-10.15' - name: Notarize Release Build (macOS) run: | xcrun altool --notarize-app -f ${{github.workspace}}/build/artifactOut/GpgFrontend-${{steps.vars.outputs.sha_short}}-x86_64.dmg --primary-bundle-id pub.gpgfrontend.gpgfrontend -u ${{secrets.APPLE_DEVELOPER_ID}} -p ${{secrets.APPLE_DEVELOPER_ID_SECRET}} - if: matrix.os == 'macos-latest' + if: matrix.os == 'macos-10.15' - name: Package App Image (Linux) run: | @@ -203,7 +202,7 @@ jobs: with: name: gpgfrontend-${{matrix.os}}-${{env.BUILD_TYPE}}-${{steps.vars.outputs.sha_short}} path: ${{github.workspace}}/build/artifactOut/* - if: matrix.os == 'macos-latest' + if: matrix.os == 'macos-10.15' - name: Upload Artifact(Windows) uses: actions/upload-artifact@master diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 9ec83bc8..79eae6ea 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -93,7 +93,7 @@ if (MULTI_LANG_SUPPORT) COMMAND msgfmt --check --verbose --output-file ${CMAKE_SOURCE_DIR}/resource/locale/out/${_langName}/LC_MESSAGES/GpgFrontend.mo ${_poFile} ) add_custom_command(TARGET translations - COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_SOURCE_DIR}/resource/locale/out/ ${RESOURCE_OUTPUT_DIRECTORY}/locales) + COMMAND cp -rf ${CMAKE_SOURCE_DIR}/resource/locale/out/ ${RESOURCE_OUTPUT_DIRECTORY}/locales) endforeach () endif () diff --git a/src/main.cpp b/src/main.cpp index f4739767..96d3c4d8 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -55,7 +55,7 @@ int main(int argc, char* argv[]) { // unicode in source QTextCodec::setCodecForLocale(QTextCodec::codecForName("utf-8")); -#ifdef WINDOWS +#if !defined(RELEASE) // css QFile file(RESOURCE_DIR(qApp->applicationDirPath()) + "/css/default.qss"); file.open(QFile::ReadOnly); |