Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: tauri version #492

Merged
merged 37 commits into from
Nov 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
e757529
chore: move electron project into an electron folder rather than main
sekwah41 Dec 28, 2022
f1ee205
feat: add base tauri app
sekwah41 Dec 28, 2022
5d99a8f
chore(ci): just test on linux for now
sekwah41 Dec 29, 2022
0fed52a
chore(ci): enable installing libgtk on linux build
sekwah41 Dec 29, 2022
3298571
chore(ci): Upload files from build
sekwah41 Dec 29, 2022
18ed7c5
chore(ci): enable building on other operating systems
sekwah41 Dec 29, 2022
41fb889
chore(ci): add upload targets
sekwah41 Dec 29, 2022
bf891c5
feat: make tauri version draggable
sekwah41 Dec 30, 2022
f1f4fc2
feat(tauri): debug menu in dev mode
sekwah41 Dec 30, 2022
f4d8d77
feat: restructure connector in a way that allows easy switching out f…
sekwah41 Dec 30, 2022
67cb272
feat(tauri): add base connector with placeholders for logging
sekwah41 Dec 30, 2022
6e62298
chore: ran tauri icon command to generate logos
sekwah41 Dec 30, 2022
e9ef8cf
chore: flag tauri to build with global variable
sekwah41 Dec 30, 2022
90d662a
fix(tauri): catch audio playing errors gracefully
sekwah41 Dec 30, 2022
69bab00
feat(tauri): add easy command interface for frontend -> backend
sekwah41 Dec 31, 2022
a325e0b
feat(tauri): added connection hooks for all of the base tauri commands
sekwah41 Dec 31, 2022
2e8faf9
feat(tauri): pass the data from the frontend into the commands
sekwah41 Dec 31, 2022
76ace97
feat(tauri): compact mode resizing
sekwah41 Jan 1, 2023
f8c3cea
feat(tauri): always on top command
sekwah41 Jan 3, 2023
ba75f3d
feat(tauri): full screen mode
sekwah41 Jan 3, 2023
7a74056
chore: wait-on updated due to breaking node change in 17
sekwah41 Sep 30, 2023
7c34758
chore: finished tauri rebase
sekwah41 Sep 30, 2023
dadf80f
feat(tauri): add tray icon updating and a number of other commands
sekwah41 Oct 1, 2023
11ab40e
chore(tauri): update bundle config
sekwah41 Oct 1, 2023
f57caa0
feat(tauri): add closing logic
sekwah41 Oct 1, 2023
0b3df63
feat(tauri): improve installer
sekwah41 Oct 1, 2023
efc7bd2
fix(tauri): allow context menu on list titles
sekwah41 Oct 6, 2023
8d5a273
fix(tauri): update to tauri v2 (fixes audio)
sekwah41 Oct 6, 2023
24be241
refactor(tauri): split system_tray to another file
sekwah41 Oct 19, 2023
391f5b5
fix(tauri): fullscreen break being resizeable
sekwah41 Oct 21, 2023
053c651
chore: remove ignoreDeprecations
sekwah41 Oct 21, 2023
5214659
chore: update install deps for ubuntu
sekwah41 Oct 21, 2023
05514b1
chore: update ubuntu, node and add a devcontainer file to make it eas…
sekwah41 Oct 22, 2023
d17b63d
feat(tauri): add global show and hide shortcuts as well as block reload
sekwah41 Oct 23, 2023
dd1bf65
feat(tauri): auto updater
sekwah41 Oct 25, 2023
4bbf3a7
feat(tauri): updater window
sekwah41 Nov 8, 2023
12d0ad9
chore: add identifiers for the platforms to the builds
sekwah41 Nov 12, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{ "image": "ubuntu:22.04" }
sekwah41 marked this conversation as resolved.
Show resolved Hide resolved
123 changes: 123 additions & 0 deletions .github/workflows/build-tauri.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,123 @@
name: Build Tauri

on:
push:
branches-ignore:
- "master"
paths-ignore:
- "website"
workflow_call:
workflow_dispatch:
jobs:
build:
name: "Test Build"

runs-on: ${{ matrix.os }}

