Skip to content

Commit

Permalink
Under the hood changes
Browse files Browse the repository at this point in the history
  • Loading branch information
withinJoel committed Dec 28, 2024
1 parent 877b819 commit c4b4f99
Show file tree
Hide file tree
Showing 6 changed files with 65 additions and 16 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
node_modules/
dist/
dist/Output
dist/Elsa
Convertion.txt
2 changes: 1 addition & 1 deletion Modules/Modules.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
////Version
const currentVersion = '2.0.4';
const currentVersion = '2.0.5';

////Load Script
function loadScript(url) {
Expand Down
24 changes: 24 additions & 0 deletions dist/run.iss
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
[Setup]
AppName=Elsa
AppVersion=2.0.4
AppPublisher=Joel Jolly
AppPublisherURL=https://github.com/withinjoel/elsa
AppSupportURL=https://github.com/withinjoel/elsa/issues
AppUpdatesURL=https://github.com/withinjoel/elsa/releases
DefaultDirName={pf}\Elsa
DefaultGroupName=Elsa
OutputDir=Output
OutputBaseFilename=Setup
Compression=lzma2
SolidCompression=yes
SetupIconFile=..\Logo\Elsa.ico

[Files]
Source: "Elsa\*"; DestDir: "{app}"; Flags: recursesubdirs

[Icons]
Name: "{commondesktop}\Elsa"; Filename: "{app}\Elsa.exe"; IconFilename: "{app}\Elsa.exe"
Name: "{group}\Elsa"; Filename: "{app}\Elsa.exe"; IconFilename: "{app}\Elsa.exe"

[Run]
Filename: "{app}\Elsa.exe"; Description: "{cm:LaunchProgram,Elsa}"; Flags: nowait postinstall skipifsilent
26 changes: 16 additions & 10 deletions main.js
Original file line number Diff line number Diff line change
@@ -1,23 +1,29 @@
// Import necessary modules
const { app, BrowserWindow, screen, Menu, ipcMain, dialog } = require('electron');
const path = require('path');
const os = require('os'); // For OS details
const axios = require('axios'); // For HTTP requests
const fs = require('fs');
const { exec } = require('child_process'); // To execute commands
import { app, BrowserWindow, screen, Menu } from 'electron';
import path from 'path';
import { fileURLToPath } from 'url';
import contextMenu from 'electron-context-menu';
import os from 'os'; // For OS details
import axios from 'axios'; // For HTTP requests
import fs from 'fs';
import { dialog } from 'electron';
import { ipcMain } from 'electron';
import { exec } from 'child_process'; // To execute commands

// Handle __dirname and __filename in ESM
const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);

// Initialize electron-context-menu with default settings
require('electron-context-menu')({
showInspectElement: false, // Disable the "Inspect Element" option
contextMenu({
showInspectElement: true, // Disable the "Inspect Element" option
// Add more customization options as needed
});

// Function to create the main application window
function createWindow() {
const { width, height } = screen.getPrimaryDisplay().workAreaSize;

const emptyMenu = Menu.buildFromTemplate([]);

const win = new BrowserWindow({
title: "Elsa",
backgroundColor: "#090909",
Expand Down
21 changes: 19 additions & 2 deletions package-lock.json

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

5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
{
"name": "Elsa",
"version": "2.0.4",
"version": "2.0.5",
"description": "Elsa",
"main": "main.js",
"type": "module",
"scripts": {
"start": "electron .",
"package": "electron-packager . Elsa --platform=win32 --arch=x64 --out=dist --overwrite --icon=Logo/Elsa.png",
Expand All @@ -18,4 +19,4 @@
"electron-context-menu": "^4.0.4",
"dompurify": "^3.2.3"
}
}
}

0 comments on commit c4b4f99

Please sign in to comment.