├── .github ├── FUNDING.yml └── workflows │ ├── android.yml │ ├── build.yml │ ├── codespell.yml │ ├── doxygen.yml │ ├── macos.yml │ ├── mingw.yml │ ├── msvc.yml │ └── ubuntu.yml ├── .gitignore ├── App ├── CMakeLists.txt ├── Resource │ ├── AppIcon.rc │ ├── Resource.qrc │ ├── Translations │ │ ├── TransformCoordinateApp_ar.ts │ │ ├── TransformCoordinateApp_ca.ts │ │ ├── TransformCoordinateApp_cs.ts │ │ ├── TransformCoordinateApp_da.ts │ │ ├── TransformCoordinateApp_de.ts │ │ ├── TransformCoordinateApp_el.ts │ │ ├── TransformCoordinateApp_en.ts │ │ ├── TransformCoordinateApp_en_GB.ts │ │ ├── TransformCoordinateApp_es.ts │ │ ├── TransformCoordinateApp_et.ts │ │ ├── TransformCoordinateApp_fi.ts │ │ ├── TransformCoordinateApp_fr.ts │ │ ├── TransformCoordinateApp_gd.ts │ │ ├── TransformCoordinateApp_gl.ts │ │ ├── TransformCoordinateApp_hu.ts │ │ ├── TransformCoordinateApp_it.ts │ │ ├── TransformCoordinateApp_ja.ts │ │ ├── TransformCoordinateApp_ko.ts │ │ ├── TransformCoordinateApp_nb.ts │ │ ├── TransformCoordinateApp_ne.ts │ │ ├── TransformCoordinateApp_nl.ts │ │ ├── TransformCoordinateApp_nn.ts │ │ ├── TransformCoordinateApp_oc.ts │ │ ├── TransformCoordinateApp_pl.ts │ │ ├── TransformCoordinateApp_pt_BR.ts │ │ ├── TransformCoordinateApp_pt_PT.ts │ │ ├── TransformCoordinateApp_ro.ts │ │ ├── TransformCoordinateApp_ru.ts │ │ ├── TransformCoordinateApp_sk.ts │ │ ├── TransformCoordinateApp_sl.ts │ │ ├── TransformCoordinateApp_sv.ts │ │ ├── TransformCoordinateApp_th.ts │ │ ├── TransformCoordinateApp_tr.ts │ │ ├── TransformCoordinateApp_uk.ts │ │ ├── TransformCoordinateApp_zh_CN.ts │ │ └── TransformCoordinateApp_zh_TW.ts │ ├── icons │ │ ├── rabbit-black │ │ │ ├── index.theme │ │ │ └── svg │ │ │ │ └── TransformCoordinate.svg │ │ ├── rabbit-green │ │ │ ├── index.theme │ │ │ └── svg │ │ │ │ └── TransformCoordinate.svg │ │ ├── rabbit-red │ │ │ ├── index.theme │ │ │ └── svg │ │ │ │ └── TransformCoordinate.svg │ │ └── rabbit-white │ │ │ ├── index.theme │ │ │ └── svg │ │ │ └── TransformCoordinate.svg │ └── png │ │ ├── TransformCoordinate.ico │ │ └── TransformCoordinate.png ├── android │ ├── AndroidManifest.xml │ └── res │ │ ├── drawable-hdpi │ │ └── icon.png │ │ ├── drawable-ldpi │ │ └── icon.png │ │ ├── drawable-mdpi │ │ └── icon.png │ │ ├── values-zh │ │ └── strings.xml │ │ └── values │ │ └── strings.xml ├── main.cpp ├── mainwindow.cpp ├── mainwindow.h └── mainwindow.ui ├── Authors.md ├── Authors_zh_CN.md ├── CMakeLists.txt ├── ChangeLog.md ├── Install ├── Install.nsi └── install.sh ├── License.md ├── Package ├── CMakeCPack.cmake ├── CMakeCPackOptions.cmake.in ├── deb │ ├── postinst.in │ ├── postrm.in │ ├── preinst.in │ └── prerm.in └── share │ └── applications │ ├── TransformCoordinate.sh │ └── org.Rabbit.TransformCoordinate.desktop ├── README.md ├── Src ├── CMakeLists.txt ├── GpxModel │ ├── CMakeLists.txt │ ├── GpxModel.pc.in │ ├── GpxModelConfig.cmake.in │ ├── LibKML.cpp │ ├── LibKML.h │ ├── actfile.cpp │ ├── actfile.h │ ├── gpx_model.cpp │ ├── gpx_model.h │ ├── gpxfile.cpp │ ├── gpxfile.h │ ├── nmeafile.cpp │ ├── nmeafile.h │ ├── utils.c │ ├── utils.h │ ├── uxmlpars.c │ └── uxmlpars.h ├── TransformCoordinate.cpp └── TransformCoordinate.h ├── TransformCoordinate.pc.in ├── Update ├── update.xml └── update_android.xml ├── appveyor.yml ├── build_debpackage.sh ├── debian ├── changelog ├── control ├── copyright ├── postinst ├── postrm ├── preinst ├── prerm ├── rules ├── source │ └── format └── watch ├── deploy.sh ├── etc └── logqt.ini ├── test └── test_linux.sh ├── vcpkg.json └── vcpkg └── manifests └── vcpkg.json /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | # These are supported funding model platforms 2 | 3 | github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2] 4 | patreon: # Replace with a single Patreon username 5 | open_collective: # Replace with a single Open Collective username 6 | ko_fi: # Replace with a single Ko-fi username 7 | tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel 8 | community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry 9 | liberapay: # Replace with a single Liberapay username 10 | issuehunt: # Replace with a single IssueHunt username 11 | otechie: # Replace with a single Otechie username 12 | custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] 13 | 14 | - https://github.com/KangLin/RabbitCommon/raw/master/Src/Resource/image/Contribute.png 15 | - https://gitee.com/kl222/RabbitCommon/raw/master/Src/Resource/image/Contribute.png 16 | - https://gitlab.com/kl222/RabbitCommon/-/raw/master/Src/Resource/image/Contribute.png -------------------------------------------------------------------------------- /.github/workflows/android.yml: -------------------------------------------------------------------------------- 1 | # 作者:康林 2 | 3 | name: android 4 | 5 | on: 6 | workflow_call: 7 | outputs: 8 | name: 9 | description: "The artifact name" 10 | value: ${{ jobs.build_android.outputs.name }} 11 | 12 | jobs: 13 | build_android: 14 | 15 | strategy: 16 | matrix: 17 | BUILD_TYPE: [Release] 18 | qt_arch: [android_arm64_v8a, android_x86_64] 19 | qt_version: [6.8.1] 20 | include: 21 | - qt_arch: android_arm64_v8a 22 | VCPKG_TARGET_TRIPLET: arm64-android 23 | ANDROID_ABI: arm64-v8a 24 | 25 | - qt_arch: android_x86_64 26 | VCPKG_TARGET_TRIPLET: x64-android 27 | ANDROID_ABI: x86_64 28 | 29 | # See: https://docs.github.com/zh/actions/using-github-hosted-runners/about-github-hosted-runners/about-github-hosted-runners 30 | # See: https://github.com/actions/runner-images/ 31 | runs-on: ubuntu-24.04 32 | 33 | env: 34 | TransformCoordinate_VERSION: "1.1.2" 35 | VCPKGGITCOMMITID: 007aaced1a9d3245e28a2ba9395dca88ea890db1 36 | VCPKG_TARGET_TRIPLET: ${{matrix.VCPKG_TARGET_TRIPLET}} 37 | VCPKG_DEFAULT_TRIPLET: ${{matrix.VCPKG_TARGET_TRIPLET}} 38 | VCPKG_DEFAULT_HOST_TRIPLET: x64-linux 39 | SOURCE_DIR: ${{github.workspace}}/.cache/source 40 | TOOSL_DIR: ${{github.workspace}}/.cache/tools 41 | INSTALL_DIR: ${{github.workspace}}/.cache/install 42 | artifact_name: build_android 43 | ANDROID_PLATFORM: android-35 44 | ANDROID_NATIVE_API_LEVEL: 35 45 | ANDROID_ABI: ${{matrix.ANDROID_ABI}} 46 | qt_modules: 'qtscxml' 47 | 48 | # Map the job outputs to step outputs 49 | outputs: 50 | name: ${{ env.artifact_name }} 51 | 52 | steps: 53 | - name: Checkout Repository 54 | uses: actions/checkout@v3 55 | with: 56 | submodules: recursive 57 | 58 | - name: make directory 59 | run: | 60 | cmake -E make_directory ${{env.SOURCE_DIR}} 61 | cmake -E make_directory ${{env.TOOSL_DIR}} 62 | cmake -E make_directory ${{env.INSTALL_DIR}} 63 | cmake -E make_directory ${{github.workspace}}/build 64 | 65 | - name: Cache installed 66 | uses: actions/cache@v2 67 | id: cache-installed 68 | with: 69 | path: | 70 | ${{env.INSTALL_DIR}} 71 | key: install_android_qt${{matrix.qt_version}}_${{matrix.qt_arch}}_${{matrix.BUILD_TYPE}} 72 | 73 | - name: run-vcpkg 74 | uses: lukka/run-vcpkg@v11 75 | with: 76 | vcpkgGitCommitId: ${{env.VCPKGGITCOMMITID}} 77 | vcpkgDirectory: ${{env.SOURCE_DIR}}/vcpkg 78 | 79 | - name: Install Qt of gcc_64 80 | uses: jurplel/install-qt-action@v3 81 | with: 82 | dir: '${{env.TOOSL_DIR}}' # optional 83 | version: '${{matrix.qt_version}}' 84 | #host: 'linux' 85 | target: 'desktop' 86 | arch: 'linux_gcc_64' 87 | set-env: false 88 | cache: true 89 | cache-key-prefix: cached_qt 90 | 91 | - name: Install Qt of android 92 | uses: jurplel/install-qt-action@v3 93 | with: 94 | # Directory to install Qt 95 | dir: '${{env.TOOSL_DIR}}' # optional 96 | # Version of Qt to install 97 | version: '${{matrix.qt_version}}' 98 | # Host platform 99 | #host: linux # optional 100 | # Target platform for build 101 | target: 'android' # optional, default is desktop 102 | # Architecture for Windows/Android 103 | arch: '${{matrix.qt_arch}}' # optional 104 | # Additional Qt modules to install 105 | modules: '${{env.qt_modules}}' # optional. See: https://ddalcino.github.io/aqt-list-server/ 106 | # Whether or not to actually download Qt 107 | cache: true 108 | cache-key-prefix: cached_qt 109 | 110 | - name: run vcpkg 111 | uses: lukka/run-vcpkg@v11 112 | with: 113 | # Indicates whether to only setup vcpkg (i.e. installing it and setting the environment variables VCPKG_ROOT, RUNVCPK_VCPKG_ROOT), without installing any port. 114 | #setupOnly: # optional 115 | #vcpkgGitURL: https://github.com/KangLin/vcpkg.git 116 | vcpkgGitCommitId: ${{env.VCPKGGITCOMMITID}} 117 | vcpkgDirectory: ${{ runner.workspace }}/vcpkg/ 118 | 119 | - name: git clone RabbitCommon 120 | working-directory: ${{env.SOURCE_DIR}} 121 | run: | 122 | git clone https://github.com/KangLin/RabbitCommon.git 123 | 124 | - name: build TransformCoordinate 125 | working-directory: ${{github.workspace}}/build 126 | env: 127 | RabbitCommon_DIR: ${{env.SOURCE_DIR}}/RabbitCommon 128 | QT_ANDROID_KEYSTORE_PATH: ${{env.SOURCE_DIR}}/RabbitCommon/RabbitCommon.keystore 129 | QT_ANDROID_KEYSTORE_ALIAS: rabbitcommon 130 | QT_ANDROID_KEYSTORE_STORE_PASS: ${{secrets.STOREPASS}} 131 | run: | 132 | sudo chmod 777 ${Qt6_DIR}/bin/qt-cmake 133 | ${Qt6_DIR}/bin/qt-cmake .. \ 134 | -DCMARK_SHARED=OFF \ 135 | -DCMARK_TESTS=OFF \ 136 | -DCMARK_STATIC=ON \ 137 | -DCMAKE_BUILD_TYPE=${{matrix.BUILD_TYPE}} \ 138 | -DCMAKE_AUTOGEN_VERBOSE=ON \ 139 | -DQT_CHAINLOAD_TOOLCHAIN_FILE=${{env.VCPKG_ROOT}}/scripts/buildsystems/vcpkg.cmake \ 140 | -DVCPKG_CHAINLOAD_TOOLCHAIN_FILE=${ANDROID_NDK_HOME}/build/cmake/android.toolchain.cmake \ 141 | -DVCPKG_TARGET_TRIPLET=${{env.VCPKG_TARGET_TRIPLET}} \ 142 | -DX_VCPKG_APPLOCAL_DEPS_INSTALL=ON \ 143 | -DVCPKG_APPLOCAL_DEPS=ON \ 144 | -DVCPKG_VERBOSE=ON \ 145 | -DRABBIT_ENABLE_INSTALL_QT=ON \ 146 | -DRABBIT_ENABLE_INSTALL_TO_BUILD_PATH=ON \ 147 | -DQT_HOST_PATH=${Qt6_DIR}/../gcc_64 \ 148 | -DQT_ANDROID_SIGN_APK=ON \ 149 | -DQT_ENABLE_VERBOSE_DEPLOYMENT=ON \ 150 | -DVCPKG_TRACE_FIND_PACKAGE=ON \ 151 | -DQt6LinguistTools_DIR=${Qt6_DIR}/../gcc_64/lib/cmake/Qt6LinguistTools \ 152 | -DCMAKE_INSTALL_PREFIX=`pwd`/install 153 | cmake --build . --verbose --config ${{matrix.BUILD_TYPE}} --target all 154 | APK_FILE=`find . -name "android-*.apk"` 155 | echo "cp $APK_FILE ..." 156 | cp $APK_FILE TransformCoordinate_${{env.TransformCoordinate_VERSION}}_${{matrix.qt_arch}}_qt${{matrix.qt_version}}_${{matrix.BUILD_TYPE}}.apk 157 | echo "Developer library..." 158 | cmake --build . --verbose --config ${{matrix.BUILD_TYPE}} --target install 159 | 7z a TransformCoordinate_${{env.TransformCoordinate_VERSION}}_${{matrix.qt_arch}}_qt${{matrix.qt_version}}_${{matrix.BUILD_TYPE}}.zip install/* 160 | 161 | - name: Update artifact 162 | if: ${{ matrix.BUILD_TYPE == 'Release' }} 163 | uses: actions/upload-artifact@v4 164 | with: 165 | name: ${{ env.artifact_name }}_${{matrix.qt_version}}_${{matrix.qt_arch}} 166 | path: | 167 | ${{github.workspace}}/build/TransformCoordinate_${{env.TransformCoordinate_VERSION}}_${{matrix.qt_arch}}_qt${{matrix.qt_version}}_${{matrix.BUILD_TYPE}}.apk 168 | ${{github.workspace}}/build/TransformCoordinate_${{env.TransformCoordinate_VERSION}}_${{matrix.qt_arch}}_qt${{matrix.qt_version}}_${{matrix.BUILD_TYPE}}.zip 169 | -------------------------------------------------------------------------------- /.github/workflows/build.yml: -------------------------------------------------------------------------------- 1 | # 作者:康林 2 | 3 | name: build 4 | 5 | env: 6 | artifact_path: artifact_path 7 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 8 | TransformCoordinate_VERSION: "v1.1.2" 9 | 10 | on: 11 | push: 12 | pull_request: 13 | 14 | jobs: 15 | ubuntu: 16 | uses: ./.github/workflows/ubuntu.yml 17 | 18 | msvc: 19 | uses: ./.github/workflows/msvc.yml 20 | 21 | mingw: 22 | if: true 23 | uses: ./.github/workflows/mingw.yml 24 | 25 | macos: 26 | uses: ./.github/workflows/macos.yml 27 | 28 | android: 29 | uses: ./.github/workflows/android.yml 30 | secrets: inherit 31 | 32 | doxygen: 33 | uses: ./.github/workflows/doxygen.yml 34 | if: false 35 | secrets: inherit 36 | 37 | deploy: 38 | if: ${{ startsWith(github.ref, 'refs/tags/') }} 39 | runs-on: ubuntu-latest 40 | needs: [ubuntu, msvc, macos, android] 41 | steps: 42 | - name: Checkout Repository 43 | uses: actions/checkout@v3 44 | with: 45 | submodules: false 46 | 47 | # - name: Download all artifact 48 | # uses: actions/download-artifact@v4 49 | # with: 50 | # path: ${{ env.artifact_path }} 51 | 52 | - name: Download ubuntu 53 | uses: actions/download-artifact@v4 54 | with: 55 | name: ${{ needs.ubuntu.outputs.name }} 56 | path: ${{ env.artifact_path }} 57 | merge-multiple: true 58 | 59 | - name: Download msvc 60 | uses: actions/download-artifact@v4 61 | with: 62 | pattern: ${{ needs.msvc.outputs.name }}* 63 | path: ${{ env.artifact_path }} 64 | merge-multiple: true 65 | 66 | - name: Download mingw 67 | uses: actions/download-artifact@v4 68 | with: 69 | name: ${{ needs.mingw.outputs.name }} 70 | path: ${{ env.artifact_path }} 71 | merge-multiple: true 72 | 73 | - name: Download macos 74 | uses: actions/download-artifact@v4 75 | with: 76 | pattern: ${{ needs.macos.outputs.name }}* 77 | path: ${{ env.artifact_path }} 78 | merge-multiple: true 79 | 80 | - name: Download android 81 | uses: actions/download-artifact@v4 82 | with: 83 | pattern: ${{ needs.android.outputs.name }}* 84 | path: ${{ env.artifact_path }} 85 | merge-multiple: true 86 | 87 | - name: Download doxygen 88 | uses: actions/download-artifact@v4 89 | with: 90 | name: ${{ needs.doxygen.outputs.name }} 91 | path: ${{ env.artifact_path }} 92 | merge-multiple: true 93 | 94 | - name: Process configure file 95 | run: | 96 | git clone https://github.com/KangLin/RabbitCommon.git 97 | ./RabbitCommon/Install/MergeJsonFile.sh \ 98 | "${{ github.workspace }}/update.json" \ 99 | "${{ env.artifact_path }}" "${{ env.artifact_path }}/version.json" 100 | rm ${{ env.artifact_path }}/*.json 101 | 102 | - name: Make Note.md file 103 | run: | 104 | echo "[:cn: 修改日志](https://github.com/KangLin/TransformCoordinate/blob/${{env.TransformCoordinate_VERSION}}/ChangeLog.md)" > ${{github.workspace}}/Note.md 105 | echo "" >> ${{github.workspace}}/Note.md 106 | echo "文件签名:" >> ${{github.workspace}}/Note.md 107 | cd ${{ env.artifact_path }} 108 | for file in * 109 | do 110 | echo "$file" 111 | if [ -f $file ]; then 112 | if [ "${file##*.}" != "xml" ] && [ "${file##*.}" != "json" ]; then 113 | md5sum $file > $file.md5sum 114 | cat $file.md5sum >> ${{github.workspace}}/Note.md 115 | fi 116 | else 117 | rm -fr $file 118 | fi 119 | done 120 | 121 | - name: Upload To Github Release 122 | if: ${{ startsWith(github.ref, 'refs/tags/') }} 123 | run: | 124 | gh release create ${{ github.ref_name }} --title ${{ github.ref_name }} --notes-file ${{github.workspace}}/Note.md 125 | gh release upload ${{ github.ref_name }} ${{github.workspace}}/${{ env.artifact_path }}/* ${{github.workspace}}/Note.md 126 | -------------------------------------------------------------------------------- /.github/workflows/codespell.yml: -------------------------------------------------------------------------------- 1 | # 作者:康林 2 | 3 | name: Codespell 4 | 5 | on: 6 | push: 7 | pull_request: 8 | 9 | jobs: 10 | codespell: 11 | name: Check for spelling errors 12 | runs-on: ubuntu-latest 13 | steps: 14 | - name: Checkout Repository 15 | uses: actions/checkout@v3 16 | with: 17 | submodules: true 18 | 19 | - uses: codespell-project/actions-codespell@master 20 | with: 21 | check_filenames: true 22 | path: ${{github.workspace}} 23 | skip: "*.lua,codespell.yml,*.ts" 24 | ignore_words_list: "doubleclick,msdos,rabits,eArch,Seletes" 25 | -------------------------------------------------------------------------------- /.github/workflows/doxygen.yml: -------------------------------------------------------------------------------- 1 | # 作者:康林 2 | 3 | name: Doxygen 4 | 5 | on: 6 | workflow_call: 7 | outputs: 8 | name: 9 | description: "The artifact name" 10 | value: ${{ jobs.build_doxygen.outputs.name }} 11 | 12 | env: 13 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 14 | 15 | jobs: 16 | build_doxygen: 17 | runs-on: ubuntu-latest 18 | env: 19 | BUILD_TYPE: Release 20 | SOURCE_DIR: ${{github.workspace}}/.cache/source 21 | TOOSL_DIR: ${{github.workspace}}/.cache/tools 22 | INSTALL_DIR: ${{github.workspace}}/.cache/install_doxygen 23 | DOXYGEN_VERSION: 1.9.5 24 | TransformCoordinate_VERSION: "v1.1.2" 25 | artifact_name: build_doxygen 26 | 27 | # Map the job outputs to step outputs 28 | outputs: 29 | name: ${{ env.artifact_name }} 30 | 31 | steps: 32 | - name: Checkout Repository 33 | uses: actions/checkout@v3 34 | with: 35 | submodules: true 36 | 37 | - name: make_directory 38 | run: | 39 | cmake -E make_directory ${{env.SOURCE_DIR}} 40 | cmake -E make_directory ${{env.TOOSL_DIR}} 41 | cmake -E make_directory ${{env.INSTALL_DIR}} 42 | cmake -E make_directory ${{github.workspace}}/build 43 | 44 | - name: Cache installed 45 | uses: actions/cache@v2 46 | id: cache-installed 47 | with: 48 | path: | 49 | ${{env.INSTALL_DIR}} 50 | key: doxygen-cache-installed 51 | 52 | - name: install apt packages 53 | run: | 54 | sudo apt install -y -q cmake build-essential graphviz \ 55 | qttools5-dev qttools5-dev-tools qtbase5-dev qtbase5-dev-tools 56 | 57 | - name: Download doxygen 58 | run: | 59 | if [ ! -d ${{env.TOOSL_DIR}}/doxygen-${{env.DOXYGEN_VERSION}} ]; then 60 | cd ${{env.TOOSL_DIR}} 61 | wget https://www.doxygen.nl/files/doxygen-${{env.DOXYGEN_VERSION}}.linux.bin.tar.gz 62 | tar xzf doxygen-${{env.DOXYGEN_VERSION}}.linux.bin.tar.gz 63 | fi 64 | sudo cp ${{env.TOOSL_DIR}}/doxygen-${{env.DOXYGEN_VERSION}}/bin/doxygen /usr/bin/doxygen 65 | 66 | - name: git clone RabbitCommon 67 | working-directory: ${{env.SOURCE_DIR}} 68 | run: | 69 | git clone https://github.com/KangLin/RabbitCommon.git 70 | 71 | - name: build doxygen 72 | working-directory: ${{github.workspace}} 73 | env: 74 | BUILD_DOCS: ON 75 | RabbitCommon_DIR: ${{env.SOURCE_DIR}}/RabbitCommon 76 | run: | 77 | cmake -E make_directory ${{github.workspace}}/build 78 | cd ${{github.workspace}}/build 79 | cmake ${{github.workspace}} \ 80 | -DBUILD_APP:BOOL=OF \ 81 | -DBUILD_ABOUT:BOOL=OFF \ 82 | -DBUILD_ADMINAUTHORISER:BOOL=OFF \ 83 | -DBUILD_UPDATE:BOOL=OFF \ 84 | -DCMARK_SHARED=OFF \ 85 | -DCMARK_TESTS=OFF \ 86 | -DCMARK_STATIC=ON \ 87 | -DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} \ 88 | -DCMAKE_INSTALL_PREFIX=${{github.workspace}}/build/install \ 89 | -DBUILD_DOCS=ON 90 | cmake --build . --target doc_Chinese doc_English 91 | 7z a TransformCoordinate_${{env.TransformCoordinate_VERSION}}_document.zip Doxygen/* 92 | 93 | - name: Update artifact 94 | uses: actions/upload-artifact@v4 95 | with: 96 | name: ${{ env.artifact_name }} 97 | path: | 98 | ${{github.workspace}}/build/TransformCoordinate_${{env.TransformCoordinate_VERSION}}_document.zip 99 | 100 | - name: Deploy to GitHub Pages 101 | if: startsWith(github.ref, 'refs/tags/') 102 | uses: crazy-max/ghaction-github-pages@v2 103 | env: 104 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 105 | with: 106 | target_branch: gh-pages 107 | build_dir: build/Doxygen 108 | -------------------------------------------------------------------------------- /.github/workflows/macos.yml: -------------------------------------------------------------------------------- 1 | # 作者:康林 2 | 3 | name: build_macos 4 | 5 | on: 6 | workflow_call: 7 | outputs: 8 | name: 9 | description: "The artifact name" 10 | value: ${{ jobs.build_macos.outputs.name }} 11 | 12 | env: 13 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 14 | 15 | jobs: 16 | build_macos: 17 | strategy: 18 | matrix: 19 | # Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.) 20 | BUILD_TYPE: [Release, Debug] 21 | qt_version: [6.8.1, 5.15.2, 5.12.12] 22 | qt_arch: [clang_64] 23 | config_arch: [x86_64] 24 | VCPKG_TARGET_TRIPLET: [x64-osx] 25 | include: 26 | - qt_version: 6.8.1 27 | qt_modules: qtscxml 28 | 29 | - qt_version: 5.15.2 30 | 31 | - qt_version: 5.12.12 32 | 33 | # See: https://docs.github.com/zh/actions/using-github-hosted-runners/about-github-hosted-runners/about-github-hosted-runners 34 | # See: https://github.com/actions/runner-images/tree/main 35 | runs-on: macos-13 36 | 37 | env: 38 | TransformCoordinate_VERSION: "1.1.2" 39 | BUILD_TYPE: ${{ matrix.BUILD_TYPE }} 40 | SOURCE_DIR: ${{github.workspace}}/.cache/source 41 | TOOSL_DIR: ${{github.workspace}}/.cache/tools 42 | INSTALL_DIR: ${{github.workspace}}/.cache/install 43 | qt_modules: ${{matrix.qt_modules}} 44 | VCPKGGITCOMMITID: 007aaced1a9d3245e28a2ba9395dca88ea890db1 45 | VCPKG_TARGET_TRIPLET: ${{matrix.VCPKG_TARGET_TRIPLET}} 46 | artifact_name: build_macos 47 | 48 | # Map the job outputs to step outputs 49 | outputs: 50 | name: ${{ env.artifact_name }} 51 | 52 | steps: 53 | - name: Checkout Repository 54 | uses: actions/checkout@v3 55 | with: 56 | submodules: recursive 57 | 58 | - name: Make directories 59 | run: | 60 | cmake -E make_directory ${{env.SOURCE_DIR}} 61 | cmake -E make_directory ${{env.TOOSL_DIR}} 62 | cmake -E make_directory ${{env.INSTALL_DIR}} 63 | cmake -E make_directory ${{github.workspace}}/build 64 | 65 | - name: Cache installed 66 | uses: actions/cache@v3 67 | id: cache-installed 68 | with: 69 | path: | 70 | ${{env.INSTALL_DIR}} 71 | key: install_macos_qt${{matrix.qt_version}}_${{matrix.qt_arch}}_${{matrix.BUILD_TYPE}} 72 | 73 | - name: run vcpkg 74 | uses: lukka/run-vcpkg@v11 75 | with: 76 | vcpkgGitCommitId: ${{env.VCPKGGITCOMMITID}} 77 | vcpkgDirectory: ${{runner.workspace}}/vcpkg/ 78 | 79 | - name: Install Qt 80 | uses: jurplel/install-qt-action@v3 81 | with: 82 | dir: '${{env.TOOSL_DIR}}/qt' # optional 83 | version: '${{matrix.qt_version}}' # optional, default is 5.15.2 84 | arch: '${{matrix.qt_arch}}' # optional 85 | modules: '${{env.qt_modules}}' # optional. See: https://ddalcino.github.io/aqt-list-server/ 86 | cache: true 87 | cache-key-prefix: cached_qt 88 | 89 | - name: git clone RabbitCommon 90 | working-directory: ${{env.SOURCE_DIR}} 91 | run: | 92 | git clone https://github.com/KangLin/RabbitCommon.git 93 | 94 | - name: Build TransformCoordinate 95 | working-directory: ${{github.workspace}}/build 96 | env: 97 | RabbitCommon_DIR: ${{env.SOURCE_DIR}}/RabbitCommon 98 | run: | 99 | cmake ${{github.workspace}} \ 100 | -DCMARK_SHARED=OFF \ 101 | -DCMARK_TESTS=OFF \ 102 | -DCMARK_STATIC=ON \ 103 | -DCMAKE_BUILD_TYPE=${{ matrix.BUILD_TYPE }} \ 104 | -DCMAKE_INSTALL_PREFIX=${{ github.workspace }}/build/install \ 105 | -DCMAKE_PREFIX_PATH=${{env.INSTALL_DIR}}/lib/cmake \ 106 | -DVCPKG_VERBOSE=ON \ 107 | -DX_VCPKG_APPLOCAL_DEPS_INSTALL=ON \ 108 | -DVCPKG_APPLOCAL_DEPS=ON \ 109 | -DINSTALL_QT=ON \ 110 | -DCMAKE_TOOLCHAIN_FILE=${{env.VCPKG_ROOT}}/scripts/buildsystems/vcpkg.cmake 111 | cmake --build . --config ${{ matrix.BUILD_TYPE }} --target install 112 | 7z a TransformCoordinate_${{env.TransformCoordinate_VERSION}}_macos_${{matrix.BUILD_TYPE}}.zip ./install/* 113 | cmake --build . --config ${{ matrix.BUILD_TYPE }} --target package 114 | 115 | - name: Update artifact 116 | if: ${{ matrix.BUILD_TYPE == 'Release' && matrix.qt_version == '6.8.1' }} 117 | uses: actions/upload-artifact@v4 118 | with: 119 | name: ${{ env.artifact_name }}_${{matrix.qt_version}}_${{matrix.qt_arch}} 120 | path: | 121 | ${{github.workspace}}/build/transformcoordinate_${{env.TransformCoordinate_VERSION}}_Darwin_x86_64_setup.tar.gz 122 | ${{github.workspace}}/build/transformcoordinate_${{env.TransformCoordinate_VERSION}}_Darwin_x86_64_setup.sh 123 | ${{github.workspace}}/build/TransformCoordinate_${{env.TransformCoordinate_VERSION}}_macos_${{matrix.BUILD_TYPE}}.zip 124 | 125 | # - name: Upload To Github Release 126 | # if: ${{ matrix.BUILD_TYPE == 'Release' && startsWith(github.ref, 'refs/tags/') }} 127 | # uses: softprops/action-gh-release@v1 128 | # env: 129 | # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 130 | # with: 131 | # prerelease: true 132 | # body: | 133 | # [:cn: 修改日志](ChangeLog_zh_CN.md) [:us: Change log](ChangeLog.md) 134 | # files: | 135 | # ${{github.workspace}}/TransformCoordinate_${{env.TransformCoordinate_VERSION}}_amd64.deb 136 | -------------------------------------------------------------------------------- /.github/workflows/mingw.yml: -------------------------------------------------------------------------------- 1 | # 作者:康林 2 | 3 | name: build_mingw 4 | 5 | on: 6 | workflow_call: 7 | outputs: 8 | name: 9 | description: "The artifact name" 10 | value: ${{ jobs.build_mingw.outputs.name }} 11 | 12 | jobs: 13 | build_mingw: 14 | name: build mingw 15 | 16 | strategy: 17 | matrix: 18 | BUILD_TYPE: [Release, Debug] 19 | 20 | defaults: 21 | run: 22 | shell: cmd 23 | 24 | runs-on: windows-latest 25 | 26 | env: 27 | BUILD_TYPE: ${{ matrix.BUILD_TYPE }} 28 | SOURCE_DIR: ${{github.workspace}}\.cache\source 29 | TOOSL_DIR: ${{github.workspace}}\.cache\tools 30 | INSTALL_DIR: ${{github.workspace}}\.cache\install_mingw 31 | TransformCoordinate_VERSION: "1.1.2" 32 | artifact_name: build_mingw 33 | 34 | # Map the job outputs to step outputs 35 | outputs: 36 | name: ${{ env.artifact_name }} 37 | 38 | steps: 39 | - name: Checkout Repository 40 | uses: actions/checkout@v3 41 | with: 42 | submodules: recursive 43 | 44 | - name: Make directories 45 | run: | 46 | cmake -E make_directory ${{env.SOURCE_DIR}} 47 | cmake -E make_directory ${{env.TOOSL_DIR}} 48 | cmake -E make_directory ${{env.INSTALL_DIR}} 49 | cmake -E make_directory ${{github.workspace}}/build 50 | 51 | - name: pacman 52 | # if: steps.cache-pacman.outputs.cache-hit != 'true' 53 | env: 54 | PATH: C:\msys64\usr\bin 55 | run: | 56 | C:\msys64\usr\bin\pacman -Syu --noconfirm 57 | C:\msys64\usr\bin\pacman -S --noconfirm ^ 58 | mingw-w64-x86_64-cmake ^ 59 | mingw-w64-x86_64-make ^ 60 | mingw-w64-x86_64-nsis ^ 61 | mingw-w64-x86_64-gcc ^ 62 | mingw-w64-x86_64-qt6 ^ 63 | mingw-w64-x86_64-cmark ^ 64 | mingw-w64-x86_64-zlib ^ 65 | mingw-w64-x86_64-openssl ^ 66 | git base-devel 67 | 68 | - name: git clone TransformCoordinate 69 | working-directory: ${{env.SOURCE_DIR}} 70 | run: git clone https://github.com/KangLin/TransformCoordinate.git 71 | 72 | - name: Cache installed 73 | uses: actions/cache@v3 74 | id: cache-installed 75 | with: 76 | path: | 77 | ${{env.INSTALL_DIR}} 78 | key: cache-installed-mingw-install 79 | 80 | - name: git clone RabbitCommon 81 | working-directory: ${{env.SOURCE_DIR}} 82 | run: | 83 | git clone https://github.com/KangLin/RabbitCommon.git 84 | 85 | - name: Build TransformCoordinate 86 | working-directory: ${{github.workspace}}/build 87 | env: 88 | RabbitCommon_DIR: ${{env.SOURCE_DIR}}/RabbitCommon 89 | MSYSTEM: MINGW64 90 | PATH: C:\msys64\mingw64\bin;C:\msys64\usr\bin 91 | run: | 92 | cmake .. -G"MinGW Makefiles" ^ 93 | -DCMARK_SHARED=OFF ^ 94 | -DCMARK_TESTS=OFF ^ 95 | -DCMARK_STATIC=ON ^ 96 | -DCMAKE_BUILD_TYPE=${{ matrix.BUILD_TYPE }} ^ 97 | -DCMAKE_INSTALL_PREFIX=%CD%/install ^ 98 | -DCMAKE_PREFIX_PATH=${{env.INSTALL_DIR}}/lib/cmake ^ 99 | -DRABBIT_ENABLE_INSTALL_DEPENDENT=ON ^ 100 | -DRABBIT_ENABLE_INSTALL_QT=OFF ^ 101 | -DRABBIT_ENABLE_INSTALL_TO_BUILD_PATH=OFF ^ 102 | -DBUILD_FREERDP=ON 103 | cmake --build . --config ${{ matrix.BUILD_TYPE }} 104 | 105 | - name: Package 106 | if: ${{ matrix.BUILD_TYPE == 'Release' }} 107 | working-directory: ${{github.workspace}}\build 108 | run: | 109 | cmake --build . --config ${{ matrix.BUILD_TYPE }} --target install 110 | 7z a TransformCoordinate_${{env.TransformCoordinate_VERSION}}_mingw_x64.zip install/* 111 | 112 | - name: Update artifact 113 | if: ${{ matrix.BUILD_TYPE == 'Release' }} 114 | uses: actions/upload-artifact@v4 115 | with: 116 | name: ${{ env.artifact_name }} 117 | path: | 118 | ${{github.workspace}}\build\TransformCoordinate_${{env.TransformCoordinate_VERSION}}_mingw_x64.zip 119 | 120 | -------------------------------------------------------------------------------- /.github/workflows/msvc.yml: -------------------------------------------------------------------------------- 1 | # 作者:康林 2 | 3 | name: build_msvc 4 | 5 | on: 6 | workflow_call: 7 | outputs: 8 | name: 9 | description: "The artifact name" 10 | value: ${{ jobs.build_msvc.outputs.name }} 11 | 12 | jobs: 13 | build_msvc: 14 | 15 | strategy: 16 | matrix: 17 | BUILD_TYPE: [Release, Debug] 18 | qt_version: [6.6.3, 5.15.2, 5.12.12] 19 | include: 20 | - qt_version: 6.6.3 21 | VCPKG_TARGET_TRIPLET: x64-windows 22 | VCPKG_PLATFORM_TOOLSET: v143 23 | qt_arch: win64_msvc2019_64 24 | CMAKE_GENERATOR_PLATFORM: x64 25 | qt_modules: qtscxml 26 | 27 | - qt_version: 5.15.2 28 | VCPKG_TARGET_TRIPLET: x64-windows 29 | VCPKG_PLATFORM_TOOLSET: v143 30 | VCPKG_MANIFEST_DIR: "\\vcpkg\\manifests" 31 | qt_arch: win64_msvc2019_64 32 | CMAKE_GENERATOR_PLATFORM: x64 33 | 34 | - qt_version: 5.12.12 35 | VCPKG_TARGET_TRIPLET: x86-windows 36 | VCPKG_PLATFORM_TOOLSET: v143 37 | VCPKG_MANIFEST_DIR: "\\vcpkg\\manifests" 38 | qt_arch: win32_msvc2017 39 | CMAKE_GENERATOR_PLATFORM: Win32 40 | 41 | # See: https://docs.github.com/zh/actions/using-github-hosted-runners/about-github-hosted-runners/about-github-hosted-runners 42 | # See: https://github.com/actions/runner-images/ 43 | runs-on: windows-latest 44 | 45 | env: 46 | TransformCoordinate_VERSION: "v1.1.2" 47 | SOURCE_DIR: ${{github.workspace}}\.cache\source 48 | TOOSL_DIR: ${{github.workspace}}\.cache\tools 49 | INSTALL_DIR: ${{github.workspace}}\.cache\install 50 | CMAKE_GENERATOR: "Visual Studio 17 2022" 51 | CMAKE_GENERATOR_PLATFORM: ${{matrix.CMAKE_GENERATOR_PLATFORM}} 52 | VCPKGGITCOMMITID: 007aaced1a9d3245e28a2ba9395dca88ea890db1 53 | VCPKG_TARGET_TRIPLET: ${{matrix.VCPKG_TARGET_TRIPLET}} 54 | VCPKG_PLATFORM_TOOLSET: ${{matrix.VCPKG_PLATFORM_TOOLSET}} 55 | VCPKG_MANIFEST_DIR: "${{github.workspace}}${{matrix.VCPKG_MANIFEST_DIR}}" 56 | qt_modules: ${{matrix.qt_modules}} 57 | artifact_name: build_msvc 58 | 59 | # Map the job outputs to step outputs 60 | outputs: 61 | name: ${{ env.artifact_name }} 62 | 63 | defaults: 64 | run: 65 | shell: cmd 66 | 67 | steps: 68 | - name: Checkout Repository 69 | uses: actions/checkout@v3 70 | with: 71 | submodules: recursive 72 | 73 | - name: Make directories 74 | run: | 75 | cmake -E make_directory ${{github.workspace}}/build 76 | cmake -E make_directory ${{env.SOURCE_DIR}} 77 | cmake -E make_directory ${{env.TOOSL_DIR}} 78 | cmake -E make_directory ${{env.INSTALL_DIR}} 79 | 80 | - name: Cache installed 81 | uses: actions/cache@v3 82 | id: cache-installed 83 | with: 84 | path: | 85 | ${{env.INSTALL_DIR}} 86 | key: cache-installed-msvc-${{matrix.qt_arch}} 87 | 88 | - name: run vcpkg 89 | uses: lukka/run-vcpkg@v11 90 | with: 91 | vcpkgGitCommitId: ${{env.VCPKGGITCOMMITID}} 92 | vcpkgDirectory: ${{runner.workspace}}/vcpkg/ 93 | 94 | - name: Install Qt 95 | uses: jurplel/install-qt-action@v3 96 | with: 97 | dir: '${{env.TOOSL_DIR}}/qt' # optional 98 | version: '${{matrix.qt_version}}' # optional, default is 5.15.2 99 | arch: '${{matrix.qt_arch}}' # optional 100 | modules: '${{env.qt_modules}}' # optional. See: https://ddalcino.github.io/aqt-list-server/ 101 | cache: true 102 | cache-key-prefix: cached_qt 103 | 104 | - name: git clone RabbitCommon 105 | working-directory: ${{env.SOURCE_DIR}} 106 | run: | 107 | git clone https://github.com/KangLin/RabbitCommon.git 108 | 109 | - name: Build TransformCoordinate 110 | working-directory: ${{github.workspace}}/build 111 | env: 112 | RabbitCommon_DIR: ${{env.SOURCE_DIR}}/RabbitCommon 113 | run: | 114 | cmake ${{github.workspace}} ^ 115 | -A ${{matrix.CMAKE_GENERATOR_PLATFORM}} ^ 116 | -T ${{matrix.VCPKG_PLATFORM_TOOLSET}} ^ 117 | -DCMARK_SHARED=OFF ^ 118 | -DCMARK_TESTS=OFF ^ 119 | -DCMARK_STATIC=ON ^ 120 | -DCMAKE_BUILD_TYPE=${{ matrix.BUILD_TYPE }} ^ 121 | -DCMAKE_INSTALL_PREFIX=%CD%/install ^ 122 | -DCMAKE_TOOLCHAIN_FILE=${{env.VCPKG_ROOT}}\scripts\buildsystems\vcpkg.cmake ^ 123 | -DVCPKG_MANIFEST_DIR=${{env.VCPKG_MANIFEST_DIR}} ^ 124 | -DVCPKG_VERBOSE=ON ^ 125 | -DX_VCPKG_APPLOCAL_DEPS_INSTALL=ON ^ 126 | -DRABBIT_ENABLE_INSTALL_DEPENDENT=ON ^ 127 | -DRABBIT_ENABLE_INSTALL_QT=ON ^ 128 | -DRABBIT_ENABLE_INSTALL_TO_BUILD_PATH=OFF 129 | cmake --build . --config ${{ matrix.BUILD_TYPE }} 130 | 131 | - name: Package 132 | if: ${{ matrix.BUILD_TYPE == 'Release' }} 133 | working-directory: ${{github.workspace}}\build 134 | run: | 135 | cmake --build . --config ${{ matrix.BUILD_TYPE }} --target install 136 | makensis.exe Install.nsi 137 | copy /Y TransformCoordinate_Setup_${{env.TransformCoordinate_VERSION}}.exe TransformCoordinate_${{env.TransformCoordinate_VERSION}}_${{matrix.qt_arch}}_qt${{matrix.qt_version}}_Setup.exe 138 | 139 | - name: Update configure file 140 | if: ${{ matrix.BUILD_TYPE == 'Release' }} 141 | working-directory: ${{github.workspace}}\build 142 | run: | 143 | install\bin\TransformCoordinateApp.exe ^ 144 | -f "update_${{matrix.qt_arch}}_qt${{matrix.qt_version}}.json" ^ 145 | --foc 1 ^ 146 | -u "https://github.com/KangLin/TransformCoordinate/releases/download/${{env.TransformCoordinate_VERSION}}/TransformCoordinate_${{env.TransformCoordinate_VERSION}}_${{matrix.qt_arch}}_qt${{matrix.qt_version}}_Setup.exe;https://sourceforge.net/projects/TransformCoordinate/files/v${{env.TransformCoordinate_VERSION}}/TransformCoordinate_${{env.TransformCoordinate_VERSION}}_${{matrix.qt_arch}}_qt${{matrix.qt_version}}_Setup.exe" ^ 147 | --pf RabbitRemoteControl_${{env.RabbitRemoteControl_VERSION}}_${{matrix.qt_arch}}_qt${{matrix.qt_version}}_Setup.exe ^ 148 | -m "${{env.RabbitRemoteControl_VERSION}}" 149 | RENAME update_${{matrix.qt_arch}}_qt${{matrix.qt_version}}.json.xml update_windows.xml 150 | 151 | - name: Update artifact 152 | if: ${{ matrix.BUILD_TYPE == 'Release' && matrix.qt_version != '5.15.2' }} 153 | uses: actions/upload-artifact@v4 154 | with: 155 | name: ${{ env.artifact_name }}_${{matrix.qt_version}}_${{matrix.qt_arch}} 156 | path: | 157 | ${{github.workspace}}\build\TransformCoordinate_${{env.TransformCoordinate_VERSION}}_${{matrix.qt_arch}}_qt${{matrix.qt_version}}_Setup.exe 158 | ${{github.workspace}}\build\update_${{matrix.qt_arch}}_qt${{matrix.qt_version}}.json.xml 159 | ${{github.workspace}}\build\update_windows.xml 160 | -------------------------------------------------------------------------------- /.github/workflows/ubuntu.yml: -------------------------------------------------------------------------------- 1 | # 作者:康林 2 | 3 | name: build_ubuntu 4 | 5 | on: 6 | workflow_call: 7 | outputs: 8 | name: 9 | description: "The artifact name" 10 | value: ${{ jobs.build_ubuntu.outputs.name }} 11 | 12 | env: 13 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 14 | 15 | jobs: 16 | build_ubuntu: 17 | strategy: 18 | matrix: 19 | BUILD_TYPE: [Release, Debug] 20 | 21 | runs-on: ubuntu-latest 22 | 23 | env: 24 | BUILD_TYPE: ${{ matrix.BUILD_TYPE }} 25 | SOURCE_DIR: ${{github.workspace}}/.cache/source 26 | TOOSL_DIR: ${{github.workspace}}/.cache/tools 27 | INSTALL_DIR: ${{github.workspace}}/.cache/install_ubuntu 28 | TransformCoordinate_VERSION: "1.1.2" 29 | artifact_name: build_ubuntu 30 | 31 | # Map the job outputs to step outputs 32 | outputs: 33 | name: ${{ env.artifact_name }} 34 | 35 | steps: 36 | - name: Checkout Repository 37 | uses: actions/checkout@v3 38 | with: 39 | submodules: recursive 40 | 41 | - name: Make directories 42 | run: | 43 | cmake -E make_directory ${{env.SOURCE_DIR}} 44 | cmake -E make_directory ${{env.TOOSL_DIR}} 45 | cmake -E make_directory ${{env.INSTALL_DIR}} 46 | cmake -E make_directory ${{github.workspace}}/build 47 | 48 | - name: Install apt packages 49 | run: | 50 | sudo apt update -y 51 | sudo apt upgrade -y 52 | sudo apt install -y -q cmake build-essential xvfb xpra \ 53 | libglu1-mesa-dev libpulse-mainloop-glib0 \ 54 | debhelper fakeroot \ 55 | qt6-tools-dev qt6-tools-dev-tools \ 56 | qt6-base-dev qt6-base-dev-tools qt6-qpa-plugins \ 57 | libqt6svg6-dev qt6-l10n-tools qt6-translations-l10n \ 58 | qt6-scxml-dev qt6-multimedia-dev libqt6serialport6-dev \ 59 | qt6-webengine-dev qt6-webengine-dev-tools \ 60 | libcmark-dev cmark 61 | 62 | - name: git clone RabbitCommon 63 | working-directory: ${{env.SOURCE_DIR}} 64 | run: | 65 | git clone https://github.com/KangLin/RabbitCommon.git 66 | 67 | - name: CPACK 68 | working-directory: ${{github.workspace}}/build 69 | env: 70 | RabbitCommon_DIR: ${{env.SOURCE_DIR}}/RabbitCommon 71 | run: | 72 | cmake ${{github.workspace}} \ 73 | -DCMARK_SHARED=OFF \ 74 | -DCMARK_TESTS=OFF \ 75 | -DCMARK_STATIC=ON \ 76 | -DCMAKE_BUILD_TYPE=${{matrix.BUILD_TYPE}} \ 77 | -DCMAKE_INSTALL_PREFIX=${{github.workspace}}/build/install 78 | cmake --build . --config ${{matrix.BUILD_TYPE}} 79 | cpack -G "DEB;STGZ" 80 | 81 | - name: build_debpackage.sh 82 | working-directory: ${{github.workspace}} 83 | env: 84 | RabbitCommon_DIR: ${{env.SOURCE_DIR}}/RabbitCommon 85 | run: | 86 | ./build_debpackage.sh /usr/lib/`uname -a`-linux-gnu/cmake/Qt6 87 | cp ../transformcoordinate_${{env.TransformCoordinate_VERSION}}_amd64.deb ../transformcoordinate_${{env.TransformCoordinate_VERSION}}_RabbitCommon_amd64.deb 88 | cp ../libtransformcoordinate_${{env.TransformCoordinate_VERSION}}_amd64.deb ../libtransformcoordinate_${{env.TransformCoordinate_VERSION}}_RabbitCommon_amd64.deb 89 | cp ../libtransformcoordinate-dev_${{env.TransformCoordinate_VERSION}}_amd64.deb ../libtransformcoordinate-dev_${{env.TransformCoordinate_VERSION}}_RabbitCommon_amd64.deb 90 | 91 | - name: build_debpackage.sh with RabbitCommon kits 92 | working-directory: ${{github.workspace}} 93 | run: | 94 | git clean -xdf 95 | export RabbitCommon_VERSION=2.3.0 96 | wget https://github.com/KangLin/RabbitCommon/releases/download/v${RabbitCommon_VERSION}/rabbitcommon-dev_${RabbitCommon_VERSION}_amd64.deb 97 | wget https://github.com/KangLin/RabbitCommon/releases/download/v${RabbitCommon_VERSION}/rabbitcommon_${RabbitCommon_VERSION}_amd64.deb 98 | sudo apt install -q -y ./rabbitcommon_${RabbitCommon_VERSION}_amd64.deb \ 99 | ./rabbitcommon-dev_${RabbitCommon_VERSION}_amd64.deb 100 | ./build_debpackage.sh /usr/lib/`uname -a`-linux-gnu/cmake/Qt6 101 | 102 | - name: copy 103 | working-directory: ${{github.workspace}} 104 | run: | 105 | cp ../transformcoordinate_${{env.TransformCoordinate_VERSION}}_RabbitCommon_amd64.deb transformcoordinate_${{env.TransformCoordinate_VERSION}}_RabbitCommon_amd64.deb 106 | cp ../libtransformcoordinate_${{env.TransformCoordinate_VERSION}}_RabbitCommon_amd64.deb libtransformcoordinate_${{env.TransformCoordinate_VERSION}}_RabbitCommon_amd64.deb 107 | cp ../libtransformcoordinate-dev_${{env.TransformCoordinate_VERSION}}_RabbitCommon_amd64.deb libtransformcoordinate-dev_${{env.TransformCoordinate_VERSION}}_RabbitCommon_amd64.deb 108 | cp ../transformcoordinate_${{env.TransformCoordinate_VERSION}}_amd64.deb transformcoordinate_${{env.TransformCoordinate_VERSION}}_amd64.deb 109 | cp ../libtransformcoordinate_${{env.TransformCoordinate_VERSION}}_amd64.deb libtransformcoordinate_${{env.TransformCoordinate_VERSION}}_amd64.deb 110 | cp ../libtransformcoordinate-dev_${{env.TransformCoordinate_VERSION}}_amd64.deb libtransformcoordinate-dev_${{env.TransformCoordinate_VERSION}}_amd64.deb 111 | 112 | - name: Update configure file 113 | if: ${{ matrix.BUILD_TYPE == 'Release' }} 114 | working-directory: ${{github.workspace}} 115 | run: | 116 | sudo Xvfb :99 -ac & 117 | export DISPLAY=:99.0 118 | sudo apt install ./libtransformcoordinate_${{env.TransformCoordinate_VERSION}}_amd64.deb 119 | sudo apt install ./transformcoordinate_${{env.TransformCoordinate_VERSION}}_amd64.deb 120 | MD5=`md5sum transformcoordinate_${{env.TransformCoordinate_VERSION}}_amd64.deb|awk '{print $1}'` 121 | echo "MD5:${MD5}" 122 | ./test/test_linux.sh 123 | /opt/TransformCoordinate/bin/TransformCoordinate.sh \ 124 | -f "${{github.workspace}}/version.json" \ 125 | --md5 ${MD5} \ 126 | -m "${{env.TransformCoordinate_VERSION}}" \ 127 | -u "https://github.com/KangLin/TransformCoordinate/releases/download/v${{env.TransformCoordinate_VERSION}}/transformcoordinate_${{env.TransformCoordinate_VERSION}}_amd64.deb;https://sourceforge.net/projects/TransformCoordinate/files/v${{env.TransformCoordinate_VERSION}}/transformcoordinate_${{env.TransformCoordinate_VERSION}}_amd64.deb" 128 | 129 | - name: Update artifact 130 | if: ${{ matrix.BUILD_TYPE == 'Release' }} 131 | uses: actions/upload-artifact@v4 132 | with: 133 | name: ${{ env.artifact_name }} 134 | path: | 135 | ${{github.workspace}}/transformcoordinate_${{env.TransformCoordinate_VERSION}}_RabbitCommon_amd64.deb 136 | ${{github.workspace}}/libtransformcoordinate_${{env.TransformCoordinate_VERSION}}_RabbitCommon_amd64.deb 137 | ${{github.workspace}}/libtransformcoordinate-dev_${{env.TransformCoordinate_VERSION}}_RabbitCommon_amd64.deb 138 | ${{github.workspace}}/transformcoordinate_${{env.TransformCoordinate_VERSION}}_amd64.deb 139 | ${{github.workspace}}/libtransformcoordinate_${{env.TransformCoordinate_VERSION}}_amd64.deb 140 | ${{github.workspace}}/libtransformcoordinate-dev_${{env.TransformCoordinate_VERSION}}_amd64.deb 141 | ${{github.workspace}}/version.json 142 | 143 | # - name: Upload To Github Release 144 | # if: ${{ matrix.BUILD_TYPE == 'Release' && startsWith(github.ref, 'refs/tags/') }} 145 | # uses: softprops/action-gh-release@v1 146 | # env: 147 | # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 148 | # with: 149 | # prerelease: true 150 | # body: | 151 | # [:cn: 修改日志](ChangeLog_zh_CN.md) [:us: Change log](ChangeLog.md) 152 | # files: | 153 | # ${{github.workspace}}/TransformCoordinate_${{env.TransformCoordinate_VERSION}}_amd64.deb 154 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .debhelper/ 2 | *.substvars 3 | debian/debhelper-build-stamp 4 | debian/libtransformcoordinate 5 | debian/libtransformcoordinate-dev 6 | debian/transformcoordinate 7 | obj*/ 8 | *.log 9 | debian/transformcoordinate/ 10 | debian/files 11 | build/ 12 | build_*/ 13 | build_/ 14 | Makefile.Debug 15 | Makefile.Release 16 | *.bak 17 | *~ 18 | *.autosave 19 | *.qm 20 | *.user 21 | test.xml 22 | .CCodec.h.kate-swp 23 | .kdev4/ 24 | .kdev_include_paths 25 | *.ncb 26 | .metadata/ 27 | *~ 28 | debug/ 29 | bin/ 30 | *.class 31 | .deps/ 32 | Makefile.in 33 | aclocal.m4 34 | config.guess 35 | config.h 36 | config.h.in 37 | config.h.in~ 38 | config.log 39 | config.status 40 | config.sub 41 | configure 42 | depcomp 43 | install-sh 44 | libtool 45 | ltmain.sh 46 | missing 47 | reachmonitor 48 | stamp-h1 49 | .deps/ 50 | Makefile.in 51 | aclocal.m4 52 | config.guess 53 | config.h 54 | config.h.in 55 | config.h.in~ 56 | config.log 57 | config.status 58 | config.sub 59 | configure 60 | depcomp 61 | install-sh 62 | libtool 63 | ltmain.sh 64 | missing 65 | stamp-h1 66 | *.bak 67 | *.bs 68 | *.la 69 | *.lo 70 | *.ft 71 | *.ft.1 72 | *.made 73 | *.o 74 | *.obj 75 | *.old 76 | *.orig 77 | *.out 78 | *.pdb 79 | *.rej 80 | .libs/ 81 | Makefile 82 | *.cdf 83 | *.cache 84 | *.obj 85 | *.ilk 86 | *.resources 87 | *.tlb 88 | *.tli 89 | *.tlh 90 | *.tmp 91 | *.rsp 92 | *.pgc 93 | *.pgd 94 | *.meta 95 | *.tlog 96 | *.manifest 97 | *.res 98 | *.pch 99 | *.exp 100 | *.idb 101 | *.rep 102 | *.xdc 103 | *.pdb 104 | *_manifest.rc 105 | *.bsc 106 | *.sbr 107 | *.opensdf 108 | *.sdf 109 | *.suo 110 | Debug/ 111 | release/ 112 | Release/ 113 | ipch/ 114 | IncludeLocalDatabase.txt 115 | rabbitim.kdev4 116 | *.pro.user.* 117 | Doxygen/ 118 | Doxyfile 119 | android/local.properties 120 | android/gradle.properties 121 | android/gradlew.* 122 | 123 | 124 | # Compiled Object files 125 | *.slo 126 | *.lo 127 | *.o 128 | *.obj 129 | 130 | # Precompiled Headers 131 | *.gch 132 | *.pch 133 | 134 | # Compiled Dynamic libraries 135 | *.so 136 | *.dylib 137 | *.dll 138 | 139 | # Fortran module files 140 | *.mod 141 | 142 | # Compiled Static libraries 143 | *.lai 144 | *.la 145 | *.a 146 | *.lib 147 | 148 | # Executables 149 | *.exe 150 | *.out 151 | *.app 152 | 153 | # Platform Specifics - auto generated files 154 | PlatformSpecifics/Windows/*.rc 155 | 156 | # Visual studio - project files 157 | *.sln 158 | *.suo 159 | *.vcxproj 160 | *.vcxproj.filters 161 | *.vcxproj.user 162 | 163 | # Visual Studio - Build Results 164 | [Dd]ebug/ 165 | [Rr]elease/ 166 | [Mm]in[Ss]ize[Rr]el/ 167 | [Rr]el[Ww]ith[Dd]eb[Ii]nfo/ 168 | 169 | # Visual Studio - Browsing Database File 170 | *.sdf 171 | *.opensdf 172 | 173 | #osx xcode 174 | DerivedData/ 175 | *.DS_Store 176 | *.build 177 | *.xcodeproj 178 | 179 | #CPACK related files 180 | CPackConfig-*.cmake 181 | _CPack_Packages/ 182 | 183 | #packages 184 | *.tar.gz 185 | *.zip 186 | -------------------------------------------------------------------------------- /App/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # 作者:康林 2 | 3 | project(TransformCoordinateApp 4 | DESCRIPTION "Transform coordinate application") 5 | 6 | # 打开 qt 编译工具 7 | SET(CMAKE_AUTOUIC ON) 8 | SET(CMAKE_AUTOMOC ON) 9 | SET(CMAKE_AUTORCC ON) 10 | 11 | # 需要的QT组件 12 | if(NOT DEFINED QT_VERSION_MAJOR) 13 | find_package(QT NAMES Qt6 Qt5 COMPONENTS Core) 14 | endif() 15 | SET(QT_COMPONENTS Core Gui Widgets) 16 | find_package(Qt${QT_VERSION_MAJOR} COMPONENTS ${QT_COMPONENTS}) 17 | message("QT_VERSION:${Qt${QT_VERSION_MAJOR}_VERSION}") 18 | if(Qt${QT_VERSION_MAJOR}_VERSION VERSION_LESS 6.0.0 AND ANDROID) 19 | message(FATAL_ERROR "Qt must great 6.0.0") 20 | endif() 21 | if(Qt${QT_VERSION_MAJOR}_FOUND) 22 | FOREACH(_COMPONENT ${QT_COMPONENTS}) 23 | LIST(APPEND QT_LIBRARIES Qt${QT_VERSION_MAJOR}::${_COMPONENT}) 24 | ENDFOREACH() 25 | endif() 26 | get_filename_component(QT_INSTALL_DIR "${Qt${QT_VERSION_MAJOR}_DIR}/../../.." ABSOLUTE) 27 | 28 | if(NOT RabbitCommon_DIR) 29 | set(RabbitCommon_DIR $ENV{RabbitCommon_DIR}) 30 | if(NOT RabbitCommon_DIR) 31 | set(RabbitCommon_DIR ${CMAKE_SOURCE_DIR}/../RabbitCommon) 32 | endif() 33 | endif() 34 | if(RabbitCommon_DIR AND EXISTS ${RabbitCommon_DIR}/Src) 35 | message("Use RabbitCommon source code") 36 | add_subdirectory(${RabbitCommon_DIR}/Src ${CMAKE_BINARY_DIR}/RabbitCommon) 37 | else() 38 | find_package(RabbitCommon) 39 | if(NOT RabbitCommon_FOUND) 40 | message("RabbitCommon_DIR is not found. Please use one of the following ways to set it:") 41 | message("1. Set RabbitCommon_DIR to the install prefix of RabbitCommon.") 42 | message("2. Set RabbitCommon_DIR to source code root of RabbitCommon.") 43 | message("2.1 Please download the source code of RabbitCommon from https://github.com/KangLin/RabbitCommon") 44 | message(" ag:") 45 | message(" git clone https://github.com/KangLin/RabbitCommon.git") 46 | message("2.2 Then set cmake variable or environment variable RabbitCommon_DIR to download root directory.") 47 | message(" ag:") 48 | message(" cmake -DRabbitCommon_DIR= ") 49 | message(FATAL_ERROR "RabbitCommon_DIR isn't set.") 50 | endif() 51 | endif() 52 | 53 | set(HEAD_FILES 54 | mainwindow.h) 55 | set(SOURCES_FILES 56 | main.cpp 57 | mainwindow.cpp) 58 | set(SOURCE_UI_FILES 59 | mainwindow.ui) 60 | 61 | SET(RCC_FILES 62 | ${TRANSLATIONS_RESOURCE_FILES} 63 | Resource/Resource.qrc 64 | ) 65 | if(WIN32) 66 | SET(RCC_FILES 67 | ${RCC_FILES} 68 | Resource/AppIcon.rc) 69 | endif() 70 | 71 | ADD_TARGET(NAME ${PROJECT_NAME} 72 | ISEXE 73 | ISWINDOWS 74 | VERSION ${TransformCoordinate_VERSION} 75 | SOURCE_FILES ${SOURCES_FILES} ${HEAD_FILES} ${SOURCE_UI_FILES} ${RCC_FILES} 76 | PRIVATE_LIBS ${QT_LIBRARIES} TransformCoordinate RabbitCommon 77 | PRIVATE_DEFINITIONS RABBITCOMMON 78 | TransformCoordinate_REVISION="${TransformCoordinate_REVISION}" 79 | TransformCoordinate_VERSION="${TransformCoordinate_VERSION}" 80 | ) 81 | 82 | INSTALL_FILE(SOURCES ${CMAKE_SOURCE_DIR}/etc/logqt.ini 83 | DESTINATION etc 84 | COMPONENT Application) 85 | 86 | if(UNIX) 87 | INSTALL(FILES ${CMAKE_SOURCE_DIR}/Package/share/applications/org.Rabbit.TransformCoordinate.desktop 88 | DESTINATION "share/applications" 89 | COMPONENT Application) 90 | INSTALL(PROGRAMS ${CMAKE_SOURCE_DIR}/Package/share/applications/TransformCoordinate.sh 91 | DESTINATION "${CMAKE_INSTALL_BINDIR}" 92 | COMPONENT Application) 93 | INSTALL(FILES ${CMAKE_SOURCE_DIR}/App/Resource/icons/rabbit-black/svg/TransformCoordinate.svg 94 | DESTINATION "share/pixmaps" 95 | COMPONENT Application) 96 | endif() 97 | IF(WIN32) 98 | INSTALL(FILES ${CMAKE_SOURCE_DIR}/App/Resource/png/TransformCoordinate.ico 99 | DESTINATION . 100 | COMPONENT Application) 101 | # 替换 Install.nsi 中的 CMAKE_INSTALL_PREFIX 等 102 | configure_file(${CMAKE_SOURCE_DIR}/Install/Install.nsi 103 | ${CMAKE_BINARY_DIR}/Install.nsi @ONLY) 104 | ENDIF() 105 | 106 | # Install other files 107 | set(OTHER_FILES ${CMAKE_SOURCE_DIR}/License.md 108 | ${CMAKE_SOURCE_DIR}/Authors.md 109 | ${CMAKE_SOURCE_DIR}/ChangeLog.md 110 | ${CMAKE_SOURCE_DIR}/Authors_zh_CN.md) 111 | INSTALL_FILE(SOURCES ${OTHER_FILES} 112 | DESTINATION ${CMAKE_INSTALL_DOCDIR} 113 | COMPONENT Application) 114 | 115 | if(NOT RabbitCommon_FOUND AND LINUX) 116 | INSTALL_ICON_THEME(SOURCES ${CMAKE_SOURCE_DIR}/App/Resource/icons 117 | COMPONENT Application 118 | PARAMETERS PATTERN index.theme EXCLUDE 119 | ) 120 | else() 121 | INSTALL_ICON_THEME(SOURCES ${CMAKE_SOURCE_DIR}/App/Resource/icons 122 | COMPONENT Application) 123 | endif() 124 | -------------------------------------------------------------------------------- /App/Resource/AppIcon.rc: -------------------------------------------------------------------------------- 1 | IDI_ICON1 ICON DISCARDABLE "png/TransformCoordinate.ico" 2 | -------------------------------------------------------------------------------- /App/Resource/Resource.qrc: -------------------------------------------------------------------------------- 1 | 2 | 3 | png/TransformCoordinate.png 4 | 5 | 6 | -------------------------------------------------------------------------------- /App/Resource/Translations/TransformCoordinateApp_ar.ts: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | MainWindow 6 | 7 | 8 | Coordinate conversion 9 | 10 | 11 | 12 | 13 | Source coordinate: 14 | 15 | 16 | 17 | 18 | 19 | Latitude: 20 | 21 | 22 | 23 | 24 | 25 | Longitude: 26 | 27 | 28 | 29 | 30 | Destination coordinate: 31 | 32 | 33 | 34 | 35 | 36 | 37 | Conversion 38 | 39 | 40 | 41 | 42 | Transform File 43 | 44 | 45 | 46 | 47 | Source File: 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | Browse 56 | 57 | 58 | 59 | 60 | Destination File: 61 | 62 | 63 | 64 | 65 | Transform files in path 66 | 67 | 68 | 69 | 70 | Source Directory: 71 | 72 | 73 | 74 | 75 | Destination Directory: 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | Help 84 | 85 | 86 | 87 | 88 | Tools 89 | 90 | 91 | 92 | 93 | About(&A) 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | About 102 | 103 | 104 | 105 | 106 | Update(&U) 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | Update 115 | 116 | 117 | 118 | 119 | Exit 120 | 121 | 122 | 123 | 124 | Convert fail 125 | 126 | 127 | 128 | 129 | GPX file(*.gpx);;NMea file(*.nmea);;ACT file(*.act);;txt(*.txt);;All files(*.*) 130 | 131 | 132 | 133 | 134 | Open source file 135 | 136 | 137 | 138 | 139 | GPX file(*.gpx);; 140 | 141 | 142 | 143 | 144 | KML file(*.kml) 145 | 146 | 147 | 148 | 149 | Open destination file 150 | 151 | 152 | 153 | 154 | 155 | Start transform ...... 156 | 157 | 158 | 159 | 160 | 161 | 162 | 163 | Ready 164 | 165 | 166 | 167 | 168 | Convert fail: 169 | 170 | 171 | 172 | 173 | Convert files fail 174 | 175 | 176 | 177 | 178 | Open source directory 179 | 180 | 181 | 182 | 183 | Open destination directory 184 | 185 | 186 | 187 | 188 | Be transforming 189 | 190 | 191 | 192 | 193 | QObject 194 | 195 | 196 | Transform coordinate 197 | 198 | 199 | 200 | 201 | -------------------------------------------------------------------------------- /App/Resource/Translations/TransformCoordinateApp_ca.ts: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | MainWindow 6 | 7 | 8 | Coordinate conversion 9 | 10 | 11 | 12 | 13 | Source coordinate: 14 | 15 | 16 | 17 | 18 | 19 | Latitude: 20 | 21 | 22 | 23 | 24 | 25 | Longitude: 26 | 27 | 28 | 29 | 30 | Destination coordinate: 31 | 32 | 33 | 34 | 35 | 36 | 37 | Conversion 38 | 39 | 40 | 41 | 42 | Transform File 43 | 44 | 45 | 46 | 47 | Source File: 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | Browse 56 | 57 | 58 | 59 | 60 | Destination File: 61 | 62 | 63 | 64 | 65 | Transform files in path 66 | 67 | 68 | 69 | 70 | Source Directory: 71 | 72 | 73 | 74 | 75 | Destination Directory: 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | Help 84 | 85 | 86 | 87 | 88 | Tools 89 | 90 | 91 | 92 | 93 | About(&A) 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | About 102 | 103 | 104 | 105 | 106 | Update(&U) 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | Update 115 | 116 | 117 | 118 | 119 | Exit 120 | 121 | 122 | 123 | 124 | Convert fail 125 | 126 | 127 | 128 | 129 | GPX file(*.gpx);;NMea file(*.nmea);;ACT file(*.act);;txt(*.txt);;All files(*.*) 130 | 131 | 132 | 133 | 134 | Open source file 135 | 136 | 137 | 138 | 139 | GPX file(*.gpx);; 140 | 141 | 142 | 143 | 144 | KML file(*.kml) 145 | 146 | 147 | 148 | 149 | Open destination file 150 | 151 | 152 | 153 | 154 | 155 | Start transform ...... 156 | 157 | 158 | 159 | 160 | 161 | 162 | 163 | Ready 164 | 165 | 166 | 167 | 168 | Convert fail: 169 | 170 | 171 | 172 | 173 | Convert files fail 174 | 175 | 176 | 177 | 178 | Open source directory 179 | 180 | 181 | 182 | 183 | Open destination directory 184 | 185 | 186 | 187 | 188 | Be transforming 189 | 190 | 191 | 192 | 193 | QObject 194 | 195 | 196 | Transform coordinate 197 | 198 | 199 | 200 | 201 | -------------------------------------------------------------------------------- /App/Resource/Translations/TransformCoordinateApp_cs.ts: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | MainWindow 6 | 7 | 8 | Coordinate conversion 9 | 10 | 11 | 12 | 13 | Source coordinate: 14 | 15 | 16 | 17 | 18 | 19 | Latitude: 20 | 21 | 22 | 23 | 24 | 25 | Longitude: 26 | 27 | 28 | 29 | 30 | Destination coordinate: 31 | 32 | 33 | 34 | 35 | 36 | 37 | Conversion 38 | 39 | 40 | 41 | 42 | Transform File 43 | 44 | 45 | 46 | 47 | Source File: 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | Browse 56 | 57 | 58 | 59 | 60 | Destination File: 61 | 62 | 63 | 64 | 65 | Transform files in path 66 | 67 | 68 | 69 | 70 | Source Directory: 71 | 72 | 73 | 74 | 75 | Destination Directory: 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | Help 84 | 85 | 86 | 87 | 88 | Tools 89 | 90 | 91 | 92 | 93 | About(&A) 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | About 102 | 103 | 104 | 105 | 106 | Update(&U) 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | Update 115 | 116 | 117 | 118 | 119 | Exit 120 | 121 | 122 | 123 | 124 | Convert fail 125 | 126 | 127 | 128 | 129 | GPX file(*.gpx);;NMea file(*.nmea);;ACT file(*.act);;txt(*.txt);;All files(*.*) 130 | 131 | 132 | 133 | 134 | Open source file 135 | 136 | 137 | 138 | 139 | GPX file(*.gpx);; 140 | 141 | 142 | 143 | 144 | KML file(*.kml) 145 | 146 | 147 | 148 | 149 | Open destination file 150 | 151 | 152 | 153 | 154 | 155 | Start transform ...... 156 | 157 | 158 | 159 | 160 | 161 | 162 | 163 | Ready 164 | 165 | 166 | 167 | 168 | Convert fail: 169 | 170 | 171 | 172 | 173 | Convert files fail 174 | 175 | 176 | 177 | 178 | Open source directory 179 | 180 | 181 | 182 | 183 | Open destination directory 184 | 185 | 186 | 187 | 188 | Be transforming 189 | 190 | 191 | 192 | 193 | QObject 194 | 195 | 196 | Transform coordinate 197 | 198 | 199 | 200 | 201 | -------------------------------------------------------------------------------- /App/Resource/Translations/TransformCoordinateApp_da.ts: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | MainWindow 6 | 7 | 8 | Coordinate conversion 9 | 10 | 11 | 12 | 13 | Source coordinate: 14 | 15 | 16 | 17 | 18 | 19 | Latitude: 20 | 21 | 22 | 23 | 24 | 25 | Longitude: 26 | 27 | 28 | 29 | 30 | Destination coordinate: 31 | 32 | 33 | 34 | 35 | 36 | 37 | Conversion 38 | 39 | 40 | 41 | 42 | Transform File 43 | 44 | 45 | 46 | 47 | Source File: 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | Browse 56 | 57 | 58 | 59 | 60 | Destination File: 61 | 62 | 63 | 64 | 65 | Transform files in path 66 | 67 | 68 | 69 | 70 | Source Directory: 71 | 72 | 73 | 74 | 75 | Destination Directory: 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | Help 84 | 85 | 86 | 87 | 88 | Tools 89 | 90 | 91 | 92 | 93 | About(&A) 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | About 102 | 103 | 104 | 105 | 106 | Update(&U) 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | Update 115 | 116 | 117 | 118 | 119 | Exit 120 | 121 | 122 | 123 | 124 | Convert fail 125 | 126 | 127 | 128 | 129 | GPX file(*.gpx);;NMea file(*.nmea);;ACT file(*.act);;txt(*.txt);;All files(*.*) 130 | 131 | 132 | 133 | 134 | Open source file 135 | 136 | 137 | 138 | 139 | GPX file(*.gpx);; 140 | 141 | 142 | 143 | 144 | KML file(*.kml) 145 | 146 | 147 | 148 | 149 | Open destination file 150 | 151 | 152 | 153 | 154 | 155 | Start transform ...... 156 | 157 | 158 | 159 | 160 | 161 | 162 | 163 | Ready 164 | 165 | 166 | 167 | 168 | Convert fail: 169 | 170 | 171 | 172 | 173 | Convert files fail 174 | 175 | 176 | 177 | 178 | Open source directory 179 | 180 | 181 | 182 | 183 | Open destination directory 184 | 185 | 186 | 187 | 188 | Be transforming 189 | 190 | 191 | 192 | 193 | QObject 194 | 195 | 196 | Transform coordinate 197 | 198 | 199 | 200 | 201 | -------------------------------------------------------------------------------- /App/Resource/Translations/TransformCoordinateApp_de.ts: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | MainWindow 6 | 7 | 8 | Coordinate conversion 9 | 10 | 11 | 12 | 13 | Source coordinate: 14 | 15 | 16 | 17 | 18 | 19 | Latitude: 20 | 21 | 22 | 23 | 24 | 25 | Longitude: 26 | 27 | 28 | 29 | 30 | Destination coordinate: 31 | 32 | 33 | 34 | 35 | 36 | 37 | Conversion 38 | 39 | 40 | 41 | 42 | Transform File 43 | 44 | 45 | 46 | 47 | Source File: 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | Browse 56 | 57 | 58 | 59 | 60 | Destination File: 61 | 62 | 63 | 64 | 65 | Transform files in path 66 | 67 | 68 | 69 | 70 | Source Directory: 71 | 72 | 73 | 74 | 75 | Destination Directory: 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | Help 84 | 85 | 86 | 87 | 88 | Tools 89 | 90 | 91 | 92 | 93 | About(&A) 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | About 102 | 103 | 104 | 105 | 106 | Update(&U) 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | Update 115 | 116 | 117 | 118 | 119 | Exit 120 | 121 | 122 | 123 | 124 | Convert fail 125 | 126 | 127 | 128 | 129 | GPX file(*.gpx);;NMea file(*.nmea);;ACT file(*.act);;txt(*.txt);;All files(*.*) 130 | 131 | 132 | 133 | 134 | Open source file 135 | 136 | 137 | 138 | 139 | GPX file(*.gpx);; 140 | 141 | 142 | 143 | 144 | KML file(*.kml) 145 | 146 | 147 | 148 | 149 | Open destination file 150 | 151 | 152 | 153 | 154 | 155 | Start transform ...... 156 | 157 | 158 | 159 | 160 | 161 | 162 | 163 | Ready 164 | 165 | 166 | 167 | 168 | Convert fail: 169 | 170 | 171 | 172 | 173 | Convert files fail 174 | 175 | 176 | 177 | 178 | Open source directory 179 | 180 | 181 | 182 | 183 | Open destination directory 184 | 185 | 186 | 187 | 188 | Be transforming 189 | 190 | 191 | 192 | 193 | QObject 194 | 195 | 196 | Transform coordinate 197 | 198 | 199 | 200 | 201 | -------------------------------------------------------------------------------- /App/Resource/Translations/TransformCoordinateApp_el.ts: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | MainWindow 6 | 7 | 8 | Coordinate conversion 9 | 10 | 11 | 12 | 13 | Source coordinate: 14 | 15 | 16 | 17 | 18 | 19 | Latitude: 20 | 21 | 22 | 23 | 24 | 25 | Longitude: 26 | 27 | 28 | 29 | 30 | Destination coordinate: 31 | 32 | 33 | 34 | 35 | 36 | 37 | Conversion 38 | 39 | 40 | 41 | 42 | Transform File 43 | 44 | 45 | 46 | 47 | Source File: 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | Browse 56 | 57 | 58 | 59 | 60 | Destination File: 61 | 62 | 63 | 64 | 65 | Transform files in path 66 | 67 | 68 | 69 | 70 | Source Directory: 71 | 72 | 73 | 74 | 75 | Destination Directory: 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | Help 84 | 85 | 86 | 87 | 88 | Tools 89 | 90 | 91 | 92 | 93 | About(&A) 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | About 102 | 103 | 104 | 105 | 106 | Update(&U) 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | Update 115 | 116 | 117 | 118 | 119 | Exit 120 | 121 | 122 | 123 | 124 | Convert fail 125 | 126 | 127 | 128 | 129 | GPX file(*.gpx);;NMea file(*.nmea);;ACT file(*.act);;txt(*.txt);;All files(*.*) 130 | 131 | 132 | 133 | 134 | Open source file 135 | 136 | 137 | 138 | 139 | GPX file(*.gpx);; 140 | 141 | 142 | 143 | 144 | KML file(*.kml) 145 | 146 | 147 | 148 | 149 | Open destination file 150 | 151 | 152 | 153 | 154 | 155 | Start transform ...... 156 | 157 | 158 | 159 | 160 | 161 | 162 | 163 | Ready 164 | 165 | 166 | 167 | 168 | Convert fail: 169 | 170 | 171 | 172 | 173 | Convert files fail 174 | 175 | 176 | 177 | 178 | Open source directory 179 | 180 | 181 | 182 | 183 | Open destination directory 184 | 185 | 186 | 187 | 188 | Be transforming 189 | 190 | 191 | 192 | 193 | QObject 194 | 195 | 196 | Transform coordinate 197 | 198 | 199 | 200 | 201 | -------------------------------------------------------------------------------- /App/Resource/Translations/TransformCoordinateApp_en.ts: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | MainWindow 6 | 7 | 8 | Coordinate conversion 9 | 10 | 11 | 12 | 13 | Source coordinate: 14 | 15 | 16 | 17 | 18 | 19 | Latitude: 20 | 21 | 22 | 23 | 24 | 25 | Longitude: 26 | 27 | 28 | 29 | 30 | Destination coordinate: 31 | 32 | 33 | 34 | 35 | 36 | 37 | Conversion 38 | 39 | 40 | 41 | 42 | Transform File 43 | 44 | 45 | 46 | 47 | Source File: 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | Browse 56 | 57 | 58 | 59 | 60 | Destination File: 61 | 62 | 63 | 64 | 65 | Transform files in path 66 | 67 | 68 | 69 | 70 | Source Directory: 71 | 72 | 73 | 74 | 75 | Destination Directory: 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | Help 84 | 85 | 86 | 87 | 88 | Tools 89 | 90 | 91 | 92 | 93 | About(&A) 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | About 102 | 103 | 104 | 105 | 106 | Update(&U) 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | Update 115 | 116 | 117 | 118 | 119 | Exit 120 | 121 | 122 | 123 | 124 | Convert fail 125 | 126 | 127 | 128 | 129 | GPX file(*.gpx);;NMea file(*.nmea);;ACT file(*.act);;txt(*.txt);;All files(*.*) 130 | 131 | 132 | 133 | 134 | Open source file 135 | 136 | 137 | 138 | 139 | GPX file(*.gpx);; 140 | 141 | 142 | 143 | 144 | KML file(*.kml) 145 | 146 | 147 | 148 | 149 | Open destination file 150 | 151 | 152 | 153 | 154 | 155 | Start transform ...... 156 | 157 | 158 | 159 | 160 | 161 | 162 | 163 | Ready 164 | 165 | 166 | 167 | 168 | Convert fail: 169 | 170 | 171 | 172 | 173 | Convert files fail 174 | 175 | 176 | 177 | 178 | Open source directory 179 | 180 | 181 | 182 | 183 | Open destination directory 184 | 185 | 186 | 187 | 188 | Be transforming 189 | 190 | 191 | 192 | 193 | QObject 194 | 195 | 196 | Transform coordinate 197 | 198 | 199 | 200 | 201 | -------------------------------------------------------------------------------- /App/Resource/Translations/TransformCoordinateApp_zh_CN.ts: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | MainWindow 6 | 7 | 8 | Coordinate conversion 9 | 坐标转换 10 | 11 | 12 | 13 | Source coordinate: 14 | 源坐标: 15 | 16 | 17 | 18 | 19 | Latitude: 20 | 纬度: 21 | 22 | 23 | 24 | 25 | Longitude: 26 | 经度: 27 | 28 | 29 | 30 | Destination coordinate: 31 | 目标坐标: 32 | 33 | 34 | 35 | 36 | 37 | Conversion 38 | 转换 39 | 40 | 41 | 42 | Transform File 43 | 转换文件 44 | 45 | 46 | 47 | Source File: 48 | 源文件: 49 | 50 | 51 | 52 | 53 | 54 | 55 | Browse 56 | 浏览 57 | 58 | 59 | 60 | Destination File: 61 | 目标文件: 62 | 63 | 64 | 65 | Transform files in path 66 | 转换文件夹中的文件 67 | 68 | 69 | 70 | Source Directory: 71 | 源目录: 72 | 73 | 74 | 75 | Destination Directory: 76 | 目标目录: 77 | 78 | 79 | 80 | 81 | 82 | 83 | Help 84 | 帮助 85 | 86 | 87 | 88 | Tools 89 | 工具 90 | 91 | 92 | 93 | About(&A) 94 | 关于(&A) 95 | 96 | 97 | 98 | 99 | 100 | 101 | About 102 | 关于 103 | 104 | 105 | 106 | Update(&U) 107 | 更新(&U) 108 | 109 | 110 | 111 | 112 | 113 | 114 | Update 115 | 更新 116 | 117 | 118 | 119 | Exit 120 | 退出 121 | 122 | 123 | 124 | Open source file 125 | 打开源文件 126 | 127 | 128 | 129 | GPX file(*.gpx);;NMea file(*.nmea);;ACT file(*.act);;txt(*.txt);;All files(*.*) 130 | GPX file(*.gpx);;NMea file(*.nmea);;ACT file(*.act);;txt(*.txt);;所有文件(*.*) 131 | 132 | 133 | 134 | Convert fail 135 | 转换失败 136 | 137 | 138 | 139 | GPX file(*.gpx);; 140 | 141 | 142 | 143 | 144 | KML file(*.kml) 145 | KML 文件(*.kml) 146 | 147 | 148 | 149 | Open destination file 150 | 打开目标文件 151 | 152 | 153 | 154 | 155 | Start transform ...... 156 | 开始转换…… 157 | 158 | 159 | 160 | 161 | 162 | 163 | Ready 164 | 预备 165 | 166 | 167 | 168 | Convert fail: 169 | 转换失败: 170 | 171 | 172 | 173 | Convert files fail 174 | 转换文件失败 175 | 176 | 177 | 178 | Open source directory 179 | 打开源目录 180 | 181 | 182 | 183 | Open destination directory 184 | 打开目标目录 185 | 186 | 187 | 188 | Be transforming 189 | 正在转换 190 | 191 | 192 | 193 | QObject 194 | 195 | 196 | Transform coordinate 197 | 坐标转换 198 | 199 | 200 | 201 | -------------------------------------------------------------------------------- /App/Resource/Translations/TransformCoordinateApp_zh_TW.ts: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | MainWindow 6 | 7 | 8 | Coordinate conversion 9 | 坐標轉換 10 | 11 | 12 | 13 | Source coordinate: 14 | 源坐標: 15 | 16 | 17 | 18 | 19 | Latitude: 20 | 緯度: 21 | 22 | 23 | 24 | 25 | Longitude: 26 | 經度: 27 | 28 | 29 | 30 | Destination coordinate: 31 | 目標坐標: 32 | 33 | 34 | 35 | 36 | 37 | Conversion 38 | 轉換 39 | 40 | 41 | 42 | Transform File 43 | 轉換文件 44 | 45 | 46 | 47 | Source File: 48 | 源文件: 49 | 50 | 51 | 52 | 53 | 54 | 55 | Browse 56 | 瀏覽 57 | 58 | 59 | 60 | Destination File: 61 | 目標文件: 62 | 63 | 64 | 65 | Transform files in path 66 | 轉換文件夾中的文件 67 | 68 | 69 | 70 | Source Directory: 71 | 源目錄: 72 | 73 | 74 | 75 | Destination Directory: 76 | 目標目錄: 77 | 78 | 79 | 80 | 81 | 82 | 83 | Help 84 | 幫助 85 | 86 | 87 | 88 | Tools 89 | 工具 90 | 91 | 92 | 93 | About(&A) 94 | 關於(&A) 95 | 96 | 97 | 98 | 99 | 100 | 101 | About 102 | 關於 103 | 104 | 105 | 106 | Update(&U) 107 | 更新(&U) 108 | 109 | 110 | 111 | 112 | 113 | 114 | Update 115 | 更新 116 | 117 | 118 | 119 | Exit 120 | 退出 121 | 122 | 123 | 124 | Open source file 125 | 打開源文件 126 | 127 | 128 | 129 | GPX file(*.gpx);;NMea file(*.nmea);;ACT file(*.act);;txt(*.txt);;All files(*.*) 130 | GPX file(*.gpx);;NMea file(*.nmea);;ACT file(*.act);;txt(*.txt);;所有文件(*.*) 131 | 132 | 133 | 134 | Convert fail 135 | 轉換失敗 136 | 137 | 138 | 139 | GPX file(*.gpx);; 140 | 141 | 142 | 143 | 144 | KML file(*.kml) 145 | KML 文件(*.kml) 146 | 147 | 148 | 149 | Open destination file 150 | 打開目標文件 151 | 152 | 153 | 154 | 155 | Start transform ...... 156 | 開始轉換…… 157 | 158 | 159 | 160 | 161 | 162 | 163 | Ready 164 | 預備 165 | 166 | 167 | 168 | Convert fail: 169 | 轉換失敗: 170 | 171 | 172 | 173 | Convert files fail 174 | 轉換文件失敗 175 | 176 | 177 | 178 | Open source directory 179 | 打開源目錄 180 | 181 | 182 | 183 | Open destination directory 184 | 打開目標目錄 185 | 186 | 187 | 188 | Be transforming 189 | 正在轉換 190 | 191 | 192 | 193 | QObject 194 | 195 | 196 | Transform coordinate 197 | 坐標轉換 198 | 199 | 200 | 201 | -------------------------------------------------------------------------------- /App/Resource/icons/rabbit-black/index.theme: -------------------------------------------------------------------------------- 1 | 2 | [Icon Theme] 3 | Name=black 4 | Comment=black 5 | Inherits=breeze 6 | Directories=svg, png, ico 7 | 8 | [svg] 9 | Size=200 10 | MinSize=16 11 | ManSize=256 12 | Type=Scalable 13 | 14 | [png] 15 | Size=200 16 | MinSize=16 17 | ManSize=256 18 | Type=Scalable 19 | 20 | [ico] 21 | Size=200 22 | MinSize=16 23 | ManSize=256 24 | Type=Scalable 25 | 26 | -------------------------------------------------------------------------------- /App/Resource/icons/rabbit-black/svg/TransformCoordinate.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /App/Resource/icons/rabbit-green/index.theme: -------------------------------------------------------------------------------- 1 | 2 | [Icon Theme] 3 | Name=black 4 | Comment=black 5 | Inherits=breeze 6 | Directories=svg, png, ico 7 | 8 | [svg] 9 | Size=200 10 | MinSize=16 11 | ManSize=256 12 | Type=Scalable 13 | 14 | [png] 15 | Size=200 16 | MinSize=16 17 | ManSize=256 18 | Type=Scalable 19 | 20 | [ico] 21 | Size=200 22 | MinSize=16 23 | ManSize=256 24 | Type=Scalable 25 | 26 | -------------------------------------------------------------------------------- /App/Resource/icons/rabbit-green/svg/TransformCoordinate.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /App/Resource/icons/rabbit-red/index.theme: -------------------------------------------------------------------------------- 1 | 2 | [Icon Theme] 3 | Name=black 4 | Comment=black 5 | Inherits=breeze 6 | Directories=svg, png, ico 7 | 8 | [svg] 9 | Size=200 10 | MinSize=16 11 | ManSize=256 12 | Type=Scalable 13 | 14 | [png] 15 | Size=200 16 | MinSize=16 17 | ManSize=256 18 | Type=Scalable 19 | 20 | [ico] 21 | Size=200 22 | MinSize=16 23 | ManSize=256 24 | Type=Scalable 25 | 26 | -------------------------------------------------------------------------------- /App/Resource/icons/rabbit-red/svg/TransformCoordinate.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /App/Resource/icons/rabbit-white/index.theme: -------------------------------------------------------------------------------- 1 | 2 | [Icon Theme] 3 | Name=black 4 | Comment=black 5 | Inherits=breeze 6 | Directories=svg, png, ico 7 | 8 | [svg] 9 | Size=200 10 | MinSize=16 11 | ManSize=256 12 | Type=Scalable 13 | 14 | [png] 15 | Size=200 16 | MinSize=16 17 | ManSize=256 18 | Type=Scalable 19 | 20 | [ico] 21 | Size=200 22 | MinSize=16 23 | ManSize=256 24 | Type=Scalable 25 | 26 | -------------------------------------------------------------------------------- /App/Resource/icons/rabbit-white/svg/TransformCoordinate.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /App/Resource/png/TransformCoordinate.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KangLin/TransformCoordinate/e401d8d3d8ba74273a77ad5e1cf72388684fa061/App/Resource/png/TransformCoordinate.ico -------------------------------------------------------------------------------- /App/Resource/png/TransformCoordinate.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KangLin/TransformCoordinate/e401d8d3d8ba74273a77ad5e1cf72388684fa061/App/Resource/png/TransformCoordinate.png -------------------------------------------------------------------------------- /App/android/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 18 | 19 | 27 | 28 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | -------------------------------------------------------------------------------- /App/android/res/drawable-hdpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KangLin/TransformCoordinate/e401d8d3d8ba74273a77ad5e1cf72388684fa061/App/android/res/drawable-hdpi/icon.png -------------------------------------------------------------------------------- /App/android/res/drawable-ldpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KangLin/TransformCoordinate/e401d8d3d8ba74273a77ad5e1cf72388684fa061/App/android/res/drawable-ldpi/icon.png -------------------------------------------------------------------------------- /App/android/res/drawable-mdpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/KangLin/TransformCoordinate/e401d8d3d8ba74273a77ad5e1cf72388684fa061/App/android/res/drawable-mdpi/icon.png -------------------------------------------------------------------------------- /App/android/res/values-zh/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 坐标转换 5 | 6 | 7 | -------------------------------------------------------------------------------- /App/android/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Transform coordinate 5 | 6 | 7 | -------------------------------------------------------------------------------- /App/main.cpp: -------------------------------------------------------------------------------- 1 | // 作者:康 林 2 | 3 | #include 4 | #if defined(Q_OS_ANDROID) && QT_VERSION >= QT_VERSION_CHECK(5, 7, 0) && QT_VERSION < QT_VERSION_CHECK(6, 0, 0) 5 | #include 6 | #endif 7 | 8 | #include "mainwindow.h" 9 | #ifdef RABBITCOMMON 10 | #include "RabbitCommonDir.h" 11 | #include "RabbitCommonTools.h" 12 | #include "FrmUpdater.h" 13 | #endif 14 | 15 | int main(int argc, char *argv[]) 16 | { 17 | QApplication a(argc, argv); 18 | a.setApplicationName("TransformCoordinate"); 19 | a.setApplicationVersion(TransformCoordinate_VERSION); 20 | 21 | RabbitCommon::CTools::Instance()->Init(); 22 | QSharedPointer translator = 23 | RabbitCommon::CTools::Instance()->InstallTranslator("TransformCoordinateApp"); 24 | a.setApplicationDisplayName(QObject::tr("Transform coordinate")); 25 | 26 | #ifdef RABBITCOMMON 27 | CFrmUpdater *pUpdate = new CFrmUpdater(); 28 | pUpdate->SetTitle(QImage(":/icon/App")); 29 | if(a.arguments().length() > 1) { 30 | pUpdate->GenerateUpdateJson(); 31 | pUpdate->GenerateUpdateXml(); 32 | return 0; 33 | } 34 | #endif 35 | MainWindow w; 36 | #if defined(Q_OS_ANDROID) 37 | w.showMaximized(); 38 | #else 39 | w.show(); 40 | #endif 41 | 42 | int nRet = a.exec(); 43 | 44 | RabbitCommon::CTools::Instance()->RemoveTranslator(translator); 45 | RabbitCommon::CTools::Instance()->Clean(); 46 | return nRet; 47 | } 48 | -------------------------------------------------------------------------------- /App/mainwindow.h: -------------------------------------------------------------------------------- 1 | // 作者:康 林 2 | 3 | #ifndef MAINWINDOW_H 4 | #define MAINWINDOW_H 5 | 6 | #include 7 | #include 8 | #include 9 | 10 | namespace Ui { 11 | class MainWindow; 12 | } 13 | 14 | class MainWindow : public QMainWindow 15 | { 16 | Q_OBJECT 17 | 18 | public: 19 | explicit MainWindow(QWidget *parent = 0); 20 | ~MainWindow(); 21 | 22 | private slots: 23 | void on_pbConversion_clicked(); 24 | void on_pbBrowsSrcFile_clicked(); 25 | void on_pbBrowsDstFile_clicked(); 26 | void on_pbConversionFile_clicked(); 27 | void on_leSrcFile_textChanged(const QString &text); 28 | void on_pbSrcDir_clicked(); 29 | void on_pbDstDir_clicked(); 30 | void on_pbConversionDir_clicked(); 31 | void on_leSrcDir_textChanged(const QString &text); 32 | void on_actionAbout_A_triggered(); 33 | 34 | void on_actionUpdate_U_triggered(); 35 | 36 | void on_actionExit_triggered(); 37 | 38 | private: 39 | Ui::MainWindow *ui; 40 | 41 | QTranslator m_Translator; 42 | 43 | QLabel m_statusInfo; 44 | int InitStatusBar(); 45 | int SetStatusInfo(QString szText, QColor color = QPalette().color(QPalette::WindowText)); 46 | 47 | // QWidget interface 48 | protected: 49 | virtual void closeEvent(QCloseEvent *event) override; 50 | }; 51 | 52 | #endif // MAINWINDOW_H 53 | -------------------------------------------------------------------------------- /Authors.md: -------------------------------------------------------------------------------- 1 | Authors: 2 | KangLin 3 | 4 | The third project: 5 | 6 | Qt (LGPL v2.1) 7 | http://qt.io/ 8 | -------------------------------------------------------------------------------- /Authors_zh_CN.md: -------------------------------------------------------------------------------- 1 | 作者: 2 | 康林 3 | 4 | 第三方库: 5 | 6 | Qt (LGPL v2.1) 7 | http://qt.io/ 8 | -------------------------------------------------------------------------------- /CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # 作者:康林 2 | 3 | cmake_minimum_required(VERSION 2.8) 4 | 5 | set(CMAKE_VERBOSE_MAKEFILE ON) 6 | set(CMAKE_CXX_STANDARD 11) 7 | set(CMAKE_CXX_STANDARD_REQUIRED ON) 8 | if(CMAKE_VERSION VERSION_LESS "3.7.0") 9 | set(CMAKE_INCLUDE_CURRENT_DIR ON) 10 | endif() 11 | 12 | project(TransformCoordinate) 13 | 14 | # Find Git Version Patch 15 | IF(EXISTS "${CMAKE_SOURCE_DIR}/.git") 16 | if(NOT GIT) 17 | SET(GIT $ENV{GIT}) 18 | endif() 19 | if(NOT GIT) 20 | FIND_PROGRAM(GIT NAMES git git.exe git.cmd) 21 | endif() 22 | IF(GIT) 23 | EXECUTE_PROCESS( 24 | WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} 25 | COMMAND ${GIT} describe --tags 26 | OUTPUT_VARIABLE TransformCoordinate_VERSION OUTPUT_STRIP_TRAILING_WHITESPACE 27 | ) 28 | 29 | EXECUTE_PROCESS( 30 | WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} 31 | COMMAND ${GIT} rev-parse --short HEAD 32 | OUTPUT_VARIABLE TransformCoordinate_REVISION OUTPUT_STRIP_TRAILING_WHITESPACE 33 | ) 34 | 35 | if(NOT TransformCoordinate_VERSION) 36 | SET(TransformCoordinate_VERSION "v1.1.2") 37 | endif() 38 | ENDIF() 39 | ENDIF() 40 | message("TransformCoordinate_VERSION:${TransformCoordinate_VERSION};TransformCoordinate_REVISION:${TransformCoordinate_REVISION}") 41 | if(NOT TransformCoordinate_VERSION) 42 | SET(TransformCoordinate_VERSION "v1.1.2") 43 | endif() 44 | string(REPLACE "v" "" TransformCoordinate_VERSION ${TransformCoordinate_VERSION}) 45 | if(TransformCoordinate_REVISION) 46 | string(REPLACE "v" "" TransformCoordinate_REVISION ${TransformCoordinate_REVISION}) 47 | endif() 48 | 49 | include(CMakePackageConfigHelpers) 50 | include(GNUInstallDirs) 51 | include(GenerateExportHeader) 52 | include(CheckIncludeFile) 53 | include(CheckIncludeFileCXX) 54 | include(CheckFunctionExists) 55 | 56 | CHECK_INCLUDE_FILE_CXX("string" HAVE_STRING_H) 57 | check_include_file("math.h" HAVE_MATH_H) 58 | 59 | check_function_exists("fabs" HAVE_FABS) 60 | check_function_exists("sin" HAVE_SIN) 61 | check_function_exists("cos" HAVE_COS) 62 | 63 | SET(BUILD_SHARED_LIBS ON CACHE BOOL "Build shared libs") 64 | add_compile_options("$<$:/utf-8>") 65 | add_compile_options("$<$:/utf-8>") 66 | 67 | add_subdirectory(Src) 68 | 69 | # Build options 70 | option(BUILD_APP "Set to ON to build applaction" ON) 71 | if(BUILD_APP) 72 | add_subdirectory(App) 73 | endif(BUILD_APP) 74 | 75 | include(Package/CMakeCPack.cmake) 76 | 77 | message("Build app:${BUILD_APP}") 78 | message("Build shared library:${BUILD_SHARED_LIBS}") 79 | message("Build GPXMODEL:${WITH_GPXMODEL}") 80 | -------------------------------------------------------------------------------- /ChangeLog.md: -------------------------------------------------------------------------------- 1 | - v1.1.3 2 | - Android 9.0 及以后版本 3 | - 使用 [RabbitCommon v2.3.1](https://github.com/KangLin/RabbitCommon/releases/tag/v2.3.1) 4 | 5 | - v1.1.2 6 | - 修改作者格式 7 | - 使用 [RabbitCommon v2.2.6](https://github.com/KangLin/RabbitCommon/releases/tag/v2.2.6) 8 | 9 | - v1.1.1 10 | - 修复 debian/rules 并行错误 11 | - 修复 debian/rules in aarch64 12 | - 使用 [RabbitCommon v2.2.5](https://github.com/KangLin/RabbitCommon/releases/tag/v2.2.5) 13 | 14 | - v1.1.0 15 | - 修改 TransformCoordinateFiles 16 | 17 | - v1.0.4 18 | - 修改提示信息 19 | 20 | - v1.0.3 21 | - 重命名图标方案 rabbit-* 22 | - 修改 org.Rabbit.TransformCoordinate.desktop 23 | - 修改版本格式 24 | 25 | - v1.0.2 26 | - debian: 判断系统中是否安装有RabbitCommon开发库,如果有,则安装到系统。如果没 27 | 有,则从源码编译RabbitCommon,并安装到/opt/TransformCoordinate 28 | - 重命名 share/TransformCoordinate.desktop 到 share/org.Rabbit.TransformCoordinate.desktop 29 | 30 | - v1.0.1 31 | - 修改文档 32 | - 修改自动化编译 33 | 34 | - v1.0.0 35 | - 使用 [RabbitCommon v2.2.1](https://github.com/KangLin/RabbitCommon/releases/tag/v2.2.1) 36 | 37 | - v0.0.11 38 | - 修复 Android 错误 39 | - 用 QFileDialog::getExistingDirectory 替换 RabbitCommon::CDir::GetOpenDirectory 40 | 41 | - v0.0.10 42 | + 修改自动编译 43 | - 增加 github actions 44 | + 使用 RabbitCommon V2 45 | + 增加日志菜单 46 | + 增加设置样式菜单 47 | + 使用 CPack 打包 48 | 49 | - v0.0.9 50 | + 修改更新 51 | + 增加 android 签名 52 | 53 | - v0.0.8 54 | + 修改翻译 55 | + 修改自动化编译 56 | + 增加运行库安装 57 | 58 | - v0.0.7 59 | + 修改翻译 60 | + 修改打开文件对话框 61 | + 修改状态栏提示 62 | + 修改 CMAKE_INSTALL_PREFIX 为 android 63 | + 修改翻译和 README 64 | + android 启动 Splash screen 隐藏 65 | 66 | - v0.0.6 67 | + 坐标转换 68 | + 修改翻译 69 | -------------------------------------------------------------------------------- /Install/Install.nsi: -------------------------------------------------------------------------------- 1 | ; Script generated by the HM NIS Edit Script Wizard. 2 | 3 | ; HM NIS Edit Wizard helper defines 4 | !define PRODUCT_NAME "TransformCoordinate" 5 | !define PRODUCT_APP_NAME "TransformCoordinateApp" 6 | !define PRODUCT_VERSION "v1.1.2" 7 | !define PRODUCT_PUBLISHER "KangLin studio" 8 | !define PRODUCT_WEB_SITE "https://github.com/KangLin/${PRODUCT_NAME}" 9 | !define PRODUCT_DIR_REGKEY "Software\Microsoft\Windows\CurrentVersion\App Paths\${PRODUCT_NAME}.exe" 10 | !define PRODUCT_UNINST_KEY "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}" 11 | !define PRODUCT_UNINST_ROOT_KEY "HKCU" 12 | 13 | SetCompressor lzma 14 | 15 | ;InstType "Full" 16 | ;InstType "Lite" 17 | ;InstType "Minimal" 18 | 19 | ; MUI 1.67 compatible ------ 20 | !include "MUI2.nsh" 21 | !include "x64.nsh" 22 | 23 | ; MUI Settings 24 | !define MUI_ABORTWARNING 25 | !define MUI_ICON "@CMAKE_INSTALL_PREFIX@\TransformCoordinate.ico" 26 | !define MUI_UNICON "@CMAKE_INSTALL_PREFIX@\TransformCoordinate.ico" 27 | 28 | ; Language Selection Dialog Settings 29 | !define MUI_LANGDLL_REGISTRY_ROOT "${PRODUCT_UNINST_ROOT_KEY}" 30 | !define MUI_LANGDLL_REGISTRY_KEY "${PRODUCT_UNINST_KEY}" 31 | !define MUI_LANGDLL_REGISTRY_VALUENAME "NSIS:Language" 32 | 33 | ; Welcome page 34 | !insertmacro MUI_PAGE_WELCOME 35 | ; License page 36 | !insertmacro MUI_PAGE_LICENSE "@CMAKE_INSTALL_PREFIX@\share\doc\TransformCoordinate\License.md" 37 | ; Components page 38 | !insertmacro MUI_PAGE_COMPONENTS 39 | ; Directory page 40 | !insertmacro MUI_PAGE_DIRECTORY 41 | ; Instfiles page 42 | !insertmacro MUI_PAGE_INSTFILES 43 | ; Finish page 44 | !define MUI_FINISHPAGE_RUN "$INSTDIR\bin\${PRODUCT_APP_NAME}.exe" 45 | !define MUI_FINISHPAGE_SHOWREADME 46 | !insertmacro MUI_PAGE_FINISH 47 | ; Uninstaller pages 48 | !insertmacro MUI_UNPAGE_INSTFILES 49 | 50 | ; Language files 51 | !insertmacro MUI_LANGUAGE "English" 52 | !insertmacro MUI_LANGUAGE "SimpChinese" 53 | 54 | LangString LANG_PRODUCT_NAME ${LANG_ENGLISH} "TransformCoordinate" 55 | LangString LANG_PRODUCT_NAME ${LANG_SIMPCHINESE} "坐标转换" 56 | 57 | LangString LANG_UNINSTALL_CONFIRM ${LANG_ENGLISH} "Thank you very much! $(^Name) has been successfully removed." 58 | LangString LANG_UNINSTALL_CONFIRM ${LANG_SIMPCHINESE} "非常感谢您的使用! $(^Name) 已成功地从您的计算机中移除。" 59 | 60 | LangString LANG_REMOVE_COMPONENT ${LANG_ENGLISH} "You sure you want to completely remove $ (^ Name), and all of its components?" 61 | LangString LANG_REMOVE_COMPONENT ${LANG_SIMPCHINESE} "你确实要完全移除 $(^Name) ,其及所有的组件?" 62 | 63 | LangString LANG_DIRECTORY_PERMISSION ${LANG_ENGLISH} "Don't directory permission" 64 | LangString LANG_DIRECTORY_PERMISSION ${LANG_SIMPCHINESE} "无目录访问权限" 65 | 66 | ; MUI end ------ 67 | 68 | Name "$(LANG_PRODUCT_NAME) ${PRODUCT_VERSION}" 69 | Caption "$(LANG_PRODUCT_NAME) ${PRODUCT_VERSION}" 70 | OutFile "${PRODUCT_NAME}_Setup_${PRODUCT_VERSION}.exe" 71 | InstallDir "$LOCALAPPDATA\${PRODUCT_NAME}" 72 | ;InstallDirRegKey ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_DIR_REGKEY}" "" 73 | 74 | ShowInstDetails show 75 | ShowUnInstDetails show 76 | RequestExecutionLevel user ;highest 77 | 78 | ; Install vc runtime 79 | Function InstallVC 80 | Push $R0 81 | ClearErrors 82 | ReadRegDword $R0 HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{FF66E9F6-83E7-3A3E-AF14-8DE9A809A6A4}" "Version" 83 | 84 | ; check register 85 | IfErrors 0 VSRedistInstalled 86 | Exec "$INSTDIR\bin\vcredist_x86.exe /q" 87 | StrCpy $R0 "-1" 88 | 89 | VSRedistInstalled: 90 | ;MessageBox MB_OK "Vcredist_x86.exe is installed" 91 | Exch $R0 92 | Delete "$INSTDIR\bin\vcredist_x86.exe" 93 | FunctionEnd 94 | 95 | Function InstallVC64 96 | Push $R0 97 | ClearErrors 98 | ReadRegDword $R0 HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{FF66E9F6-83E7-3A3E-AF14-8DE9A809A6A4}" "Version" 99 | 100 | ; check register 101 | IfErrors 0 VSRedistInstalled 102 | Exec "$INSTDIR\bin\vcredist_x64.exe /q" 103 | StrCpy $R0 "-1" 104 | 105 | VSRedistInstalled: 106 | ;MessageBox MB_OK "Vcredist_x64.exe is installed" 107 | Exch $R0 108 | Delete "$INSTDIR\bin\vcredist_x64.exe" 109 | FunctionEnd 110 | 111 | Function InstallRuntime 112 | IfFileExists "$INSTDIR\bin\vcredist_x64.exe" 0 +2 113 | call InstallVC64 114 | IfFileExists "$INSTDIR\bin\vcredist_x86.exe" 0 +2 115 | call InstallVC 116 | FunctionEnd 117 | 118 | Function DirectoryPermissionErrorBox 119 | StrCpy $1 "${LANG_DIRECTORY_PERMISSION}" 120 | MessageBox MB_ICONSTOP $1 121 | Abort 122 | FunctionEnd 123 | 124 | Var UNINSTALL_PROG 125 | Var OLD_PATH 126 | Function .onInit 127 | !insertmacro MUI_LANGDLL_DISPLAY 128 | ClearErrors 129 | ReadRegStr $UNINSTALL_PROG ${PRODUCT_UNINST_ROOT_KEY} ${PRODUCT_UNINST_KEY} "UninstallString" 130 | IfErrors done 131 | 132 | ;https://blog.csdn.net/u012896330/article/details/55517461 133 | CopyFiles $UNINSTALL_PROG $TEMP 134 | StrCpy $OLD_PATH $UNINSTALL_PROG -10 135 | ExecWait '"$TEMP/uninst.exe" /S _?=$OLD_PATH' $0 136 | DetailPrint "uninst.exe returned $0" 137 | Delete "$TEMP/uninst.exe" 138 | 139 | done: 140 | FunctionEnd 141 | 142 | Section "${PRODUCT_NAME}" SEC01 143 | SetOutPath "$INSTDIR" 144 | IfFileExists "$INSTDIR\*.*" +2 0 145 | call DirectoryPermissionErrorBox 146 | SetOverwrite ifnewer 147 | File /r "install\*" 148 | ;SetShellVarContext all 149 | 150 | ;SetShellVarContext current 151 | call InstallRuntime 152 | SectionEnd 153 | 154 | Section -AdditionalIcons 155 | CreateDirectory "$SMPROGRAMS\${PRODUCT_NAME}" 156 | CreateShortCut "$SMPROGRAMS\${PRODUCT_NAME}\$(LANG_PRODUCT_NAME).lnk" "$INSTDIR\bin\${PRODUCT_APP_NAME}.exe" 157 | CreateShortCut "$SMPROGRAMS\${PRODUCT_NAME}\Uninstall.lnk" "$INSTDIR\uninst.exe" 158 | 159 | WriteIniStr "$INSTDIR\${PRODUCT_NAME}.url" "InternetShortcut" "URL" "${PRODUCT_WEB_SITE}" 160 | CreateShortCut "$SMPROGRAMS\${PRODUCT_NAME}\Website.lnk" "$INSTDIR\${PRODUCT_NAME}.url" 161 | 162 | CreateShortCut "$DESKTOP\$(LANG_PRODUCT_NAME).lnk" "$INSTDIR\bin\${PRODUCT_APP_NAME}.exe" 163 | SectionEnd 164 | 165 | Section -Post 166 | WriteUninstaller "$INSTDIR\uninst.exe" 167 | 168 | WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_DIR_REGKEY}" "" "$INSTDIR\bin\${PRODUCT_APP_NAME}.exe" 169 | WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_DIR_REGKEY}" "Path" "$INSTDIR\" 170 | WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayName" "$(^Name)" 171 | WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "UninstallString" "$INSTDIR\uninst.exe" 172 | WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayIcon" "$INSTDIR\bin\${PRODUCT_APP_NAME}.exe" 173 | WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayVersion" "${PRODUCT_VERSION}" 174 | WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "URLInfoAbout" "${PRODUCT_WEB_SITE}" 175 | WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "Publisher" "${PRODUCT_PUBLISHER}" 176 | SectionEnd 177 | 178 | ; Section descriptions 179 | !insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN 180 | !insertmacro MUI_DESCRIPTION_TEXT ${SEC01} "$(LANG_PRODUCT_NAME)" 181 | !insertmacro MUI_FUNCTION_DESCRIPTION_END 182 | 183 | Function un.onUninstSuccess 184 | ;HideWindow 185 | MessageBox MB_ICONINFORMATION|MB_OK "$(LANG_UNINSTALL_CONFIRM)" 186 | FunctionEnd 187 | 188 | Function un.onInit 189 | !insertmacro MUI_UNGETLANGUAGE 190 | MessageBox MB_ICONQUESTION|MB_YESNO|MB_DEFBUTTON2 "$(LANG_REMOVE_COMPONENT)" IDYES +2 191 | Abort 192 | FunctionEnd 193 | 194 | Section Uninstall 195 | ;SetShellVarContext all 196 | RMDir /r "$SMPROGRAMS\${PRODUCT_NAME}" 197 | SetOutPath "$SMPROGRAMS" 198 | Delete "$DESKTOP\$(LANG_PRODUCT_NAME).lnk" 199 | RMDIR /r "$INSTDIR" 200 | ;SetShellVarContext current 201 | 202 | DeleteRegKey ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" 203 | ;DeleteRegKey HKLM "${PRODUCT_DIR_REGKEY}" 204 | DeleteRegKey ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_DIR_REGKEY}" 205 | 206 | ;SendMessage ${HWND_BROADCAST} ${WM_WININICHANGE} 0 "STR:Environment" 207 | ;SetAutoClose true 208 | SectionEnd 209 | -------------------------------------------------------------------------------- /Install/install.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Use to install appimage in linux 4 | # $1: install or remove 5 | # $2: run 6 | 7 | case "$1" in 8 | remove) 9 | echo "remove ..." 10 | rm -f /usr/share/applications/TransformCoordinate.desktop 11 | rm -f ~/.config/autostart/TransformCoordinate.desktop 12 | rm -f /usr/share/pixmaps/TransformCoordinate.png 13 | ;; 14 | 15 | install|*) 16 | echo "install ..." 17 | # Install desktop 18 | if [ -f /usr/share/applications/TransformCoordinate.desktop ]; then 19 | rm /usr/share/applications/TransformCoordinate.desktop 20 | fi 21 | ln -s `pwd`/share/applications/TransformCoordinate.desktop /usr/share/applications/TransformCoordinate.desktop 22 | 23 | # Install auto run on boot 24 | if [ ! -d ~/.config/autostart ]; then 25 | mkdir -p ~/.config/autostart 26 | chmod a+wr ~/.config/autostart 27 | fi 28 | if [ -f ~/.config/autostart/TransformCoordinate.desktop ]; then 29 | rm ~/.config/autostart/TransformCoordinate.desktop 30 | fi 31 | ln -s `pwd`/share/applications/TransformCoordinate.desktop ~/.config/autostart/TransformCoordinate.desktop 32 | 33 | # Reset exec to desktop 34 | sed -i "s/Exec=.*//g" `pwd`/share/applications/TransformCoordinate.desktop 35 | echo "Exec=`pwd`/TransformCoordinate-x86_64.AppImage" >> `pwd`/share/applications/TransformCoordinate.desktop 36 | 37 | # Install applications icon 38 | if [ -f /usr/share/pixmaps/TransformCoordinate.png ]; then 39 | rm /usr/share/pixmaps/TransformCoordinate.png 40 | fi 41 | if [ ! -d /usr/share/pixmaps ]; then 42 | mkdir -p /usr/share/pixmaps 43 | fi 44 | ln -s `pwd`/share/pixmaps/TransformCoordinate.png /usr/share/pixmaps/TransformCoordinate.png 45 | 46 | # Whether run after install 47 | if [ "$2" = "run" ]; then 48 | ./TransformCoordinate-x86_64.AppImage 49 | fi 50 | ;; 51 | esac 52 | -------------------------------------------------------------------------------- /Package/CMakeCPackOptions.cmake.in: -------------------------------------------------------------------------------- 1 | # 作者: 康 林 2 | 3 | # 此文件在运行 cmake 时配置,在运行 cpack 时加载。 4 | # 要从 cmake 传递变量到 cpack 中,则需要在此文件中配置。 5 | # 主要作用是把 CMAKE_* 变量传递到 CPACK 中 6 | 7 | if("${CPACK_GENERATOR}" STREQUAL "DEB") 8 | configure_file("@CMAKE_SOURCE_DIR@/Package/deb/postinst.in" 9 | "@CMAKE_BINARY_DIR@/postinst" @ONLY) 10 | configure_file("@CMAKE_SOURCE_DIR@/Package/deb/postrm.in" 11 | "@CMAKE_BINARY_DIR@/postrm" @ONLY) 12 | configure_file("@CMAKE_SOURCE_DIR@/Package/deb/preinst.in" 13 | "@CMAKE_BINARY_DIR@/preinst" @ONLY) 14 | configure_file("@CMAKE_SOURCE_DIR@/Package/deb/prerm.in" 15 | "@CMAKE_BINARY_DIR@/prerm" @ONLY) 16 | endif() 17 | -------------------------------------------------------------------------------- /Package/deb/postinst.in: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # postinst script for TransformCoordinate 3 | # 4 | # see: dh_installdeb(1) 5 | 6 | set -e 7 | 8 | # summary of how this script can be called: 9 | # * `configure' 10 | # * `abort-upgrade' 11 | # * `abort-remove' `in-favour' 12 | # 13 | # * `abort-remove' 14 | # * `abort-deconfigure' `in-favour' 15 | # `removing' 16 | # 17 | # for details, see https://www.debian.org/doc/debian-policy/ or 18 | # the debian-policy package 19 | 20 | 21 | case "$1" in 22 | configure) 23 | if [ ! -f /usr/share/applications/org.Rabbit.TransformCoordinate.desktop ]; then 24 | ln -s @CPACK_PACKAGING_INSTALL_PREFIX@/share/applications/org.Rabbit.TransformCoordinate.desktop /usr/share/applications/org.Rabbit.TransformCoordinate.desktop 25 | fi 26 | if [ ! -f /usr/share/pixmaps/org.Rabbit.TransformCoordinate.svg ]; then 27 | if [ ! -d /usr/share/pixmaps ]; then 28 | mkdir -p /usr/share/pixmaps 29 | fi 30 | ln -s @CPACK_PACKAGING_INSTALL_PREFIX@/share/pixmaps/org.Rabbit.TransformCoordinate.svg /usr/share/pixmaps/org.Rabbit.TransformCoordinate.svg 31 | fi 32 | export QT_VERSION_DIR= 33 | if [ -n "${QT_VERSION_DIR}" ]; then 34 | echo "/opt/qt${QT_VERSION_DIR}/lib" >> /etc/ld.so.conf.d/TransformCoordinate.conf 35 | fi 36 | ldconfig 37 | ;; 38 | 39 | abort-upgrade|abort-remove|abort-deconfigure) 40 | rm -fr /usr/share/applications/org.Rabbit.TransformCoordinate.desktop 41 | rm -fr /etc/ld.so.conf.d/TransformCoordinate.conf 42 | rm -fr /usr/share/pixmaps/org.Rabbit.TransformCoordinate.svg 43 | ;; 44 | 45 | *) 46 | echo "postinst called with unknown argument \`$1'" >&2 47 | exit 1 48 | ;; 49 | esac 50 | 51 | # dh_installdeb will replace this with shell code automatically 52 | # generated by other debhelper scripts. 53 | 54 | #DEBHELPER# 55 | 56 | exit 0 57 | -------------------------------------------------------------------------------- /Package/deb/postrm.in: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # postrm script for TransformCoordinate 3 | # 4 | # see: dh_installdeb(1) 5 | 6 | set -e 7 | 8 | # summary of how this script can be called: 9 | # * `remove' 10 | # * `purge' 11 | # * `upgrade' 12 | # * `failed-upgrade' 13 | # * `abort-install' 14 | # * `abort-install' 15 | # * `abort-upgrade' 16 | # * `disappear' 17 | # 18 | # for details, see https://www.debian.org/doc/debian-policy/ or 19 | # the debian-policy package 20 | 21 | 22 | case "$1" in 23 | purge|remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear) 24 | rm -fr /usr/share/applications/org.Rabbit.TransformCoordinate.desktop 25 | rm -fr /etc/ld.so.conf.d/TransformCoordinate.conf 26 | rm -fr /usr/share/pixmaps/org.Rabbit.TransformCoordinate.svg 27 | ldconfig 28 | ;; 29 | 30 | *) 31 | echo "postrm called with unknown argument \`$1'" >&2 32 | exit 1 33 | ;; 34 | esac 35 | 36 | # dh_installdeb will replace this with shell code automatically 37 | # generated by other debhelper scripts. 38 | 39 | #DEBHELPER# 40 | 41 | exit 0 42 | -------------------------------------------------------------------------------- /Package/deb/preinst.in: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # preinst script for TransformCoordinate 3 | # 4 | # see: dh_installdeb(1) 5 | 6 | set -e 7 | 8 | # summary of how this script can be called: 9 | # * `install' 10 | # * `install' 11 | # * `upgrade' 12 | # * `abort-upgrade' 13 | # for details, see https://www.debian.org/doc/debian-policy/ or 14 | # the debian-policy package 15 | 16 | 17 | case "$1" in 18 | install|upgrade) 19 | export QT_VERSION= 20 | if [ -n "${QT_VERSION}" ]; then 21 | sudo add-apt-repository -y ppa:beineri/opt-qt-${QT_VERSION}-`lsb_release -c|awk '{print $2}'` 22 | sudo apt-get update 23 | fi 24 | ;; 25 | 26 | abort-upgrade) 27 | ;; 28 | 29 | *) 30 | echo "preinst called with unknown argument \`$1'" >&2 31 | exit 1 32 | ;; 33 | esac 34 | 35 | # dh_installdeb will replace this with shell code automatically 36 | # generated by other debhelper scripts. 37 | 38 | #DEBHELPER# 39 | 40 | exit 0 41 | -------------------------------------------------------------------------------- /Package/deb/prerm.in: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # prerm script for TransformCoordinate 3 | # 4 | # see: dh_installdeb(1) 5 | 6 | set -e 7 | 8 | # summary of how this script can be called: 9 | # * `remove' 10 | # * `upgrade' 11 | # * `failed-upgrade' 12 | # * `remove' `in-favour' 13 | # * `deconfigure' `in-favour' 14 | # `removing' 15 | # 16 | # for details, see https://www.debian.org/doc/debian-policy/ or 17 | # the debian-policy package 18 | 19 | 20 | case "$1" in 21 | remove|upgrade|deconfigure) 22 | ;; 23 | 24 | failed-upgrade) 25 | ;; 26 | 27 | *) 28 | echo "prerm called with unknown argument \`$1'" >&2 29 | exit 1 30 | ;; 31 | esac 32 | 33 | # dh_installdeb will replace this with shell code automatically 34 | # generated by other debhelper scripts. 35 | 36 | #DEBHELPER# 37 | 38 | exit 0 39 | -------------------------------------------------------------------------------- /Package/share/applications/TransformCoordinate.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -e 4 | 5 | #获取运行的程序名 6 | PRONAME=`basename $0` 7 | #获取文件运行的当前目录 8 | #current_dir=$(cd "$(dirname "$0")"; pwd) 9 | 10 | cd "$(dirname "$0")"/.. 11 | INSTALL_PATH=`pwd` 12 | echo "INSTALL_PATH:$INSTALL_PATH" 13 | export LD_LIBRARY_PATH=$INSTALL_PATH/bin:$INSTALL_PATH/lib:$INSTALL_PATH/lib/`uname -m`-linux-gnu:$LD_LIBRARY_PATH 14 | echo "LD_LIBRARY_PATH:$LD_LIBRARY_PATH" 15 | $INSTALL_PATH/bin/TransformCoordinateApp $* 16 | -------------------------------------------------------------------------------- /Package/share/applications/org.Rabbit.TransformCoordinate.desktop: -------------------------------------------------------------------------------- 1 | # https://specifications.freedesktop.org/menu-spec/latest/index.html 2 | 3 | # https://specifications.freedesktop.org/desktop-entry-spec/latest/ 4 | [Desktop Entry] 5 | Type=Application 6 | Icon=org.Rabbit.TransformCoordinate 7 | Exec=/opt/TransformCoordinate/bin/TransformCoordinate.sh 8 | Terminal=false 9 | StartupNotify=true 10 | 11 | # https://specifications.freedesktop.org/menu-spec/latest/apa.html 12 | Categories=Utility;Development 13 | 14 | # https://www.freedesktop.org/wiki/Specifications/mime-apps-spec/ 15 | # https://www.freedesktop.org/wiki/Specifications/shared-mime-info-spec/ 16 | MimeType=application/gpx;text/plain; 17 | 18 | Name=TransformCoordinate 19 | GenericName=TransformCoordinate 20 | Comment=TransformCoordinate 21 | Name[zh_CN]=坐标转换 22 | GenericName[zh_CN]=坐标转换 23 | Comment[zh_CN]=坐标转换 24 | 25 | -------------------------------------------------------------------------------- /Src/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # 作者:康 林 2 | 3 | project(TransformCoordinate) 4 | 5 | option(WITH_GPXMODEL "Set to ON to build GpxModel" ON) 6 | if(WITH_GPXMODEL) 7 | add_subdirectory(GpxModel) 8 | endif() 9 | 10 | set(INSTALLHEADER_FILES 11 | TransformCoordinate.h 12 | ) 13 | set(HEAD_FILES 14 | ${INSTALLHEADER_FILES} 15 | ) 16 | set(SOURCE_FILES 17 | TransformCoordinate.cpp) 18 | 19 | add_library(${PROJECT_NAME} 20 | ${SOURCE_FILES} 21 | ${HEAD_FILES} 22 | ) 23 | if(TARGET GpxModel) 24 | target_link_libraries(${PROJECT_NAME} PUBLIC GpxModel) 25 | target_compile_definitions(${PROJECT_NAME} PUBLIC WITH_GPXMODEL) 26 | endif() 27 | target_include_directories(${PROJECT_NAME} PUBLIC 28 | $ 29 | $ 30 | $ 31 | ) 32 | target_compile_options(${PROJECT_NAME} PRIVATE 33 | "$<$:/utf-8>" 34 | "$<$:/utf-8>" 35 | $<$:$, -g -ggdb, -O3>> 36 | ) 37 | target_compile_definitions(${PROJECT_NAME} PRIVATE 38 | $<$: _DEBUG DEBUG>) 39 | if(NOT MINGW) 40 | target_compile_options(${PROJECT_NAME} PRIVATE 41 | $<$:-fPIC> 42 | ) 43 | endif() 44 | 45 | GENERATE_EXPORT_HEADER(${PROJECT_NAME}) 46 | string(TOLOWER ${PROJECT_NAME} LOWER_PROJECT_NAME) 47 | list(APPEND INSTALLHEADER_FILES 48 | ${CMAKE_CURRENT_BINARY_DIR}/${LOWER_PROJECT_NAME}_export.h) 49 | file(COPY ${CMAKE_CURRENT_BINARY_DIR}/${LOWER_PROJECT_NAME}_export.h 50 | DESTINATION ${CMAKE_BINARY_DIR}) 51 | 52 | set_target_properties(${PROJECT_NAME} PROPERTIES 53 | PUBLIC_HEADER "${INSTALLHEADER_FILES}" # Install head files 54 | INSTALL_RPATH "$ORIGIN;$ORIGIN/../lib;$ORIGIN/../lib/${CMAKE_LIBRARY_ARCHITECTURE}" 55 | ) 56 | if(TransformCoordinate_VERSION) 57 | string(REPLACE "v" "" TransformCoordinate_VERSION ${TransformCoordinate_VERSION}) 58 | if(NOT PARA_SOVERSION) 59 | string(FIND ${TransformCoordinate_VERSION} "." _VERSION_MAJOR_POS) 60 | string(SUBSTRING ${TransformCoordinate_VERSION} 0 ${_VERSION_MAJOR_POS} PARA_SOVERSION) 61 | endif() 62 | string(REPLACE "v" "" PARA_SOVERSION ${PARA_SOVERSION}) 63 | set_target_properties(${PROJECT_NAME} PROPERTIES 64 | VERSION ${TransformCoordinate_VERSION} 65 | ) 66 | endif() 67 | if(PARA_SOVERSION) 68 | set_target_properties(${PROJECT_NAME} PROPERTIES 69 | SOVERSION ${PARA_SOVERSION} 70 | ) 71 | endif() 72 | if(WIN32) 73 | set_target_properties(${PROJECT_NAME} PROPERTIES 74 | LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin 75 | ) 76 | else() 77 | set_target_properties(${PROJECT_NAME} PROPERTIES 78 | LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib 79 | ) 80 | endif() 81 | set_target_properties(${PROJECT_NAME} PROPERTIES 82 | RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin 83 | ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib 84 | ) 85 | 86 | # Install target 87 | SET(INSTALL_LIBRARY "${CMAKE_INSTALL_LIBDIR}") 88 | if(WIN32) 89 | SET(INSTALL_LIBRARY "${CMAKE_INSTALL_BINDIR}") 90 | endif() 91 | INSTALL(TARGETS ${PROJECT_NAME} 92 | EXPORT ${PROJECT_NAME}Config 93 | RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" 94 | COMPONENT Runtime 95 | LIBRARY DESTINATION "${INSTALL_LIBRARY}" 96 | COMPONENT Runtime 97 | ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}" 98 | COMPONENT Development 99 | PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/TransformCoordinate 100 | COMPONENT Development 101 | INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} 102 | ) 103 | 104 | export(TARGETS ${PROJECT_NAME} 105 | APPEND FILE ${CMAKE_BINARY_DIR}/${PROJECT_NAME}Config.cmake 106 | ) 107 | # Install cmake configure files 108 | install(EXPORT ${PROJECT_NAME}Config 109 | DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake" 110 | COMPONENT Development 111 | ) 112 | write_basic_package_version_file( 113 | "${CMAKE_BINARY_DIR}/${PROJECT_NAME}ConfigVersion.cmake" 114 | VERSION ${TransformCoordinate_VERSION} 115 | COMPATIBILITY AnyNewerVersion) 116 | install(FILES "${CMAKE_BINARY_DIR}/${PROJECT_NAME}ConfigVersion.cmake" 117 | DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake" 118 | COMPONENT Development) 119 | -------------------------------------------------------------------------------- /Src/GpxModel/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # 作者:康 林 2 | 3 | cmake_minimum_required(VERSION 2.8) 4 | 5 | project(GpxModel) 6 | 7 | set(HEAD_FILES 8 | gpx_model.h 9 | ) 10 | set(SOURCE_FILES 11 | ${SOURCE_FILES} 12 | actfile.cpp 13 | gpx_model.cpp 14 | gpxfile.cpp 15 | nmeafile.cpp 16 | utils.c 17 | uxmlpars.c) 18 | 19 | find_package(LibKML) 20 | if(LIBKML_FOUND) 21 | SET(GpxModel_DEFINITION -DBUILD_LIBKML ${LIBKML_DEFINITIONS}) 22 | SET(GPX_LIBS ${LIBKML_LIBRARIES}) 23 | set(SOURCE_FILES ${SOURCE_FILES} LibKML.cpp) 24 | endif() 25 | 26 | add_library(${PROJECT_NAME} ${SOURCE_FILES} ${HEAD_FILES}) 27 | target_compile_options(${PROJECT_NAME} PRIVATE 28 | "$<$:/utf-8>" 29 | "$<$:/utf-8>" 30 | $<$:$, -g -ggdb, -O3>> 31 | ) 32 | target_compile_definitions(${PROJECT_NAME} PRIVATE 33 | $<$:_DEBUG DEBUG> 34 | ) 35 | if(NOT MINGW) 36 | target_compile_options(${PROJECT_NAME} PRIVATE 37 | $<$:-fPIC> 38 | ) 39 | endif() 40 | if(LIBKML_FOUND) 41 | target_link_libraries(${PROJECT_NAME} PRIVATE ${GPX_LIBS}) 42 | foreach(d ${GpxModel_DEFINITION}) 43 | target_compile_definitions(${PROJECT_NAME} PUBLIC ${d}) 44 | endforeach() 45 | target_include_directories(${PROJECT_NAME} PRIVATE "${LIBKML_INCLUDE_DIRS}") 46 | endif() 47 | target_include_directories(${PROJECT_NAME} PRIVATE ${CMAKE_CURRENT_BINARY_DIR}) 48 | 49 | GENERATE_EXPORT_HEADER(${PROJECT_NAME}) 50 | string(TOLOWER ${PROJECT_NAME} LOWER_PROJECT_NAME) 51 | list(APPEND HEAD_FILES 52 | ${CMAKE_CURRENT_BINARY_DIR}/${LOWER_PROJECT_NAME}_export.h) 53 | file(COPY ${CMAKE_CURRENT_BINARY_DIR}/${LOWER_PROJECT_NAME}_export.h 54 | DESTINATION ${CMAKE_BINARY_DIR}) 55 | 56 | set_target_properties(${PROJECT_NAME} PROPERTIES 57 | PUBLIC_HEADER "${HEAD_FILES}" # Install head files 58 | INSTALL_RPATH "$ORIGIN;$ORIGIN/../lib;$ORIGIN/../lib/${CMAKE_LIBRARY_ARCHITECTURE}" 59 | ) 60 | if(TransformCoordinate_VERSION) 61 | if(NOT WIN32) 62 | string(REPLACE "v" "" TransformCoordinate_VERSION ${TransformCoordinate_VERSION}) 63 | endif() 64 | if(NOT PARA_SOVERSION) 65 | string(FIND ${TransformCoordinate_VERSION} "." _VERSION_MAJOR_POS) 66 | string(SUBSTRING ${TransformCoordinate_VERSION} 0 ${_VERSION_MAJOR_POS} PARA_SOVERSION) 67 | endif() 68 | string(REPLACE "v" "" PARA_SOVERSION ${PARA_SOVERSION}) 69 | set_target_properties(${PROJECT_NAME} PROPERTIES 70 | VERSION ${TransformCoordinate_VERSION} 71 | ) 72 | endif() 73 | if(PARA_SOVERSION) 74 | set_target_properties(${PROJECT_NAME} PROPERTIES 75 | SOVERSION ${PARA_SOVERSION} 76 | ) 77 | endif() 78 | if(WIN32) 79 | set_target_properties(${PROJECT_NAME} PROPERTIES 80 | LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin 81 | ) 82 | else() 83 | set_target_properties(${PROJECT_NAME} PROPERTIES 84 | LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib 85 | ) 86 | endif() 87 | set_target_properties(${PROJECT_NAME} PROPERTIES 88 | RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin 89 | ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib 90 | ) 91 | 92 | # Install target 93 | SET(INSTALL_LIBRARY "${CMAKE_INSTALL_LIBDIR}") 94 | if(WIN32) 95 | SET(INSTALL_LIBRARY "${CMAKE_INSTALL_BINDIR}") 96 | endif() 97 | INSTALL(TARGETS ${PROJECT_NAME} 98 | EXPORT ${PROJECT_NAME}Config 99 | RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" 100 | COMPONENT Runtime 101 | LIBRARY DESTINATION "${INSTALL_LIBRARY}" 102 | COMPONENT Runtime 103 | ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}" 104 | COMPONENT Development 105 | PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/GpxModel 106 | COMPONENT Development 107 | INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} 108 | ) 109 | 110 | export(TARGETS ${PROJECT_NAME} 111 | APPEND FILE ${CMAKE_BINARY_DIR}/${PROJECT_NAME}Config.cmake 112 | ) 113 | # Install cmake configure files 114 | install(EXPORT ${PROJECT_NAME}Config 115 | DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake" 116 | COMPONENT Development 117 | ) 118 | write_basic_package_version_file( 119 | "${CMAKE_BINARY_DIR}/${PROJECT_NAME}ConfigVersion.cmake" 120 | VERSION ${TransformCoordinate_VERSION} 121 | COMPATIBILITY AnyNewerVersion) 122 | install(FILES "${CMAKE_BINARY_DIR}/${PROJECT_NAME}ConfigVersion.cmake" 123 | DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake" 124 | COMPONENT Development) 125 | -------------------------------------------------------------------------------- /Src/GpxModel/GpxModel.pc.in: -------------------------------------------------------------------------------- 1 | prefix=@CMAKE_INSTALL_PREFIX@ 2 | libdir=${prefix}/lib 3 | includedir=${prefix}/include 4 | 5 | Name: @PROJECT_NAME@ 6 | Description: GPX model C++ library 7 | Version: @BUILD_VERSION@ 8 | Libs: -L${libdir} -lGpxModel 9 | Cflags: -I${includedir} 10 | Requires:@LIBKML_LIBS@ 11 | -------------------------------------------------------------------------------- /Src/GpxModel/GpxModelConfig.cmake.in: -------------------------------------------------------------------------------- 1 | # Author: KangLin(kl222@126.com) 2 | 3 | #.rst: 4 | # TransformCoordinate 5 | # -------- 6 | # 7 | # Find TransformCoordinate 8 | # 9 | # Find the TransformCoordinate libraries (asound) 10 | # 11 | # :: 12 | # 13 | # This module defines the following variables: 14 | # GpxModel_FOUND - True if GpxModel libraries are found 15 | # GpxModel_LIBRARIES - Set when GpxModel libraries is found 16 | # GpxModel_INCLUDE_DIRS - where to find GpxModel heard directory. 17 | # GpxModel_DEFINITIONS - Set definitions 18 | # GpxModel_VERSION_STRING - the version of TransformCoordinate found (since CMake 2.8.8) 19 | 20 | set(GpxModel_VERSION_STRING @BUILD_VERSION@) 21 | 22 | find_package(PkgConfig) 23 | if(PKG_CONFIG_FOUND) 24 | pkg_check_modules(GpxModel GpxModel) 25 | if(GpxModel_FOUND) 26 | return() 27 | endif() 28 | endif() 29 | 30 | # Compute and install package configuration and version files 31 | get_filename_component(_dir "${CMAKE_CURRENT_LIST_FILE}" PATH) 32 | get_filename_component(_prefix "${_dir}" ABSOLUTE) 33 | 34 | find_path(GpxModel_INCLUDE_DIR GpxModel.h 35 | HINTS ${_prefix}/include) 36 | find_library(GpxModel_LIBRARY GpxModel 37 | HINTS ${_prefix}/lib) 38 | 39 | find_package_handle_standard_args(GpxModel 40 | REQUIRED_VARS GpxModel_INCLUDE_DIR 41 | GpxModel_LIBRARY 42 | VERSION_VAR GpxModel_VERSION_STRING) 43 | 44 | if(GpxModel_FOUND) 45 | SET(GpxModel_INCLUDE_DIRS ${GpxModel_INCLUDE_DIR}) 46 | SET(GpxModel_LIBRARIES ${GpxModel_LIBRARY}) 47 | endif() 48 | 49 | MARK_AS_ADVANCED(GpxModel_INCLUDE_DIR GpxModel_LIBRARY) 50 | 51 | #find_package(LibKML) 52 | #if(LIBKML_FOUND) 53 | # set(GpxModel_INCLUDE_DIRS ${GpxModel_INCLUDE_DIRS} ${LIBKML_INCLUDE_DIRS}) 54 | # SET(GpxModel_LIBRARIES ${GpxModel_LIBRARIES} ${LIBKML_LIBRARIES}) 55 | # SET(GpxModel_DEFINITIONS -DBUILD_LIBKML) 56 | #endif() 57 | -------------------------------------------------------------------------------- /Src/GpxModel/LibKML.h: -------------------------------------------------------------------------------- 1 | #ifndef LIBKML_H 2 | #define LIBKML_H 3 | 4 | #include "gpx_model.h" 5 | 6 | class CLibKML 7 | { 8 | public: 9 | CLibKML(); 10 | 11 | /** 12 | * @brief Parses a GPX file and fills the GPX model 13 | * @param fp File handler to the opened GPX file 14 | * @param gpxm GPX_model 15 | * @param overwriteMetadata If true the metadata of GPX_model is overwritten 16 | * @return Return code, GPXM_OK on success 17 | */ 18 | static GPX_model::retCode_e load(ifstream* fp, GPX_model* gpxm, bool overwriteMetadata = false); 19 | 20 | /** 21 | * @brief Saves a GPX file representing the GPX model 22 | * @param fp File handler to the opened GPX file 23 | * @param gpxm GPX model to write 24 | * @return Return code, GPXM_OK on success 25 | */ 26 | static GPX_model::retCode_e save(ofstream* fp, const GPX_model* gpxm); 27 | }; 28 | 29 | #endif // LIBKML_H 30 | -------------------------------------------------------------------------------- /Src/GpxModel/actfile.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * Copyright (c) 2014 - 2015 Frederic Bourgeois * 3 | * * 4 | * This program is free software: you can redistribute it and/or modify * 5 | * it under the terms of the GNU General Public License as published by * 6 | * the Free Software Foundation, either version 3 of the License, or * 7 | * (at your option) any later version. * 8 | * * 9 | * This program is distributed in the hope that it will be useful, * 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 12 | * GNU General Public License for more details. * 13 | * * 14 | * You should have received a copy of the GNU General Public License * 15 | * along with This program. If not, see . * 16 | ****************************************************************************/ 17 | 18 | #ifndef _ACTFILE_H_ 19 | #define _ACTFILE_H_ 20 | 21 | #include 22 | #include "gpx_model.h" 23 | 24 | using namespace std; 25 | 26 | /** 27 | * @ingroup GPX_model 28 | * @{ 29 | */ 30 | 31 | /** 32 | * @namespace ACTFile 33 | * 34 | * @brief Functions to load and save ACT files. 35 | * 36 | * This file provides one function to read a ACT file. 37 | * While reading the ACT file a GPX_model structure is filled. 38 | * 39 | * @see http://www.a-rival.de 40 | * 41 | * @author Frederic Bourgeois 42 | * @version 1.1 43 | * @date 30 Jul 2016 44 | */ 45 | namespace ACTFile 46 | { 47 | /** 48 | * @brief Parses a ACT file and fills the GPX model 49 | * @param fp File handler to the opened GPX file 50 | * @param gpxm GPX_model 51 | * @return Return code, GPXM_OK on success 52 | */ 53 | GPX_model::retCode_e load(ifstream* fp, GPX_model* gpxm); 54 | } 55 | 56 | /** @} GPX_model */ 57 | 58 | #endif // _ACTFILE_H_ 59 | -------------------------------------------------------------------------------- /Src/GpxModel/gpxfile.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * Copyright (c) 2014 - 2015 Frederic Bourgeois * 3 | * * 4 | * This program is free software: you can redistribute it and/or modify * 5 | * it under the terms of the GNU General Public License as published by * 6 | * the Free Software Foundation, either version 3 of the License, or * 7 | * (at your option) any later version. * 8 | * * 9 | * This program is distributed in the hope that it will be useful, * 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 12 | * GNU General Public License for more details. * 13 | * * 14 | * You should have received a copy of the GNU General Public License * 15 | * along with This program. If not, see . * 16 | ****************************************************************************/ 17 | 18 | #ifndef _GPXFILE_H_ 19 | #define _GPXFILE_H_ 20 | 21 | #include 22 | #include "gpx_model.h" 23 | 24 | using namespace std; 25 | 26 | /** 27 | * @ingroup GPX_model 28 | * @{ 29 | */ 30 | 31 | /** 32 | * @namespace GPXFile 33 | * 34 | * @brief Functions to load and save GPX files. 35 | * 36 | * This file provides two functions to read and write a GPX file. 37 | * While reading the GPX file a GPX_model structure is filled. 38 | * In the other way a GPX file is written from a GPX_model structure. 39 | * 40 | * @see http://www.topografix.com/gpx.asp 41 | * 42 | * @author Frederic Bourgeois 43 | * @version 1.5 44 | * @date 22 Aug 2016 45 | */ 46 | namespace GPXFile 47 | { 48 | /** 49 | * @brief Parses a GPX file and fills the GPX model 50 | * @param fp File handler to the opened GPX file 51 | * @param gpxm GPX_model 52 | * @param overwriteMetadata If true the metadata of GPX_model is overwritten 53 | * @return Return code, GPXM_OK on success 54 | */ 55 | GPX_model::retCode_e load(ifstream* fp, GPX_model* gpxm, bool overwriteMetadata = false); 56 | 57 | /** 58 | * @brief Saves a GPX file representing the GPX model 59 | * @param fp File handler to the opened GPX file 60 | * @param gpxm GPX model to write 61 | * @return Return code, GPXM_OK on success 62 | */ 63 | GPX_model::retCode_e save(ofstream* fp, const GPX_model* gpxm); 64 | } 65 | 66 | /** @} GPX_model */ 67 | 68 | #endif // _GPXFILE_H_ 69 | -------------------------------------------------------------------------------- /Src/GpxModel/nmeafile.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * Copyright (c) 2014 - 2015 Frederic Bourgeois * 3 | * * 4 | * This program is free software: you can redistribute it and/or modify * 5 | * it under the terms of the GNU General Public License as published by * 6 | * the Free Software Foundation, either version 3 of the License, or * 7 | * (at your option) any later version. * 8 | * * 9 | * This program is distributed in the hope that it will be useful, * 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 12 | * GNU General Public License for more details. * 13 | * * 14 | * You should have received a copy of the GNU General Public License * 15 | * along with This program. If not, see . * 16 | ****************************************************************************/ 17 | 18 | #ifndef _NMEAFILE_H_ 19 | #define _NMEAFILE_H_ 20 | 21 | #include 22 | #include 23 | #include "gpx_model.h" 24 | 25 | using namespace std; 26 | 27 | /** 28 | * @ingroup GPX_model 29 | * @{ 30 | */ 31 | 32 | /** 33 | * @namespace NMEAFile 34 | * 35 | * @brief Functions to load NMEA files. 36 | * 37 | * This file provides a function to read a NMEA file. 38 | * While reading the NMEA file a GPX_model structure is filled. 39 | * 40 | * @see http://www.gpsinformation.org/dale/nmea.htm 41 | * 42 | * @author Frederic Bourgeois 43 | * @version 1.3 44 | * @date 30 Jul 2016 45 | */ 46 | namespace NMEAFile 47 | { 48 | /** 49 | * @brief Parses a NMEA file and fills the GPX model structure 50 | * @param fp File handler to the opened ACT file 51 | * @param gpxm GPX_model 52 | * @param name Name of the NMEA file without extension 53 | * @return Return code, GPXM_OK on success 54 | */ 55 | GPX_model::retCode_e load(ifstream* fp, GPX_model* gpxm, const string& name = ""); 56 | } 57 | 58 | /** @} GPX_model */ 59 | 60 | #endif // _NMEAFILE_H_ 61 | -------------------------------------------------------------------------------- /Src/GpxModel/utils.c: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * Copyright (c) 2014 - 2016 Frederic Bourgeois * 3 | * * 4 | * This program is free software: you can redistribute it and/or modify * 5 | * it under the terms of the GNU General Public License as published by * 6 | * the Free Software Foundation, either version 3 of the License, or * 7 | * (at your option) any later version. * 8 | * * 9 | * This program is distributed in the hope that it will be useful, * 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 12 | * GNU General Public License for more details. * 13 | * * 14 | * You should have received a copy of the GNU General Public License * 15 | * along with This program. If not, see . * 16 | ****************************************************************************/ 17 | 18 | #include 19 | #include 20 | #include 21 | #include "utils.h" 22 | 23 | void UTILS_setenv(const char *name, const char *value) 24 | { 25 | #ifdef WIN32 26 | char str[128]; 27 | sprintf_s(str, 128, "%s=%s", name, value); 28 | _putenv(str); 29 | #else 30 | setenv(name, value, 1); 31 | #endif 32 | } 33 | 34 | void UTILS_unsetenv(const char *name) 35 | { 36 | #ifdef WIN32 37 | char str[128]; 38 | sprintf_s(str, 128, "%s=", name); 39 | _putenv(str); 40 | #else 41 | unsetenv(name); 42 | #endif 43 | } 44 | 45 | double UTILS_atof(const char *str) 46 | { 47 | double val; 48 | setlocale(LC_NUMERIC, "C"); 49 | val = atof(str); 50 | setlocale(LC_NUMERIC, ""); 51 | return val; 52 | } 53 | -------------------------------------------------------------------------------- /Src/GpxModel/utils.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * Copyright (c) 2014 - 2016 Frederic Bourgeois * 3 | * * 4 | * This program is free software: you can redistribute it and/or modify * 5 | * it under the terms of the GNU General Public License as published by * 6 | * the Free Software Foundation, either version 3 of the License, or * 7 | * (at your option) any later version. * 8 | * * 9 | * This program is distributed in the hope that it will be useful, * 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 12 | * GNU General Public License for more details. * 13 | * * 14 | * You should have received a copy of the GNU General Public License * 15 | * along with This program. If not, see . * 16 | ****************************************************************************/ 17 | 18 | #ifndef _UTILS_H 19 | #define UTILS_H 20 | 21 | #ifdef __cplusplus 22 | extern "C" { 23 | #endif 24 | 25 | /** 26 | * @brief Changes an environment variable 27 | * @param name Variable 28 | * @param value Value 29 | */ 30 | void UTILS_setenv(const char *name, const char *value); 31 | 32 | /** 33 | * @brief Deletes the variable name from the environment 34 | * @param name Variable 35 | */ 36 | void UTILS_unsetenv(const char *name); 37 | 38 | /** 39 | * @brief Converts a string to a double 40 | * @param str String 41 | * @return Double value 42 | */ 43 | double UTILS_atof(const char *str); 44 | 45 | #ifdef __cplusplus 46 | } 47 | #endif 48 | 49 | #endif // _UTILS_H 50 | -------------------------------------------------------------------------------- /Src/GpxModel/uxmlpars.h: -------------------------------------------------------------------------------- 1 | /**************************************************************************** 2 | * Copyright (c) 2014 - 2015 Frederic Bourgeois * 3 | * * 4 | * This program is free software: you can redistribute it and/or modify * 5 | * it under the terms of the GNU General Public License as published by * 6 | * the Free Software Foundation, either version 3 of the License, or * 7 | * (at your option) any later version. * 8 | * * 9 | * This program is distributed in the hope that it will be useful, * 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of * 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 12 | * GNU General Public License for more details. * 13 | * * 14 | * You should have received a copy of the GNU General Public License * 15 | * along with This program. If not, see . * 16 | ****************************************************************************/ 17 | 18 | /** 19 | * @file uxmlpars.h 20 | * 21 | * @brief XML parser (SAX) 22 | * 23 | * Generic XML parser. 24 | * 25 | * The user must specify callback functions and a buffer (pContent) which 26 | * will contain the tag content and the size of the buffer (maxContent). 27 | * 28 | * Callback functions: 29 | * - \b UXML_GetChar Called to get the next character from a stream (file or buffer) 30 | * - \b UXML_OpenTag Called when a new tag was found (<...>) 31 | * - \b UXML_CloseTAG Called when a tag was closed () 32 | * - \b UXML_SetContent Called when a tag content was found 33 | * - \b UXML_setAttribute Called when a tag attribute was found 34 | * 35 | * @author Frederic Bourgeois 36 | * @version 1.1 37 | * @date 30 Jul 2016 38 | */ 39 | 40 | #ifndef _UXMLPARS_H_ 41 | #define _UXMLPARS_H_ 42 | 43 | #ifdef __cplusplus 44 | extern "C" { 45 | #endif 46 | 47 | /** Maximal length of a tag */ 48 | #define UXML_TAG_SIZE 256 49 | 50 | /** Function pointer for UXML_GetChar */ 51 | typedef int (*UXML_GetChar)(void* pXml); 52 | 53 | /** Function pointer for UXML_OpenTag */ 54 | typedef void (*UXML_OpenTag)(void* pXml, char* pTagName); 55 | 56 | /** Function pointer for UXML_CloseTAG */ 57 | typedef void (*UXML_CloseTAG)(void* pXml, char* pTagName); 58 | 59 | /** Function pointer for UXML_SetContent */ 60 | typedef void (*UXML_SetContent)(void* pXml, char* pTagName, char* pTagContent); 61 | 62 | /** Function pointer for UXML_setAttribute */ 63 | typedef void (*UXML_setAttribute)(void* pXml, char* pTagName, char* pAttribute, char *value); 64 | 65 | /** Parsing structure. Set here the callback functions and the tag content buffer */ 66 | typedef struct t_uXml 67 | { 68 | void* fp; /**< Input stream handler (file or buffer) */ 69 | int state; /**< User defined state for a state machine */ 70 | int eof; /**< end of file flag (0/1) or negative error code */ 71 | int encoding; /**< File encoding */ 72 | int unget_c; /**< "Ungeted" character (intern use) */ 73 | int recursionDepth; /**< Recursion depth */ 74 | int maxContent; /**< Maximal size of buffer *pContent */ 75 | char pTag[UXML_TAG_SIZE]; /**< Begin and end tag name in lower case */ 76 | char pAttribute[UXML_TAG_SIZE]; /**< Attribute name in lower case */ 77 | char* pContent; /**< Tag content buffer */ 78 | void* pObject; /**< User defined object */ 79 | UXML_GetChar getChar; /**< Called to get the next character from a stream (file or buffer) */ 80 | UXML_OpenTag openTag; /**< Called when a new tag was found (<...>) */ 81 | UXML_CloseTAG closeTag; /**< Called when a tag was closed () */ 82 | UXML_SetContent setContent; /**< Called when a tag content was found */ 83 | UXML_setAttribute setAttribute; /**< Called when a tag attribute was found */ 84 | } T_uXml; 85 | 86 | /** 87 | * @brief Initializes T_uXml structure 88 | * @param pXML Pointer to a T_uXml structure 89 | */ 90 | void UXML_init(T_uXml* pXML); 91 | 92 | /** 93 | * @brief Parses XML file 94 | * @param pXML Pointer to a T_uXml structure 95 | * @return 0 on success 96 | */ 97 | int UXML_parseFile(T_uXml* pXML); 98 | 99 | #ifdef __cplusplus 100 | } 101 | #endif 102 | 103 | #endif //_UXMLPARS_H_ 104 | -------------------------------------------------------------------------------- /Src/TransformCoordinate.h: -------------------------------------------------------------------------------- 1 | // 作者:康 林 2 | 3 | #ifndef _COORDTRANS 4 | #define _COORDTRANS 5 | 6 | #include "transformcoordinate_export.h" 7 | #include 8 | 9 | /*! 10 | * - WGS84: 11 | * 为一种大地坐标系,也是目前广泛使用的全球卫星定位系统(GPS)使用的坐标系。 12 | * - GCJ02: 13 | * 戏称火星坐标系,是由中国国家测绘局制定的地理坐标系统,是由WGS84加密后得到的坐标系。 14 | * - BD09: 15 | * 为百度坐标系,在GCJ02坐标系基础上再次加密。 16 | * 其中bd09ll表示百度经纬度坐标,bd09mc表示百度墨卡托米制坐标。 17 | */ 18 | enum _COORDINATE{ 19 | WGS84, 20 | GCJ02, 21 | BD09LL, //百度经纬度坐标 22 | BD09MC //百度墨卡托米制坐标 23 | }; 24 | 25 | static std::string gCoordinateDescription[] = {"WGS84", "GCJ02", "BD09LL", "BD09MC"}; 26 | TRANSFORMCOORDINATE_EXPORT int TransformCoordinate( 27 | double oldx, 28 | double oldy, 29 | double &newx, 30 | double &newy, 31 | _COORDINATE from = WGS84, 32 | _COORDINATE to = GCJ02); 33 | 34 | #ifdef WITH_GPXMODEL 35 | TRANSFORMCOORDINATE_EXPORT int TransformCoordinateFiles( 36 | const char *szSrc, 37 | const char *szDst, 38 | _COORDINATE from = WGS84, 39 | _COORDINATE to = GCJ02, 40 | bool bIgnoreError = false); 41 | #endif //WITH_GPXMODEL 42 | 43 | #endif 44 | -------------------------------------------------------------------------------- /TransformCoordinate.pc.in: -------------------------------------------------------------------------------- 1 | prefix=@CMAKE_INSTALL_PREFIX@ 2 | libdir=${prefix}/lib 3 | includedir=${prefix}/include 4 | 5 | Name: @PROJECT_NAME@ 6 | Description: Transform coordinate C++ library 7 | Version: @BUILD_VERSION@ 8 | Libs: -L${libdir} -lTransformCoordinate 9 | Cflags: -I${includedir} @GpxModel_DEFINITIONS@ 10 | Requires:@GPXMODEL_LIB@ 11 | -------------------------------------------------------------------------------- /Update/update.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | v1.1.2 4 | 5 | -------------------------------------------------------------------------------- /Update/update_android.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 0 7 | android 8 | android 9 | armv7 10 | 11 | 12 | v0.0.9 13 | 14 | -------------------------------------------------------------------------------- /appveyor.yml: -------------------------------------------------------------------------------- 1 | # 作者:康林 2 | 3 | #TODO: Change version 4 | version: 'v1.1.2.{build}' 5 | 6 | environment: 7 | STOREPASS: 8 | secure: l9BZEU39F1a4vSkhwl0CHR+yh6CD1c7byGzMv+1NUa4= 9 | QT_USER: 10 | secure: EoBPaPuJ6u9UDYpQWjKhUg== 11 | QT_PASSWORD: 12 | secure: ejAYGgB+3sBispRxUSr0xw== 13 | TransformCoordinate_VERSION: "v1.1.2" 14 | 15 | matrix: 16 | ##### msvc 2015 ######## 17 | - GENERATORS: "Visual Studio 14 2015" 18 | TOOLCHAIN_VERSION: 14 19 | QT_ROOT: C:\Qt\5.6\msvc2015 20 | BUILD_ARCH: x86 21 | 22 | - GENERATORS: "Visual Studio 14 2015 Win64" 23 | TOOLCHAIN_VERSION: 14 24 | QT_ROOT: C:\Qt\5.6\msvc2015_64 25 | BUILD_ARCH: x64 26 | 27 | matrix: 28 | fast_finish: false 29 | 30 | init: 31 | - set varch=%BUILD_ARCH% 32 | - if "%BUILD_ARCH%" == "x64" set varch=amd64 33 | - if %TOOLCHAIN_VERSION% LSS 15 (call "C:\Program Files (x86)\Microsoft Visual Studio %TOOLCHAIN_VERSION%.0\VC\vcvarsall.bat" %varch%) else (call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvarsall.bat" %varch%) 34 | - echo NUMBER_OF_PROCESSORS=%NUMBER_OF_PROCESSORS% 35 | - echo PROCESSOR_IDENTIFIER=%PROCESSOR_IDENTIFIER% 36 | - if NOT "%QT_ROOT%" == "NO" for /f "delims=" %%i in ('%QT_ROOT%/bin/qmake -query QT_VERSION') do (set QT_VERSION=%%i) 37 | - echo QT_ROOT=%QT_ROOT% 38 | - echo QT_VERSION=%QT_VERSION% 39 | 40 | install: 41 | - cd %APPVEYOR_BUILD_FOLDER% 42 | - git submodule update --init --recursive 43 | - git clone https://github.com/KangLin/RabbitCommon.git 44 | - set RabbitCommon_DIR=%APPVEYOR_BUILD_FOLDER%/RabbitCommon 45 | 46 | - set OTHER_SOURCE=%APPVEYOR_BUILD_FOLDER%\..\other_source 47 | - set INSTALL_DIR=%OTHER_SOURCE%\install_dir 48 | - if not exist "%OTHER_SOURCE%" ( mkdir "%OTHER_SOURCE%" ) 49 | - if not exist "%INSTALL_DIR%" (mkdir "%INSTALL_DIR%") 50 | 51 | - cd %OTHER_SOURCE% 52 | - set CMAKE_VERSION=3.28.3 53 | - if not exist cmake-%CMAKE_VERSION%-windows-i386 (curl -fsSL -o cmake-%CMAKE_VERSION%-windows-i386.zip https://github.com/Kitware/CMake/releases/download/v%CMAKE_VERSION%/cmake-%CMAKE_VERSION%-windows-i386.zip && 7z x cmake-%CMAKE_VERSION%-windows-i386.zip) 54 | - cd cmake-%CMAKE_VERSION%-windows-i386 55 | - set PATH="%CD%/bin";%PATH% 56 | - echo %PATH% 57 | 58 | - cd %OTHER_SOURCE% 59 | - set VCPKG_ROOT=%OTHER_SOURCE%\vcpkg 60 | - ps: | 61 | if( -not (Test-Path -Path ${env:VCPKG_ROOT}) ) 62 | { 63 | git clone -q "https://github.com/microsoft/vcpkg.git" 64 | cd ${env:VCPKG_ROOT} 65 | git checkout -q -b 898b728edc5e0d12b50015f9cd18247c4257a3eb 898b728edc5e0d12b50015f9cd18247c4257a3eb 66 | bootstrap-vcpkg.bat 67 | } 68 | 69 | before_build: 70 | 71 | build_script: 72 | - cd %APPVEYOR_BUILD_FOLDER% 73 | - mkdir build 74 | - cd build 75 | - cmake %APPVEYOR_BUILD_FOLDER% ^ 76 | -G"%GENERATORS%" ^ 77 | -DCMARK_SHARED=OFF ^ 78 | -DCMARK_TESTS=OFF ^ 79 | -DCMARK_STATIC=ON ^ 80 | -DQT_DIR=%QT_ROOT%/lib/cmake/Qt5 ^ 81 | -DQt5_DIR=%QT_ROOT%/lib/cmake/Qt5 ^ 82 | -DRABBIT_ENABLE_INSTALL_DEPENDENT=ON ^ 83 | -DRABBIT_ENABLE_INSTALL_QT=ON ^ 84 | -DRABBIT_ENABLE_INSTALL_TO_BUILD_PATH=OFF ^ 85 | -DCMAKE_BUILD_TYPE=Release ^ 86 | -DCMAKE_INSTALL_PREFIX="%cd%/install" ^ 87 | -DCMAKE_PREFIX_PATH="%INSTALL_DIR%" ^ 88 | -DCMAKE_TOOLCHAIN_FILE="%VCPKG_ROOT%/scripts/buildsystems/vcpkg.cmake" ^ 89 | -DVCPKG_MANIFEST_DIR="%APPVEYOR_BUILD_FOLDER%/vcpkg/manifests" ^ 90 | -DX_VCPKG_APPLOCAL_DEPS_INSTALL=ON ^ 91 | -DVCPKG_APPLOCAL_DEPS=ON 92 | - cmake --build . --config Release 93 | - cmake --build . --config Release --target install 94 | - if "%BUILD_ARCH%" == "x86" (copy /Y c:\OpenSSL-Win32\bin\ssleay32.dll install\bin && copy /Y c:\OpenSSL-Win32\bin\libeay32.dll install\bin) 95 | - if "%BUILD_ARCH%" == "x64" (copy /Y c:\OpenSSL-Win64\bin\ssleay32.dll install\bin && copy /Y c:\OpenSSL-Win64\bin\libeay32.dll install\bin) 96 | - makensis Install.nsi 97 | - rename TransformCoordinate_Setup_%TransformCoordinate_VERSION%.exe TransformCoordinate_%TransformCoordinate_VERSION%_windows_xp_Setup.exe 98 | 99 | artifacts: 100 | - path: build\TransformCoordinate_*.exe 101 | 102 | test: off 103 | 104 | #See:https://www.appveyor.com/docs/deployment/github/ 105 | deploy: 106 | - provider: GitHub 107 | #release: TransformCoordinate-$(appveyor_TransformCoordinate_VERSION) 108 | description: 'Release TransformCoordinate $(APPVEYOR_REPO_TAG_NAME) on windows' 109 | #token : https://github.com/settings/tokens password encrypt: https://ci.appveyor.com/tools/encrypt 110 | auth_token: 111 | secure: g7JyppMs3R6LHgau/3Ud1X0Mmj4sXkeo75Jy5saIwp75E+f5vFbJPUTAm0VXULKh 112 | on: 113 | TOOLCHAIN_VERSION: 14 114 | QT_VERSION: 5.6.3 115 | BUILD_ARCH: x86 116 | appveyor_repo_tag: true # deploy on tag push only 117 | -------------------------------------------------------------------------------- /build_debpackage.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | if [ -n "$1" -a -z "$QT_ROOT" ]; then 4 | QT_ROOT=$1 5 | fi 6 | 7 | if [ -z "$QT_ROOT" ]; then 8 | echo "$0 QT_ROOT RabbitCommon_DIR" 9 | exit -1 10 | fi 11 | 12 | if [ -n "$2" -a -z "$RabbitCommon_DIR" ]; then 13 | RabbitCommon_DIR=$2 14 | fi 15 | 16 | if [ -z "$RabbitCommon_DIR" ]; then 17 | RabbitCommon_DIR=`pwd`/../RabbitCommon 18 | fi 19 | 20 | if [ ! -d "$RabbitCommon_DIR" ]; then 21 | echo "$0 QT_ROOT RabbitCommon_DIR" 22 | fi 23 | 24 | export RabbitCommon_DIR=$RabbitCommon_DIR 25 | export QT_ROOT=$QT_ROOT 26 | export PATH=$QT_ROOT/bin:$PATH 27 | export LD_LIBRARY_PATH=$QT_ROOT/lib/i386-linux-gnu:$QT_ROOT/lib:$LD_LIBRARY_PATH 28 | export PKG_CONFIG_PATH=$QT_ROOT/lib/pkgconfig:$PKG_CONFIG_PATH 29 | #fakeroot debian/rules binary 30 | 31 | # -p, --sign-command=sign-command 32 | # When dpkg-buildpackage needs to execute GPG to sign a source 33 | # control (.dsc) file or a .changes file it will run sign-command 34 | # (searching the PATH if necessary) instead of gpg (long option since 35 | # dpkg 1.18.8). sign-command will get all the arguments that gpg 36 | # would have gotten. sign-command should not contain spaces or any 37 | # other shell metacharacters. 38 | 39 | # -k, --sign-key=key-id 40 | # Specify a key-ID to use when signing packages (long option since 41 | # dpkg 1.18.8). 42 | 43 | # -us, --unsigned-source 44 | # Do not sign the source package (long option since dpkg 1.18.8). 45 | 46 | # -ui, --unsigned-buildinfo 47 | # Do not sign the .buildinfo file (since dpkg 1.18.19). 48 | 49 | # -uc, --unsigned-changes 50 | # Do not sign the .buildinfo and .changes files (long option since 51 | # dpkg 1.18.8). 52 | 53 | # -b Equivalent to --build=binary or --build=any,all. 54 | # -S Equivalent to --build=source 55 | # -d, --no-check-builddeps do not check build dependencies and conflicts. 56 | # --ignore-builtin-builddeps 57 | # do not check builtin build dependencies. 58 | 59 | #The -us -uc tell it there is no need to GPG sign the package. the -b is build binary 60 | dpkg-buildpackage -us -uc -b -d 61 | 62 | #The -us -uc tell it there is no need to GPG sign the package. the -S is build source package 63 | #dpkg-buildpackage -us -uc -S 64 | 65 | #dpkg-buildpackage -S 66 | 67 | # build source and binary package 68 | #dpkg-buildpackage -us -uc -d 69 | 70 | #dpkg-buildpackage -d 71 | 72 | 73 | -------------------------------------------------------------------------------- /debian/changelog: -------------------------------------------------------------------------------- 1 | transformcoordinate (1.1.2) unstable; urgency=medium 2 | 3 | * CI: update actions/download-artifact to 4 4 | * FIX: Modify author format (#3) 5 | * CI: update RabbitCommon version to 2.2.6 6 | * Fix deploy.sh bug 7 | * CI: modify android.yml 8 | 9 | -- Kang Lin Sat, 14 Sep 2024 10:12:17 +0800 10 | -------------------------------------------------------------------------------- /debian/control: -------------------------------------------------------------------------------- 1 | # Debian 维护者指南: https://www.debian.org/doc/manuals/debmake-doc/ch05.zh-cn.html#control 2 | # Debian 新维护者手册: https://www.debian.org/doc/manuals/maint-guide/dreq.zh-cn.html#control 3 | # https://www.debian.org/doc/debian-policy/ch-controlfields.html 4 | 5 | Source: transformcoordinate 6 | Section: devel 7 | Priority: optional 8 | Maintainer: Kang Lin 9 | Build-Depends: debhelper (>=13~), debhelper-compat (=13), fakeroot, cmake, 10 | libssl-dev, libcmark-dev, rabbitcommon-dev(>=2.3.1), 11 | qt6-tools-dev, qt6-tools-dev-tools, 12 | qt6-base-dev, qt6-base-dev-tools, qt6-l10n-tools, 13 | qt6-translations-l10n, qt6-scxml-dev, qt6-webengine-dev, 14 | qt6-webengine-dev-tools, libsqlite3-dev 15 | Standards-Version: 4.6.2 16 | Homepage: https://github.com/KangLin/TransformCoordinate 17 | Vcs-Git: https://github.com/KangLin/TransformCoordinate.git 18 | Vcs-Browser: https://github.com/KangLin/TransformCoordinate 19 | Rules-Requires-Root: binary-targets 20 | 21 | Package: transformcoordinate 22 | Section: utils 23 | Architecture: any 24 | Multi-Arch: foreign 25 | Pre-Depends: ${misc:Pre-Depends} 26 | Depends: libtransformcoordinate (= ${binary:Version}), ${shlibs:Depends}, ${misc:Depends} 27 | Description: The Transform coordinate application using Qt 28 | The Transform coordinate application using Qt 29 | . 30 | Author: Kang Lin 31 | . 32 | Donation: 33 | . 34 | https://github.com/KangLin/RabbitCommon/raw/master/Src/Resource/image/Contribute.png 35 | . 36 | https://gitee.com/kl222/RabbitCommon/raw/master/Src/Resource/image/Contribute.png 37 | . 38 | https://gitlab.com/kl222/RabbitCommon/-/raw/master/Src/Resource/image/Contribute.png 39 | 40 | Package: libtransformcoordinate 41 | Section: libs 42 | Architecture: any 43 | Multi-Arch: same 44 | Pre-Depends: ${misc:Pre-Depends} 45 | Depends: ${shlibs:Depends}, ${misc:Depends} 46 | Description: The Transform coordinate runtime library using Qt 47 | The Transform coordinate runtime library using Qt 48 | . 49 | Author: Kang Lin 50 | . 51 | Donation: 52 | . 53 | https://github.com/KangLin/RabbitCommon/raw/master/Src/Resource/image/Contribute.png 54 | . 55 | https://gitee.com/kl222/RabbitCommon/raw/master/Src/Resource/image/Contribute.png 56 | . 57 | https://gitlab.com/kl222/RabbitCommon/-/raw/master/Src/Resource/image/Contribute.png 58 | 59 | Package: libtransformcoordinate-dev 60 | Section: libdevel 61 | Architecture: any 62 | Multi-Arch: same 63 | Depends: libtransformcoordinate (= ${binary:Version}), ${misc:Depends} 64 | Description: The Transform coordinate devel library using Qt 65 | The Transform coordinate devel library using Qt 66 | . 67 | Author: Kang Lin 68 | . 69 | Donation: 70 | . 71 | https://github.com/KangLin/RabbitCommon/raw/master/Src/Resource/image/Contribute.png 72 | . 73 | https://gitee.com/kl222/RabbitCommon/raw/master/Src/Resource/image/Contribute.png 74 | . 75 | https://gitlab.com/kl222/RabbitCommon/-/raw/master/Src/Resource/image/Contribute.png 76 | 77 | -------------------------------------------------------------------------------- /debian/copyright: -------------------------------------------------------------------------------- 1 | Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ 2 | Source: https://github.com/KangLin/TransformCoordinate 3 | Upstream-Name: rabbitcommon 4 | Upstream-Contact: Kang Lin 5 | 6 | Files: * 7 | Copyright: 2019 Kang Lin 8 | License: GPL-3.0+ 9 | 10 | Files: debian/* 11 | Copyright: 2024 Kang Lin 12 | License: GPL-3.0+ 13 | 14 | License: GPL-3.0+ 15 | This program is free software: you can redistribute it and/or modify 16 | it under the terms of the GNU General Public License as published by 17 | the Free Software Foundation, either version 3 of the License, or 18 | (at your option) any later version. 19 | . 20 | This package is distributed in the hope that it will be useful, 21 | but WITHOUT ANY WARRANTY; without even the implied warranty of 22 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 23 | GNU General Public License for more details. 24 | . 25 | You should have received a copy of the GNU General Public License 26 | along with this program. If not, see . 27 | . 28 | On Debian systems, the complete text of the GNU General 29 | Public License version 3 can be found in "/usr/share/common-licenses/GPL-3". 30 | -------------------------------------------------------------------------------- /debian/postinst: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # postinst script for TransformCoordinate 3 | # 4 | # see: dh_installdeb(1) 5 | 6 | set -e 7 | 8 | # summary of how this script can be called: 9 | # * `configure' 10 | # * `abort-upgrade' 11 | # * `abort-remove' `in-favour' 12 | # 13 | # * `abort-remove' 14 | # * `abort-deconfigure' `in-favour' 15 | # `removing' 16 | # 17 | # for details, see https://www.debian.org/doc/debian-policy/ or 18 | # the debian-policy package 19 | 20 | INSTALL_ROOT=/opt/TransformCoordinate 21 | 22 | case "$1" in 23 | configure) 24 | mkdir -p $INSTALL_ROOT/log 25 | chmod -R a+w $INSTALL_ROOT/log 26 | chmod -R a+w $INSTALL_ROOT/etc 27 | if [ ! -f /usr/share/applications/org.Rabbit.TransformCoordinate.desktop ]; then 28 | ln -s $INSTALL_ROOT/share/applications/org.Rabbit.TransformCoordinate.desktop /usr/share/applications/org.Rabbit.TransformCoordinate.desktop 29 | fi 30 | if [ ! -f /usr/share/pixmaps/org.Rabbit.TransformCoordinate.svg ]; then 31 | if [ ! -d /usr/share/pixmaps ]; then 32 | mkdir -p /usr/share/pixmaps 33 | fi 34 | ln -s $INSTALL_ROOT/share/pixmaps/TransformCoordinate.svg /usr/share/pixmaps/org.Rabbit.TransformCoordinate.svg 35 | fi 36 | #echo "$INSTALL_ROOT/lib" > /etc/ld.so.conf.d/TransformCoordinate.conf 37 | #echo "$INSTALL_ROOT/bin" >> /etc/ld.so.conf.d/TransformCoordinate.conf 38 | #export QT_VERSION_DIR= 39 | #if [ -n "${QT_VERSION_DIR}" ]; then 40 | # echo "/opt/qt${QT_VERSION_DIR}/lib" >> /etc/ld.so.conf.d/FaceRecognizer.conf 41 | #fi 42 | #ldconfig 43 | ;; 44 | 45 | abort-upgrade|abort-remove|abort-deconfigure) 46 | rm -fr /usr/share/applications/org.Rabbit.TransformCoordinate.desktop 47 | rm -fr /usr/share/pixmaps/org.Rabbit.TransformCoordinate.svg 48 | rm -fr $INSTALL_ROOT/log 49 | #rm -fr /etc/ld.so.conf.d/TransformCoordinate.conf 50 | ;; 51 | 52 | *) 53 | echo "postinst called with unknown argument \`$1'" >&2 54 | exit 1 55 | ;; 56 | esac 57 | 58 | # dh_installdeb will replace this with shell code automatically 59 | # generated by other debhelper scripts. 60 | 61 | #DEBHELPER# 62 | 63 | exit 0 64 | -------------------------------------------------------------------------------- /debian/postrm: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # postrm script for TransformCoordinate 3 | # 4 | # see: dh_installdeb(1) 5 | 6 | set -e 7 | 8 | # summary of how this script can be called: 9 | # * `remove' 10 | # * `purge' 11 | # * `upgrade' 12 | # * `failed-upgrade' 13 | # * `abort-install' 14 | # * `abort-install' 15 | # * `abort-upgrade' 16 | # * `disappear' 17 | # 18 | # for details, see https://www.debian.org/doc/debian-policy/ or 19 | # the debian-policy package 20 | 21 | INSTALL_ROOT=/opt/TransformCoordinate 22 | 23 | case "$1" in 24 | purge|remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear) 25 | rm -fr /usr/share/applications/org.Rabbit.TransformCoordinate.desktop 26 | rm -fr /usr/share/pixmaps/org.Rabbit.TransformCoordinate.svg 27 | rm -fr $INSTALL_ROOT/log 28 | #rm -fr /etc/ld.so.conf.d/TransformCoordinate.conf 29 | ;; 30 | 31 | *) 32 | echo "postrm called with unknown argument \`$1'" >&2 33 | exit 1 34 | ;; 35 | esac 36 | 37 | # dh_installdeb will replace this with shell code automatically 38 | # generated by other debhelper scripts. 39 | 40 | #DEBHELPER# 41 | 42 | exit 0 43 | -------------------------------------------------------------------------------- /debian/preinst: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # preinst script for TransformCoordinate 3 | # 4 | # see: dh_installdeb(1) 5 | 6 | set -e 7 | 8 | # summary of how this script can be called: 9 | # * `install' 10 | # * `install' 11 | # * `upgrade' 12 | # * `abort-upgrade' 13 | # for details, see https://www.debian.org/doc/debian-policy/ or 14 | # the debian-policy package 15 | 16 | 17 | case "$1" in 18 | install|upgrade) 19 | export QT_VERSION= 20 | if [ -n "${QT_VERSION}" ]; then 21 | sudo add-apt-repository -y ppa:beineri/opt-qt-${QT_VERSION}-`lsb_release -c|awk '{print $2}'` 22 | sudo apt-get update 23 | fi 24 | ;; 25 | 26 | abort-upgrade) 27 | ;; 28 | 29 | *) 30 | echo "preinst called with unknown argument \`$1'" >&2 31 | exit 1 32 | ;; 33 | esac 34 | 35 | # dh_installdeb will replace this with shell code automatically 36 | # generated by other debhelper scripts. 37 | 38 | #DEBHELPER# 39 | 40 | exit 0 41 | -------------------------------------------------------------------------------- /debian/prerm: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # prerm script for TransformCoordinate 3 | # 4 | # see: dh_installdeb(1) 5 | 6 | set -e 7 | 8 | # summary of how this script can be called: 9 | # * `remove' 10 | # * `upgrade' 11 | # * `failed-upgrade' 12 | # * `remove' `in-favour' 13 | # * `deconfigure' `in-favour' 14 | # `removing' 15 | # 16 | # for details, see https://www.debian.org/doc/debian-policy/ or 17 | # the debian-policy package 18 | 19 | 20 | case "$1" in 21 | remove|upgrade|deconfigure) 22 | ;; 23 | 24 | failed-upgrade) 25 | ;; 26 | 27 | *) 28 | echo "prerm called with unknown argument \`$1'" >&2 29 | exit 1 30 | ;; 31 | esac 32 | 33 | # dh_installdeb will replace this with shell code automatically 34 | # generated by other debhelper scripts. 35 | 36 | #DEBHELPER# 37 | 38 | exit 0 39 | -------------------------------------------------------------------------------- /debian/rules: -------------------------------------------------------------------------------- 1 | #!/usr/bin/make -f 2 | # See debhelper(7) (uncomment to enable) 3 | # output every command that modifies files on the build system. 4 | #export DH_VERBOSE = 1 5 | 6 | # see FEATURE AREAS in dpkg-buildflags(1) 7 | #export DEB_BUILD_MAINT_OPTIONS = hardening=+all 8 | 9 | # see ENVIRONMENT in dpkg-buildflags(1) 10 | # package maintainers to append CFLAGS 11 | #export DEB_CFLAGS_MAINT_APPEND = -Wall -pedantic 12 | # package maintainers to append LDFLAGS 13 | #export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed 14 | 15 | #export QT_SELECT=qt5 16 | 17 | ifdef INSTALL_DIR 18 | LIB_PARAS += ${INSTALL_DIR}/lib 19 | endif 20 | 21 | DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH) 22 | 23 | BUILD_DIR = build_$(DEB_HOST_MULTIARCH) 24 | 25 | PACKAGE_DIR = debian/libtransformcoordinate 26 | PACKAGE_DEV_DIR = debian/libtransformcoordinate-dev 27 | PACKAGE_APP_DIR = debian/transformcoordinate 28 | 29 | PACKAGE_APP_PREFIX = $(PACKAGE_APP_DIR)/opt/TransformCoordinate 30 | 31 | ifeq ($(strip $(shell pkg-config --libs RabbitCommon)), -lRabbitCommon) 32 | PACKAGE_PREFIX = $(PACKAGE_DIR)/usr 33 | PACKAGE_DEV_PREFIX = $(PACKAGE_DEV_DIR)/usr 34 | else 35 | PACKAGE_PREFIX = $(PACKAGE_DIR)/opt/TransformCoordinate 36 | PACKAGE_DEV_PREFIX = $(PACKAGE_DEV_DIR)/opt/TransformCoordinate 37 | endif 38 | 39 | %: 40 | dh $@ 41 | 42 | # Debian 维护者指南: https://www.debian.org/doc/manuals/debmake-doc/index.zh-cn.html 43 | # Debian 新维护者手册: https://www.debian.org/doc/manuals/maint-guide/dreq.zh-cn.html#rules 44 | # https://www.debian.org/doc/manuals/maint-guide/dreq.zh-cn.html#rules 45 | # See: man debhelper 46 | # This is example for Cmake (See https://bugs.debian.org/641051 ) 47 | override_dh_auto_configure: 48 | # See: man dh_auto_configure an debhelper 49 | dh_auto_configure -B$(BUILD_DIR) -- \ 50 | -DCMAKE_BUILD_TYPE=Release \ 51 | -DCMARK_SHARED=OFF \ 52 | -DCMARK_TESTS=OFF \ 53 | -DCMARK_STATIC=ON 54 | 55 | override_dh_auto_build: 56 | cmake --build $(BUILD_DIR) --config Release \ 57 | --parallel $(if "`cat /proc/cpuinfo |grep 'processor' |wc -l`", `cat /proc/cpuinfo |grep 'processor' |wc -l`, 1) 58 | 59 | override_dh_auto_install: 60 | cmake --install $(BUILD_DIR) --config Release \ 61 | --component Runtime --prefix $(PACKAGE_PREFIX) 62 | cmake --install $(BUILD_DIR) --config Release \ 63 | --component Development --prefix $(PACKAGE_DEV_PREFIX) 64 | cmake --install $(BUILD_DIR) --config Release \ 65 | --component Application \ 66 | --prefix $(PACKAGE_APP_DIR)/opt/TransformCoordinate 67 | 68 | override_dh_shlibdeps: 69 | dh_shlibdeps --dpkg-shlibdeps-params=--ignore-missing-info -l`pwd`/$(BUILD_DIR)/lib:$(LIB_PARAS) 70 | 71 | override_dh_builddeb: 72 | dh_builddeb --package=libtransformcoordinate -P$(PACKAGE_DIR) 73 | dh_builddeb --package=libtransformcoordinate-dev -P$(PACKAGE_DEV_DIR) 74 | dh_builddeb --package=transformcoordinate -P$(PACKAGE_APP_DIR) 75 | -------------------------------------------------------------------------------- /debian/source/format: -------------------------------------------------------------------------------- 1 | 3.0 (native) 2 | -------------------------------------------------------------------------------- /debian/watch: -------------------------------------------------------------------------------- 1 | # Compulsory line, this is a version 4 file 2 | version=4 3 | 4 | # GitHub hosted projects 5 | opts="filenamemangle=s%(?:.*?)?v?(\d[\d.]*)\.tar\.gz%-$1.tar.gz%" \ 6 | https://github.com/KangLin/TransformCoordinate/tags \ 7 | (?:.*?/)?v?(\d[\d.]*)\.tar\.gz debian uupdate 8 | -------------------------------------------------------------------------------- /deploy.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -e 3 | 4 | SOURCE_DIR=`pwd` 5 | 6 | PRE_TAG=`git tag --sort=-creatordate | head -n 1` 7 | 8 | if [ -n "$1" ]; then 9 | VERSION=`git describe --tags` 10 | if [ -z "$VERSION" ]; then 11 | VERSION=`git rev-parse HEAD` 12 | fi 13 | 14 | if [ -n "$2" ]; then 15 | MESSAGE="Release $1 $2" 16 | else 17 | MESSAGE="Release $1" 18 | fi 19 | 20 | PRE_TAG=`git tag --sort=-taggerdate | head -n 1` 21 | echo "Current version: $VERSION, current tag: $PRE_TAG. The version to will be set tag version: $1 message: $MESSAGE" 22 | echo "Please check the follow list:" 23 | echo " - Test is ok ?" 24 | echo " - Translation is ok ?" 25 | echo " - Setup file is ok ?" 26 | echo " - Update_*.xml is ok ?" 27 | 28 | read -t 30 -p "Be sure to input Y, not input N: " INPUT 29 | if [ "$INPUT" != "Y" -a "$INPUT" != "y" ]; then 30 | exit 0 31 | fi 32 | git tag -a $1 -m "Release $1 ${MESSAGE}" 33 | else 34 | echo "Usage: $0 release_version [release_message]" 35 | echo " release_version format: [v][0-9].[0-9].[0-9]" 36 | exit -1 37 | fi 38 | 39 | VERSION=`git describe --tags` 40 | if [ -z "$VERSION" ]; then 41 | VERSION=`git rev-parse --short HEAD` 42 | fi 43 | 44 | sed -i "s/^\!define PRODUCT_VERSION.*/\!define PRODUCT_VERSION \"${VERSION}\"/g" ${SOURCE_DIR}/Install/Install.nsi 45 | 46 | sed -i "s/.*${VERSION} ${CHANGLOG_FILE} 78 | echo "" >> ${CHANGLOG_FILE} 79 | echo "`git log --pretty=format:' * %s' ${PRE_TAG}..HEAD`" >> ${CHANGLOG_FILE} 80 | echo "" >> ${CHANGLOG_FILE} 81 | echo " -- `git log --pretty=format:'%an <%ae>' HEAD^..HEAD` `date --rfc-email`" >> ${CHANGLOG_FILE} 82 | 83 | MAJOR_VERSION=`echo ${DEBIAN_VERSION}|cut -d "." -f 1` 84 | sed -i "s/android:versionCode=.*android/android:versionCode=\"${MAJOR_VERSION}\" android/g" ${SOURCE_DIR}/App/android/AndroidManifest.xml 85 | 86 | if [ -n "$1" ]; then 87 | git add . 88 | git commit -m "Release $1" 89 | git push 90 | git tag -d $1 91 | git tag -a $1 -m "Release $1" 92 | git push origin :refs/tags/$1 93 | git push origin $1 94 | fi 95 | -------------------------------------------------------------------------------- /etc/logqt.ini: -------------------------------------------------------------------------------- 1 | [Log] 2 | ;; Log file path. 3 | ;Path=log 4 | ;; Log file name prefix 5 | Name="yyyy-MM-dd" 6 | ;; Message format pattern. See: https://doc.qt.io/qt-6/qtlogging.html#qSetMessagePattern 7 | Pattern="[%{time hh:mm:ss.zzz} %{pid}|%{threadid} %{if-debug}D%{endif}%{if-info}I%{endif}%{if-warning}W%{endif}%{if-critical}E%{endif}%{if-fatal}F%{endif}] %{category} - %{message}" 8 | ;[%{file}:%{line}, %{function}]" 9 | ;; Log file length 10 | ;Length=100M 11 | ;; Log file count 12 | ;Count=10 13 | ;; Write log file interval 14 | ;Interval=1 15 | 16 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 17 | ;; Log rules 18 | ;; Please see QLoggingCategory documents: https://doc.qt.io/qt-6/qloggingcategory.html#logging-rules 19 | ;; Format: 20 | ;; [.] = true|false 21 | [Rules] 22 | ;*=false 23 | *.debug=false 24 | ;*.warning=false 25 | 26 | ;RabbitCommon*=false 27 | ;RabbitCommon.Updater=true 28 | -------------------------------------------------------------------------------- /test/test_linux.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | EXIT_CODE=0 4 | PROJECT_NAME="TransformCoordinate" 5 | 6 | if [ -n "$1" ]; then 7 | echo "$PROJECT_NAME" 8 | PROJECT_NAME=$1 9 | fi 10 | 11 | if [ ! -f /opt/${PROJECT_NAME}/share/applications/org.Rabbit.${PROJECT_NAME}.desktop ]; then 12 | echo "There are not /opt/share/applications/org.Rabbit.${PROJECT_NAME}.desktop" 13 | EXIT_CODE=$[EXIT_CODE+1] 14 | fi 15 | 16 | if [ ! -f /usr/share/applications/org.Rabbit.${PROJECT_NAME}.desktop ]; then 17 | echo "There are not /usr/share/applications/org.Rabbit.${PROJECT_NAME}.desktop" 18 | EXIT_CODE=$[EXIT_CODE+1] 19 | fi 20 | 21 | if [ ! -f /opt/${PROJECT_NAME}/share/pixmaps/${PROJECT_NAME}.svg ]; then 22 | echo "There are not /opt/${PROJECT_NAME}/share/pixmaps/${PROJECT_NAME}.svg" 23 | EXIT_CODE=$[EXIT_CODE+1] 24 | fi 25 | 26 | if [ ! -f /usr/share/pixmaps/org.Rabbit.${PROJECT_NAME}.svg ]; then 27 | echo "There are not /usr/share/pixmaps/org.Rabbit.${PROJECT_NAME}.svg" 28 | EXIT_CODE=$[EXIT_CODE+1] 29 | fi 30 | 31 | 32 | exit $EXIT_CODE 33 | -------------------------------------------------------------------------------- /vcpkg.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "transformcoordinate", 3 | "version-string": "1.1.2", 4 | "license": "GPL-3.0", 5 | "homepage": "https://github.com/KangLin/TransformCoordinate", 6 | 7 | "dependencies": [ 8 | "openssl", 9 | "cmark" 10 | ] 11 | } 12 | -------------------------------------------------------------------------------- /vcpkg/manifests/vcpkg.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "transformcoordinate", 3 | "version-string": "1.1.2", 4 | "license": "GPL-3.0", 5 | "homepage": "https://github.com/KangLin/TransformCoordinate", 6 | 7 | "dependencies": [ 8 | "openssl", 9 | "cmark" 10 | ], 11 | 12 | "builtin-baseline": "9259a0719d94c402aae2ab7975bc096afdec15df", 13 | "overrides": [ 14 | { "name": "openssl", "version-string": "1.1.1n" }, 15 | { "name": "cmark", "version-string": "0.30.1" } 16 | ] 17 | 18 | } 19 | --------------------------------------------------------------------------------