Skip to content
Merged
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
29 changes: 27 additions & 2 deletions Windows.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,21 @@
const { BrowserWindow, session } = require("electron");
const { autoUpdater } = require("electron-updater");
const path = require("path");
const log = require("electron-log");
const { mediaHandler } = require("./utils");

// Windows Store detection
const isWindowsStore = process.env.WINDOWS_STORE === 'true' || process.env.STOREBUILD === 'true';

// Store versiyonunda electron-updater yükleme
let autoUpdater = null;
if (!isWindowsStore) {
try {
autoUpdater = require("electron-updater").autoUpdater;
} catch (error) {
console.log("electron-updater not available in Store version");
}
}

function createMainWindow(windowstate, url) {
let mainWindow = new BrowserWindow({
x: windowstate.x,
Expand Down Expand Up @@ -32,7 +44,13 @@ function createMainWindow(windowstate, url) {
if (windowstate) windowstate.manage(mainWindow);
if (!url) {
mainWindow.webContents.once("did-finish-load", () => {
checkForUpdatesAndLoad(mainWindow);
// Store versiyonunda auto-updater çalıştırma
if (!isWindowsStore) {
checkForUpdatesAndLoad(mainWindow);
} else {
// Store versiyonunda direkt ana sayfayı yükle
mainWindow.loadURL("https://topluyo.com");
}
});
} else {
url = url.startsWith("/") ? url : `/${url}`;
Expand Down Expand Up @@ -63,6 +81,13 @@ function createMainWindow(windowstate, url) {
}

function checkForUpdatesAndLoad(mainWindow) {
// Store versiyonunda auto-updater mevcut değilse direkt ana sayfayı yükle
if (!autoUpdater || isWindowsStore) {
console.log("Auto-updater not available in Store version, loading main page");
mainWindow.loadURL("https://topluyo.com");
return;
}

autoUpdater.logger = log;
autoUpdater.logger.transports.file.level = "info";
autoUpdater.autoDownload = true;
Expand Down
Binary file added build/appx/LargeTile.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added build/appx/SmallTile.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added build/appx/Square150x150Logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added build/appx/Square44x44Logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added build/appx/StoreLogo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added build/appx/Wide310x150Logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
111 changes: 111 additions & 0 deletions electron-builder.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
const config = {
"appId": "com.topluyo.app",
"productName": "Topluyo",
"directories": {
"output": "dist"
},
"files": [
"build/**/*",
"node_modules/**/*",
"!node_modules/uiohook-napi/**/*",
"*.html",
"icons/*",
"*.rtf",
"*.js"
],
"protocols": [
{
"name": "Topluyo",
"schemes": [
"topluyo"
]
}
],
"win": {
"target": [
{
"target": "nsis",
"arch": ["x64"]
},
{
"target": "appx",
"arch": ["x64", "ia32", "arm64"]
}
],
"icon": "build/icon.ico",
"artifactName": "Topluyo-Setup-${version}.${ext}",
"requestedExecutionLevel": "asInvoker"
},
"appx": {
"identityName": "TopluyoApp.Topluyo",
"publisher": "CN=569715F9-C64D-44BC-9F1E-31B71AC68EEC",
"publisherDisplayName": "TopluyoApp",
"languages": "tr-TR",
"backgroundColor": "#191819",
"artifactName": "TopluyoApp-${version}.${ext}",
"showNameOnTiles": true,
"electronUpdaterAware": false,
"setBuildNumber": false
},
"nsis": {
"oneClick": false,
"allowToChangeInstallationDirectory": true,
"createDesktopShortcut": true,
"createStartMenuShortcut": true,
"shortcutName": "Topluyo",
"license": "kullanici_sozlesmesi.rtf",
"deleteAppDataOnUninstall": true
},
"linux": {
"target": [
"AppImage",
"snap",
"tar.gz"
],
"icon": "icons/png/256x256.png",
"category": "Utility",
"description": "Topluyo",
"executableName": "Topluyo",
"artifactName": "Topluyo-${version}.${ext}",
"maintainer": "Hasan Delibaş <info@topluyo.com>"
},
"snap": {
"confinement": "classic",
"publish": false
},
"mac": {
"target": [
"dmg",
"pkg",
"zip"
],
"icon": "icons/mac/icon.icns",
"category": "public.app-category.utilities",
"artifactName": "Topluyo-${version}.${ext}",
"hardenedRuntime": false,
"gatekeeperAssess": false,
"entitlements": "build/entitlements.mac.plist",
"entitlementsInherit": "build/entitlements.mac.plist",
"extendInfo": {
"NSMicrophoneUsageDescription": "Topluyo uygulaması mikrofon erişimi gerektirir.",
"NSCameraUsageDescription": "Topluyo uygulaması kamera erişimi gerektirir.",
"NSScreenRecordingUsageDescription": "Topluyo uygulaması ekran paylaşımı ve ekran kaydı için ekran erişimi gerektirir.",
"NSScreenCaptureDescription": "Topluyo uygulaması ekran paylaşımı için ekran erişimi gerektirir."
}
},
"afterPack": "./fixChromeSandbox.js",
"publish": [
{
"provider": "github",
"owner": "topluyo",
"repo": "App"
}
]
};

// Store versiyonu için electron-updater'ı exclude et
if (process.env.WINDOWS_STORE === 'true' || process.env.STOREBUILD === 'true') {
config.files.push("!node_modules/electron-updater/**/*");
}

module.exports = config;
16 changes: 14 additions & 2 deletions fixChromeSandbox.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,23 @@ const fs = require("fs");
const path = require("path");

module.exports = async function (context) {
// Windows Store versiyonunda chrome-sandbox'a dokunma
const isWindowsStore = process.env.WINDOWS_STORE === 'true' || process.env.STOREBUILD === 'true';

if (isWindowsStore) {
console.log("🏪 Windows Store build - chrome-sandbox işlemi atlanıyor");
return;
}

const sandboxPath = path.join(context.appOutDir, "chrome-sandbox");

if (fs.existsSync(sandboxPath)) {
fs.unlinkSync(sandboxPath); // tamamen sil
console.log("❌ chrome-sandbox kaldırıldı.");
try {
fs.unlinkSync(sandboxPath); // tamamen sil
console.log("❌ chrome-sandbox kaldırıldı.");
} catch (error) {
console.warn("⚠️ chrome-sandbox silinemedi:", error.message);
}
} else {
console.warn("⚠️ afterPack: chrome-sandbox bulunamadı.");
}
Expand Down
Binary file added icons/png/TopluyoIcon150x150.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added icons/png/TopluyoIcon310x150.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added icons/png/TopluyoIcon310x310.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added icons/png/TopluyoIcon71x71.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
30 changes: 26 additions & 4 deletions main.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,28 @@
const { app, BrowserWindow, ipcMain, shell, dialog } = require("electron");
const windowStateKeeper = require("electron-window-state");
const { createMainWindow } = require("./Windows");
const { isSafeUrl, openExternalLinks, ossWindow } = require("./utils");
const { URL } = require("url");
const { openExternalLinks, ossWindow } = require("./utils");
const fs = require("fs");
const path = require("path");

// Windows Store detection
const isWindowsStore = process.env.WINDOWS_STORE === 'true' || process.windowsStore || false;

// Store versiyonu için error handling
if (isWindowsStore) {
process.on('uncaughtException', (error) => {
console.log('Uncaught Exception in Store version:', error);
// Store versiyonunda uygulamayı crash etme
return;
});

process.on('unhandledRejection', (reason, promise) => {
console.log('Unhandled Rejection in Store version:', reason);
// Store versiyonunda uygulamayı crash etme
return;
});
}

let mainWindow = null;
let deeplinkingUrl = null;

Expand All @@ -27,8 +44,13 @@ if (process.platform === "win32") {
} else {
app.setAsDefaultProtocolClient("topluyo");
}
} else if (process.platform === "linux") {
require("./linuxscript");
} else if (process.platform === "linux" && !isWindowsStore) {
// Store versiyonunda Linux script'i çalıştırma
try {
require("./linuxscript");
} catch (error) {
console.log('Linux script not available:', error.message);
}
}

if (!gotLock) {
Expand Down
7 changes: 4 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "topluyo",
"version": "2025.8.501",
"version": "2025.8.815",
"description": "Topluyo",
"main": "main.js",
"scripts": {
Expand All @@ -13,7 +13,7 @@
"clear": "if exist dist rmdir /s /q dist",
"installer": "electron-builder --win --x64",
"build:winexe": "npm run clear && set NODE_ENV=production&& set STOREBUILD=false&& electron-builder --win --x64 --config.win.target=nsis",
"build:winstore": "npm run clear && set NODE_ENV=production&& set STOREBUILD=true&& electron-builder --win --config.win.target=appx",
"build:winstore": "npm run clear && set NODE_ENV=production&& set STOREBUILD=true&& set WINDOWS_STORE=true&& electron-builder --win --config.win.target=appx --config=electron-builder.config.js",
"build:linux": "npm run clean && electron-builder --linux --publish=never",
"build:mac": "npm run clean && electron-builder --mac",
"rebuild": "electron-rebuild -f -w iohook"
Expand All @@ -39,6 +39,7 @@
"files": [
"build/**/*",
"node_modules/**/*",
"!node_modules/uiohook-napi/**/*",
"*.html",
"icons/*",
"*.rtf",
Expand Down Expand Up @@ -75,7 +76,7 @@
"backgroundColor": "#191819",
"artifactName": "TopluyoApp-${version}.${ext}",
"showNameOnTiles": true,
"electronUpdaterAware": true,
"electronUpdaterAware": false,
"setBuildNumber": false
},
"nsis": {
Expand Down
Loading