From 40beeedf1af4fc2c781542e6708cab7fc1a40d4d Mon Sep 17 00:00:00 2001 From: Mylloon Date: Sat, 29 Jul 2023 15:30:41 +0200 Subject: [PATCH] now working --- README.md | 2 +- index.html => pages/index.html | 2 ++ src/main.ts | 6 +++++- src/renderer.ts | 1 + 4 files changed, 9 insertions(+), 2 deletions(-) rename index.html => pages/index.html (91%) create mode 100644 src/renderer.ts diff --git a/README.md b/README.md index f0c80b2..a672f0f 100644 --- a/README.md +++ b/README.md @@ -7,6 +7,6 @@ ## Dev ```bash -npm install --platform=win32 +npm install npm run package ``` diff --git a/index.html b/pages/index.html similarity index 91% rename from index.html rename to pages/index.html index 4f513bd..44ecf4d 100644 --- a/index.html +++ b/pages/index.html @@ -14,5 +14,7 @@ Nous utilisons Node.js , Chromium , et Electron . + + diff --git a/src/main.ts b/src/main.ts index f4d16f6..5c28dca 100644 --- a/src/main.ts +++ b/src/main.ts @@ -11,8 +11,12 @@ const createWindow = () => { }, }); - win.loadFile("../index.html"); + win.loadFile(path.join(path.resolve(__dirname, ".."), "pages", "index.html")); }; + +// Fix crash on Windows +app.commandLine.appendSwitch("disable-gpu-sandbox"); + app.whenReady().then(() => { createWindow(); diff --git a/src/renderer.ts b/src/renderer.ts new file mode 100644 index 0000000..702f428 --- /dev/null +++ b/src/renderer.ts @@ -0,0 +1 @@ +console.log("hello");