Compare commits
25 Commits
Author | SHA1 | Date |
---|---|---|
CakeLancelot | b5ab9aad2d | |
CakeLancelot | 01ee292d10 | |
CakeLancelot | 2183106c73 | |
Gent Semaj | db7370ca41 | |
CakeLancelot | ec0fc87dcd | |
CakeLancelot | cef8c1de93 | |
CakeLancelot | b73329c6de | |
CakeLancelot | 2e7dc51aa1 | |
CakeLancelot | 3fc6cabe33 | |
CakeLancelot | 71e4694ff6 | |
CakeLancelot | 76f4a05287 | |
CakeLancelot | 97144aad59 | |
CakeLancelot | 4a465ca689 | |
CakeLancelot | 43f0c8c684 | |
CakeLancelot | d4dc403e90 | |
CakeLancelot | ab5de9488d | |
CakeLancelot | dabb8bf484 | |
CakeLancelot | 043bf219e7 | |
CakeLancelot | 7131026b2f | |
dongresource | 7dd018e336 | |
CakeLancelot | e19098a13e | |
CakeLancelot | 48e2052748 | |
CakeLancelot | 7b3de1fe52 | |
CakeLancelot | 675a5fce50 | |
CakeLancelot | 2bf916ea58 |
|
@ -0,0 +1,19 @@
|
|||
# top-most EditorConfig file
|
||||
root = true
|
||||
|
||||
# Unix-style newlines with a newline ending every file
|
||||
[*]
|
||||
end_of_line = lf
|
||||
insert_final_newline = true
|
||||
|
||||
# 4 space indentation
|
||||
[*.js, *.css, *.html, *.json]
|
||||
indent_style = space
|
||||
indent_size = 4
|
||||
|
||||
# Don't enforce anything in vendored code
|
||||
[*.min.*]
|
||||
end_of_line = unset
|
||||
insert_final_newline = unset
|
||||
indent_style = unset
|
||||
indent_style = unset
|
|
@ -0,0 +1,47 @@
|
|||
name: Publish Build
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ "main" ]
|
||||
tags: '*'
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: windows-2022
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- name: Set up Node.js 20.x
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 20.x
|
||||
cache: 'npm'
|
||||
- name: Install dependencies
|
||||
run: npm install
|
||||
- name: Pack into zip and create installer
|
||||
run: npm run dist
|
||||
- name: Upload Artifacts
|
||||
uses: actions/upload-artifact@master
|
||||
with:
|
||||
path: dist
|
||||
|
||||
publish-release:
|
||||
if: contains(github.ref, 'refs/tags/')
|
||||
runs-on: ubuntu-latest
|
||||
needs: build
|
||||
|
||||
steps:
|
||||
- name: Download artifact
|
||||
uses: actions/download-artifact@master
|
||||
- name: Create release
|
||||
uses: ncipollo/release-action@v1
|
||||
with:
|
||||
artifacts: "artifact/*-ia32-win.zip,artifact/*.exe"
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
@ -1,6 +1,6 @@
|
|||
MIT License
|
||||
|
||||
Copyright (c) 2020-2023 OpenFusion Contributors
|
||||
Copyright (c) 2020-2024 OpenFusion Contributors
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
|
|
51
README.md
|
@ -1,3 +1,52 @@
|
|||
# OpenFusionClient
|
||||
|
||||
Electron app for joining OpenFusion servers
|
||||
[![Current Release](https://img.shields.io/github/v/release/OpenFusionProject/OpenFusionClient?include_prereleases)](https://github.com/OpenFusionProject/OpenFusionClient/releases/latest) [![Discord](https://img.shields.io/badge/chat-on%20discord-7289da.svg?logo=discord)](https://discord.gg/DYavckB)[![License](https://img.shields.io/github/license/OpenFusionProject/OpenFusionClient)](https://github.com/OpenFusionProject/OpenFusionClient/blob/master/LICENSE.md)
|
||||
|
||||
An Electron app that allows you to easily join FusionFall servers.
|
||||
|
||||
It automatically installs FF's custom build of Unity Web Player, manages text files such as `assetInfo.php`/`loginInfo.php`, and embeds the game, all in a few clicks!
|
||||
|
||||
For an overview of how the game client worked originally, please see [this section in the OpenFusion README](https://github.com/OpenFusionProject/OpenFusion#architecture).
|
||||
|
||||
## Disclaimer
|
||||
|
||||
This repository does not contain any code from the actual FusionFall game client. **Think of it more as a launcher:** it abstracts away having to use a NPAPI plugin capable web browser, along with having to host a HTTP server for it to connect to.
|
||||
|
||||
In addition, if you are interested in contributing: do note that **this project likely cannot utilize more modern Javascript techniques**. In order to use NPAPI plugins, a very old version of Electron was needed (0.31.0). This limits the project to only a portion of ES5 in non-strict mode, and a reduced subset of Node/Electron APIs.
|
||||
|
||||
## Usage
|
||||
|
||||
Provided that you have npm installed, clone the repository, then run install like so:
|
||||
|
||||
```
|
||||
git clone https://github.com/OpenFusionProject/OpenFusionClient.git
|
||||
npm install
|
||||
```
|
||||
|
||||
After that has completed you can then test OpenFusionClient:
|
||||
|
||||
```
|
||||
npm run start
|
||||
```
|
||||
|
||||
If you would like to package it as a standalone win32 application:
|
||||
|
||||
```
|
||||
npm run pack
|
||||
```
|
||||
|
||||
You can then compress the application directory into a zip file and installer for distribution:
|
||||
|
||||
```
|
||||
npm run dist
|
||||
```
|
||||
|
||||
Before opening a PR or running pack/dist, please do a code formatting pass:
|
||||
|
||||
```
|
||||
npm run prettier
|
||||
```
|
||||
|
||||
## License
|
||||
|
||||
MIT unless specified otherwise
|
||||
|
|
|
@ -47,6 +47,11 @@ img {
|
|||
}
|
||||
|
||||
body {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
clear: both;
|
||||
user-select: none;
|
||||
background-color: #000;
|
||||
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
|
||||
|
@ -129,3 +134,12 @@ button > i {
|
|||
#server-table .server-listing-entry {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
#client {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
background: #000;
|
||||
clear: both;
|
||||
}
|
||||
|
|
Before Width: | Height: | Size: 72 KiB |
Before Width: | Height: | Size: 9.6 KiB After Width: | Height: | Size: 9.6 KiB |
Before Width: | Height: | Size: 176 B After Width: | Height: | Size: 176 B |
Before Width: | Height: | Size: 2.8 KiB After Width: | Height: | Size: 2.8 KiB |
|
@ -1,10 +1,8 @@
|
|||
// You're kind of ruining the surprise by reading this, but whatever
|
||||
var today = new Date();
|
||||
|
||||
// Check Christmas season: Date constructor in Javascript uses an index
|
||||
// so 11 is Dec. of this year, and 12 is Jan. of the next
|
||||
var christmasBegin = new Date(today.getFullYear(), 11, 23);
|
||||
var christmasEnd = new Date(today.getFullYear(), 12, 8);
|
||||
var christmasBegin = new Date(today.getFullYear(), 11, 21);
|
||||
var christmasEnd = new Date(today.getFullYear(), 11, 31);
|
||||
var sf;
|
||||
|
||||
if (today >= christmasBegin && today <= christmasEnd) {
|
|
@ -5,7 +5,7 @@ var gameRunning = false;
|
|||
|
||||
// Uncomment and enter credentials to skip login screen
|
||||
function authDoCallback(param) {
|
||||
/*var unity = document.getElementById('Unity_embed');
|
||||
/*var unity = document.getElementById('unityEmbed');
|
||||
unity.SendMessage("GlobalManager", "SetTEGid", "player");
|
||||
unity.SendMessage("GlobalManager", "SetAuthid", "0");
|
||||
unity.SendMessage("GlobalManager", "DoAuth", 0);*/
|
||||
|
@ -33,7 +33,7 @@ function PayPage(param) {
|
|||
|
||||
function onResize() {
|
||||
if (gameRunning == true) {
|
||||
var unity = document.getElementById("Unity_embed");
|
||||
var unity = document.getElementById("unityEmbed");
|
||||
unity.style.width = window.innerWidth + "px";
|
||||
unity.style.height = window.innerHeight + "px";
|
||||
}
|
||||
|
@ -56,38 +56,29 @@ function launchGame() {
|
|||
"codebase",
|
||||
"undefined/UnityWebPlayer.cab#version=2,0,0,0"
|
||||
);
|
||||
object.setAttribute("id", "Unity_object");
|
||||
object.setAttribute("id", "unityObject");
|
||||
object.setAttribute("width", "1264");
|
||||
object.setAttribute("height", "661");
|
||||
|
||||
var embed = document.createElement("embed");
|
||||
embed.setAttribute("type", "application/vnd.unity");
|
||||
embed.setAttribute("type", "application/vnd.ffuwp");
|
||||
embed.setAttribute(
|
||||
"pluginspage",
|
||||
"http://www.unity3d.com/unity-web-player-2.x"
|
||||
);
|
||||
embed.setAttribute("id", "Unity_embed");
|
||||
embed.setAttribute("id", "unityEmbed");
|
||||
embed.setAttribute("width", "1280");
|
||||
embed.setAttribute("height", "680");
|
||||
embed.setAttribute("src", window.asseturl + "main.unity3d");
|
||||
embed.setAttribute("disablecontdparaextmenu", "true");
|
||||
embed.setAttribute("src", window.assetUrl + "main.unity3d");
|
||||
embed.setAttribute("bordercolor", "000000");
|
||||
embed.setAttribute("backgroundcolor", "000000");
|
||||
embed.setAttribute("disableContextMenu", true);
|
||||
embed.setAttribute("textcolor", "ccffff");
|
||||
embed.setAttribute("logoimage", "assets/img/unity_dexlabs.png");
|
||||
embed.setAttribute("progressbarimage", "assets/img/unity_loadingbar.png");
|
||||
embed.setAttribute("logoimage", "assets/img/unity-dexlabs.png");
|
||||
embed.setAttribute("progressbarimage", "assets/img/unity-loadingbar.png");
|
||||
embed.setAttribute(
|
||||
"progressframeimage",
|
||||
"assets/img/unity_loadingframe.png"
|
||||
);
|
||||
embed.setAttribute(
|
||||
"autoupdateurlsignature",
|
||||
"42180ee5edc4e3d4dd706bcc17cedd8d6ec7b7ac463071fd34ab97fe181f1a78df31db5feb4526677e4f69ef53acaff44471591e68b87f041c80fd54765f0d5725b08aa28f5acf7716ffb2a04e971269f35925c7e38d57dd78f6a206530caaa3da7e32f07f19810efc0ebf29a4eae976a925ad9cc5beb4dd51564c67dc489033"
|
||||
);
|
||||
embed.setAttribute(
|
||||
"autoupdateurl",
|
||||
"http://wp-cartoonnetwork.unity3d.com/ff/big/beta-20111013/autodownload_webplugin_beta"
|
||||
"assets/img/unity-loadingframe.png"
|
||||
);
|
||||
|
||||
var div = document.getElementById("client");
|
|
@ -1,10 +1,15 @@
|
|||
var remote = require("remote");
|
||||
var remotefs = remote.require("fs-extra");
|
||||
var dns = remote.require("dns");
|
||||
var path = remote.require("path");
|
||||
|
||||
var userdir = remote.require("app").getPath("userData");
|
||||
var versionarray;
|
||||
var serverarray;
|
||||
var userData = remote.require("app").getPath("userData");
|
||||
var configPath = path.join(userData, "config.json");
|
||||
var serversPath = path.join(userData, "servers.json");
|
||||
var versionsPath = path.join(userData, "versions.json");
|
||||
|
||||
var versionArray;
|
||||
var serverArray;
|
||||
var config;
|
||||
|
||||
function enableServerListButtons() {
|
||||
|
@ -26,26 +31,24 @@ function disableServerListButtons() {
|
|||
}
|
||||
|
||||
function getAppVersion() {
|
||||
appversion = remote.require("app").getVersion();
|
||||
|
||||
// simplify version, ex. 1.4.0 -> 1.4,
|
||||
// but only if a revision number isn't present
|
||||
if(appversion.endsWith(".0")){
|
||||
return appversion.substr(0, appversion.length - 2)
|
||||
} else {
|
||||
return appversion
|
||||
}
|
||||
appVersion = remote.require("app").getVersion();
|
||||
|
||||
// Simplify version, ex. 1.4.0 -> 1.4,
|
||||
// but only if a revision number isn't present
|
||||
if (appVersion.endsWith(".0")) {
|
||||
return appVersion.substr(0, appVersion.length - 2);
|
||||
} else {
|
||||
return appVersion;
|
||||
}
|
||||
}
|
||||
|
||||
function setAppVersionText() {
|
||||
$("#of-aboutversionnumber").text("Version " + getAppVersion());
|
||||
$("#of-versionnumber").text("v" + getAppVersion());
|
||||
$("#of-aboutversionnumber").text("Version " + getAppVersion());
|
||||
$("#of-versionnumber").text("v" + getAppVersion());
|
||||
}
|
||||
|
||||
function addServer() {
|
||||
var jsontomodify = JSON.parse(
|
||||
remotefs.readFileSync(userdir + "\\servers.json")
|
||||
);
|
||||
var jsonToModify = JSON.parse(remotefs.readFileSync(serversPath));
|
||||
|
||||
var server = {};
|
||||
server["uuid"] = uuidv4();
|
||||
|
@ -60,20 +63,15 @@ function addServer() {
|
|||
server["version"] = $("#addserver-versionselect option:selected").text();
|
||||
//server['endpoint'] =
|
||||
|
||||
jsontomodify["servers"].push(server);
|
||||
jsonToModify["servers"].push(server);
|
||||
|
||||
remotefs.writeFileSync(
|
||||
userdir + "\\servers.json",
|
||||
JSON.stringify(jsontomodify, null, 4)
|
||||
);
|
||||
remotefs.writeFileSync(serversPath, JSON.stringify(jsonToModify, null, 4));
|
||||
loadServerList();
|
||||
}
|
||||
|
||||
function editServer() {
|
||||
var jsontomodify = JSON.parse(
|
||||
remotefs.readFileSync(userdir + "\\servers.json")
|
||||
);
|
||||
$.each(jsontomodify["servers"], function (key, value) {
|
||||
var jsonToModify = JSON.parse(remotefs.readFileSync(serversPath));
|
||||
$.each(jsonToModify["servers"], function (key, value) {
|
||||
if (value["uuid"] == getSelectedServer()) {
|
||||
value["description"] =
|
||||
$("#editserver-descinput").val().length == 0
|
||||
|
@ -89,69 +87,57 @@ function editServer() {
|
|||
}
|
||||
});
|
||||
|
||||
remotefs.writeFileSync(
|
||||
userdir + "\\servers.json",
|
||||
JSON.stringify(jsontomodify, null, 4)
|
||||
);
|
||||
remotefs.writeFileSync(serversPath, JSON.stringify(jsonToModify, null, 4));
|
||||
loadServerList();
|
||||
}
|
||||
|
||||
function deleteServer() {
|
||||
var jsontomodify = JSON.parse(
|
||||
remotefs.readFileSync(userdir + "\\servers.json")
|
||||
);
|
||||
var result = jsontomodify["servers"].filter(function (obj) {
|
||||
var jsonToModify = JSON.parse(remotefs.readFileSync(serversPath));
|
||||
var result = jsonToModify["servers"].filter(function (obj) {
|
||||
return obj.uuid === getSelectedServer();
|
||||
})[0];
|
||||
|
||||
var resultindex = jsontomodify["servers"].indexOf(result);
|
||||
var resultindex = jsonToModify["servers"].indexOf(result);
|
||||
|
||||
jsontomodify["servers"].splice(resultindex, 1);
|
||||
jsonToModify["servers"].splice(resultindex, 1);
|
||||
|
||||
remotefs.writeFileSync(
|
||||
userdir + "\\servers.json",
|
||||
JSON.stringify(jsontomodify, null, 4)
|
||||
);
|
||||
remotefs.writeFileSync(serversPath, JSON.stringify(jsonToModify, null, 4));
|
||||
loadServerList();
|
||||
}
|
||||
|
||||
function restoreDefaultServers() {
|
||||
remotefs.copySync(
|
||||
__dirname + "\\defaults\\servers.json",
|
||||
userdir + "\\servers.json"
|
||||
path.join(__dirname, "/defaults/servers.json"),
|
||||
serversPath
|
||||
);
|
||||
loadServerList();
|
||||
}
|
||||
|
||||
function loadGameVersions() {
|
||||
var versionjson = JSON.parse(
|
||||
remotefs.readFileSync(userdir + "\\versions.json")
|
||||
);
|
||||
versionarray = versionjson["versions"];
|
||||
$.each(versionarray, function (key, value) {
|
||||
var versionJson = remotefs.readJsonSync(versionsPath);
|
||||
versionArray = versionJson["versions"];
|
||||
$.each(versionArray, function (key, value) {
|
||||
$(new Option(value.name, "val")).appendTo("#addserver-versionselect");
|
||||
$(new Option(value.name, "val")).appendTo("#editserver-versionselect");
|
||||
});
|
||||
}
|
||||
|
||||
function loadConfig() {
|
||||
// load config object globally
|
||||
config = JSON.parse(remotefs.readFileSync(userdir + "\\config.json"));
|
||||
// Load config object globally
|
||||
config = remotefs.readJsonSync(configPath);
|
||||
}
|
||||
|
||||
function loadServerList() {
|
||||
var serverjson = JSON.parse(
|
||||
remotefs.readFileSync(userdir + "\\servers.json")
|
||||
);
|
||||
serverarray = serverjson["servers"];
|
||||
var serverJson = remotefs.readJsonSync(serversPath);
|
||||
serverArray = serverJson["servers"];
|
||||
|
||||
$(".server-listing-entry").remove(); // Clear out old stuff, if any
|
||||
disableServerListButtons(); // Disable buttons until another server is selected
|
||||
|
||||
if (serverarray.length > 0) {
|
||||
if (serverArray.length > 0) {
|
||||
// Servers were found in the JSON
|
||||
$("#server-listing-placeholder").attr("hidden", true);
|
||||
$.each(serverarray, function (key, value) {
|
||||
$.each(serverArray, function (key, value) {
|
||||
// Create the row, and populate the cells
|
||||
var row = document.createElement("tr");
|
||||
row.className = "server-listing-entry";
|
||||
|
@ -172,63 +158,66 @@ function loadServerList() {
|
|||
}
|
||||
}
|
||||
|
||||
function performCacheSwap(newversion) {
|
||||
var cacheroot = userdir + "\\..\\..\\LocalLow\\Unity\\Web Player\\Cache";
|
||||
var currentcache = cacheroot + "\\Fusionfall";
|
||||
var newcache = cacheroot + "\\" + newversion;
|
||||
var record = userdir + "\\.lastver";
|
||||
function performCacheSwap(newVersion) {
|
||||
var cacheRoot = path.join(
|
||||
userData,
|
||||
"/../../LocalLow/Unity/Web Player/Cache"
|
||||
);
|
||||
var currentCache = path.join(cacheRoot, "FusionFall");
|
||||
var newCache = path.join(cacheRoot, newVersion);
|
||||
var record = path.join(userData, ".lastver");
|
||||
|
||||
// if cache renaming would result in a no-op (ex. launching the same version
|
||||
// two times), then skip it. this avoids permissions errors with multiple clients
|
||||
// If cache renaming would result in a no-op (ex. launching the same version
|
||||
// two times), then skip it. This avoids permissions errors with multiple clients
|
||||
// (file/folder is already open in another process)
|
||||
var skip = false;
|
||||
|
||||
if (remotefs.existsSync(currentcache)) {
|
||||
// cache already exists, find out what version it belongs to
|
||||
if (remotefs.existsSync(currentCache)) {
|
||||
// Cache already exists, find out what version it belongs to
|
||||
if (remotefs.existsSync(record)) {
|
||||
lastversion = remotefs.readFileSync(record);
|
||||
if (lastversion != newversion) {
|
||||
var lastVersion = remotefs.readFileSync(record, (encoding = "utf8"));
|
||||
if (lastVersion != newVersion) {
|
||||
// Remove the directory we're trying to store the
|
||||
// existing cache to if it already exists for whatever
|
||||
// reason, as it would cause an EPERM error otherwise.
|
||||
// This is a no-op if the directory doesn't exist
|
||||
remotefs.removeSync(path.join(cacheRoot, lastVersion));
|
||||
// Store old cache to named directory
|
||||
remotefs.renameSync(
|
||||
currentcache,
|
||||
cacheroot + "\\" + lastversion
|
||||
currentCache,
|
||||
path.join(cacheRoot, lastVersion)
|
||||
);
|
||||
} else {
|
||||
console.log(
|
||||
"Cached version unchanged, renaming will be skipped"
|
||||
);
|
||||
console.log("Cached version unchanged, skipping rename");
|
||||
skip = true;
|
||||
}
|
||||
console.log("Current cache is " + lastversion);
|
||||
} else {
|
||||
console.log(
|
||||
"Couldn't find last version record; cache may get overwritten"
|
||||
);
|
||||
console.log("Current cache is " + lastVersion);
|
||||
}
|
||||
}
|
||||
|
||||
if (remotefs.existsSync(newcache) || !skip) {
|
||||
// rename saved cache to FusionFall
|
||||
remotefs.renameSync(newcache, currentcache);
|
||||
console.log("Current cache swapped to " + newversion);
|
||||
// Make note of what version we are launching for next launch
|
||||
remotefs.writeFileSync(record, newVersion);
|
||||
|
||||
if (remotefs.existsSync(newCache) && !skip) {
|
||||
// Rename saved cache to FusionFall
|
||||
remotefs.renameSync(newCache, currentCache);
|
||||
console.log("Current cache swapped to " + newVersion);
|
||||
}
|
||||
|
||||
// make note of what version we are launching for next launch
|
||||
remotefs.writeFileSync(record, newversion);
|
||||
}
|
||||
|
||||
// For writing loginInfo.php, assetInfo.php, etc.
|
||||
function setGameInfo(serverUUID) {
|
||||
var result = serverarray.filter(function (obj) {
|
||||
var result = serverArray.filter(function (obj) {
|
||||
return obj.uuid === serverUUID;
|
||||
})[0];
|
||||
var gameversion = versionarray.filter(function (obj) {
|
||||
var gameVersion = versionArray.filter(function (obj) {
|
||||
return obj.name === result.version;
|
||||
})[0];
|
||||
|
||||
// if cache swapping property exists AND is `true`, run cache swapping logic
|
||||
// If cache swapping property exists AND is `true`, run cache swapping logic
|
||||
if (config["cache-swapping"]) {
|
||||
try {
|
||||
performCacheSwap(gameversion.name);
|
||||
performCacheSwap(gameVersion.name);
|
||||
} catch (ex) {
|
||||
console.log(
|
||||
"Error when swapping cache, it may get overwritten:\n" + ex
|
||||
|
@ -236,33 +225,36 @@ function setGameInfo(serverUUID) {
|
|||
}
|
||||
}
|
||||
|
||||
window.asseturl = gameversion.url; // gameclient.js needs to access this
|
||||
window.assetUrl = gameVersion.url; // game-client.js needs to access this
|
||||
|
||||
remotefs.writeFileSync(__dirname + "\\assetInfo.php", asseturl);
|
||||
remotefs.writeFileSync(path.join(__dirname, "assetInfo.php"), assetUrl);
|
||||
if (result.hasOwnProperty("endpoint")) {
|
||||
var httpendpoint = result.endpoint.replace("https://", "http://");
|
||||
var httpEndpoint = result.endpoint.replace("https://", "http://");
|
||||
remotefs.writeFileSync(
|
||||
__dirname + "\\rankurl.txt",
|
||||
httpendpoint + "getranks"
|
||||
path.join(__dirname, "rankurl.txt"),
|
||||
httpEndpoint + "getranks"
|
||||
);
|
||||
// Write these out too
|
||||
remotefs.writeFileSync(
|
||||
__dirname + "\\sponsor.php",
|
||||
httpendpoint + "upsell/sponsor.png"
|
||||
path.join(__dirname, "sponsor.php"),
|
||||
httpEndpoint + "upsell/sponsor.png"
|
||||
);
|
||||
remotefs.writeFileSync(
|
||||
__dirname + "\\images.php",
|
||||
httpendpoint + "upsell/"
|
||||
path.join(__dirname, "images.php"),
|
||||
httpEndpoint + "upsell/"
|
||||
);
|
||||
} else {
|
||||
// Remove/default the endpoint related stuff, this server won't be using it
|
||||
if (remotefs.existsSync(__dirname + "\\rankurl.txt")) {
|
||||
remotefs.unlinkSync(__dirname + "\\rankurl.txt");
|
||||
if (remotefs.existsSync(path.join(__dirname, "rankurl.txt"))) {
|
||||
remotefs.unlinkSync(path.join(__dirname, "rankurl.txt"));
|
||||
remotefs.writeFileSync(
|
||||
__dirname + "\\sponsor.php",
|
||||
path.join(__dirname, "sponsor.php"),
|
||||
"assets/img/welcome.png"
|
||||
);
|
||||
remotefs.writeFileSync(__dirname + "\\images.php", "assets/img/");
|
||||
remotefs.writeFileSync(
|
||||
path.join(__dirname, "images.php"),
|
||||
"assets/img/"
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -280,10 +272,10 @@ function setGameInfo(serverUUID) {
|
|||
|
||||
// DNS resolution. there is no synchronous version for some stupid reason
|
||||
if (!address.match(/^[0-9.]+$/))
|
||||
dns.resolve4(address, function (err, res) {
|
||||
dns.lookup(address, (family = 4), function (err, resolvedAddress) {
|
||||
if (!err) {
|
||||
console.log("Resolved " + address + " to " + res[0]);
|
||||
address = res[0];
|
||||
console.log("Resolved " + address + " to " + resolvedAddress);
|
||||
address = resolvedAddress;
|
||||
} else {
|
||||
console.log("Err: " + err.code);
|
||||
}
|
||||
|
@ -298,7 +290,7 @@ function setGameInfo(serverUUID) {
|
|||
function prepConnection(address, port) {
|
||||
var full = address + ":" + port;
|
||||
console.log("Will connect to " + full);
|
||||
remotefs.writeFileSync(__dirname + "\\loginInfo.php", full);
|
||||
remotefs.writeFileSync(path.join(__dirname, "loginInfo.php"), full);
|
||||
launchGame();
|
||||
}
|
||||
|
||||
|
@ -341,10 +333,10 @@ $("#server-table").on("dblclick", ".server-listing-entry", function (event) {
|
|||
});
|
||||
|
||||
$("#of-editservermodal").on("show.bs.modal", function (e) {
|
||||
var jsontomodify = JSON.parse(
|
||||
remotefs.readFileSync(userdir + "\\servers.json")
|
||||
var jsonToModify = remotefs.readJsonSync(
|
||||
path.join(userData, "servers.json")
|
||||
);
|
||||
$.each(jsontomodify["servers"], function (key, value) {
|
||||
$.each(jsonToModify["servers"], function (key, value) {
|
||||
if (value["uuid"] == getSelectedServer()) {
|
||||
$("#editserver-descinput")[0].value = value["description"];
|
||||
$("#editserver-ipinput")[0].value = value["ip"];
|
||||
|
@ -361,7 +353,7 @@ $("#of-editservermodal").on("show.bs.modal", function (e) {
|
|||
});
|
||||
|
||||
$("#of-deleteservermodal").on("show.bs.modal", function (e) {
|
||||
var result = serverarray.filter(function (obj) {
|
||||
var result = serverArray.filter(function (obj) {
|
||||
return obj.uuid === getSelectedServer();
|
||||
})[0];
|
||||
$("#deleteserver-servername").html(result.description);
|
|
@ -0,0 +1,32 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||
<asmv1:assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1" xmlns:asmv1="urn:schemas-microsoft-com:asm.v1" xmlns:asmv2="urn:schemas-microsoft-com:asm.v2" xmlns:asmv3="urn:schemas-microsoft-com:asm.v3">
|
||||
<assemblyIdentity type="win32" name="OpenFusion.Client" version="1.5.2.0" processorArchitecture="x86" />
|
||||
<dependency>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity type="Win32" name="Microsoft.Windows.Common-Controls" version="6.0.0.0" processorArchitecture="*" publicKeyToken="6595b64144ccf1df" language="*">
|
||||
</assemblyIdentity>
|
||||
</dependentAssembly>
|
||||
</dependency>
|
||||
<asmv3:trustInfo>
|
||||
<security>
|
||||
<requestedPrivileges>
|
||||
<requestedExecutionLevel level="asInvoker" uiAccess="false"></requestedExecutionLevel>
|
||||
</requestedPrivileges>
|
||||
</security>
|
||||
</asmv3:trustInfo>
|
||||
<asmv3:application>
|
||||
<asmv3:windowsSettings>
|
||||
<activeCodePage xmlns="urn:schemas-microsoft-com:smi.2019.WindowsSettings">UTF-8</activeCodePage>
|
||||
<dpiAware xmlns="urn:schemas-microsoft-com:smi.2005.WindowsSettings">True/PM</dpiAware>
|
||||
</asmv3:windowsSettings>
|
||||
</asmv3:application>
|
||||
<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
|
||||
<application>
|
||||
<supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}"></supportedOS>
|
||||
<supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}"></supportedOS>
|
||||
<supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}"></supportedOS>
|
||||
<supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}"></supportedOS>
|
||||
<supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}"></supportedOS>
|
||||
</application>
|
||||
</compatibility>
|
||||
</asmv1:assembly>
|
|
@ -1,9 +1,9 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<plist>
|
||||
<dict>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>2.5.5b4</string>
|
||||
<key>UnityBuildNumber</key>
|
||||
<string>50</string>
|
||||
</dict>
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<plist>
|
||||
<dict>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>2.5.5b4</string>
|
||||
<key>UnityBuildNumber</key>
|
||||
<string>50</string>
|
||||
</dict>
|
||||
</plist>
|
|
@ -1,9 +1,9 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<plist>
|
||||
<dict>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>3.5.2f2</string>
|
||||
<key>UnityBuildNumber</key>
|
||||
<string>4c6ee796dacc</string>
|
||||
</dict>
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<plist>
|
||||
<dict>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>2.5.5b4</string>
|
||||
<key>UnityBuildNumber</key>
|
||||
<string>50</string>
|
||||
</dict>
|
||||
</plist>
|
|
@ -1,13 +1,13 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<plist>
|
||||
<dict>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>2.5.5b4</string>
|
||||
<key>UnityBuildNumber</key>
|
||||
<string>50</string>
|
||||
<key>monoVersion</key>
|
||||
<string>fusion-2.x.x</string>
|
||||
<key>monoMinimumRevision</key>
|
||||
<string>2.0.0f6</string>
|
||||
</dict>
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<plist>
|
||||
<dict>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>2.5.5b4</string>
|
||||
<key>UnityBuildNumber</key>
|
||||
<string>50</string>
|
||||
<key>monoVersion</key>
|
||||
<string>fusion-2.x.x</string>
|
||||
<key>monoMinimumRevision</key>
|
||||
<string>2.0.0f6</string>
|
||||
</dict>
|
||||
</plist>
|
|
@ -1,16 +1,16 @@
|
|||
const fs = require('fs');
|
||||
const defaultdir = './dist/win-ia32-unpacked/resources/default_app'
|
||||
const exefile = './dist/win-ia32-unpacked/OpenFusionClient.exe'
|
||||
const defaultDir = './dist/win-ia32-unpacked/resources/default_app'
|
||||
const exeFile = './dist/win-ia32-unpacked/OpenFusionClient.exe'
|
||||
|
||||
exports.default = function() {
|
||||
// remove leftover files from default electron app
|
||||
fs.rm(dir, { recursive: true }, (err) => {
|
||||
fs.rm(defaultDir, { recursive: true }, (err) => {
|
||||
if (err) {
|
||||
throw err;
|
||||
}
|
||||
});
|
||||
// patch executable for large address awareness
|
||||
fs.open(exefile, "r+", (err, fd) => {
|
||||
fs.open(exeFile, "r+", (err, fd) => {
|
||||
if(!err) {
|
||||
fs.write(
|
||||
fd, new Uint8Array([0x22]), 0, 1, 0x166,
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"autoupdate-check": true,
|
||||
"cache-swapping": true,
|
||||
"last-version-initialized": "1.4"
|
||||
"last-version-initialized": "1.5"
|
||||
}
|
||||
|
|
48
index.html
|
@ -3,27 +3,18 @@
|
|||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta
|
||||
name="viewport"
|
||||
content="width=device-width, initial-scale=1.0, shrink-to-fit=no"
|
||||
http-equiv="Content-Type"
|
||||
contentType="text/html; charset=UTF-8"
|
||||
/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>OpenFusion: Server Selector</title>
|
||||
<link rel="stylesheet" href="assets/bootstrap/css/bootstrap.min.css" />
|
||||
<link rel="stylesheet" href="assets/css/bootstrap.min.css" />
|
||||
<link rel="stylesheet" href="assets/fonts/fontawesome-all.min.css" />
|
||||
<link rel="stylesheet" href="assets/css/openfusion.css" />
|
||||
<link rel="stylesheet" href="assets/css/styles.css" />
|
||||
</head>
|
||||
|
||||
<body
|
||||
style="
|
||||
background: rgb(0, 0, 0);
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
clear: both;
|
||||
"
|
||||
onresize="onResize()"
|
||||
>
|
||||
<body onresize="onResize()">
|
||||
<section id="of-serverselector">
|
||||
<div class="container" id="serverselector-container">
|
||||
<div class="row text-center mt-3" id="of-logoheader">
|
||||
|
@ -151,9 +142,14 @@
|
|||
</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<p id="of-aboutversionnumber" class="text-monospace">APP_VERSION_NUMBER</p>
|
||||
<p
|
||||
id="of-aboutversionnumber"
|
||||
class="text-monospace"
|
||||
>
|
||||
APP_VERSION_NUMBER
|
||||
</p>
|
||||
<p>
|
||||
©2020-2023 OpenFusion Contributors<br />OpenFusion
|
||||
©2020-2024 OpenFusion Contributors<br />OpenFusion
|
||||
is licensed under MIT.<br />
|
||||
</p>
|
||||
<a
|
||||
|
@ -459,28 +455,18 @@
|
|||
</div>
|
||||
</section>
|
||||
<section>
|
||||
<div
|
||||
id="client"
|
||||
style="
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
background: #000;
|
||||
clear: both;
|
||||
"
|
||||
></div>
|
||||
<div id="client"></div>
|
||||
</section>
|
||||
<script
|
||||
src="assets/js/jquery.min.js"
|
||||
onload="window.$ = window.jQuery = module.exports;"
|
||||
></script>
|
||||
<script src="assets/bootstrap/js/bootstrap.min.js"></script>
|
||||
<script src="assets/js/bootstrap.min.js"></script>
|
||||
<script src="assets/js/bs-init.js"></script>
|
||||
<script src="assets/js/uuidv4.min.js"></script>
|
||||
<script src="assets/js/serverselector.js"></script>
|
||||
<script src="assets/js/gameclient.js"></script>
|
||||
<script src="assets/js/server-selector.js"></script>
|
||||
<script src="assets/js/game-client.js"></script>
|
||||
<script src="assets/js/snowflakes.min.js"></script>
|
||||
<script src="assets/js/eastereggs.js"></script>
|
||||
<script src="assets/js/easter-eggs.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
178
index.js
|
@ -1,108 +1,56 @@
|
|||
var app = require("app"); // Module to control application life.
|
||||
var ipc = require("ipc");
|
||||
var fs = require("fs-extra");
|
||||
var os = require("os");
|
||||
var dialog = require("dialog");
|
||||
var BrowserWindow = require("browser-window");
|
||||
var fs = require("fs-extra");
|
||||
var ipc = require("ipc");
|
||||
var os = require("os");
|
||||
var path = require("path");
|
||||
|
||||
var BrowserWindow = require("browser-window");
|
||||
var mainWindow = null;
|
||||
|
||||
app.commandLine.appendSwitch("--enable-npapi");
|
||||
|
||||
function verifyUnity() {
|
||||
var dllpath =
|
||||
app.getPath("appData") +
|
||||
"\\..\\LocalLow\\Unity\\WebPlayer\\player\\fusion-2.x.x\\webplayer_win.dll";
|
||||
|
||||
if (fs.existsSync(dllpath)) {
|
||||
var buff = fs.readFileSync(dllpath);
|
||||
var hash = require("crypto")
|
||||
.createHash("md5")
|
||||
.update(buff)
|
||||
.digest("hex");
|
||||
if (hash == "e5028405b4483de9e5e5fe9cd5f1e98f") {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
var unityHomeDir = path.join(__dirname, "../../WebPlayer");
|
||||
// If running in non-packaged / development mode, this dir will be slightly different
|
||||
if (process.env.npm_node_execpath) {
|
||||
unityHomeDir = path.join(app.getAppPath(), "/build/WebPlayer");
|
||||
}
|
||||
|
||||
function installUnity(callback) {
|
||||
var utilsdir = __dirname + "\\..\\..\\utils";
|
||||
process.env["UNITY_HOME_DIR"] = unityHomeDir;
|
||||
process.env["UNITY_DISABLE_PLUGIN_UPDATES"] = "yes";
|
||||
|
||||
// if running in non-packaged / development mode, this dir will be slightly different
|
||||
if (process.env.npm_node_execpath) {
|
||||
utilsdir = app.getAppPath() + "\\build\\utils";
|
||||
}
|
||||
app.commandLine.appendSwitch("enable-npapi");
|
||||
app.commandLine.appendSwitch(
|
||||
"load-plugin",
|
||||
path.join(unityHomeDir, "/loader/npUnity3D32.dll")
|
||||
);
|
||||
app.commandLine.appendSwitch("no-proxy-server");
|
||||
|
||||
// run the installer silently
|
||||
var child = require("child_process").spawn(
|
||||
utilsdir + "\\UnityWebPlayer.exe",
|
||||
["/quiet", "/S"]
|
||||
);
|
||||
child.on("exit", function () {
|
||||
// overwrite 3.5.2 loader/player with FF's custom version
|
||||
var dstfolder =
|
||||
app.getPath("appData") + "..\\LocalLow\\Unity\\WebPlayer";
|
||||
fs.copySync(utilsdir + "\\WebPlayer", dstfolder, {
|
||||
clobber: true,
|
||||
});
|
||||
// avoids error reporter popping up when closing Electron
|
||||
fs.removeSync(dstfolder + "\\UnityBugReporter.exe");
|
||||
console.log("Unity Web Player installed successfully.");
|
||||
callback();
|
||||
});
|
||||
}
|
||||
var userData = app.getPath("userData");
|
||||
var configPath = path.join(userData, "config.json");
|
||||
var serversPath = path.join(userData, "servers.json");
|
||||
var versionsPath = path.join(userData, "versions.json");
|
||||
|
||||
function initialSetup(firstTime) {
|
||||
// Display a small window to inform the user that the app is working
|
||||
setupWindow = new BrowserWindow({
|
||||
width: 275,
|
||||
height: 450,
|
||||
resizable: false,
|
||||
center: true,
|
||||
frame: false,
|
||||
});
|
||||
setupWindow.loadUrl("file://" + __dirname + "/initialsetup.html");
|
||||
installUnity(function () {
|
||||
if (!firstTime) {
|
||||
// migration from pre-1.4
|
||||
// Back everything up, just in case
|
||||
fs.copySync(
|
||||
app.getPath("userData") + "\\config.json",
|
||||
app.getPath("userData") + "\\config.json.bak"
|
||||
);
|
||||
fs.copySync(
|
||||
app.getPath("userData") + "\\servers.json",
|
||||
app.getPath("userData") + "\\servers.json.bak"
|
||||
);
|
||||
fs.copySync(
|
||||
app.getPath("userData") + "\\versions.json",
|
||||
app.getPath("userData") + "\\versions.json.bak"
|
||||
);
|
||||
} else {
|
||||
// first-time setup
|
||||
// Copy default servers
|
||||
fs.copySync(
|
||||
__dirname + "\\defaults\\servers.json",
|
||||
app.getPath("userData") + "\\servers.json"
|
||||
);
|
||||
}
|
||||
|
||||
// Copy default versions and config
|
||||
if (!firstTime) {
|
||||
// Migration from pre-1.4
|
||||
// Back everything up, just in case
|
||||
fs.copySync(configPath, configPath + ".bak");
|
||||
fs.copySync(serversPath, serversPath + ".bak");
|
||||
fs.copySync(versionsPath, versionsPath + ".bak");
|
||||
} else {
|
||||
// First-time setup
|
||||
// Copy default servers
|
||||
fs.copySync(
|
||||
__dirname + "\\defaults\\versions.json",
|
||||
app.getPath("userData") + "\\versions.json"
|
||||
);
|
||||
fs.copySync(
|
||||
__dirname + "\\defaults\\config.json",
|
||||
app.getPath("userData") + "\\config.json"
|
||||
path.join(__dirname, "/defaults/servers.json"),
|
||||
serversPath
|
||||
);
|
||||
}
|
||||
|
||||
console.log("JSON files copied.");
|
||||
setupWindow.destroy();
|
||||
showMainWindow();
|
||||
});
|
||||
// Copy default versions and config
|
||||
fs.copySync(path.join(__dirname, "/defaults/versions.json"), versionsPath);
|
||||
fs.copySync(path.join(__dirname, "/defaults/config.json"), configPath);
|
||||
|
||||
console.log("JSON files copied.");
|
||||
showMainWindow();
|
||||
}
|
||||
|
||||
ipc.on("exit", function (id) {
|
||||
|
@ -116,26 +64,26 @@ app.on("window-all-closed", function () {
|
|||
|
||||
app.on("ready", function () {
|
||||
// Check just in case the user forgot to extract the zip.
|
||||
zip_check = app.getPath("exe").includes(os.tmpdir());
|
||||
if (zip_check) {
|
||||
errormsg =
|
||||
zipCheck = app.getPath("exe").includes(os.tmpdir());
|
||||
if (zipCheck) {
|
||||
var errorMessage =
|
||||
"It has been detected that OpenFusionClient is running from the TEMP folder.\n\n" +
|
||||
"Please extract the entire Client folder to a location of your choice before starting OpenFusionClient.";
|
||||
dialog.showErrorBox("Error!", errormsg);
|
||||
dialog.showErrorBox("Error!", errorMessage);
|
||||
return;
|
||||
}
|
||||
|
||||
// Create the browser window.
|
||||
mainWindow = new BrowserWindow({
|
||||
width: 1280,
|
||||
height: 720,
|
||||
show: false,
|
||||
"web-preferences": { plugins: true },
|
||||
"web-preferences": {
|
||||
plugins: true,
|
||||
},
|
||||
});
|
||||
mainWindow.setMinimumSize(640, 480);
|
||||
|
||||
// Check for first run
|
||||
var configPath = app.getPath("userData") + "\\config.json";
|
||||
try {
|
||||
if (!fs.existsSync(configPath)) {
|
||||
console.log("Config file not found. Running initial setup.");
|
||||
|
@ -146,20 +94,20 @@ app.on("ready", function () {
|
|||
console.log("Pre-1.4 config detected. Running migration.");
|
||||
initialSetup(false);
|
||||
} else {
|
||||
if (verifyUnity()) {
|
||||
showMainWindow();
|
||||
} else {
|
||||
installUnity(showMainWindow);
|
||||
}
|
||||
showMainWindow();
|
||||
}
|
||||
}
|
||||
} catch (ex) {
|
||||
console.log("An error occurred while checking for the config");
|
||||
dialog.showErrorBox(
|
||||
"Error!",
|
||||
"An error occurred while checking for the config. Make sure you have sufficent permissions."
|
||||
);
|
||||
app.quit();
|
||||
}
|
||||
|
||||
// Makes it so external links are opened in the system browser, not Electron
|
||||
mainWindow.webContents.on("new-window", function (e, url) {
|
||||
e.preventDefault();
|
||||
mainWindow.webContents.on("new-window", function (event, url) {
|
||||
event.preventDefault();
|
||||
require("shell").openExternal(url);
|
||||
});
|
||||
|
||||
|
@ -183,19 +131,23 @@ function showMainWindow() {
|
|||
});
|
||||
|
||||
mainWindow.webContents.on("plugin-crashed", function () {
|
||||
console.log("Unity Web Player crashed.");
|
||||
var errorMessage =
|
||||
"Unity Web Player has crashed - please re-open the application.\n" +
|
||||
"If this error persists, please read the FAQ or ask for support in our Discord server.";
|
||||
dialog.showErrorBox("Error!", errorMessage);
|
||||
mainWindow.destroy();
|
||||
app.quit();
|
||||
});
|
||||
|
||||
mainWindow.webContents.on("will-navigate", function (evt, url) {
|
||||
evt.preventDefault();
|
||||
// TODO: showMessageBox rather than showErrorBox?
|
||||
mainWindow.webContents.on("will-navigate", function (event, url) {
|
||||
event.preventDefault();
|
||||
switch (url) {
|
||||
case "https://audience.fusionfall.com/ff/regWizard.do?_flowId=fusionfall-registration-flow":
|
||||
errormsg =
|
||||
var errorMessage =
|
||||
"The register page is currently unimplemented.\n\n" +
|
||||
'You can still create an account: type your desired username and password into the provided boxes and click "Log In". ' +
|
||||
"Your account will then be automatically created on the server. \nBe sure to remember these details!";
|
||||
dialog.showErrorBox("Sorry!", errormsg);
|
||||
dialog.showErrorBox("Sorry!", errorMessage);
|
||||
break;
|
||||
case "https://audience.fusionfall.com/ff/login.do":
|
||||
dialog.showErrorBox(
|
||||
|
@ -207,7 +159,7 @@ function showMainWindow() {
|
|||
require("shell").openExternal("https://discord.gg/DYavckB");
|
||||
break;
|
||||
default:
|
||||
mainWindow.webContents.loadURL(url);
|
||||
mainWindow.loadUrl(url);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
|
@ -1,40 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>OpenFusion: Initial Setup</title>
|
||||
</head>
|
||||
<body
|
||||
style="
|
||||
overflow: hidden;
|
||||
background-color: #000;
|
||||
user-select: none;
|
||||
-webkit-user-select: none;
|
||||
"
|
||||
>
|
||||
<center>
|
||||
<div>
|
||||
<img src="assets/img/of-3.png" width="256" />
|
||||
<div>
|
||||
<img src="assets/img/spinner.gif" width="50px" />
|
||||
</div>
|
||||
<div style="margin-top: 15px">
|
||||
<p
|
||||
style="
|
||||
text-shadow: 1px 1px 8px #4349c4;
|
||||
color: #4a76b7;
|
||||
font-size: 18px;
|
||||
font-family: -apple-system, BlinkMacSystemFont,
|
||||
'Segoe UI', Roboto, 'Helvetica Neue', Arial,
|
||||
'Noto Sans', sans-serif, 'Apple Color Emoji',
|
||||
'Segoe UI Emoji', 'Segoe UI Symbol',
|
||||
'Noto Color Emoji';
|
||||
"
|
||||
>
|
||||
OpenFusion is setting up...<br />Please wait - this
|
||||
should take <br />less than a minute.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</center>
|
||||
</body>
|
||||
</html>
|
|
@ -1,16 +1,16 @@
|
|||
{
|
||||
"name": "OpenFusionClient",
|
||||
"version": "1.4.0",
|
||||
"version": "1.5.2",
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "OpenFusionClient",
|
||||
"version": "1.4.0",
|
||||
"version": "1.5.2",
|
||||
"hasInstallScript": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"fs-extra": "^0.30.0"
|
||||
"fs-extra": "2.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"electron-builder": "^22.14.13",
|
||||
|
@ -746,7 +746,8 @@
|
|||
"node_modules/balanced-match": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz",
|
||||
"integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw=="
|
||||
"integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/base64-js": {
|
||||
"version": "1.5.1",
|
||||
|
@ -830,6 +831,7 @@
|
|||
"version": "1.1.11",
|
||||
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
|
||||
"integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"balanced-match": "^1.0.0",
|
||||
"concat-map": "0.0.1"
|
||||
|
@ -1333,7 +1335,8 @@
|
|||
"node_modules/concat-map": {
|
||||
"version": "0.0.1",
|
||||
"resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
|
||||
"integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s="
|
||||
"integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/concat-stream": {
|
||||
"version": "1.6.2",
|
||||
|
@ -2021,15 +2024,12 @@
|
|||
}
|
||||
},
|
||||
"node_modules/fs-extra": {
|
||||
"version": "0.30.0",
|
||||
"resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-0.30.0.tgz",
|
||||
"integrity": "sha1-8jP/zAjU2n1DLapEl3aYnbHfk/A=",
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-2.0.0.tgz",
|
||||
"integrity": "sha512-DERmRq6uGnu7I4uFJiWQBe5pYy67v2oKowEi8jYA/52u/ZO9xXBP2HAGacD9Nus0UT/WhJFZTq8cWbxZqOHVUg==",
|
||||
"dependencies": {
|
||||
"graceful-fs": "^4.1.2",
|
||||
"jsonfile": "^2.1.0",
|
||||
"klaw": "^1.0.0",
|
||||
"path-is-absolute": "^1.0.0",
|
||||
"rimraf": "^2.2.8"
|
||||
"jsonfile": "^2.1.0"
|
||||
}
|
||||
},
|
||||
"node_modules/fs-extra/node_modules/jsonfile": {
|
||||
|
@ -2095,6 +2095,7 @@
|
|||
"version": "6.0.4",
|
||||
"resolved": "https://registry.npmjs.org/glob/-/glob-6.0.4.tgz",
|
||||
"integrity": "sha1-DwiGD2oVUSey+t1PnOJLGqtuTSI=",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"inflight": "^1.0.4",
|
||||
"inherits": "2",
|
||||
|
@ -2406,6 +2407,7 @@
|
|||
"version": "1.0.6",
|
||||
"resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz",
|
||||
"integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"once": "^1.3.0",
|
||||
"wrappy": "1"
|
||||
|
@ -2414,7 +2416,8 @@
|
|||
"node_modules/inherits": {
|
||||
"version": "2.0.4",
|
||||
"resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz",
|
||||
"integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ=="
|
||||
"integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/ini": {
|
||||
"version": "1.3.8",
|
||||
|
@ -2711,14 +2714,6 @@
|
|||
"json-buffer": "3.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/klaw": {
|
||||
"version": "1.3.1",
|
||||
"resolved": "https://registry.npmjs.org/klaw/-/klaw-1.3.1.tgz",
|
||||
"integrity": "sha1-QIhDO0azsbolnXh4XY6W9zugJDk=",
|
||||
"optionalDependencies": {
|
||||
"graceful-fs": "^4.1.9"
|
||||
}
|
||||
},
|
||||
"node_modules/klaw-sync": {
|
||||
"version": "6.0.0",
|
||||
"resolved": "https://registry.npmjs.org/klaw-sync/-/klaw-sync-6.0.0.tgz",
|
||||
|
@ -2915,6 +2910,7 @@
|
|||
"version": "3.0.4",
|
||||
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz",
|
||||
"integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"brace-expansion": "^1.1.7"
|
||||
},
|
||||
|
@ -3052,6 +3048,7 @@
|
|||
"version": "1.4.0",
|
||||
"resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
|
||||
"integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"wrappy": "1"
|
||||
}
|
||||
|
@ -3215,6 +3212,7 @@
|
|||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz",
|
||||
"integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=",
|
||||
"dev": true,
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
}
|
||||
|
@ -3603,6 +3601,7 @@
|
|||
"version": "2.4.5",
|
||||
"resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.4.5.tgz",
|
||||
"integrity": "sha1-7nEM5dk6j9uFb7Xqj/Di11k0sto=",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"glob": "^6.0.1"
|
||||
},
|
||||
|
@ -4379,7 +4378,8 @@
|
|||
"node_modules/wrappy": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
|
||||
"integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8="
|
||||
"integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/write-file-atomic": {
|
||||
"version": "3.0.3",
|
||||
|
@ -5049,7 +5049,8 @@
|
|||
"balanced-match": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz",
|
||||
"integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw=="
|
||||
"integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==",
|
||||
"dev": true
|
||||
},
|
||||
"base64-js": {
|
||||
"version": "1.5.1",
|
||||
|
@ -5109,6 +5110,7 @@
|
|||
"version": "1.1.11",
|
||||
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
|
||||
"integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"balanced-match": "^1.0.0",
|
||||
"concat-map": "0.0.1"
|
||||
|
@ -5485,7 +5487,8 @@
|
|||
"concat-map": {
|
||||
"version": "0.0.1",
|
||||
"resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
|
||||
"integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s="
|
||||
"integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=",
|
||||
"dev": true
|
||||
},
|
||||
"concat-stream": {
|
||||
"version": "1.6.2",
|
||||
|
@ -6054,15 +6057,12 @@
|
|||
}
|
||||
},
|
||||
"fs-extra": {
|
||||
"version": "0.30.0",
|
||||
"resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-0.30.0.tgz",
|
||||
"integrity": "sha1-8jP/zAjU2n1DLapEl3aYnbHfk/A=",
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-2.0.0.tgz",
|
||||
"integrity": "sha512-DERmRq6uGnu7I4uFJiWQBe5pYy67v2oKowEi8jYA/52u/ZO9xXBP2HAGacD9Nus0UT/WhJFZTq8cWbxZqOHVUg==",
|
||||
"requires": {
|
||||
"graceful-fs": "^4.1.2",
|
||||
"jsonfile": "^2.1.0",
|
||||
"klaw": "^1.0.0",
|
||||
"path-is-absolute": "^1.0.0",
|
||||
"rimraf": "^2.2.8"
|
||||
"jsonfile": "^2.1.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"jsonfile": {
|
||||
|
@ -6121,6 +6121,7 @@
|
|||
"version": "6.0.4",
|
||||
"resolved": "https://registry.npmjs.org/glob/-/glob-6.0.4.tgz",
|
||||
"integrity": "sha1-DwiGD2oVUSey+t1PnOJLGqtuTSI=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"inflight": "^1.0.4",
|
||||
"inherits": "2",
|
||||
|
@ -6349,6 +6350,7 @@
|
|||
"version": "1.0.6",
|
||||
"resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz",
|
||||
"integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"once": "^1.3.0",
|
||||
"wrappy": "1"
|
||||
|
@ -6357,7 +6359,8 @@
|
|||
"inherits": {
|
||||
"version": "2.0.4",
|
||||
"resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz",
|
||||
"integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ=="
|
||||
"integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==",
|
||||
"dev": true
|
||||
},
|
||||
"ini": {
|
||||
"version": "1.3.8",
|
||||
|
@ -6580,14 +6583,6 @@
|
|||
"json-buffer": "3.0.0"
|
||||
}
|
||||
},
|
||||
"klaw": {
|
||||
"version": "1.3.1",
|
||||
"resolved": "https://registry.npmjs.org/klaw/-/klaw-1.3.1.tgz",
|
||||
"integrity": "sha1-QIhDO0azsbolnXh4XY6W9zugJDk=",
|
||||
"requires": {
|
||||
"graceful-fs": "^4.1.9"
|
||||
}
|
||||
},
|
||||
"klaw-sync": {
|
||||
"version": "6.0.0",
|
||||
"resolved": "https://registry.npmjs.org/klaw-sync/-/klaw-sync-6.0.0.tgz",
|
||||
|
@ -6738,6 +6733,7 @@
|
|||
"version": "3.0.4",
|
||||
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz",
|
||||
"integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"brace-expansion": "^1.1.7"
|
||||
}
|
||||
|
@ -6848,6 +6844,7 @@
|
|||
"version": "1.4.0",
|
||||
"resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
|
||||
"integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"wrappy": "1"
|
||||
}
|
||||
|
@ -6971,7 +6968,8 @@
|
|||
"path-is-absolute": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz",
|
||||
"integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18="
|
||||
"integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=",
|
||||
"dev": true
|
||||
},
|
||||
"path-key": {
|
||||
"version": "2.0.1",
|
||||
|
@ -7272,6 +7270,7 @@
|
|||
"version": "2.4.5",
|
||||
"resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.4.5.tgz",
|
||||
"integrity": "sha1-7nEM5dk6j9uFb7Xqj/Di11k0sto=",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"glob": "^6.0.1"
|
||||
}
|
||||
|
@ -7882,7 +7881,8 @@
|
|||
"wrappy": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
|
||||
"integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8="
|
||||
"integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=",
|
||||
"dev": true
|
||||
},
|
||||
"write-file-atomic": {
|
||||
"version": "3.0.3",
|
||||
|
|
18
package.json
|
@ -1,13 +1,13 @@
|
|||
{
|
||||
"name": "OpenFusionClient",
|
||||
"version": "1.4.1",
|
||||
"version": "1.5.2",
|
||||
"description": "OpenFusionClient",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
"postinstall": "npx patch-package && npm explore electron-prebuilt -- npm run postinstall",
|
||||
"start": "electron .",
|
||||
"pack": "electron-builder --win --ia32 --dir",
|
||||
"dist": "electron-builder --win --ia32",
|
||||
"dist": "electron-builder --win --ia32 --publish=never",
|
||||
"prettier": "npx prettier --write ."
|
||||
},
|
||||
"author": "OpenFusion Contributors",
|
||||
|
@ -20,7 +20,7 @@
|
|||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/OpenFusionProject/Client.git"
|
||||
"url": "https://github.com/OpenFusionProject/OpenFusionClient.git"
|
||||
},
|
||||
"build": {
|
||||
"appId": "xyz.openfusion.client",
|
||||
|
@ -63,13 +63,17 @@
|
|||
"extraFiles": [
|
||||
"LICENSE.md",
|
||||
{
|
||||
"from": "build/utils",
|
||||
"to": "utils"
|
||||
"from": "build/OpenFusionClient.exe.manifest",
|
||||
"to": "OpenFusionClient.exe.manifest"
|
||||
},
|
||||
{
|
||||
"from": "build/WebPlayer",
|
||||
"to": "WebPlayer"
|
||||
}
|
||||
],
|
||||
"afterPack": "./build/afterpack.js"
|
||||
"afterPack": "./build/after-pack.js"
|
||||
},
|
||||
"dependencies": {
|
||||
"fs-extra": "^0.30.0"
|
||||
"fs-extra": "2.0.0"
|
||||
}
|
||||
}
|
||||
|
|