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

Build as Flatpak on Linux #53

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
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 .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ typings/

# Electron-Forge
out/
.flatpak-builder/

# Electron Vite
dist/
Expand Down
9 changes: 9 additions & 0 deletions forge.config.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

const MakerDmg = require("@electron-forge/maker-dmg").default;
const MakerSquirrel = require("@electron-forge/maker-squirrel").default;
const MakerFlatpak = require("@electron-forge/maker-flatpak").default;
const path = require("node:path");

const getAppIcon = () => {
Expand Down Expand Up @@ -41,5 +42,13 @@ module.exports = {
new MakerDmg({
icon: getAppIcon(),
}),
new MakerFlatpak({
options: {
categories: ["Utility"],
icon: getAppIcon(),
files: [],
id: "io.github.felipecrs.ClipboardSync",
},
}),
],
};
270 changes: 270 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"main": "dist/main/index.js",
"scripts": {
"prepare": "node ./tools/prepare.js",
"clean": "rimraf dist out",
"clean": "rimraf dist out .flatpak-builder",
"start": "electron-vite preview --sourcemap",
"dev": "electron-vite dev",
"package": "electron-vite build && electron-forge package",
Expand Down Expand Up @@ -36,6 +36,7 @@
"devDependencies": {
"@electron-forge/cli": "^7.3.1",
"@electron-forge/maker-dmg": "^7.3.1",
"@electron-forge/maker-flatpak": "^7.3.1",
"@electron-forge/maker-squirrel": "^7.3.1",
"@electron-toolkit/tsconfig": "^1.0.1",
"@types/electron-squirrel-startup": "^1.0.2",
Expand Down
5 changes: 4 additions & 1 deletion src/main/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -789,6 +789,7 @@ const setContextMenu = () => {
label: updateLabel,
type: "normal",
click: checkForUpdatesPress,
visible: process.platform !== "linux",
},
{
label: "GitHub",
Expand Down Expand Up @@ -830,7 +831,9 @@ const createAppIcon = async () => {

await initialize();

await autoCheckForUpdates();
if (process.platform !== "linux") {
await autoCheckForUpdates();
}
};

// This method will be called when Electron has finished
Expand Down