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

Adding snap package to linux build guide #1195

Open
wants to merge 4 commits into
base: v1
Choose a base branch
from

Conversation

fetzsav
Copy link

@fetzsav fetzsav commented Apr 2, 2023

This is the docs for tauri-apps/tauri#6532

@github-actions
Copy link

github-actions bot commented Apr 2, 2023

🚀 Deployed on https://dev1195--tauri.netlify.app

@github-actions github-actions bot temporarily deployed to pull request April 2, 2023 21:36 Inactive
@github-actions github-actions bot temporarily deployed to pull request April 3, 2023 13:29 Inactive
@@ -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`).
Copy link
Contributor

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?

Copy link
Member

@lorenzolewis lorenzolewis left a 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.

@FabianLars
Copy link
Member

and we'll get these merged in if not.

Don't forget that this hasn't landed in Tauri itself yet

@lorenzolewis
Copy link
Member

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 ;) )

@netlify
Copy link

netlify bot commented Sep 2, 2023

Deploy Preview for tauri ready!

Name Link
🔨 Latest commit a8f0bcb
🔍 Latest deploy log https://app.netlify.com/sites/tauri/deploys/64f3968c7a49110008f57851
😎 Deploy Preview https://deploy-preview-1195--tauri.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@fetzsav
Copy link
Author

fetzsav commented Sep 12, 2023

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 ;) )

Hey, sorry for getting back to you late.
But yes, this has not landed in Tauri yet.

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!

@simonhyll simonhyll added this to the Version 1.x milestone Feb 26, 2024
@simonhyll simonhyll requested a review from a team February 29, 2024 00:58
@simonhyll simonhyll added upstream Is this held back by upstream issues? and removed status: pending upstream release labels May 21, 2024
@simonhyll simonhyll added the enhancement Does it add or improve content? label Jun 8, 2024
@RoseBlume
Copy link
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Does it add or improve content? upstream Is this held back by upstream issues?
Projects
Status: 🪵 Backlog
Development

Successfully merging this pull request may close these issues.

5 participants