From f2ea3bf935a87d0f1e824d68c9e0a77ece0b3f17 Mon Sep 17 00:00:00 2001 From: ksqsf Date: Sat, 9 Nov 2024 19:23:36 +0100 Subject: [PATCH] build: add cmake support --- .github/workflows/cmake-ci.yml | 17 ++++ .../RimeIcon.appiconset/Contents.json | 20 ++-- .../{rime-128.png => icon-128x128.png} | Bin .../{rime-256.png => icon-128x128@2.png} | Bin .../{rime-16 1.png => icon-16x16.png} | Bin .../{rime-32 1.png => icon-16x16@2.png} | Bin .../RimeIcon.appiconset/icon-256x256.png | Bin 0 -> 6452 bytes .../{rime-512.png => icon-256x256@2.png} | Bin .../{rime-32.png => icon-32x32.png} | Bin .../{rime-64.png => icon-32x32@2.png} | Bin .../RimeIcon.appiconset/icon-512x512.png | Bin 0 -> 11986 bytes .../{rime-1024.png => icon-512x512@2.png} | Bin CMakeLists.txt | 95 ++++++++++++++++++ INSTALL.md | 17 ++++ cmake/AddRime.cmake | 22 ++++ cmake/AddSparkle.cmake | 18 ++++ cmake/AppleUtils.cmake | 10 ++ data/CMakeLists.txt | 21 ++++ librime | 2 +- package/CMakeLists.txt | 12 +++ package/make_package | 9 +- resources/CMakeLists.txt | 31 ++++++ 22 files changed, 262 insertions(+), 12 deletions(-) create mode 100644 .github/workflows/cmake-ci.yml rename Assets.xcassets/RimeIcon.appiconset/{rime-128.png => icon-128x128.png} (100%) rename Assets.xcassets/RimeIcon.appiconset/{rime-256.png => icon-128x128@2.png} (100%) rename Assets.xcassets/RimeIcon.appiconset/{rime-16 1.png => icon-16x16.png} (100%) rename Assets.xcassets/RimeIcon.appiconset/{rime-32 1.png => icon-16x16@2.png} (100%) create mode 100644 Assets.xcassets/RimeIcon.appiconset/icon-256x256.png rename Assets.xcassets/RimeIcon.appiconset/{rime-512.png => icon-256x256@2.png} (100%) rename Assets.xcassets/RimeIcon.appiconset/{rime-32.png => icon-32x32.png} (100%) rename Assets.xcassets/RimeIcon.appiconset/{rime-64.png => icon-32x32@2.png} (100%) create mode 100644 Assets.xcassets/RimeIcon.appiconset/icon-512x512.png rename Assets.xcassets/RimeIcon.appiconset/{rime-1024.png => icon-512x512@2.png} (100%) create mode 100644 CMakeLists.txt create mode 100644 cmake/AddRime.cmake create mode 100644 cmake/AddSparkle.cmake create mode 100644 cmake/AppleUtils.cmake create mode 100644 data/CMakeLists.txt create mode 100644 package/CMakeLists.txt create mode 100644 resources/CMakeLists.txt diff --git a/.github/workflows/cmake-ci.yml b/.github/workflows/cmake-ci.yml new file mode 100644 index 000000000..f88130328 --- /dev/null +++ b/.github/workflows/cmake-ci.yml @@ -0,0 +1,17 @@ +name: cmake ci +on: [workflow_dispatch] +jobs: + build: + runs-on: macos-14 + steps: + - name: Checkout last commit + uses: actions/checkout@v4 + with: + submodules: recursive + - name: Configure build environment + run: | + brew install ninja rsync + - name: Build + run: | + cmake -S. -GNinja -DCMAKE_OSX_DEPLOYMENT_TARGET=13 + ninja -Cbuild diff --git a/Assets.xcassets/RimeIcon.appiconset/Contents.json b/Assets.xcassets/RimeIcon.appiconset/Contents.json index acfdfc399..1553a9150 100644 --- a/Assets.xcassets/RimeIcon.appiconset/Contents.json +++ b/Assets.xcassets/RimeIcon.appiconset/Contents.json @@ -1,61 +1,61 @@ { "images" : [ { - "filename" : "rime-16 1.png", + "filename" : "icon-16x16.png", "idiom" : "mac", "scale" : "1x", "size" : "16x16" }, { - "filename" : "rime-32 1.png", + "filename" : "icon-16x16@2.png", "idiom" : "mac", "scale" : "2x", "size" : "16x16" }, { - "filename" : "rime-32.png", + "filename" : "icon-32x32.png", "idiom" : "mac", "scale" : "1x", "size" : "32x32" }, { - "filename" : "rime-64.png", + "filename" : "icon-32x32@2.png", "idiom" : "mac", "scale" : "2x", "size" : "32x32" }, { - "filename" : "rime-128.png", + "filename" : "icon-128x128.png", "idiom" : "mac", "scale" : "1x", "size" : "128x128" }, { - "filename" : "rime-256.png", + "filename" : "icon-128x128@2.png", "idiom" : "mac", "scale" : "2x", "size" : "128x128" }, { - "filename" : "rime-256.png", + "filename" : "icon-256x256.png", "idiom" : "mac", "scale" : "1x", "size" : "256x256" }, { - "filename" : "rime-512.png", + "filename" : "icon-256x256@2.png", "idiom" : "mac", "scale" : "2x", "size" : "256x256" }, { - "filename" : "rime-512.png", + "filename" : "icon-512x512.png", "idiom" : "mac", "scale" : "1x", "size" : "512x512" }, { - "filename" : "rime-1024.png", + "filename" : "icon-512x512@2.png", "idiom" : "mac", "scale" : "2x", "size" : "512x512" diff --git a/Assets.xcassets/RimeIcon.appiconset/rime-128.png b/Assets.xcassets/RimeIcon.appiconset/icon-128x128.png similarity index 100% rename from Assets.xcassets/RimeIcon.appiconset/rime-128.png rename to Assets.xcassets/RimeIcon.appiconset/icon-128x128.png diff --git a/Assets.xcassets/RimeIcon.appiconset/rime-256.png b/Assets.xcassets/RimeIcon.appiconset/icon-128x128@2.png similarity index 100% rename from Assets.xcassets/RimeIcon.appiconset/rime-256.png rename to Assets.xcassets/RimeIcon.appiconset/icon-128x128@2.png diff --git a/Assets.xcassets/RimeIcon.appiconset/rime-16 1.png b/Assets.xcassets/RimeIcon.appiconset/icon-16x16.png similarity index 100% rename from Assets.xcassets/RimeIcon.appiconset/rime-16 1.png rename to Assets.xcassets/RimeIcon.appiconset/icon-16x16.png diff --git a/Assets.xcassets/RimeIcon.appiconset/rime-32 1.png b/Assets.xcassets/RimeIcon.appiconset/icon-16x16@2.png similarity index 100% rename from Assets.xcassets/RimeIcon.appiconset/rime-32 1.png rename to Assets.xcassets/RimeIcon.appiconset/icon-16x16@2.png diff --git a/Assets.xcassets/RimeIcon.appiconset/icon-256x256.png b/Assets.xcassets/RimeIcon.appiconset/icon-256x256.png new file mode 100644 index 0000000000000000000000000000000000000000..e12ead07c580610d62c28986b7d233b263ca1ccc GIT binary patch literal 6452 zcmcIp2{@GP`d5k>OUByBHW
Nu+<*V~fUtedrzH|QPI@kHTxZdY}-rv37&wJnRE8Wf2K~`#ml$e;9
zEZK33hnUzZV7W>RBmrFfVyc+H1Q|A}MA
z#YB8p9z;hmA{dd3C{8SZ#r(vwLs%SEYzXULi2ix|9~1!5b#eKr<4
47Bl;)fzgOQ@kLlE_sl(tAll=p{(Nh+sqDBSCm?d@3RehAX0k
zk_$>y1VR!rUMc2^hzLr#7g15kLy@bXbHXk2=C|I=Z`Q2&b6BuAXP@29KKqot_g8wr
z*GpMJM?pqLMtSdd_y8H1^`N<4W|JKF_klkA8T{K!{VqIPMn+LX`nOJ|s#;4%My@tF
zD2x{7