strategy:
matrix:
include:
- os: ubuntu-22.04
name: linux
# https://tauri.app/v1/guides/building/linux#cross-compiling-tauri-applications-for-arm-based-devices
# Cross Compiling is also more of a pain it seems for linux atm, explore later
targets: "x86_64-unknown-linux-gnu"
tauri_target: ["x86_64-unknown-linux-gnu"]
- os: macos-latest
name: mac
targets: "aarch64-apple-darwin,x86_64-apple-darwin"
tauri_target: ["universal-apple-darwin"]
- os: windows-latest
name: win
targets: "aarch64-pc-windows-msvc,x86_64-pc-windows-msvc"
# The MSI installer is better integrated with the Add/Remove menu and feels more modern.
# The only real added benefit of NSIS is that the installer can have a custom logo.
# Also, nsis is the only one that currently works on arm64
# Another note is embedBootstrapper is enabled to improve support on window 7. Though windows 7 doesn't support arm64.
tauri_target:
[
"'aarch64-pc-windows-msvc --bundles nsis,updater'",
"'x86_64-pc-windows-msvc --bundles msi,updater'",
]

steps:
- uses: actions/checkout@v4
- name: Use Node.js 18.x
uses: actions/setup-node@v4
with:
node-version: 18.x
cache: "yarn"
- name: install Rust stable
uses: dtolnay/rust-toolchain@stable
with:
targets: ${{ matrix.targets }}
- name: Rust cache
uses: swatinem/rust-cache@v2
with:
workspaces: "./app/tauri -> target"
- name: install dependencies (ubuntu only)
if: matrix.os == 'ubuntu-22.04'
run: |
sudo apt-get update
sudo apt-get install -y libwebkit2gtk-4.1 build-essential curl wget file libssl-dev libgtk-3-dev libayatana-appindicator3-dev librsvg2-dev javascriptcoregtk-4.1
- name: Install NPM Packages
run: |
yarn install --immutable --network-timeout 120000
- name: Build
shell: bash
run: |
for target in ${{ join(matrix.tauri_target, ' ') }}; do
yarn build:tauri --target $target --config ./app/tauri/release.conf.json
done
env:
TAURI_SIGNING_PRIVATE_KEY: ${{ secrets.TAURI_PRIVATE_KEY }}
TAURI_SIGNING_PRIVATE_KEY_PASSWORD: ${{ secrets.TAURI_KEY_PASSWORD }}
# Possibly set up some basic unit testing just to make sure parts render and none of the libraries are straight up breaking
- uses: actions/upload-artifact@v3
with:
name: tauri-${{ matrix.name }}
path: |
app/tauri/target/*/release/bundle/**/*.AppImage
app/tauri/target/*/release/bundle/**/*.dmg
app/tauri/target/*/release/bundle/**/*.deb
app/tauri/target/*/release/bundle/**/msi/*.msi
app/tauri/target/*/release/bundle/**/nsis/*.exe
app/tauri/target/*/release/bundle/appimage/**/*.tar.gz
app/tauri/target/*/release/bundle/macos/**/*.tar.gz
app/tauri/target/*/release/bundle/**/*.zip
app/tauri/target/*/release/bundle/**/*.sig
generate-updater-file:
needs: build
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
# Download-artifact cannot do a wildcard and if all are downloaded it can download the results from the electron stage
# We could filter that but this is faster to avoid unneeded downloads.
- name: Download Win
uses: actions/download-artifact@v3
with:
name: tauri-win
path: artifacts/tauri-win
- name: Download Mac
uses: actions/download-artifact@v3
with:
name: tauri-mac
path: artifacts/tauri-mac
- name: Download Linux
uses: actions/download-artifact@v3
with:
name: tauri-linux
path: artifacts/tauri-linux
- name: Use Node.js 18.x
uses: actions/setup-node@v3
with:
node-version: 18.x
cache: "yarn"
- name: Generate updater file
run: node app/tauri/release-prep/release-prep.js
- uses: actions/upload-artifact@v3
with:
name: tauri-release
path: |
release/*
20 changes: 10 additions & 10 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
- name: Setup node
uses: actions/setup-node@v3
with:
node-version: 16.x
node-version: 18.x
cache: "yarn"
- name: Cache
uses: actions/cache@v3
Expand All @@ -53,37 +53,37 @@ jobs:
with:
name: built-app-all-in-one-${{ matrix.name }}
path: |
app/main/dist/Pomatez-v+([0-9]).+([0-9]).+([0-9])-win-*.exe
app/electron/dist/Pomatez-v+([0-9]).+([0-9]).+([0-9])-win-*.exe
- name: Upload ia32 builds
uses: actions/upload-artifact@v3
with:
name: built-app-ia32-${{ matrix.name }}
path: |
app/main/dist/Pomatez*ia32*.*
app/electron/dist/Pomatez*ia32*.*
- name: Upload x64 builds
uses: actions/upload-artifact@v3
with:
name: built-app-x64-${{ matrix.name }}
path: |
app/main/dist/Pomatez*x64*.*
app/main/dist/Pomatez*x86_64*.*
app/main/dist/Pomatez*amd64*.*
app/electron/dist/Pomatez*x64*.*
app/electron/dist/Pomatez*x86_64*.*
app/electron/dist/Pomatez*amd64*.*
- name: Upload arm64 builds
uses: actions/upload-artifact@v3
with:
name: built-app-arm64-${{ matrix.name }}
path: |
app/main/dist/Pomatez*arm64*.*
app/main/dist/Pomatez*aarch64*.*
app/electron/dist/Pomatez*arm64*.*
app/electron/dist/Pomatez*aarch64*.*
- name: Upload armv7l builds
uses: actions/upload-artifact@v3
with:
name: built-app-armv7l-${{ matrix.name }}
path: |
app/main/dist/Pomatez*armv7l*.*
app/electron/dist/Pomatez*armv7l*.*
- name: Upload autoupdaters
uses: actions/upload-artifact@v3
with:
name: built-app-AutoUpdater-${{ matrix.name }}
path: |
app/main/dist/latest*
app/electron/dist/latest*
84 changes: 47 additions & 37 deletions .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,22 @@ jobs:
release_created: ${{ steps.release.outputs.release_created }}
sha: ${{ steps.release.outputs.sha }}
upload_url: ${{ steps.release.outputs.upload_url }}
build:
name: "Build"
build-node:
name: "Build Node"
needs: release-please
if: needs.release-please.outputs.release_created
uses: ./.github/workflows/build.yml
build-tauri:
name: "Build Tauri"
needs: release-please
if: needs.release-please.outputs.release_created
uses: ./.github/workflows/build-tauri.yml
secrets: inherit
publish:
name: Publish
needs:
- build
- build-node
- build-tauri
- release-please
runs-on: ubuntu-latest
steps:
Expand All @@ -42,37 +49,40 @@ jobs:
with:
tag_name: ${{ needs.release-please.outputs.tag }}
files: |
**/latest*
**/*.deb
**/*.rpm
**/*.dmg
**/*.AppImage
**/*.zip
**/*.exe
**/*.snap
**/*.blockmap
publish-to-homebrew-cask:
name: Publish to Homebrew Cask
needs:
- publish
- release-please
runs-on: macos-latest
steps:
- uses: Homebrew/actions/bump-packages@master
with:
casks: pomatez
token: ${{ secrets.GITHUB_TOKEN }}
publish-to-winget:
name: Publish to WinGet
needs:
- publish
- release-please
runs-on: windows-latest
steps:
- uses: vedantmgoyal2009/winget-releaser@v2
with:
identifier: Zidoro.Pomatez
installers-regex: 'setup\.exe$'
max-versions-to-keep: 5 # keep only latest 5 versions
release-tag: ${{ needs.release-please.outputs.tag }}
token: ${{ secrets.GITHUB_TOKEN }}
built-*/latest*
built-*/*.deb
built-*/*.rpm
built-*/*.dmg
built-*/*.AppImage
built-*/*.zip
built-*/*.exe
built-*/*.snap
built-*/*.blockmap
tauri-release/*

# Commented out just for test releases
# publish-to-homebrew-cask:
# name: Publish to Homebrew Cask
# needs:
# - publish
# - release-please
# runs-on: macos-latest
# steps:
# - uses: Homebrew/actions/bump-packages@master
# with:
# casks: pomatez
# token: ${{ secrets.GITHUB_TOKEN }}
# publish-to-winget:
# name: Publish to WinGet
# needs:
# - publish
# - release-please
# runs-on: windows-latest
# steps:
# - uses: vedantmgoyal2009/winget-releaser@v2
# with:
# identifier: Zidoro.Pomatez
# installers-regex: 'setup\.exe$'
# max-versions-to-keep: 5 # keep only latest 5 versions
# release-tag: ${{ needs.release-please.outputs.tag }}
# token: ${{ secrets.GITHUB_TOKEN }}
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

/dist
/build
/artifacts/

.DS_Store
.env.local
Expand All @@ -19,3 +20,5 @@ yarn-error.log*

.idea/
*.iml
/lerna-debug.log
/release/
7 changes: 3 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,11 @@

## [1.3.1](https://github.com/zidoro/pomatez/compare/v1.3.0...v1.3.1) (2023-10-19)


### Bug Fixes 🐛

* javascript error on launch ([#414](https://github.com/zidoro/pomatez/issues/414)) ([c6c18fb](https://github.com/zidoro/pomatez/commit/c6c18fb47b424be62a9b91ed64c7c95e8eaa41a3))
* **lang:** Switch "released notes" with "release notes" ([#439](https://github.com/zidoro/pomatez/issues/439)) ([d9a3afa](https://github.com/zidoro/pomatez/commit/d9a3afa11f828084483c1d1e3693ff9b0dc1c8e1))
* toast notification ([#382](https://github.com/zidoro/pomatez/issues/382)) ([25403d7](https://github.com/zidoro/pomatez/commit/25403d742d83d0d3654418a43bc5efe8316dc019))
- javascript error on launch ([#414](https://github.com/zidoro/pomatez/issues/414)) ([c6c18fb](https://github.com/zidoro/pomatez/commit/c6c18fb47b424be62a9b91ed64c7c95e8eaa41a3))
- **lang:** Switch "released notes" with "release notes" ([#439](https://github.com/zidoro/pomatez/issues/439)) ([d9a3afa](https://github.com/zidoro/pomatez/commit/d9a3afa11f828084483c1d1e3693ff9b0dc1c8e1))
- toast notification ([#382](https://github.com/zidoro/pomatez/issues/382)) ([25403d7](https://github.com/zidoro/pomatez/commit/25403d742d83d0d3654418a43bc5efe8316dc019))

## [1.3.0](https://github.com/zidoro/pomatez/compare/v1.2.3...v1.3.0) (2023-09-26)

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
10 changes: 7 additions & 3 deletions app/renderer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@
"homepage": "./",
"scripts": {
"clean": "rimraf build/",
"prebuild": "copyfiles -u 3 \"src/assets/logos/*\" ../main/src/assets",
"prebuild": "yarn clean && copyfiles -u 3 \"src/assets/logos/*\" ../electron/src/assets",
"build": "react-scripts build",
"postbuild": "copyfiles -u 1 \"build/**/*\" ../main/build && yarn clean",
"postbuild": "copyfiles -u 1 \"build/**/*\" ../electron/build",
"dev:renderer": "react-scripts start",
"start": "yarn dev:renderer",
"gen:tts": "node tts-generator.js"
Expand All @@ -32,7 +32,11 @@
}
},
"dependencies": {
"@pomatez/shareables": "^1.0.0",
"@pomatez/shareables": "*",
"@tauri-apps/api": "2.0.0-alpha.11",
"@tauri-apps/plugin-autostart": "2.0.0-alpha.2",
"@tauri-apps/plugin-global-shortcut": "2.0.0-alpha.2",
"@tauri-apps/plugin-window": "2.0.0-alpha.1",
"@types/autosize": "^3.0.7",
"@types/jest": "^26.0.24",
"@types/node": "^14.18.63",
Expand Down
2 changes: 1 addition & 1 deletion app/renderer/public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<meta charset="UTF-8" />
<link rel="icon" href="%PUBLIC_URL%/favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta http-equiv="Content-Security-Policy" content="default-src 'self' data: 'unsafe-inline'">
<meta http-equiv="Content-Security-Policy" content="default-src 'self' data: 'unsafe-inline'; connect-src 'self' http://ipc.localhost/">
<title>Pomatez</title>
</head>
<body>
Expand Down
Loading
Loading