Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 4445852c42 | |||
|
|
b5e7b8e2c1 |
14 changed files with 40 additions and 6 deletions
BIN
apps/electron/build/icons/128x128.png
Normal file
BIN
apps/electron/build/icons/128x128.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 13 KiB |
BIN
apps/electron/build/icons/128x128@2x.png
Normal file
BIN
apps/electron/build/icons/128x128@2x.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 20 KiB |
BIN
apps/electron/build/icons/32x32.png
Normal file
BIN
apps/electron/build/icons/32x32.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.1 KiB |
BIN
apps/electron/build/icons/64x64.png
Normal file
BIN
apps/electron/build/icons/64x64.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 5.2 KiB |
BIN
apps/electron/build/icons/icon.icns
Normal file
BIN
apps/electron/build/icons/icon.icns
Normal file
Binary file not shown.
BIN
apps/electron/build/icons/icon.ico
Normal file
BIN
apps/electron/build/icons/icon.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 34 KiB |
BIN
apps/electron/build/icons/icon.png
Normal file
BIN
apps/electron/build/icons/icon.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 38 KiB |
|
|
@ -41,6 +41,7 @@
|
|||
"productName": "Tensamin",
|
||||
"executableName": "tensamin",
|
||||
"artifactName": "Tensamin-${version}-${os}-${arch}.${ext}",
|
||||
"icon": "build/icons/icon.png",
|
||||
"directories": {
|
||||
"output": "release"
|
||||
},
|
||||
|
|
@ -52,10 +53,15 @@
|
|||
{
|
||||
"from": "../web/dist",
|
||||
"to": "web"
|
||||
},
|
||||
{
|
||||
"from": "build/icons/icon.png",
|
||||
"to": "icons/icon.png"
|
||||
}
|
||||
],
|
||||
"linux": {
|
||||
"target": ["AppImage", "deb", "rpm"],
|
||||
"icon": "build/icons",
|
||||
"executableName": "tensamin",
|
||||
"category": "Network",
|
||||
"maintainer": "Methanium",
|
||||
|
|
@ -67,10 +73,12 @@
|
|||
}
|
||||
},
|
||||
"win": {
|
||||
"target": ["nsis", "portable"]
|
||||
"target": ["nsis", "portable"],
|
||||
"icon": "build/icons/icon.ico"
|
||||
},
|
||||
"mac": {
|
||||
"target": ["dmg"]
|
||||
"target": ["dmg"],
|
||||
"icon": "build/icons/icon.icns"
|
||||
},
|
||||
"publish": null
|
||||
}
|
||||
|
|
|
|||
|
|
@ -34,6 +34,12 @@ function getRendererIndex() {
|
|||
return join(process.resourcesPath, "web", "index.html");
|
||||
}
|
||||
|
||||
function getWindowIcon() {
|
||||
if (process.platform === "darwin") return undefined;
|
||||
if (app.isPackaged) return join(process.resourcesPath, "icons", "icon.png");
|
||||
return resolve(__dirname, "../../build/icons/icon.png");
|
||||
}
|
||||
|
||||
function getPlatform(): DesktopScreenShareCapabilities["platform"] {
|
||||
if (process.platform === "linux") return "linux";
|
||||
if (process.platform === "darwin") return "macos";
|
||||
|
|
@ -191,6 +197,7 @@ async function createWindow() {
|
|||
minWidth: 900,
|
||||
minHeight: 600,
|
||||
title: "Tensamin",
|
||||
icon: getWindowIcon(),
|
||||
frame: false,
|
||||
autoHideMenuBar: true,
|
||||
webPreferences: {
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@
|
|||
"build:mobile:raw": "tauri android build",
|
||||
"dev:mobile": "if command -v nix >/dev/null 2>&1; then nix develop --command bun dev:mobile:raw; else bun dev:mobile:raw; fi",
|
||||
"build:mobile": "bun run render-version.ts && if command -v nix >/dev/null 2>&1; then nix develop --command bun build:mobile:raw; else bun build:mobile:raw; fi && bun run render-version.ts --unrender",
|
||||
"gen-icons": "tauri icon ./logo.json",
|
||||
"gen-icons": "tauri icon ./logo.json && bun scripts/sync-electron-icons.ts",
|
||||
"format": "bunx prettier --write .",
|
||||
"lint": "eslint src"
|
||||
},
|
||||
|
|
|
|||
19
apps/tauri/scripts/sync-electron-icons.ts
Normal file
19
apps/tauri/scripts/sync-electron-icons.ts
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
import { copyFile, mkdir } from "node:fs/promises";
|
||||
import { dirname, join, resolve } from "node:path";
|
||||
import { fileURLToPath } from "node:url";
|
||||
|
||||
const scriptDir = dirname(fileURLToPath(import.meta.url));
|
||||
const tauriDir = resolve(scriptDir, "..");
|
||||
const clientDir = resolve(tauriDir, "../..");
|
||||
const tauriIconsDir = join(tauriDir, "src-tauri", "icons");
|
||||
const electronIconsDir = join(clientDir, "apps", "electron", "build", "icons");
|
||||
|
||||
const desktopIcons = ["32x32.png", "64x64.png", "128x128.png", "128x128@2x.png", "icon.png", "icon.ico", "icon.icns"];
|
||||
|
||||
await mkdir(electronIconsDir, { recursive: true });
|
||||
|
||||
await Promise.all(
|
||||
desktopIcons.map((icon) => copyFile(join(tauriIconsDir, icon), join(electronIconsDir, icon))),
|
||||
);
|
||||
|
||||
console.log(`Synced ${desktopIcons.length} desktop icons to ${electronIconsDir}`);
|
||||
Binary file not shown.
|
|
@ -6,8 +6,8 @@
|
|||
outputs = {nixpkgs, ...}: let
|
||||
systems = ["x86_64-linux"];
|
||||
forAllSystems = nixpkgs.lib.genAttrs systems;
|
||||
version = "0.0.5";
|
||||
x86_64DebHash = "sha256-flC62rhhKyE/yRoNZRwXVHn/vwxE/Klxzj8uWhItDkY=";
|
||||
version = "0.0.6";
|
||||
x86_64DebHash = "sha256-rNlyNZFgYVRvJzX1sBz/qLHUdZoyfvHl5xuwb2BtU48=";
|
||||
forgejoBaseUrl = "https://git.methanium.net/tensamin/client/releases/download/${version}";
|
||||
in {
|
||||
packages = forAllSystems (system: let
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "tensamin",
|
||||
"version": "0.0.6",
|
||||
"version": "0.0.7",
|
||||
"private": true,
|
||||
"workspaces": [
|
||||
"packages/*",
|
||||
|
|
|
|||
Loading…
Reference in a new issue