Skip to content

Commit

Permalink
Update 10052024@2215
Browse files Browse the repository at this point in the history
  • Loading branch information
jschmidt92 committed Oct 6, 2024
1 parent 1a54598 commit 016b0d1
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 11 deletions.
19 changes: 9 additions & 10 deletions electron/main/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import {
Menu,
nativeImage,
Notification,
shell,
Tray,
} from "electron";
import { createRequire } from "node:module";
Expand All @@ -17,7 +16,7 @@ import os from "node:os";
import { GameDig } from "gamedig";
import { spawn } from "child_process";
import * as fs from "fs";
import * as http from "http";
import * as https from "https";
import extract from "extract-zip";
import log from "electron-log";
import pkg from "electron-updater";
Expand All @@ -39,27 +38,27 @@ const dlServerUp = true;
// const require = createRequire(import.meta.url);
const sPath = path.join(app.getPath("userData"), "settings.json");
const host = {
protocol: "http://",
protocol: "https://",
domain: "mod.innovativedevsolutions.org",
port: 80,
mods: [
{
path: "/dragonfly.zip",
path: "/@ArmaDragonflyClient.zip",
versionKey: "dragonfly_version",
versionUrl: "/dragonfly_version.json",
},
{
path: "/sof_client.zip",
path: "/@sof_client.zip",
versionKey: "sof_client_version",
versionUrl: "/sof_client_version.json",
},
{
path: "/sof_mod.zip",
path: "/@sof_mod.zip",
versionKey: "sof_mod_version",
versionUrl: "/sof_mod_version.json",
},
{
path: "/sof_server.zip",
path: "/@sof_server.zip",
versionKey: "sof_server_version",
versionUrl: "/sof_server_version.json",
},
Expand Down Expand Up @@ -104,7 +103,7 @@ const icon = path.join(process.env.VITE_PUBLIC, "icon.ico");

function fetchFileVersion(file: any) {
return new Promise((resolve, reject) => {
http
https
.get(host.protocol + host.domain + file.versionUrl, (res) => {
let data = "";

Expand All @@ -128,7 +127,7 @@ function download(
progressCallback: (progress: DownloadProgress) => void
): Promise<string> {
return new Promise((resolve, reject) => {
http
https
.get(url, (response) => {
if (response.statusCode !== 200) {
reject(
Expand Down Expand Up @@ -222,7 +221,7 @@ function launchGame(data: GameData) {

const exePath = path.join(data.arma3path, "arma3_x64.exe");
const modList: string[] = [
`-mod="!Workshop/@CBA_A3;!Workshop/@ace;@sof_client;@sof"`,
`-mod="!Workshop/@CBA_A3;!Workshop/@ace;@sof_client;@sof_mod"`,
];
const options: string[] = data.join
? [
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "pmc3-launcher",
"version": "1.0.10",
"version": "1.0.11",
"main": "dist-electron/main/index.js",
"description": "Arma 3 PMC Simulator 3.0 Launcher",
"author": "Jacob Schmidt",
Expand Down

0 comments on commit 016b0d1

Please sign in to comment.