Skip to content

Commit

Permalink
Merge pull request #114 from Martichou/macos_support
Browse files Browse the repository at this point in the history
feat: macos support :)
  • Loading branch information
Martichou authored Jul 4, 2024
2 parents 61d2516 + c851df3 commit 643e8ab
Show file tree
Hide file tree
Showing 15 changed files with 3,069 additions and 36 deletions.
30 changes: 26 additions & 4 deletions .github/workflows/build_ubuntu.yml → .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,23 @@ env:

jobs:
build_core:
runs-on: ubuntu-latest
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- os: ubuntu-latest
- os: macos-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
with:
cache-directories: "${{ github.workspace }}/core_lib/target"
- uses: arduino/setup-protoc@v3
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Install dependencies
if: matrix.os != 'macos-latest'
run: |
sudo apt-get update
sudo apt-get install -y libdbus-1-dev
Expand All @@ -43,11 +51,20 @@ jobs:
dependencies: |
sudo apt-get install -y libjavascriptcoregtk-4.0-dev libwebkit2gtk-4.0-dev
cache_directory: app/legacy/src-tauri/target
build_cmd: deb:build
generated_bundle: appimage/r-quick-share*.AppImage
- os: ubuntu-24.04
target_path: app/main
dependencies: |
sudo apt-get install -y libsoup-3.0-dev libjavascriptcoregtk-4.1-dev libwebkit2gtk-4.1-dev
cache_directory: app/main/src-tauri/target
build_cmd: deb:build
generated_bundle: appimage/r-quick-share*.AppImage
- os: macos-latest
target_path: app/main
cache_directory: app/main/src-tauri/target
build_cmd: dmg:build
generated_bundle: dmg/RQuickShare_*.dmg
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v3
Expand All @@ -61,24 +78,29 @@ jobs:
with:
cache-directories: "${{ github.workspace }}/${{ matrix.cache_directory }}"
- uses: arduino/setup-protoc@v3
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Install Linux dependencies for U
if: matrix.os != 'macos-latest'
run: |
sudo apt-get update
sudo apt-get install -y libdbus-1-dev libgtk-3-dev libayatana-appindicator3-dev librsvg2-dev
- name: Install Linux dependencies
if: matrix.os != 'macos-latest'
run: ${{ matrix.dependencies }}
- name: GLIBC version
if: matrix.os != 'macos-latest'
run: |
GLIBC_VER=$(ldd --version | head -n1 | awk '{print $NF}')
echo "GLIBC version: ${GLIBC_VER}"
- name: Build Vite + Tauri
run: |
cd ./${{ matrix.target_path }}
pnpm install
pnpm deb:build
pnpm ${{ matrix.build_cmd }}
- name: Upload result
uses: actions/upload-artifact@v4
with:
name: artifact-debug-rquickshare
name: artifact-debug-rquickshare-${{ matrix.os }}
path: |
${{ github.workspace }}/${{ matrix.target_path }}/src-tauri/target/debug/bundle/appimage/r-quick-share*.AppImage
${{ github.workspace }}/${{ matrix.target_path }}/src-tauri/target/debug/bundle/${{ matrix.generated_bundle }}
7 changes: 5 additions & 2 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ jobs:
steps:
- uses: actions/checkout@v4
- uses: arduino/setup-protoc@v3
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- uses: pnpm/action-setup@v3
with:
version: 8
Expand Down Expand Up @@ -70,8 +72,9 @@ jobs:
- uses: Swatinem/rust-cache@v2
with:
cache-directories: "${{ github.workspace }}/${{ matrix.directory }}/target"
- name: Install Protoc
uses: arduino/setup-protoc@v3
- uses: arduino/setup-protoc@v3
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}

- name: Install Linux dependencies for U
run: |
Expand Down
8 changes: 8 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ jobs:
dependencies: |
sudo apt-get install -y libsoup-3.0-dev libjavascriptcoregtk-4.1-dev libwebkit2gtk-4.1-dev
cache_directory: app/main/src-tauri/target
- os: macos-latest
name: main
target_path: app/main
cache_directory: app/main/src-tauri/target
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v3
Expand All @@ -41,12 +45,16 @@ jobs:
with:
cache-directories: "${{ github.workspace }}/${{ matrix.cache_directory }}"
- uses: arduino/setup-protoc@v3
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}

- name: Install Linux dependencies for U
if: matrix.os != 'macos-latest'
run: |
sudo apt-get update
sudo apt-get install -y libdbus-1-dev libgtk-3-dev libayatana-appindicator3-dev librsvg2-dev
- name: Install Linux dependencies
if: matrix.os != 'macos-latest'
run: ${{ matrix.dependencies }}

- name: Build Vite + Tauri
Expand Down
2 changes: 1 addition & 1 deletion app/legacy/src-tauri/tauri.conf.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
},
"bundle": {
"active": true,
"targets": "all",
"targets": ["deb", "appimage"],
"identifier": "dev.mandre.rquickshare",
"icon": [
"icons/32x32.png",
Expand Down
1 change: 1 addition & 0 deletions app/main/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"dev": "cross-env RUST_BACKTRACE=1 concurrently -k \"tauri dev\" \"pnpm devtools\"",
"tauri": "tauri",
"deb:build": "tauri build -d -b appimage",
"dmg:build": "tauri build -d -b dmg",
"build": "tauri build",
"vite:dev": "vite dev",
"vite:build": "vite build",
Expand Down
8 changes: 8 additions & 0 deletions app/main/src-tauri/Info.plist
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>NSBluetoothAlwaysUsageDescription</key>
<string>Used for nearby devices sharing</string>
</dict>
</plist>
2 changes: 1 addition & 1 deletion app/main/src-tauri/gen/schemas/acl-manifests.json

Large diffs are not rendered by default.

Loading

0 comments on commit 643e8ab

Please sign in to comment.