Compare commits
9 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
db5a2dbe01 | ||
|
|
8a29f48092 | ||
|
|
2fbcbef87c | ||
|
|
ab9c3f6e88 | ||
|
|
a20c0777ab | ||
|
|
2ff11d65e7 | ||
|
|
e252a96c4c | ||
|
|
e8f5c4ce24 | ||
|
|
8921baf41a |
2
.github/workflows/archive.yml
vendored
2
.github/workflows/archive.yml
vendored
@@ -16,7 +16,7 @@ jobs:
|
|||||||
cd ..
|
cd ..
|
||||||
zip ${{ github.event.repository.name }}/${{ github.event.repository.name }}-${{ github.ref_name }}.zip ${{ github.event.repository.name }} -r
|
zip ${{ github.event.repository.name }}/${{ github.event.repository.name }}-${{ github.ref_name }}.zip ${{ github.event.repository.name }} -r
|
||||||
- name: Upload zip to release
|
- name: Upload zip to release
|
||||||
uses: softprops/action-gh-release@a74c6b72af54cfa997e81df42d94703d6313a2d0
|
uses: softprops/action-gh-release@c062e08bd532815e2082a85e87e3ef29c3e6d191
|
||||||
with:
|
with:
|
||||||
files: |
|
files: |
|
||||||
${{ github.event.repository.name }}-${{ github.ref_name }}.zip
|
${{ github.event.repository.name }}-${{ github.ref_name }}.zip
|
||||||
130
.github/workflows/tauri.yml
vendored
130
.github/workflows/tauri.yml
vendored
@@ -12,20 +12,13 @@ jobs:
|
|||||||
uses: actions/checkout@v4.1.7
|
uses: actions/checkout@v4.1.7
|
||||||
with:
|
with:
|
||||||
submodules: true
|
submodules: true
|
||||||
- name: Get release
|
|
||||||
id: get_release
|
|
||||||
uses: bruceadams/get-release@74c3d60f5a28f358ccf241a00c9021ea16f0569f
|
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
- name: Setup node
|
- name: Setup node
|
||||||
uses: actions/setup-node@v4.0.3
|
uses: actions/setup-node@v4.0.3
|
||||||
with:
|
with:
|
||||||
node-version: 20.12.2
|
node-version: 20.12.2
|
||||||
cache: 'npm'
|
cache: 'npm'
|
||||||
- name: Install Rust stable
|
- name: Install Rust stable
|
||||||
uses: actions-rs/toolchain@v1.0.7
|
uses: dtolnay/rust-toolchain@stable
|
||||||
with:
|
|
||||||
toolchain: stable
|
|
||||||
- name: Install cinny dependencies
|
- name: Install cinny dependencies
|
||||||
run: cd cinny && npm ci
|
run: cd cinny && npm ci
|
||||||
- name: Install tauri dependencies
|
- name: Install tauri dependencies
|
||||||
@@ -38,7 +31,7 @@ jobs:
|
|||||||
TAURI_KEY_PASSWORD: ${{ secrets.TAURI_KEY_PASSWORD }}
|
TAURI_KEY_PASSWORD: ${{ secrets.TAURI_KEY_PASSWORD }}
|
||||||
NODE_OPTIONS: "--max_old_space_size=4096"
|
NODE_OPTIONS: "--max_old_space_size=4096"
|
||||||
with:
|
with:
|
||||||
releaseId: ${{ steps.get_release.outputs.upload_url }}
|
releaseId: ${{ github.event.release.upload_url }}
|
||||||
- name: Get app version (windows)
|
- name: Get app version (windows)
|
||||||
run: |
|
run: |
|
||||||
$json = (Get-Content "src-tauri\tauri.conf.json" -Raw) | ConvertFrom-Json
|
$json = (Get-Content "src-tauri\tauri.conf.json" -Raw) | ConvertFrom-Json
|
||||||
@@ -57,12 +50,12 @@ jobs:
|
|||||||
run: Move-Item "src-tauri\target\release\bundle\msi\Cinny_${{ env.TAURI_VERSION }}_x64_en-US.msi.zip.sig" "src-tauri\target\release\bundle\msi\Cinny_desktop-x86_64.msi.zip.sig"
|
run: Move-Item "src-tauri\target\release\bundle\msi\Cinny_${{ env.TAURI_VERSION }}_x64_en-US.msi.zip.sig" "src-tauri\target\release\bundle\msi\Cinny_desktop-x86_64.msi.zip.sig"
|
||||||
shell: pwsh
|
shell: pwsh
|
||||||
- name: Upload tagged release
|
- name: Upload tagged release
|
||||||
uses: softprops/action-gh-release@a74c6b72af54cfa997e81df42d94703d6313a2d0
|
uses: softprops/action-gh-release@c062e08bd532815e2082a85e87e3ef29c3e6d191
|
||||||
with:
|
with:
|
||||||
files: |
|
files: |
|
||||||
src-tauri\target\release\bundle\msi\Cinny_desktop-x86_64.msi
|
src-tauri/target/release/bundle/msi/Cinny_desktop-x86_64.msi
|
||||||
src-tauri\target\release\bundle\msi\Cinny_desktop-x86_64.msi.zip
|
src-tauri/target/release/bundle/msi/Cinny_desktop-x86_64.msi.zip
|
||||||
src-tauri\target\release\bundle\msi\Cinny_desktop-x86_64.msi.zip.sig
|
src-tauri/target/release/bundle/msi/Cinny_desktop-x86_64.msi.zip.sig
|
||||||
|
|
||||||
# Linux-x86_64
|
# Linux-x86_64
|
||||||
linux-x86_64:
|
linux-x86_64:
|
||||||
@@ -73,20 +66,13 @@ jobs:
|
|||||||
uses: actions/checkout@v4.1.7
|
uses: actions/checkout@v4.1.7
|
||||||
with:
|
with:
|
||||||
submodules: true
|
submodules: true
|
||||||
- name: Get release
|
|
||||||
id: get_release
|
|
||||||
uses: bruceadams/get-release@74c3d60f5a28f358ccf241a00c9021ea16f0569f
|
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
- name: Setup node
|
- name: Setup node
|
||||||
uses: actions/setup-node@v4.0.3
|
uses: actions/setup-node@v4.0.3
|
||||||
with:
|
with:
|
||||||
node-version: 20.12.2
|
node-version: 20.12.2
|
||||||
cache: 'npm'
|
cache: 'npm'
|
||||||
- name: Install Rust stable
|
- name: Install Rust stable
|
||||||
uses: actions-rs/toolchain@v1.0.7
|
uses: dtolnay/rust-toolchain@stable
|
||||||
with:
|
|
||||||
toolchain: stable
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: |
|
run: |
|
||||||
sudo apt-get update
|
sudo apt-get update
|
||||||
@@ -103,10 +89,10 @@ jobs:
|
|||||||
TAURI_KEY_PASSWORD: ${{ secrets.TAURI_KEY_PASSWORD }}
|
TAURI_KEY_PASSWORD: ${{ secrets.TAURI_KEY_PASSWORD }}
|
||||||
NODE_OPTIONS: "--max_old_space_size=4096"
|
NODE_OPTIONS: "--max_old_space_size=4096"
|
||||||
with:
|
with:
|
||||||
releaseId: ${{ steps.get_release.outputs.upload_url }}
|
releaseId: ${{ github.event.release.upload_url }}
|
||||||
- name: Get app version
|
- name: Get app version
|
||||||
id: vars
|
id: vars
|
||||||
run: echo ::set-output name=tag::$(jq .package.version src-tauri/tauri.conf.json | tr -d '"')
|
run: echo "tag=$(jq .package.version src-tauri/tauri.conf.json | tr -d '"')" >> $GITHUB_OUTPUT
|
||||||
- name: Move deb
|
- name: Move deb
|
||||||
run: mv "src-tauri/target/release/bundle/deb/cinny_${{ steps.vars.outputs.tag }}_amd64.deb" "src-tauri/target/release/bundle/deb/Cinny_desktop-x86_64.deb"
|
run: mv "src-tauri/target/release/bundle/deb/cinny_${{ steps.vars.outputs.tag }}_amd64.deb" "src-tauri/target/release/bundle/deb/Cinny_desktop-x86_64.deb"
|
||||||
- name: Move AppImage
|
- name: Move AppImage
|
||||||
@@ -116,7 +102,7 @@ jobs:
|
|||||||
- name: Move AppImage.tar.gz.sig
|
- name: Move AppImage.tar.gz.sig
|
||||||
run: mv "src-tauri/target/release/bundle/appimage/cinny_${{ steps.vars.outputs.tag }}_amd64.AppImage.tar.gz.sig" "src-tauri/target/release/bundle/appimage/Cinny_desktop-x86_64.AppImage.tar.gz.sig"
|
run: mv "src-tauri/target/release/bundle/appimage/cinny_${{ steps.vars.outputs.tag }}_amd64.AppImage.tar.gz.sig" "src-tauri/target/release/bundle/appimage/Cinny_desktop-x86_64.AppImage.tar.gz.sig"
|
||||||
- name: Upload tagged release
|
- name: Upload tagged release
|
||||||
uses: softprops/action-gh-release@a74c6b72af54cfa997e81df42d94703d6313a2d0
|
uses: softprops/action-gh-release@c062e08bd532815e2082a85e87e3ef29c3e6d191
|
||||||
with:
|
with:
|
||||||
files: |
|
files: |
|
||||||
src-tauri/target/release/bundle/deb/Cinny_desktop-x86_64.deb
|
src-tauri/target/release/bundle/deb/Cinny_desktop-x86_64.deb
|
||||||
@@ -124,28 +110,23 @@ jobs:
|
|||||||
src-tauri/target/release/bundle/appimage/Cinny_desktop-x86_64.AppImage.tar.gz
|
src-tauri/target/release/bundle/appimage/Cinny_desktop-x86_64.AppImage.tar.gz
|
||||||
src-tauri/target/release/bundle/appimage/Cinny_desktop-x86_64.AppImage.tar.gz.sig
|
src-tauri/target/release/bundle/appimage/Cinny_desktop-x86_64.AppImage.tar.gz.sig
|
||||||
|
|
||||||
# macos-x86_64
|
# macos-universal
|
||||||
macos-x86_64:
|
macos-universal:
|
||||||
runs-on: macos-latest
|
runs-on: macos-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v4.1.7
|
uses: actions/checkout@v4.1.7
|
||||||
with:
|
with:
|
||||||
submodules: true
|
submodules: true
|
||||||
- name: Get release
|
|
||||||
id: get_release
|
|
||||||
uses: bruceadams/get-release@74c3d60f5a28f358ccf241a00c9021ea16f0569f
|
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
- name: Setup node
|
- name: Setup node
|
||||||
uses: actions/setup-node@v4.0.3
|
uses: actions/setup-node@v4.0.3
|
||||||
with:
|
with:
|
||||||
node-version: 20.12.2
|
node-version: 20.12.2
|
||||||
cache: 'npm'
|
cache: 'npm'
|
||||||
- name: Install Rust stable
|
- name: Install Rust stable
|
||||||
uses: actions-rs/toolchain@v1.0.7
|
uses: dtolnay/rust-toolchain@stable
|
||||||
with:
|
with:
|
||||||
toolchain: stable
|
target: aarch64-apple-darwin,x86_64-apple-darwin
|
||||||
- name: Install cinny dependencies
|
- name: Install cinny dependencies
|
||||||
run: cd cinny && npm ci
|
run: cd cinny && npm ci
|
||||||
- name: Install tauri dependencies
|
- name: Install tauri dependencies
|
||||||
@@ -158,88 +139,29 @@ jobs:
|
|||||||
TAURI_KEY_PASSWORD: ${{ secrets.TAURI_KEY_PASSWORD }}
|
TAURI_KEY_PASSWORD: ${{ secrets.TAURI_KEY_PASSWORD }}
|
||||||
NODE_OPTIONS: "--max_old_space_size=4096"
|
NODE_OPTIONS: "--max_old_space_size=4096"
|
||||||
with:
|
with:
|
||||||
releaseId: ${{ steps.get_release.outputs.upload_url }}
|
releaseId: ${{ github.event.release.upload_url }}
|
||||||
|
args: "--target universal-apple-darwin"
|
||||||
- name: Get app version
|
- name: Get app version
|
||||||
id: vars
|
id: vars
|
||||||
run: echo ::set-output name=tag::$(jq .package.version src-tauri/tauri.conf.json | tr -d '"')
|
run: echo "tag=$(jq .package.version src-tauri/tauri.conf.json | tr -d '"')" >> $GITHUB_OUTPUT
|
||||||
- name: Move dmg
|
- name: Move dmg
|
||||||
run: mv "src-tauri/target/release/bundle/dmg/Cinny_${{ steps.vars.outputs.tag }}_aarch64.dmg" "src-tauri/target/release/bundle/dmg/Cinny_desktop-x86_64.dmg"
|
run: mv "src-tauri/target/universal-apple-darwin/release/bundle/dmg/Cinny_${{ steps.vars.outputs.tag }}_universal.dmg" "src-tauri/target/universal-apple-darwin/release/bundle/dmg/Cinny_desktop-universal.dmg"
|
||||||
- name: Move app.tar.gz
|
- name: Move app.tar.gz
|
||||||
run: mv "src-tauri/target/release/bundle/macos/Cinny.app.tar.gz" "src-tauri/target/release/bundle/macos/Cinny_desktop-x86_64.app.tar.gz"
|
run: mv "src-tauri/target/universal-apple-darwin/release/bundle/macos/Cinny.app.tar.gz" "src-tauri/target/universal-apple-darwin/release/bundle/macos/Cinny_desktop-universal.app.tar.gz"
|
||||||
- name: Move app.tar.gz.sig
|
- name: Move app.tar.gz.sig
|
||||||
run: mv "src-tauri/target/release/bundle/macos/Cinny.app.tar.gz.sig" "src-tauri/target/release/bundle/macos/Cinny_desktop-x86_64.app.tar.gz.sig"
|
run: mv "src-tauri/target/universal-apple-darwin/release/bundle/macos/Cinny.app.tar.gz.sig" "src-tauri/target/universal-apple-darwin/release/bundle/macos/Cinny_desktop-universal.app.tar.gz.sig"
|
||||||
- name: Upload tagged release
|
- name: Upload tagged release
|
||||||
uses: softprops/action-gh-release@a74c6b72af54cfa997e81df42d94703d6313a2d0
|
uses: softprops/action-gh-release@c062e08bd532815e2082a85e87e3ef29c3e6d191
|
||||||
with:
|
with:
|
||||||
files: |
|
files: |
|
||||||
src-tauri/target/release/bundle/dmg/Cinny_desktop-x86_64.dmg
|
src-tauri/target/universal-apple-darwin/release/bundle/dmg/Cinny_desktop-universal.dmg
|
||||||
src-tauri/target/release/bundle/macos/Cinny_desktop-x86_64.app.tar.gz
|
src-tauri/target/universal-apple-darwin/release/bundle/macos/Cinny_desktop-universal.app.tar.gz
|
||||||
src-tauri/target/release/bundle/macos/Cinny_desktop-x86_64.app.tar.gz.sig
|
src-tauri/target/universal-apple-darwin/release/bundle/macos/Cinny_desktop-universal.app.tar.gz.sig
|
||||||
|
|
||||||
# macos-aarch64
|
|
||||||
# macos-aarch64:
|
|
||||||
# runs-on: macos-12
|
|
||||||
# steps:
|
|
||||||
# - name: Checkout repository
|
|
||||||
# uses: actions/checkout@v4.1.7
|
|
||||||
# with:
|
|
||||||
# submodules: true
|
|
||||||
# - name: Get release
|
|
||||||
# id: get_release
|
|
||||||
# uses: bruceadams/get-release@74c3d60f5a28f358ccf241a00c9021ea16f0569f
|
|
||||||
# env:
|
|
||||||
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
# - name: Setup node
|
|
||||||
# uses: actions/setup-node@v3.4.1
|
|
||||||
# with:
|
|
||||||
# node-version: 20.12.2
|
|
||||||
# cache: 'npm'
|
|
||||||
# - name: Install Rust stable
|
|
||||||
# uses: actions-rs/toolchain@v1.0.7
|
|
||||||
# with:
|
|
||||||
# toolchain: stable
|
|
||||||
# - name: Install cinny dependencies
|
|
||||||
# run: cd cinny && npm ci
|
|
||||||
# - name: Install tauri dependencies
|
|
||||||
# run: npm ci
|
|
||||||
# - name: Install rustup target aarch64 darwin
|
|
||||||
# run: rustup target add aarch64-apple-darwin
|
|
||||||
# - name: Build desktop app with Tauri
|
|
||||||
# uses: tauri-apps/tauri-action@v0.3.1
|
|
||||||
# env:
|
|
||||||
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
# TAURI_PRIVATE_KEY: ${{ secrets.TAURI_PRIVATE_KEY }}
|
|
||||||
# TAURI_KEY_PASSWORD: ${{ secrets.TAURI_KEY_PASSWORD }}
|
|
||||||
# NODE_OPTIONS: "--max_old_space_size=4096"
|
|
||||||
# with:
|
|
||||||
# args: --target aarch64-apple-darwin
|
|
||||||
# releaseId: ${{ steps.get_release.outputs.upload_url }}
|
|
||||||
# - name: Get app version
|
|
||||||
# if: always()
|
|
||||||
# id: vars
|
|
||||||
# run: echo ::set-output name=tag::$(jq .package.version src-tauri/tauri.conf.json | tr -d '"')
|
|
||||||
# - name: Move dmg
|
|
||||||
# if: always()
|
|
||||||
# run: mv "src-tauri/target/aarch64-apple-darwin/release/bundle/dmg/Cinny_${{ steps.vars.outputs.tag }}_aarch64.dmg" "src-tauri/target/aarch64-apple-darwin/release/bundle/dmg/Cinny_desktop-aarch64.dmg"
|
|
||||||
# - name: Move app.tar.gz
|
|
||||||
# if: always()
|
|
||||||
# run: mv "src-tauri/target/aarch64-apple-darwin/release/bundle/macos/Cinny.app.tar.gz" "src-tauri/target/aarch64-apple-darwin/release/bundle/macos/Cinny_desktop-aarch64.app.tar.gz"
|
|
||||||
# - name: Move app.tar.gz.sig
|
|
||||||
# if: always()
|
|
||||||
# run: mv "src-tauri/target/aarch64-apple-darwin/release/bundle/macos/Cinny.app.tar.gz.sig" "src-tauri/target/aarch64-apple-darwin/release/bundle/macos/Cinny_desktop-aarch64.app.tar.gz.sig"
|
|
||||||
# - name: Upload tagged release
|
|
||||||
# if: always()
|
|
||||||
# uses: softprops/action-gh-release@a74c6b72af54cfa997e81df42d94703d6313a2d0
|
|
||||||
# with:
|
|
||||||
# files: |
|
|
||||||
# src-tauri/target/aarch64-apple-darwin/release/bundle/dmg/Cinny_desktop-aarch64.dmg
|
|
||||||
# src-tauri/target/aarch64-apple-darwin/release/bundle/macos/Cinny_desktop-aarch64.tar.gz
|
|
||||||
# src-tauri/target/aarch64-apple-darwin/release/bundle/macos/Cinny_desktop-aarch64.tar.gz.sig
|
|
||||||
|
|
||||||
# Upload release.json
|
# Upload release.json
|
||||||
release-update:
|
release-update:
|
||||||
if: always()
|
if: always()
|
||||||
needs: [windows-x86_64, linux-x86_64, macos-x86_64] #, macos-aarch64]
|
needs: [windows-x86_64, linux-x86_64, macos-universal]
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
@@ -249,4 +171,4 @@ jobs:
|
|||||||
- name: Run release.json
|
- name: Run release.json
|
||||||
run: npm run release
|
run: npm run release
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
2
cinny
2
cinny
Submodule cinny updated: 96415a8d2a...c75e903619
38
config.json
Normal file
38
config.json
Normal file
@@ -0,0 +1,38 @@
|
|||||||
|
{
|
||||||
|
"defaultHomeserver": 2,
|
||||||
|
"homeserverList": [
|
||||||
|
"converser.eu",
|
||||||
|
"envs.net",
|
||||||
|
"matrix.org",
|
||||||
|
"monero.social",
|
||||||
|
"mozilla.org",
|
||||||
|
"xmr.se"
|
||||||
|
],
|
||||||
|
"allowCustomHomeservers": true,
|
||||||
|
|
||||||
|
"featuredCommunities": {
|
||||||
|
"openAsDefault": false,
|
||||||
|
"spaces": [
|
||||||
|
"#cinny-space:matrix.org",
|
||||||
|
"#community:matrix.org",
|
||||||
|
"#space:envs.net",
|
||||||
|
"#science-space:matrix.org",
|
||||||
|
"#libregaming-games:tchncs.de",
|
||||||
|
"#mathematics-on:matrix.org"
|
||||||
|
],
|
||||||
|
"rooms": [
|
||||||
|
"#cinny:matrix.org",
|
||||||
|
"#freesoftware:matrix.org",
|
||||||
|
"#pcapdroid:matrix.org",
|
||||||
|
"#gentoo:matrix.org",
|
||||||
|
"#PrivSec.dev:arcticfoxes.net",
|
||||||
|
"#disroot:aria-net.org"
|
||||||
|
],
|
||||||
|
"servers": ["envs.net", "matrix.org", "monero.social", "mozilla.org"]
|
||||||
|
},
|
||||||
|
|
||||||
|
"hashRouter": {
|
||||||
|
"enabled": true,
|
||||||
|
"basename": "/"
|
||||||
|
}
|
||||||
|
}
|
||||||
4
package-lock.json
generated
4
package-lock.json
generated
@@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "cinny",
|
"name": "cinny",
|
||||||
"version": "4.0.1",
|
"version": "4.2.0",
|
||||||
"lockfileVersion": 3,
|
"lockfileVersion": 3,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "cinny",
|
"name": "cinny",
|
||||||
"version": "3.2.1",
|
"version": "4.2.0",
|
||||||
"license": "AGPL-3.0-only",
|
"license": "AGPL-3.0-only",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@tauri-apps/api": "1.6.0"
|
"@tauri-apps/api": "1.6.0"
|
||||||
|
|||||||
@@ -1,13 +1,13 @@
|
|||||||
{
|
{
|
||||||
"name": "cinny",
|
"name": "cinny",
|
||||||
"version": "4.0.1",
|
"version": "4.2.0",
|
||||||
"description": "Yet another matrix client",
|
"description": "Yet another matrix client",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=16.0.0"
|
"node": ">=16.0.0"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"tauri": "tauri",
|
"tauri": "cp config.json cinny/ && tauri",
|
||||||
"release": "node scripts/release.mjs"
|
"release": "node scripts/release.mjs"
|
||||||
},
|
},
|
||||||
"keywords": [],
|
"keywords": [],
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ async function createTauriRelease() {
|
|||||||
const windowsX86_64 = {};
|
const windowsX86_64 = {};
|
||||||
const linuxX86_64 = {};
|
const linuxX86_64 = {};
|
||||||
const darwinX86_64 = {};
|
const darwinX86_64 = {};
|
||||||
// const darwinAarch64 = {};
|
const darwinAarch64 = {};
|
||||||
|
|
||||||
const promises = latestAssets.map(async (asset) => {
|
const promises = latestAssets.map(async (asset) => {
|
||||||
const { name, browser_download_url } = asset;
|
const { name, browser_download_url } = asset;
|
||||||
@@ -53,19 +53,19 @@ async function createTauriRelease() {
|
|||||||
linuxX86_64.signature = await getAssetSign(browser_download_url);
|
linuxX86_64.signature = await getAssetSign(browser_download_url);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (/x86_64\.app\.tar\.gz$/.test(name)) {
|
if (/universal\.app\.tar\.gz$/.test(name)) {
|
||||||
darwinX86_64.url = browser_download_url;
|
darwinX86_64.url = browser_download_url;
|
||||||
}
|
}
|
||||||
if (/x86_64\.app\.tar\.gz\.sig$/.test(name)) {
|
if (/universal\.app\.tar\.gz\.sig$/.test(name)) {
|
||||||
darwinX86_64.signature = await getAssetSign(browser_download_url);
|
darwinX86_64.signature = await getAssetSign(browser_download_url);
|
||||||
}
|
}
|
||||||
|
|
||||||
// if (/aarch64\.app\.tar\.gz$/.test(name)) {
|
if (/universal\.app\.tar\.gz$/.test(name)) {
|
||||||
// darwinAarch64.url = browser_download_url;
|
darwinAarch64.url = browser_download_url;
|
||||||
// }
|
}
|
||||||
// if (/aarch64\.app\.tar\.gz\.sig$/.test(name)) {
|
if (/universal\.app\.tar\.gz\.sig$/.test(name)) {
|
||||||
// darwinAarch64.signature = await getAssetSign(browser_download_url);
|
darwinAarch64.signature = await getAssetSign(browser_download_url);
|
||||||
// }
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
await Promise.allSettled(promises);
|
await Promise.allSettled(promises);
|
||||||
@@ -86,8 +86,8 @@ async function createTauriRelease() {
|
|||||||
if (darwinX86_64.url) releaseData.platforms["darwin-x86_64"] = darwinX86_64;
|
if (darwinX86_64.url) releaseData.platforms["darwin-x86_64"] = darwinX86_64;
|
||||||
else console.error('Failed to get release for darwinX86_64');
|
else console.error('Failed to get release for darwinX86_64');
|
||||||
|
|
||||||
// if (darwinAarch64.url) releaseData.platforms["darwin-aarch64"] = darwinAarch64;
|
if (darwinAarch64.url) releaseData.platforms["darwin-aarch64"] = darwinAarch64;
|
||||||
// else console.error('Failed to get release for darwinAarch64');
|
else console.error('Failed to get release for darwinAarch64');
|
||||||
|
|
||||||
const releaseResult = await repos.getReleaseByTag({ ...repoMetaData, tag: 'tauri' });
|
const releaseResult = await repos.getReleaseByTag({ ...repoMetaData, tag: 'tauri' });
|
||||||
const tauriRelease = releaseResult.data;
|
const tauriRelease = releaseResult.data;
|
||||||
|
|||||||
73
src-tauri/Cargo.lock
generated
73
src-tauri/Cargo.lock
generated
@@ -444,13 +444,12 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "cinny"
|
name = "cinny"
|
||||||
version = "4.0.1"
|
version = "4.2.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"serde",
|
"serde",
|
||||||
"serde_json",
|
"serde_json",
|
||||||
"tauri",
|
"tauri",
|
||||||
"tauri-build",
|
"tauri-build",
|
||||||
"tauri-plugin-single-instance",
|
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@@ -1775,46 +1774,12 @@ version = "1.4.0"
|
|||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646"
|
checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646"
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "libappindicator"
|
|
||||||
version = "0.7.1"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "db2d3cb96d092b4824cb306c9e544c856a4cb6210c1081945187f7f1924b47e8"
|
|
||||||
dependencies = [
|
|
||||||
"glib",
|
|
||||||
"gtk",
|
|
||||||
"gtk-sys",
|
|
||||||
"libappindicator-sys",
|
|
||||||
"log",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "libappindicator-sys"
|
|
||||||
version = "0.7.3"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "f1b3b6681973cea8cc3bce7391e6d7d5502720b80a581c9a95c9cbaf592826aa"
|
|
||||||
dependencies = [
|
|
||||||
"gtk-sys",
|
|
||||||
"libloading",
|
|
||||||
"once_cell",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "libc"
|
name = "libc"
|
||||||
version = "0.2.149"
|
version = "0.2.149"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "a08173bc88b7955d1b3145aa561539096c421ac8debde8cbc3612ec635fee29b"
|
checksum = "a08173bc88b7955d1b3145aa561539096c421ac8debde8cbc3612ec635fee29b"
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "libloading"
|
|
||||||
version = "0.7.4"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "b67380fd3b2fbe7527a606e18729d21c6f3951633d0500574c4dc22d2d638b9f"
|
|
||||||
dependencies = [
|
|
||||||
"cfg-if",
|
|
||||||
"winapi",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "line-wrap"
|
name = "line-wrap"
|
||||||
version = "0.1.1"
|
version = "0.1.1"
|
||||||
@@ -3452,7 +3417,6 @@ dependencies = [
|
|||||||
"core-foundation",
|
"core-foundation",
|
||||||
"core-graphics",
|
"core-graphics",
|
||||||
"crossbeam-channel",
|
"crossbeam-channel",
|
||||||
"dirs-next",
|
|
||||||
"dispatch",
|
"dispatch",
|
||||||
"gdk",
|
"gdk",
|
||||||
"gdk-pixbuf",
|
"gdk-pixbuf",
|
||||||
@@ -3467,7 +3431,6 @@ dependencies = [
|
|||||||
"instant",
|
"instant",
|
||||||
"jni",
|
"jni",
|
||||||
"lazy_static",
|
"lazy_static",
|
||||||
"libappindicator",
|
|
||||||
"libc",
|
"libc",
|
||||||
"log",
|
"log",
|
||||||
"ndk",
|
"ndk",
|
||||||
@@ -3512,9 +3475,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "tauri"
|
name = "tauri"
|
||||||
version = "1.6.8"
|
version = "1.7.1"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "77567d2b3b74de4588d544147142d02297f3eaa171a25a065252141d8597a516"
|
checksum = "336bc661a3f3250853fa83c6e5245449ed1c26dce5dcb28bdee7efedf6278806"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"base64 0.21.5",
|
"base64 0.21.5",
|
||||||
@@ -3594,9 +3557,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "tauri-codegen"
|
name = "tauri-codegen"
|
||||||
version = "1.4.3"
|
version = "1.4.4"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "c3a1d90db526a8cdfd54444ad3f34d8d4d58fa5c536463915942393743bd06f8"
|
checksum = "c1aed706708ff1200ec12de9cfbf2582b5d8ec05f6a7293911091effbd22036b"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"base64 0.21.5",
|
"base64 0.21.5",
|
||||||
"brotli",
|
"brotli",
|
||||||
@@ -3620,9 +3583,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "tauri-macros"
|
name = "tauri-macros"
|
||||||
version = "1.4.4"
|
version = "1.4.5"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "6a582d75414250122e4a597b9dd7d3c910a2c77906648fc2ac9353845ff0feec"
|
checksum = "b88f831d2973ae4f81a706a0004e67dac87f2e4439973bbe98efbd73825d8ede"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"heck 0.5.0",
|
"heck 0.5.0",
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
@@ -3632,25 +3595,11 @@ dependencies = [
|
|||||||
"tauri-utils",
|
"tauri-utils",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "tauri-plugin-single-instance"
|
|
||||||
version = "0.0.0"
|
|
||||||
source = "git+https://github.com/tauri-apps/plugins-workspace?branch=v1#a32008965b5cf060cc04e1e143dd221ce410715d"
|
|
||||||
dependencies = [
|
|
||||||
"log",
|
|
||||||
"serde",
|
|
||||||
"serde_json",
|
|
||||||
"tauri",
|
|
||||||
"thiserror",
|
|
||||||
"windows-sys 0.52.0",
|
|
||||||
"zbus",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "tauri-runtime"
|
name = "tauri-runtime"
|
||||||
version = "0.14.3"
|
version = "0.14.4"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "cd7ffddf36d450791018e63a3ddf54979b9581d9644c584a5fb5611e6b5f20b4"
|
checksum = "3068ed62b63dedc705558f4248c7ecbd5561f0f8050949859ea0db2326f26012"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"gtk",
|
"gtk",
|
||||||
"http",
|
"http",
|
||||||
@@ -3669,9 +3618,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "tauri-runtime-wry"
|
name = "tauri-runtime-wry"
|
||||||
version = "0.14.8"
|
version = "0.14.9"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "1989b3b4d611f5428b3414a4abae6fa6df30c7eb8ed33250ca90a5f7e5bb3655"
|
checksum = "d4c3db170233096aa30330feadcd895bf9317be97e624458560a20e814db7955"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"arboard",
|
"arboard",
|
||||||
"cocoa",
|
"cocoa",
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
[package]
|
[package]
|
||||||
name = "cinny"
|
name = "cinny"
|
||||||
version = "4.0.1"
|
version = "4.2.0"
|
||||||
description = "Yet another matrix client"
|
description = "Yet another matrix client"
|
||||||
authors = ["Ajay Bura"]
|
authors = ["Ajay Bura"]
|
||||||
license = "AGPL-3.0-only"
|
license = "AGPL-3.0-only"
|
||||||
@@ -17,8 +17,7 @@ tauri-build = { version = "1.5.3", features = [] }
|
|||||||
[dependencies]
|
[dependencies]
|
||||||
serde_json = "1.0.109"
|
serde_json = "1.0.109"
|
||||||
serde = { version = "1.0.193", features = ["derive"] }
|
serde = { version = "1.0.193", features = ["derive"] }
|
||||||
tauri = { version = "1.6.8", features = ["api-all", "devtools", "system-tray", "updater"] }
|
tauri = { version = "1.7.1", features = ["api-all", "devtools", "updater"] }
|
||||||
tauri-plugin-single-instance = { git = "https://github.com/tauri-apps/plugins-workspace", branch = "v1" }
|
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
# by default Tauri runs in production mode
|
# by default Tauri runs in production mode
|
||||||
|
|||||||
@@ -3,10 +3,8 @@
|
|||||||
windows_subsystem = "windows"
|
windows_subsystem = "windows"
|
||||||
)]
|
)]
|
||||||
|
|
||||||
use tauri::Manager;
|
|
||||||
#[cfg(target_os = "macos")]
|
#[cfg(target_os = "macos")]
|
||||||
mod menu;
|
mod menu;
|
||||||
mod tray;
|
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
let builder = tauri::Builder::default();
|
let builder = tauri::Builder::default();
|
||||||
@@ -14,38 +12,7 @@ fn main() {
|
|||||||
#[cfg(target_os = "macos")]
|
#[cfg(target_os = "macos")]
|
||||||
let builder = builder.menu(menu::menu());
|
let builder = builder.menu(menu::menu());
|
||||||
|
|
||||||
let builder = builder
|
|
||||||
.system_tray(tray::system_tray())
|
|
||||||
.on_system_tray_event(tray::system_tray_handler);
|
|
||||||
|
|
||||||
builder
|
builder
|
||||||
.plugin(tauri_plugin_single_instance::init(|app, _, _| {
|
.run(tauri::generate_context!())
|
||||||
let tray_handle = match app.tray_handle_by_id(crate::tray::TRAY_LABEL) {
|
|
||||||
Some(h) => h,
|
|
||||||
None => return,
|
|
||||||
};
|
|
||||||
let window = app.get_window("main").unwrap();
|
|
||||||
|
|
||||||
if !window.is_visible().unwrap() || window.is_minimized().unwrap() {
|
|
||||||
window.unminimize().unwrap();
|
|
||||||
window.show().unwrap();
|
|
||||||
window.set_focus().unwrap();
|
|
||||||
tray_handle
|
|
||||||
.get_item("toggle")
|
|
||||||
.set_title("Hide Cinny")
|
|
||||||
.unwrap();
|
|
||||||
}
|
|
||||||
}))
|
|
||||||
.build(tauri::generate_context!())
|
|
||||||
.expect("error while building tauri application")
|
.expect("error while building tauri application")
|
||||||
.run(run_event_handler)
|
|
||||||
}
|
|
||||||
|
|
||||||
fn run_event_handler<R: tauri::Runtime>(app: &tauri::AppHandle<R>, event: tauri::RunEvent) {
|
|
||||||
match event {
|
|
||||||
tauri::RunEvent::WindowEvent { label, event, .. } => {
|
|
||||||
tray::window_event_handler(app, &label, &event);
|
|
||||||
}
|
|
||||||
_ => {}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,87 +0,0 @@
|
|||||||
use tauri::{
|
|
||||||
CustomMenuItem, Manager, SystemTray, SystemTrayEvent, SystemTrayMenu,
|
|
||||||
SystemTrayMenuItem, WindowEvent, SystemTrayHandle, Window,
|
|
||||||
};
|
|
||||||
|
|
||||||
pub const TRAY_LABEL: &'static str = "main-tray";
|
|
||||||
|
|
||||||
pub fn window_event_handler<R: tauri::Runtime>(
|
|
||||||
app: &tauri::AppHandle<R>,
|
|
||||||
label: &str,
|
|
||||||
event: &WindowEvent,
|
|
||||||
) {
|
|
||||||
match event {
|
|
||||||
// Prevent Cinny from closing, instead hide it and let it be
|
|
||||||
// reopened through the tray.
|
|
||||||
WindowEvent::CloseRequested { api, .. } => {
|
|
||||||
api.prevent_close();
|
|
||||||
app.get_window(&label).unwrap().hide().unwrap();
|
|
||||||
app.tray_handle_by_id(TRAY_LABEL)
|
|
||||||
.unwrap()
|
|
||||||
.get_item("toggle")
|
|
||||||
.set_title("Show Cinny")
|
|
||||||
.unwrap();
|
|
||||||
}
|
|
||||||
_ => {}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Build the system tray object
|
|
||||||
pub fn system_tray() -> SystemTray {
|
|
||||||
let toggle = CustomMenuItem::new("toggle".to_owned(), "Hide Cinny");
|
|
||||||
let quit = CustomMenuItem::new("quit".to_owned(), "Quit");
|
|
||||||
let menu = SystemTrayMenu::new()
|
|
||||||
.add_item(toggle)
|
|
||||||
.add_native_item(SystemTrayMenuItem::Separator)
|
|
||||||
.add_item(quit);
|
|
||||||
|
|
||||||
tauri::SystemTray::new()
|
|
||||||
.with_menu(menu)
|
|
||||||
.with_id(TRAY_LABEL.to_owned())
|
|
||||||
}
|
|
||||||
|
|
||||||
pub fn toggle_window_state<R: tauri::Runtime>(window: Window<R>, tray_handle: SystemTrayHandle<R>) {
|
|
||||||
// Hide the window if it's visible, show it if not
|
|
||||||
// `is_visible` returns true for minimized state for whatever reason
|
|
||||||
if window.is_visible().unwrap() {
|
|
||||||
window.hide().unwrap();
|
|
||||||
tray_handle
|
|
||||||
.get_item("toggle")
|
|
||||||
.set_title("Show Cinny")
|
|
||||||
.unwrap();
|
|
||||||
} else {
|
|
||||||
window.unminimize().unwrap();
|
|
||||||
window.show().unwrap();
|
|
||||||
window.set_focus().unwrap();
|
|
||||||
tray_handle
|
|
||||||
.get_item("toggle")
|
|
||||||
.set_title("Hide Cinny")
|
|
||||||
.unwrap();
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
pub fn system_tray_handler<R: tauri::Runtime>(app: &tauri::AppHandle<R>, event: SystemTrayEvent) {
|
|
||||||
let tray_handle = match app.tray_handle_by_id(TRAY_LABEL) {
|
|
||||||
Some(h) => h,
|
|
||||||
None => return,
|
|
||||||
};
|
|
||||||
let window = app.get_window("main").unwrap();
|
|
||||||
|
|
||||||
match event {
|
|
||||||
SystemTrayEvent::LeftClick { .. } => {
|
|
||||||
toggle_window_state(window, tray_handle);
|
|
||||||
}
|
|
||||||
SystemTrayEvent::MenuItemClick { id, .. } => {
|
|
||||||
match id.as_str() {
|
|
||||||
"quit" => {
|
|
||||||
app.exit(0);
|
|
||||||
}
|
|
||||||
"toggle" => {
|
|
||||||
toggle_window_state(window, tray_handle)
|
|
||||||
}
|
|
||||||
_ => {}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
_ => {}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"package": {
|
"package": {
|
||||||
"productName": "Cinny",
|
"productName": "Cinny",
|
||||||
"version": "4.0.1"
|
"version": "4.2.0"
|
||||||
},
|
},
|
||||||
"build": {
|
"build": {
|
||||||
"distDir": "../cinny/dist",
|
"distDir": "../cinny/dist",
|
||||||
@@ -72,11 +72,6 @@
|
|||||||
],
|
],
|
||||||
"security": {
|
"security": {
|
||||||
"csp": "script-src blob: data: filesystem: ws: wss: http: https: tauri: 'unsafe-eval' 'unsafe-inline' 'self' img-src: 'self'"
|
"csp": "script-src blob: data: filesystem: ws: wss: http: https: tauri: 'unsafe-eval' 'unsafe-inline' 'self' img-src: 'self'"
|
||||||
},
|
|
||||||
"systemTray": {
|
|
||||||
"iconPath": "icons/32x32.png",
|
|
||||||
"iconAsTemplate": true,
|
|
||||||
"menuOnLeftClick": false
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user