From 374880a733a0c766accba5f582081b8fb05ccd5f Mon Sep 17 00:00:00 2001 From: SrIzan10 <66965250+SrIzan10@users.noreply.github.com> Date: Tue, 4 Jul 2023 16:32:52 +0200 Subject: [PATCH] chore: bugs prob fixed, readme improvs, scripts --- README.md | 9 +++++++-- package.json | 9 ++++----- public/electron.js | 4 ++-- yarn.lock | 49 +--------------------------------------------- 4 files changed, 14 insertions(+), 57 deletions(-) diff --git a/README.md b/README.md index f8aa5cf..8203209 100644 --- a/README.md +++ b/README.md @@ -10,6 +10,11 @@ sern init but gui public/electron.js -### why tho? +# how do I build the app? -if it works, ain't touch it \ No newline at end of file +`yarn build-electron` ([tested on linux](https://gist.github.com/SrIzan10/50bc2ba689a4cc43bcbac2799cc733c9). `wine` must be installed to build windows packages) +`yarn build-electron-windows` (not tested but should work. use this if on windows. only builds windows packages) + +# CI builds? + +Builds will be set up using a jetbrains teamcity instance when migration to new server is done. ETA still not known. Packaged binaries are built on my host computer for now. If you're skeptical, build the app for yourself. \ No newline at end of file diff --git a/package.json b/package.json index beffb4f..e2e149d 100644 --- a/package.json +++ b/package.json @@ -13,15 +13,12 @@ "@fortawesome/free-solid-svg-icons": "^6.4.0", "@fortawesome/react-fontawesome": "^0.2.0", "@mui/icons-material": "^5.11.16", - "@mui/lab": "^5.0.0-alpha.134", "@mui/material": "^5.13.4", - "axios": "^1.4.0", "colorette": "^2.0.20", "electron-is-dev": "^2.0.0", "react": "^18.2.0", "react-dom": "^18.2.0", - "react-scripts": "5.0.1", - "web-vitals": "^2.1.0" + "react-scripts": "5.0.1" }, "scripts": { "start": "react-scripts start", @@ -29,7 +26,9 @@ "test": "react-scripts test", "eject": "react-scripts eject", "dev": "concurrently -k \"BROWSER=none yarn start\" \"yarn:electron\"", - "electron": "electron ." + "electron": "electron .", + "build-electron": "yarn build && electron-builder --linux --windows", + "build-electron-win": "yarn build && electron-builder --windows" }, "build": { "win": { diff --git a/public/electron.js b/public/electron.js index df281cb..45bdad5 100644 --- a/public/electron.js +++ b/public/electron.js @@ -3,7 +3,7 @@ const { app, BrowserWindow, dialog, ipcMain } = require('electron'); const isDev = require('electron-is-dev'); const fs = require('fs'); const colorette = require('colorette') -const { spawn } = require('node:child_process') +const { exec } = require('node:child_process') function createWindow() { const mainWindow = new BrowserWindow({ @@ -85,7 +85,7 @@ function createWindow() { } console.log(`${colorette.cyan('🛈')} About to execute command: ${commandToRun}`) - const cmd = spawn(commandToRun, { shell: true }) + const cmd = exec(commandToRun) cmd.stdout.on('data', (data) => { console.log(`${colorette.cyan('🛈')} Command stdout: ${data}`); diff --git a/yarn.lock b/yarn.lock index 391f660..cdd1b94 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1912,20 +1912,6 @@ dependencies: "@babel/runtime" "^7.21.0" -"@mui/lab@^5.0.0-alpha.134": - version "5.0.0-alpha.134" - resolved "https://registry.yarnpkg.com/@mui/lab/-/lab-5.0.0-alpha.134.tgz#e48c108fce91fbb89446dcf86ca35e7e761bc078" - integrity sha512-GhvuM2dNOi6hzjbeGEocWVozgyyeUn7RBmZhLFtniROauxmPCZMcTsEU+GAxmpyYppqHuI8flP6tGKgMuEAK/g== - dependencies: - "@babel/runtime" "^7.21.0" - "@mui/base" "5.0.0-beta.4" - "@mui/system" "^5.13.5" - "@mui/types" "^7.2.4" - "@mui/utils" "^5.13.1" - clsx "^1.2.1" - prop-types "^15.8.1" - react-is "^18.2.0" - "@mui/material@^5.13.4": version "5.13.4" resolved "https://registry.yarnpkg.com/@mui/material/-/material-5.13.4.tgz#1fed8249c980ed37f9767f9dba8aa3a589495ff3" @@ -1977,20 +1963,6 @@ csstype "^3.1.2" prop-types "^15.8.1" -"@mui/system@^5.13.5": - version "5.13.5" - resolved "https://registry.yarnpkg.com/@mui/system/-/system-5.13.5.tgz#9f67ea0c4f6974713f90b7b94c999fd3f40f8de3" - integrity sha512-n0gzUxoZ2ZHZgnExkh2Htvo9uW2oakofgPRQrDoa/GQOWyRD0NH9MDszBwOb6AAoXZb+OV5TE7I4LeZ/dzgHYA== - dependencies: - "@babel/runtime" "^7.21.0" - "@mui/private-theming" "^5.13.1" - "@mui/styled-engine" "^5.13.2" - "@mui/types" "^7.2.4" - "@mui/utils" "^5.13.1" - clsx "^1.2.1" - csstype "^3.1.2" - prop-types "^15.8.1" - "@mui/types@^7.2.4": version "7.2.4" resolved "https://registry.yarnpkg.com/@mui/types/-/types-7.2.4.tgz#b6fade19323b754c5c6de679a38f068fd50b9328" @@ -3302,15 +3274,6 @@ axios@^0.27.2: follow-redirects "^1.14.9" form-data "^4.0.0" -axios@^1.4.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/axios/-/axios-1.4.0.tgz#38a7bf1224cd308de271146038b551d725f0be1f" - integrity sha512-S4XCWMEmzvo64T9GfvQDOXgYRDJ/wsSZc7Jvdgx5u1sd0JwsuPLqb3SYmusag+edF6ziyMensPVqLTSc1PiSEA== - dependencies: - follow-redirects "^1.15.0" - form-data "^4.0.0" - proxy-from-env "^1.1.0" - axobject-query@^3.1.1: version "3.1.1" resolved "https://registry.yarnpkg.com/axobject-query/-/axobject-query-3.1.1.tgz#3b6e5c6d4e43ca7ba51c5babf99d22a9c68485e1" @@ -5499,7 +5462,7 @@ flatted@^3.1.0: resolved "https://registry.yarnpkg.com/flatted/-/flatted-3.2.7.tgz#609f39207cb614b89d0765b477cb2d437fbf9787" integrity sha512-5nqDSxl8nn5BSNxyR3n4I6eDmbolI6WT+QqR547RwxQapgjQBmtktdP+HTBb/a/zLsbzERTONyUB5pefh5TtjQ== -follow-redirects@^1.0.0, follow-redirects@^1.14.9, follow-redirects@^1.15.0: +follow-redirects@^1.0.0, follow-redirects@^1.14.9: version "1.15.2" resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.15.2.tgz#b460864144ba63f2681096f274c4e57026da2c13" integrity sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA== @@ -8854,11 +8817,6 @@ proxy-addr@~2.0.7: forwarded "0.2.0" ipaddr.js "1.9.1" -proxy-from-env@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/proxy-from-env/-/proxy-from-env-1.1.0.tgz#e102f16ca355424865755d2c9e8ea4f24d58c3e2" - integrity sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg== - psl@^1.1.33: version "1.9.0" resolved "https://registry.yarnpkg.com/psl/-/psl-1.9.0.tgz#d0df2a137f00794565fcaf3b2c00cd09f8d5a5a7" @@ -10610,11 +10568,6 @@ wcwidth@^1.0.1: dependencies: defaults "^1.0.3" -web-vitals@^2.1.0: - version "2.1.4" - resolved "https://registry.yarnpkg.com/web-vitals/-/web-vitals-2.1.4.tgz#76563175a475a5e835264d373704f9dde718290c" - integrity sha512-sVWcwhU5mX6crfI5Vd2dC4qchyTqxV8URinzt25XqVh+bHEPGH4C3NPrNionCP7Obx59wrYEbNlw4Z8sjALzZg== - webidl-conversions@^4.0.2: version "4.0.2" resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-4.0.2.tgz#a855980b1f0b6b359ba1d5d9fb39ae941faa63ad"