-
Notifications
You must be signed in to change notification settings - Fork 680
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
Adding snap package to linux build guide #1195
base: v1
Are you sure you want to change the base?
Conversation
🚀 Deployed on https://dev1195--tauri.netlify.app |
docs/guides/building/linux.md
Outdated
@@ -63,6 +63,11 @@ If your app plays audio/video you need to enable `tauri.conf.json > tauri > bund | |||
|
|||
::: | |||
|
|||
## Snap Package | |||
|
|||
Snap packages are an alternative distribution format that also does not rely on the system installed packages. Snap was created by Canonical. Snap packages work across most linux distributions. In order to build snap packages using the CLI, the `snapcraft` package must be installed. On the other hand, users are required to have the `snapd` package installed on their system. After building your snap package, it can be signed and uploaded to the official Snap Store for easier distribution. The output file can be installed using (`sudo snap install ./MyProject.snap --dangerous`). The dangerous flag is required to install the package. In order to bypass the --dangerous flag and sign your package, a Snap Store account is required and you must login via. snapcraft on your local system using (`snapcraft login`). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I feel this could be reworded a bit. For example, "distribution format that also does not rely" presumably refers to the previous AppImage section, and each section should be able to be read without having read the one before it. Also, the sentences "the snapcraft
package must be installed. On the other hand, users are required to have the snapd
package installed on their system" is pretty confusing. What is it "on the other hand" of?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Apologies for the delay, thanks for adding this! I put a few changes in here to hopefully clarify this. Lmk if you have any feedback @fetzsav and we'll get these merged in if not.
Don't forget that this hasn't landed in Tauri itself yet |
Ah yeah, good point. I need to figure out a way to track what's been merged upstream more easily (or maybe I just need to be more diligent with checking the PR description ;) ) |
✅ Deploy Preview for tauri ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
Hey, sorry for getting back to you late. Here is the PR for support in Tauri: tauri-apps/tauri#6532 I'll take a look at it after work today and see what else needs to be done before it's ready for merging! |
This is an example of how to build a tauri v2 app from source. name: jrosarybibleapp
base: core22
adopt-info: metapart
version: '2.0.4'
summary: Read the Bible and other Christian texts. # 79 char long summary
description: |
Study the Bible, and read Christianity related works. This projects goal is to promote spiritual health, and to allow each person to study the bible and come to their own conclusion about their faith.
grade: stable
confinement: strict
apps:
rosary:
command: bin/rosary
desktop: usr/share/applications/rosary.desktop
package-repositories:
- type: apt
components: [main]
suites: [noble]
key-id: 78E1918602959B9C59103100F1831DDAFC42E99D
url: http://ppa.launchpad.net/snappy-dev/snapcraft-daily/ubuntu
parts:
prep:
plugin: dump
build-snaps:
- node/20/stable
- rustup/latest/stable
build-packages:
- libwebkit2gtk-4.1-dev
- build-essential
- curl
- wget
- file
- libxdo-dev
- libssl-dev
- libayatana-appindicator3-dev
- librsvg2-dev
- dpkg
stage-packages:
- libwebkit2gtk-4.1-0
- libglu1-mesa
- libsoup-3.0-0
- freeglut3
source: .
# - on amd64 to amd64: https://github.com/RoseBlume/Rosary/releases/download/v2.0.4/Rosary_2.0.4_amd64.deb
# - on arm64 to arm64: https://github.com/RoseBlume/Rosary/releases/download/v2.0.4/Rosary_2.0.4_arm64.deb
# - on armhf to armhf: https://github.com/RoseBlume/Rosary/releases/download/v2.0.4/Rosary_2.0.4_armhf.deb
#source-type: deb
override-pull: |
set -eu
craftctl default
rustup default nightly
npm install
npm run tauri icon Bible3.png
npm run tauri build -- --bundles deb
dpkg -x src-tauri/target/release/bundle/deb/*.deb here
sed -i -e "s|Icon=rosary|Icon=/usr/share/icons/hicolor/32x32/apps/rosary.png|g" here/usr/share/applications/rosary.desktop
cp -r here/* .
organize:
usr/bin/rosary: bin/rosary |
This is the docs for tauri-apps/tauri#6532