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: Workflow/Pipeline for executables #271

Open
wants to merge 22 commits into
base: main
Choose a base branch
from

Conversation

rahulharpal1603
Copy link
Contributor

@rahulharpal1603 rahulharpal1603 commented Jan 28, 2025

Fixes #138
Many new things were introduced, so I drew diagrams to explain everything simply.

This workflow will generate these three formats of installers:

  1. Windows x64 NSIS .exe
  2. MacOS (Apple Silicon) .dmg
  3. Linux .deb package.

I have tested each installer on their platforms. I will be making guides to install this packages for each platform.

Major Changes:

  • The workflow file called app-build.yml generates a GitHub release after every push to the main branch or when triggered manually.
  • Addition of serverUtils.ts file to the frontend for effective control of the FastAPI backend
  • A customized logging system using Loguru, which only runs in production mode, was added. It automatically generates log files for each day and retains logs for 1 month.

Problem solved by this PR:

The end-user doesn't need to worry about whether the FastAPI server is running. The Tauri app will handle it using plugins provided by Tauri, which provide an interface to execute terminal commands and run the server. Also, the end user doesn't need to have Python installed on their system, all thanks to PyInstaller, because of which all the dependencies are packaged along with the PictoPy Installer.

Interaction diagram of the Tauri app and the FastAPI server:

interaction

Description about the app-build.yml workflow:

This workflow runs three parallel jobs, one for each platform, to generate the FastAPI server's executables. Once these executables are generated, they are temporarily stored and later accessed by the Tauri build workflow. This workflow is derived from this base structure: https://github.com/tauri-apps/tauri-action/blob/dev/examples/publish-to-auto-release.yml

The Final result is that we get a release on GitHub containing all the files for each platform. Example: https://github.com/rahulharpal1603/PictoPy/releases/tag/app-v0.0.0

Diagrammatic Representation of the Workflow:

workflow

@rahulharpal1603
Copy link
Contributor Author

@Pranav0-0Aggarwal Please review this. The workflows are ready.

@rahulharpal1603 rahulharpal1603 changed the title Feat: Workflow/Pipelines for executables Feat: Workflow/Pipeline for executables Jan 28, 2025
@rahulharpal1603
Copy link
Contributor Author

rahulharpal1603 commented Jan 28, 2025

For MacOS installation we need to follow these steps:
Note: This process is a workaround. I will be bringing a fix so that the terminal is out of equation.

  1. download the dmg file.
  2. open terminal and type

sudo xattr -d com.apple.quarantine

  1. After this drag the dmg file into the terminal so that its path gets appended to the command. It will now look like this:

sudo xattr -d com.apple.quarantine /path/to/.dmg/file

  1. execute this command.
  2. Now open the dmg file and drag the PictoPy app into the Applications folder(see sample photo below). After that you can run the app like any other app.

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Feat: Workflow for packaging PictoPy for Win, Linux and Mac as executables
2 participants