Updated dependencies (delete node_modules, npm install), included windows page script, changed to ejs (for now), initial work on the new design.
This commit is contained in:
parent
6a44694a32
commit
582ea96dfe
3
.gitignore
vendored
3
.gitignore
vendored
@ -1,5 +1,4 @@
|
|||||||
/node_modules/
|
/node_modules/
|
||||||
/.vs/
|
/.vs/
|
||||||
/.vscode/
|
/.vscode/
|
||||||
/mcfiles/
|
/target/
|
||||||
/logs/
|
|
42
app/assets/css/launcher.css
Normal file
42
app/assets/css/launcher.css
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
/* Reset body, html, and div presets. */
|
||||||
|
body, html, div {
|
||||||
|
margin: 0px;
|
||||||
|
padding: 0px;
|
||||||
|
}
|
||||||
|
|
||||||
|
body {
|
||||||
|
background: url('./../images/backgrounds/0.jpg') no-repeat center center fixed;
|
||||||
|
background-size: cover;
|
||||||
|
}
|
||||||
|
|
||||||
|
#frame_bar {
|
||||||
|
-webkit-app-region: drag;
|
||||||
|
background: rgba(1, 2, 1, 0.5);
|
||||||
|
min-height: 22px;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
#button_dock {
|
||||||
|
margin-left: 2px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.frame_button {
|
||||||
|
height: 12px;
|
||||||
|
width: 12px;
|
||||||
|
border-radius: 50%;
|
||||||
|
border: 0px;
|
||||||
|
margin-left: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#frame_button_close {
|
||||||
|
background-color: #e74c32;
|
||||||
|
}
|
||||||
|
|
||||||
|
#frame_button_restoredown {
|
||||||
|
background-color: #fed045;
|
||||||
|
}
|
||||||
|
|
||||||
|
#frame_button_minimize {
|
||||||
|
background-color: #96e734;
|
||||||
|
}
|
BIN
app/assets/images/backgrounds/0.jpg
Normal file
BIN
app/assets/images/backgrounds/0.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 160 KiB |
BIN
app/assets/images/backgrounds/1.jpg
Normal file
BIN
app/assets/images/backgrounds/1.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 181 KiB |
BIN
app/assets/images/backgrounds/2.jpg
Normal file
BIN
app/assets/images/backgrounds/2.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 969 KiB |
BIN
app/assets/images/backgrounds/3.jpg
Normal file
BIN
app/assets/images/backgrounds/3.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.0 MiB |
BIN
app/assets/images/backgrounds/4.jpg
Normal file
BIN
app/assets/images/backgrounds/4.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 268 KiB |
Binary file not shown.
Before Width: | Height: | Size: 1012 KiB |
@ -8,7 +8,7 @@ const fs = require('fs')
|
|||||||
const mkpath = require('mkdirp');
|
const mkpath = require('mkdirp');
|
||||||
|
|
||||||
function launchMinecraft(versionData, forgeData, basePath){
|
function launchMinecraft(versionData, forgeData, basePath){
|
||||||
const authPromise = mojang.auth('nytrocraft@live.com', 'applesrsogood123', uuidV4(), {
|
const authPromise = mojang.auth('email', 'pass', uuidV4(), {
|
||||||
name: 'Minecraft',
|
name: 'Minecraft',
|
||||||
version: 1
|
version: 1
|
||||||
})
|
})
|
||||||
|
@ -51,7 +51,7 @@ $(document).on('click', 'a[href^="http"]', function(event) {
|
|||||||
|
|
||||||
testdownloads = async function(){
|
testdownloads = async function(){
|
||||||
const lp = require(path.join(__dirname, 'assets', 'js', 'launchprocess.js'))
|
const lp = require(path.join(__dirname, 'assets', 'js', 'launchprocess.js'))
|
||||||
const basePath = path.join(__dirname, '..', 'mcfiles')
|
const basePath = path.join(__dirname, '..', 'target', 'test', 'mcfiles')
|
||||||
let versionData = await ag.loadVersionData('1.11.2', basePath)
|
let versionData = await ag.loadVersionData('1.11.2', basePath)
|
||||||
await ag.validateAssets(versionData, basePath)
|
await ag.validateAssets(versionData, basePath)
|
||||||
console.log('assets done')
|
console.log('assets done')
|
||||||
|
8
app/frame.ejs
Normal file
8
app/frame.ejs
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
|
||||||
|
<div id="frame_bar">
|
||||||
|
<div id="button_dock">
|
||||||
|
<button class="frame_button" id="frame_button_close"></button>
|
||||||
|
<button class="frame_button" id="frame_button_restoredown"></button>
|
||||||
|
<button class="frame_button" id="frame_button_minimize"></button>
|
||||||
|
</div>
|
||||||
|
</div>
|
13
app/index.ejs
Normal file
13
app/index.ejs
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
<html lang="en" xmlns="http://www.w3.org/1999/xhtml">
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8" />
|
||||||
|
<title>Westeroscraft Launcher</title>
|
||||||
|
<script src="./assets/js/script.js"></script>
|
||||||
|
<link type="text/css" rel="stylesheet" href="./assets/css/launcher.css">
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<% include frame.ejs %>
|
||||||
|
<div id="doc">
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
7
index.js
7
index.js
@ -1,22 +1,25 @@
|
|||||||
const {app, BrowserWindow} = require('electron')
|
const {app, BrowserWindow} = require('electron')
|
||||||
const path = require('path')
|
const path = require('path')
|
||||||
const url = require('url')
|
const url = require('url')
|
||||||
|
const ejse = require('ejs-electron')
|
||||||
|
|
||||||
// Keep a global reference of the window object, if you don't, the window will
|
// Keep a global reference of the window object, if you don't, the window will
|
||||||
// be closed automatically when the JavaScript object is garbage collected.
|
// be closed automatically when the JavaScript object is garbage collected.
|
||||||
let win
|
let win
|
||||||
|
|
||||||
function createWindow() {
|
function createWindow() {
|
||||||
win = new BrowserWindow({ width: 925, height: 500, icon: getPlatformIcon('WesterosSealSquare')})
|
win = new BrowserWindow({ width: 980, height: 552, icon: getPlatformIcon('WesterosSealSquare'), frame: false})
|
||||||
|
|
||||||
win.loadURL(url.format({
|
win.loadURL(url.format({
|
||||||
pathname: path.join(__dirname, 'app', 'index.html'),
|
pathname: path.join(__dirname, 'app', 'index.ejs'),
|
||||||
protocol: 'file:',
|
protocol: 'file:',
|
||||||
slashes: true
|
slashes: true
|
||||||
}))
|
}))
|
||||||
|
|
||||||
win.setMenu(null)
|
win.setMenu(null)
|
||||||
|
|
||||||
|
win.setResizable(true)
|
||||||
|
|
||||||
win.on('closed', () => {
|
win.on('closed', () => {
|
||||||
win = null
|
win = null
|
||||||
})
|
})
|
||||||
|
4
package.bat
Normal file
4
package.bat
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
@echo off
|
||||||
|
cmd /k electron-packager . WesterosCraftLauncher --overwrite --asar --platform=win32 --arch=x64 --ignore="\.git(ignore|modules)|package\.bat|node_modules|target" --out="./target" --icon="app/assets/images/WesterosSealSquare.ico"
|
||||||
|
echo Startup canceled.
|
||||||
|
pause
|
18
package.json
18
package.json
@ -2,6 +2,7 @@
|
|||||||
"name": "westeroscraftlauncher",
|
"name": "westeroscraftlauncher",
|
||||||
"version": "0.0.1",
|
"version": "0.0.1",
|
||||||
"description": "Custom modded launcher for Westeroscraft",
|
"description": "Custom modded launcher for Westeroscraft",
|
||||||
|
"productName": "WesterosCraft Launcher",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"start": "electron index.js"
|
"start": "electron index.js"
|
||||||
@ -18,13 +19,16 @@
|
|||||||
"homepage": "http://www.westeroscraft.com/",
|
"homepage": "http://www.westeroscraft.com/",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"adm-zip": "^0.4.7",
|
"adm-zip": "^0.4.7",
|
||||||
"async": "^2.3.0",
|
"async": "^2.5.0",
|
||||||
"electron": "^1.6.5",
|
"ejs": "^2.5.7",
|
||||||
"extract-zip": "=1.6.0",
|
"ejs-electron": "^2.0.1",
|
||||||
"find-java-home": "^0.1.4",
|
"find-java-home": "^0.2.0",
|
||||||
"jQuery": "^1.7.4",
|
"jquery": "^3.2.1",
|
||||||
"mojang": "^0.4.1",
|
"mojang": "^0.4.1",
|
||||||
"promise": "^7.1.1",
|
"uuid": "^3.1.0"
|
||||||
"uuid": "^3.0.1"
|
},
|
||||||
|
"devDependencies": {
|
||||||
|
"electron": "^1.7.5",
|
||||||
|
"electron-packager": "^9.0.0"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user