AndrCraft

sadf
This commit is contained in:
Herom123 2020-12-13 14:56:09 +03:00
parent 779a9a54ec
commit 44ce94a153
56 changed files with 964 additions and 8315 deletions

View File

@ -1 +0,0 @@
dist

View File

@ -1,66 +0,0 @@
{
"env": {
"es2017": true,
"node": true
},
"extends": "eslint:recommended",
"parserOptions": {
"ecmaVersion": 2019,
"sourceType": "module"
},
"rules": {
"indent": [
"error",
4,
{
"SwitchCase": 1
}
],
"linebreak-style": [
"error",
"windows"
],
"quotes": [
"error",
"single"
],
"semi": [
"error",
"never"
],
"no-var": [
"error"
],
"no-console": [
0
],
"no-control-regex": [
0
],
"no-unused-vars": [
"error",
{
"vars": "all",
"args": "none",
"ignoreRestSiblings": false,
"argsIgnorePattern": "reject"
}
],
"no-async-promise-executor": [
0
]
},
"overrides": [
{
"files": [ "app/assets/js/scripts/*.js" ],
"rules": {
"no-unused-vars": [
0
],
"no-undef": [
0
]
}
}
]
}

3
.github/FUNDING.yml vendored
View File

@ -1,3 +0,0 @@
github: dscalzi
patreon: dscalzi
custom: ['https://www.paypal.me/dscalzi']

6
.gitignore vendored
View File

@ -1,6 +0,0 @@
/node_modules/
/.vs/
/.vscode/
/target/
/logs/
/dist/

1
.nvmrc
View File

@ -1 +0,0 @@
12

View File

@ -1,45 +0,0 @@
matrix:
include:
- os: osx
osx_image: xcode11.3
language: node_js
node_js: "12"
env:
- ELECTRON_CACHE=$HOME/.cache/electron
- ELECTRON_BUILDER_CACHE=$HOME/.cache/electron-builder
- ELECTRON_BUILDER_ALLOW_UNRESOLVED_DEPENDENCIES=true
- CSC_IDENTITY_AUTO_DISCOVERY=false
- os: linux
services: docker
language: generic
node_js: "12"
env:
- ELECTRON_BUILDER_ALLOW_UNRESOLVED_DEPENDENCIES=true
cache:
directories:
- node_modules
- $HOME/.cache/electron
- $HOME/.cache/electron-builder
script:
- |
if [ "$TRAVIS_OS_NAME" == "linux" ]; then
ENVS=`env | grep -iE '(DEBUG|NODE_|ELECTRON_|YARN_|NPM_|CI|CIRCLE|TRAVIS|APPVEYOR_|CSC_|_TOKEN|_KEY|AWS_|STRIP|BUILD_)' | sed -n '/^[^\t]/s/=.*//p' | sed '/^$/d' | sed 's/^/-e /g' | tr '\n' ' '`
docker run $ENVS --rm \
-v ${PWD}:/project \
-v ~/.cache/electron:/root/.cache/electron \
-v ~/.cache/electron-builder:/root/.cache/electron-builder \
electronuserland/builder:wine \
/bin/bash -c "node -v && npm ci && npm run cilinux"
else
npm run cidarwin
fi
before_cache:
- rm -rf $HOME/.cache/electron-builder/wine
branches:
except:
- "/^v\\d+\\.\\d+\\.\\d+$/"

212
README.md
View File

@ -1,212 +0,0 @@
<p align="center"><img src="./app/assets/images/SealCircle.png" width="150px" height="150px" alt="aventium softworks"></p>
<h1 align="center">Helios Launcher</h1>
<em><h5 align="center">(formerly Electron Launcher)</h5></em>
[<p align="center"><img src="https://img.shields.io/travis/dscalzi/HeliosLauncher.svg?style=for-the-badge" alt="travis">](https://travis-ci.org/dscalzi/HeliosLauncher) [<img src="https://img.shields.io/github/downloads/dscalzi/HeliosLauncher/total.svg?style=for-the-badge" alt="downloads">](https://github.com/dscalzi/HeliosLauncher/releases) <img src="https://forthebadge.com/images/badges/winter-is-coming.svg" height="28px" alt="stark"></p>
<p align="center">Join modded servers without worrying about installing Java, Forge, or other mods. We'll handle that for you.</p>
![Screenshot 1](https://i.imgur.com/6o7SmH6.png)
![Screenshot 2](https://i.imgur.com/x3B34n1.png)
## Features
* 🔒 Full account management.
* Add multiple accounts and easily switch between them.
* Credentials are never stored and transmitted directly to Mojang.
* 📂 Efficient asset management.
* Receive client updates as soon as we release them.
* Files are validated before launch. Corrupt or incorrect files will be redownloaded.
* ☕ **Automatic Java validation.**
* If you have an incompatible version of Java installed, we'll install the right one *for you*.
* You do not need to have Java installed to run the launcher.
* 📰 News feed natively built into the launcher.
* ⚙️ Intuitive settings management, including a Java control panel.
* Supports all of our servers.
* Switch between server configurations with ease.
* View the player count of the selected server.
* Automatic updates. That's right, the launcher updates itself.
* View the status of Mojang's services.
This is not an exhaustive list. Download and install the launcher to gauge all it can do!
#### Need Help? [Check the wiki.][wiki]
#### Like the project? Leave a ⭐ star on the repository!
## Downloads
You can download from [GitHub Releases](https://github.com/dscalzi/HeliosLauncher/releases)
#### Latest Release
[![](https://img.shields.io/github/release/dscalzi/HeliosLauncher.svg?style=flat-square)](https://github.com/dscalzi/HeliosLauncher/releases/latest)
#### Latest Pre-Release
[![](https://img.shields.io/github/release/dscalzi/HeliosLauncher/all.svg?style=flat-square)](https://github.com/dscalzi/HeliosLauncher/releases)
**Supported Platforms**
If you download from the [Releases](https://github.com/dscalzi/HeliosLauncher/releases) tab, select the installer for your system.
| Platform | File |
| -------- | ---- |
| Windows x64 | `helioslauncher-setup-VERSION.exe` |
| macOS | `helioslauncher-VERSION.dmg` |
| Linux x64 | `helioslauncher-VERSION-x86_64.AppImage` |
## Console
To open the console, use the following keybind.
```console
ctrl + shift + i
```
Ensure that you have the console tab selected. Do not paste anything into the console unless you are 100% sure of what it will do. Pasting the wrong thing can expose sensitive information.
#### Export Output to a File
If you want to export the console output, simply right click anywhere on the console and click **Save as..**
![console example](https://i.imgur.com/T5e73jP.png)
## Development
### Getting Started
**System Requirements**
* [Node.js][nodejs] v12
---
**Clone and Install Dependencies**
```console
> git clone https://github.com/dscalzi/HeliosLauncher.git
> cd HeliosLauncher
> npm install
```
---
**Launch Application**
```console
> npm start
```
---
**Build Installers**
To build for your current platform.
```console
> npm run dist
```
Build for a specific platform.
| Platform | Command |
| ----------- | -------------------- |
| Windows x64 | `npm run dist:win` |
| macOS | `npm run dist:mac` |
| Linux x64 | `npm run dist:linux` |
Builds for macOS may not work on Windows/Linux and vice-versa.
---
### Visual Studio Code
All development of the launcher should be done using [Visual Studio Code][vscode].
Paste the following into `.vscode/launch.json`
```JSON
{
"version": "0.2.0",
"configurations": [
{
"name": "Debug Main Process",
"type": "node",
"request": "launch",
"cwd": "${workspaceFolder}",
"program": "${workspaceFolder}/node_modules/electron/cli.js",
"args" : ["."],
"outputCapture": "std"
},
{
"name": "Debug Renderer Process",
"type": "chrome",
"request": "launch",
"runtimeExecutable": "${workspaceFolder}/node_modules/.bin/electron",
"windows": {
"runtimeExecutable": "${workspaceFolder}/node_modules/.bin/electron.cmd"
},
"runtimeArgs": [
"${workspaceFolder}/.",
"--remote-debugging-port=9222"
],
"webRoot": "${workspaceFolder}"
}
]
}
```
This adds two debug configurations.
#### Debug Main Process
This allows you to debug Electron's [main process][mainprocess]. You can debug scripts in the [renderer process][rendererprocess] by opening the DevTools Window.
#### Debug Renderer Process
This allows you to debug Electron's [renderer process][rendererprocess]. This requires you to install the [Debugger for Chrome][chromedebugger] extension.
Note that you **cannot** open the DevTools window while using this debug configuration. Chromium only allows one debugger, opening another will crash the program.
---
### Note on Third-Party Usage
You may use this software in your own project so long as the following conditions are met.
* Credit is expressly given to the original authors (Daniel Scalzi).
* Include a link to the original source on the launcher's About page.
* Credit the authors and provide a link to the original source in any publications or download pages.
* The source code remain **public** as a fork of this repository.
We reserve the right to update these conditions at any time, please check back periodically.
---
## Resources
* [Wiki][wiki]
* [Nebula (Create Distribution.json)][nebula]
* [v2 Rewrite Branch (WIP)][v2branch]
The best way to contact the developers is on Discord.
[![discord](https://discordapp.com/api/guilds/211524927831015424/embed.png?style=banner3)][discord]
---
### See you ingame.
[nodejs]: https://nodejs.org/en/ 'Node.js'
[vscode]: https://code.visualstudio.com/ 'Visual Studio Code'
[mainprocess]: https://electronjs.org/docs/tutorial/application-architecture#main-and-renderer-processes 'Main Process'
[rendererprocess]: https://electronjs.org/docs/tutorial/application-architecture#main-and-renderer-processes 'Renderer Process'
[chromedebugger]: https://marketplace.visualstudio.com/items?itemName=msjsdiag.debugger-for-chrome 'Debugger for Chrome'
[discord]: https://discord.gg/zNWUXdt 'Discord'
[wiki]: https://github.com/dscalzi/HeliosLauncher/wiki 'wiki'
[nebula]: https://github.com/dscalzi/Nebula 'dscalzi/Nebula'
[v2branch]: https://github.com/dscalzi/HeliosLauncher/tree/ts-refactor 'v2 branch'

View File

@ -1,7 +1,7 @@
<html lang="en" xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="utf-8" http-equiv="Content-Security-Policy" content="script-src 'self' 'sha256-In6B8teKZQll5heMl9bS7CESTbGvuAt3VVV86BUQBDk='"/>
<title>Helios Launcher</title>
<title>Launcher</title>
<script src="./assets/js/scripts/uicore.js"></script>
<script src="./assets/js/scripts/uibinder.js"></script>
<link type="text/css" rel="stylesheet" href="./assets/css/launcher.css">
@ -14,16 +14,12 @@
-webkit-user-select: none;
}
#main {
display: none;
height: calc(100% - 22px);
background: linear-gradient(to top, rgba(0, 0, 0, 0.75) 0%, rgba(0, 0, 0, 0) 100%);
top:0px;
height: 100%;
width: 100%;
position: absolute;
z-index: 10;
}
#main[overlay] {
filter: blur(3px) contrast(0.9) brightness(1.0);
}
</style>
</head>
<body bkid="<%=bkid%>">
@ -37,17 +33,10 @@
<%- include('overlay') %>
<div id="loadingContainer">
<div id="loadingContent">
<div id="loadSpinnerContainer">
<img id="loadCenterImage" src="assets/images/LoadingSeal.png">
<img id="loadSpinnerImage" class="rotating" src="assets/images/LoadingText.png">
<div id="loader"></div>
</div>
</div>
</div>
<script>
// Load language
for(let key of Object.keys(Lang.query('html'))){
document.getElementById(key).innerHTML = Lang.query(`html.${key}`)
}
</script>
</body>
</html>

View File

@ -29,11 +29,22 @@
******************************************************************************/
/* Reset body, html, and div presets. */
body, html, div {
margin: 0px;
padding: 0px;
}
img {
user-select: none;
-moz-user-select: none;
-webkit-user-drag: none;
-webkit-user-select: none;
-ms-user-select: none;
user-drag: none;
}
/* Reset p presets. */
p {
-webkit-margin-before: 0em;
@ -63,7 +74,7 @@ body, button {
z-index: 100;
display: flex;
flex-direction: column;
transition: background-color 1s ease;
transition: background-color 2s ease;
/*background-color: rgba(0, 0, 0, 0.5);*/
-webkit-user-select: none;
}
@ -75,6 +86,8 @@ body, button {
-webkit-app-region: no-drag;
}
/* Flexbox to wrap the main frame content. */
#frameMain {
display: flex;
@ -106,13 +119,24 @@ body, button {
/* Frame logo (windows only). */
#frameTitleDock {
padding: 0px 10px;
padding: 2px 0px 0px 10px;
}
#frameTitleText {
font-size: 14px;
font-family: 'Avenir Medium';
letter-spacing: 0.5px;
}
#frameSeninAnan {
z-index: 90;
background-color: rgb(36, 10, 73);
position: absolute;
top: 0px;
left: 0px;
clip-path: polygon(0 0, 100% 0, 90% 100%, 0% 100%);
height: 100%;
width: 135px;
-webkit-app-region: no-drag;
}
/* Windows frame button dock. */
#frameButtonDockWin {
@ -346,12 +370,14 @@ body, button {
#welcomeButton:hover #welcomeSVG,
#welcomeButton:focus #welcomeSVG {
-webkit-filter: drop-shadow(0px 0px 2px #fff);
filter: drop-shadow(0px 0px 2px #fff);
}
#welcomeButton:active #welcomeSVG .arrowLine {
stroke: #c7c7c7;
}
#welcomeButton:active #welcomeSVG {
-webkit-filter: drop-shadow(0px 0px 2px #c7c7c7);
filter: drop-shadow(0px 0px 2px #c7c7c7);
}
#welcomeButton:disabled #welcomeSVG .arrowLine {
stroke: rgba(255, 255, 255, 0.75);
@ -412,6 +438,7 @@ body, button {
#loginCancelButton:focus #loginCancelIcon {
box-shadow: 0px 0px 20px white;
}
progress::-webkit-progress-value { background: aqua; }
#loginCancelButton:active #loginCancelIcon,
#loginCancelButton:active #loginCancelText {
text-shadow: 0px 0px 20px rgba(255, 255, 255, 0.75);
@ -648,12 +675,14 @@ body, button {
#loginButton:hover #loginSVG,
#loginButton:focus #loginSVG {
-webkit-filter: drop-shadow(0px 0px 2px #fff);
filter: drop-shadow(0px 0px 2px #fff);
}
#loginButton:active #loginSVG .arrowLine {
stroke: #c7c7c7;
}
#loginButton:active #loginSVG {
-webkit-filter: drop-shadow(0px 0px 2px #c7c7c7);
filter: drop-shadow(0px 0px 2px #c7c7c7);
}
#loginButton:disabled #loginSVG .arrowLine {
stroke: rgba(255, 255, 255, 0.75);
@ -2273,18 +2302,18 @@ input:checked + .toggleSwitchSlider:before {
}
#landingContainer > #upper > #left {
display: inline-flex;
width: 15%;
width: 11%;
height: 100%;
justify-content: flex-end;
}
#landingContainer > #upper > #content {
display: inline-flex;
width: 70%;
width: 77%;
height: 100%;
}
#landingContainer > #upper > #right {
display: inline-flex;
width: 15%;
width: 12%;
height: 100%;
}
@ -2292,7 +2321,6 @@ input:checked + .toggleSwitchSlider:before {
#landingContainer > #lower {
height: 23%;
display: flex;
background: linear-gradient(to top, rgba(0, 0, 0, 0.75), rgba(0, 0, 0, 0));
}
#landingContainer > #lower > #left {
position: relative;
@ -2305,10 +2333,10 @@ input:checked + .toggleSwitchSlider:before {
}
#landingContainer > #lower > #left #content {
position: relative;
top: 25px;
top: 70px;
display: inline-flex;
line-height: 24px;
left: 50px;
left: 10px;
}
#landingContainer > #lower > #center {
position: relative;
@ -2323,14 +2351,14 @@ input:checked + .toggleSwitchSlider:before {
position: relative;
z-index: 500;
transition: top 2s ease;
top: 10px;
top: 55px;
}
#landingContainer > #lower > #right {
position: relative;
transition: top 2s ease;
top: 0px;
height: 100%;
width: 33%;
width: 40%;
display: inline-flex;
}
@ -2341,10 +2369,14 @@ input:checked + .toggleSwitchSlider:before {
******************************************************************************/
/* Main container. */
#foo {
transition: top 2s ease;
}
#newsContainer {
bottom: -100%;
opacity: 0;
position: absolute;
top: 100%;
height: 100%;
height: calc(100% - 22px);
width: 100%;
transition: top 2s ease;
display: flex;
@ -2586,6 +2618,7 @@ input:checked + .toggleSwitchSlider:before {
#newsNavigateRight:hover #newsNavigationRightSVG,
#newsNavigateRight:focus #newsNavigationRightSVG {
-webkit-filter: drop-shadow(0px 0px 2px #fff);
filter: drop-shadow(0px 0px 2px #fff);
}
#newsNavigateLeft:active #newsNavigationLeftSVG .arrowLine,
#newsNavigateRight:active #newsNavigationRightSVG .arrowLine {
@ -2594,6 +2627,7 @@ input:checked + .toggleSwitchSlider:before {
#newsNavigateLeft:active #newsNavigationLeftSVG,
#newsNavigateRight:active #newsNavigationRightSVG {
-webkit-filter: drop-shadow(0px 0px 2px #c7c7c7);
filter: drop-shadow(0px 0px 2px #c7c7c7);
}
#newsNavigateLeft:disabled #newsNavigationLeftSVG .arrowLine,
#newsNavigateRight:disabled #newsNavigationRightSVG .arrowLine {
@ -2665,20 +2699,19 @@ input:checked + .toggleSwitchSlider:before {
/* Logo image. */
#image_seal {
height: 70px;
height: 110px;
width: auto;
position: relative;
border: 2px solid white;
box-sizing: border-box;
border-radius: 50%;
border-radius: 10%;
}
/* Logo container styles. */
#image_seal_container {
position: relative;
height: 70px;
width: 70px;
border-radius: 50%;
flex-direction: left;
height: 10px;
width: 100px;
border-radius: 1%;
margin-top: 50px;
}
@ -2693,7 +2726,7 @@ input:checked + .toggleSwitchSlider:before {
content: '';
height: 100%;
width: 100%;
top: 0%;
top: 100%;
left: 0%;
border-radius: 50%;
box-shadow: 0 0 15px #43c628;
@ -2762,11 +2795,11 @@ input:checked + .toggleSwitchSlider:before {
/* Wrapper container for top, right content. */
#rightContainer {
display: flex;
flex-direction: column;
flex-direction: right;
position: relative;
top: 50px;
align-items: flex-start;
height: calc(100% - 50px);
top: 62px;
align-items: right;
height: 50px;
}
/* Right hand user content container. */
@ -2784,8 +2817,8 @@ input:checked + .toggleSwitchSlider:before {
border: 2px solid #cad7e1;
box-sizing: border-box;
background: rgba(1, 2, 1, 0.5);
height: 70px;
width: 70px;
height: 75px;
width: 75px;
box-shadow: 0px 0px 10px 0px rgb(0, 0, 0);
overflow: hidden;
position: relative;
@ -2820,35 +2853,64 @@ input:checked + .toggleSwitchSlider:before {
#avatarOverlay:active {
background-color: rgba(0, 0, 0, 0.45);
}
#signout {
background: none;
border: none;
outline: none !important;
cursor: pointer;
padding: 0px;
color: #a91919;
font-size: 8px;
min-width: 25px;
font-weight: 900;
letter-spacing: 1px;
text-shadow: none;
position: absolute;
left: 95px;
top: 30px;
text-align: left;
-webkit-user-select: initial;
-webkit-transition: 0.2s ease;
transition: 0.2s ease;
}
#signout:hover{
text-shadow: 0px 0px 5px rgba(255, 0, 0, 0.433);
}
#signout:active {
text-shadow: 0px 0px 5px #f00;
}
/* User profile name text. */
#user_text {
font-size: 12px;
font-size: 18px;
min-width: 135px;
font-weight: 900;
letter-spacing: 1px;
text-shadow: 0px 0px 20px black;
text-shadow: 0px 0px 5px #ffffff99;
position: absolute;
right: 95px;
text-align: right;
left: 95px;
text-align: left;
-webkit-user-select: initial;
top: 8px;
}
/* Social media icon content container. */
#mediaContent {
left: calc(100% - 70px);
position: relative;
display: flex;
flex-direction: column;
margin-top: 25px;
flex-direction: row-reverse;
margin-top: 50px;
height: calc(100% - 95px);
width: 70px;
align-items: center;
}
/* Social Media Icon division containers. */
#internalMedia, #externalMedia {
display: flex;
flex-direction: column;
flex-direction: row-reverse;
}
/* Container object which wraps an icon to ensure fluid transitions. */
@ -3002,8 +3064,8 @@ input:checked + .toggleSwitchSlider:before {
height: 25px;
width: 2px;
background: rgba(107, 105, 105, 0.7);
margin-left: 20px;
margin-right: 20px;
margin-left: 30px;
margin-right: 30px;
}
/* * *
@ -3150,13 +3212,15 @@ input:checked + .toggleSwitchSlider:before {
#newsButton:hover #newsButtonSVG,
#newsButton:focus #newsButtonSVG {
-webkit-filter: drop-shadow(0px 0px 2px #fff);
-webkit-filter: drop-shadow(0px 0px 5px #fff);
filter: drop-shadow(0px 0px 5px #fff);
}
#newsButton:active #newsButtonSVG .arrowLine {
stroke: #c7c7c7;
}
#newsButton:active #newsButtonSVG {
-webkit-filter: drop-shadow(0px 0px 2px #c7c7c7);
-webkit-filter: drop-shadow(0px 0px 5px #c7c7c7);
filter: drop-shadow(0px 0px 5px #c7c7c7);
}
#newsButton:disabled #newsButtonSVG .arrowLine {
stroke: rgba(255, 255, 255, 0.75);
@ -3177,6 +3241,8 @@ input:checked + .toggleSwitchSlider:before {
#newsButtonSVG {
height: 11px;
margin-left: -2px;
-webkit-filter: drop-shadow(0px 0px 2px #c7c7c7);
filter: drop-shadow(0px 0px 2px #c7c7c7);
transition: 0.25s ease;
}
@ -3198,10 +3264,14 @@ input:checked + .toggleSwitchSlider:before {
/* Main launch content container. */
#landingContainer > #lower > #right #launch_content {
position: relative;
top: 25px;
position: absolute;
top: 0px;
width: 210px;
display: inline-flex;
left:20px;
}
/* Svg Oyna */
/* The launch button. */
#launch_button {
@ -3211,19 +3281,41 @@ input:checked + .toggleSwitchSlider:before {
font-weight: 900;
letter-spacing: 2px;
text-shadow: 0px 0px 0px #bebcbb;
font-size: 20px;
font-size: 72px;
padding: 0px;
transition: 0.25s ease;
outline: none;
}
#svgPlay {
left: calc(100% + 10px);
top: 10px;
background-image: url("data:image/svg+xml, %3Csvg version='1.1' id='Capa_1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' x='0px' y='0px' viewBox='0 0 512 512' fill='cyan' width='24' height='24' xml:space='preserve'%3E%3Cpath d='M256,0C114.617,0,0,114.615,0,256s114.617,256,256,256s256-114.615,256-256S397.383,0,256,0z M344.48,269.57l-128,80 c-2.59,1.617-5.535,2.43-8.48,2.43c-2.668,0-5.34-0.664-7.758-2.008C195.156,347.172,192,341.82,192,336V176 c0-5.82,3.156-11.172,8.242-13.992c5.086-2.836,11.305-2.664,16.238,0.422l128,80c4.676,2.93,7.52,8.055,7.52,13.57 S349.156,266.641,344.48,269.57z'/%3E%3C/svg%3E%0A");
display: inline-block;
width: 72px;
height: 72px;
background-size: cover;
transition: 0.25s ease;
position: absolute;
}
#launch_content:hover #svgPlay,
#launch_content:focus #svgPlay {
background-image: url("data:image/svg+xml, %3Csvg version='1.1' id='Capa_1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' x='0px' y='0px' viewBox='0 0 512 512' fill='orange' width='24' height='24' xml:space='preserve'%3E%3Cpath d='M256,0C114.617,0,0,114.615,0,256s114.617,256,256,256s256-114.615,256-256S397.383,0,256,0z M344.48,269.57l-128,80 c-2.59,1.617-5.535,2.43-8.48,2.43c-2.668,0-5.34-0.664-7.758-2.008C195.156,347.172,192,341.82,192,336V176 c0-5.82,3.156-11.172,8.242-13.992c5.086-2.836,11.305-2.664,16.238,0.422l128,80c4.676,2.93,7.52,8.055,7.52,13.57 S349.156,266.641,344.48,269.57z'/%3E%3C/svg%3E%0A");
width: 73px;
height: 73px;
}
#launch_button:hover,
#launch_button:focus {
text-shadow: 0px 0px 20px #fff, 0px 0px 20px #fff;
font-size: 73px;
}
#launch_button:active {
color: #c7c7c7;
text-shadow: 0px 0px 20px #c7c7c7, 0px 0px 20px #c7c7c7;
}
#launch_button:active {
transform: rotate(180deg) 0.2s ease;
}
#launch_button:disabled {
color: #c7c7c7;
cursor: default;
@ -3232,8 +3324,10 @@ input:checked + .toggleSwitchSlider:before {
/* Launch details main container, hidden until launch processing begins. */
#launch_details {
position: relative;
position: absolute;
top: 25px;
right: calc(100% - 261px);
width: 0px;
display: none;
}
@ -3247,57 +3341,17 @@ input:checked + .toggleSwitchSlider:before {
font-weight: 900;
letter-spacing: 1px;
text-shadow: 0px 0px 0px #bebcbb;
font-size: 20px;
min-width: 53.21px;
max-width: 53.21px;
font-size: 35px;
/*min-width: 53.21px;
max-width: 53.21px;*/
text-align: right;
}
/* Right side of launch details container, displays progress bar and details. */
#launch_details_right {
display: flex;
display: grid;
flex-direction: column;
justify-content: center;
}
/* Button which opens the server selection view. */
#server_selection_button {
background: none;
border: none;
outline: none;
cursor: pointer;
line-height: 24px;
padding: 0px;
transition: 0.25s ease;
}
#server_selection_button:hover,
#server_selection_button:focus {
text-shadow: 0px 0px 20px #fff, 0px 0px 20px #fff, 0px 0px 20px #fff;
}
#server_selection_button:active {
color: #c7c7c7;
text-shadow: 0px 0px 20px #c7c7c7, 0px 0px 20px #c7c7c7, 0px 0px 20px #c7c7c7;
}
/* Progress bar styles. */
#launch_progress[value] {
height: 3px;
width: 265px;
-webkit-appearance: none;
}
#launch_progress[value]::-webkit-progress-bar {
background-color: transparent;
}
#launch_progress[value]::-webkit-progress-value {
background-color: #fff;
}
/* Span which displays information about the status of the launch process. */
#launch_details_text {
font-size: 11px;
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
justify-content: revert;
}
/*******************************************************************************
@ -3314,12 +3368,12 @@ input:checked + .toggleSwitchSlider:before {
#overlayContainer {
position: absolute;
z-index: 500;
top: 22px;
top: 0px;
display: flex;
align-items: center;
justify-content: center;
width: 100%;
height: calc(100% - 22px);
height: 100%;
background: rgba(0, 0, 0, 0.50);
}
@ -3739,39 +3793,73 @@ input:checked + .toggleSwitchSlider:before {
justify-content: center;
}
/* Spinner container. */
#loadSpinnerContainer {
/* Loading Animation */
#loader {
display: block;
position: relative;
display: flex;
align-items: center;
justify-content: center;
left: 50%;
top: 50%;
width: 100px;
height: 100px;
margin: -75px 0 0 -75px;
border-radius: 50%;
border: 3px solid transparent;
border-top-color: #ddd;
-webkit-filter: drop-shadow(0px 0px 2px #aaa);
filter: drop-shadow(0px 0px 2px #aaa);
-webkit-animation: spin 1.5s linear infinite;
animation: spin 1.5s linear infinite;
}
/* Stationary image for the spinner. */
#loadCenterImage {
#loader:before {
content: "";
position: absolute;
width: 277px;
height: auto;
top: 5px;
left: 5px;
right: 5px;
bottom: 5px;
border-radius: 50%;
border: 3px solid transparent;
border-top-color: #ddd;
-webkit-animation: spin 2s linear infinite;
animation: spin 2s linear infinite;
}
/* Rotating image for the spinner. */
#loadSpinnerImage {
width: 280px;
height: auto;
z-index: 400;
#loader:after {
content: "";
position: absolute;
top: 15px;
left: 15px;
right: 15px;
bottom: 15px;
border-radius: 50%;
border: 3px solid transparent;
border-top-color: #ddd;
-webkit-animation: spin 1s linear infinite;
animation: spin 1s linear infinite;
}
/* Rotating animation for the spinner. */
@keyframes rotating {
from {
@-webkit-keyframes spin {
0% {
-webkit-transform: rotate(0deg);
-ms-transform: rotate(0deg);
transform: rotate(0deg);
}
to {
100% {
-webkit-transform: rotate(360deg);
-ms-transform: rotate(360deg);
transform: rotate(360deg);
}
}
/* Class which is applied when the spinner image is spinning. */
.rotating {
animation: rotating 10s linear infinite;
@keyframes spin {
0% {
-webkit-transform: rotate(0deg);
-ms-transform: rotate(0deg);
transform: rotate(0deg);
}
100% {
-webkit-transform: rotate(360deg);
-ms-transform: rotate(360deg);
transform: rotate(360deg);
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 244 KiB

After

Width:  |  Height:  |  Size: 74 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 124 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 48 KiB

After

Width:  |  Height:  |  Size: 120 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 142 KiB

After

Width:  |  Height:  |  Size: 74 KiB

BIN
app/assets/images/andr.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1020 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 160 KiB

After

Width:  |  Height:  |  Size: 256 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 181 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 502 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 268 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 456 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.6 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.0 MiB

View File

@ -66,6 +66,6 @@ process.on('message', (msg) => {
})
process.on('disconnect', () => {
console.log('AssetExec Disconnected')
console.log('AssetExec Bağlantısı Kesildi')
process.exit(0)
})

View File

@ -1331,7 +1331,7 @@ class AssetGuard extends EventEmitter {
return new Promise((resolve, reject) => {
//Asset constants
const resourceURL = 'https://resources.download.minecraft.net/'
const resourceURL = 'http://resources.download.minecraft.net/'
const localPath = path.join(self.commonPath, 'assets')
const objectPath = path.join(localPath, 'objects')

View File

@ -1,17 +1,18 @@
/**
* AuthManager
*
*
* This module aims to abstract login procedures. Results from Mojang's REST api
* are retrieved through our Mojang module. These results are processed and stored,
* if applicable, in the config using the ConfigManager. All login procedures should
* be made through this module.
*
*
* @module authmanager
*/
// Requirements
const ConfigManager = require('./configmanager')
const LoggerUtil = require('./loggerutil')
const Mojang = require('./mojang')
const {v3: uuidv3} = require('uuid')
const {machineIdSync} = require('node-machine-id')
const logger = LoggerUtil('%c[AuthManager]', 'color: #a02d2a; font-weight: bold')
const loggerSuccess = LoggerUtil('%c[AuthManager]', 'color: #209b07; font-weight: bold')
@ -21,45 +22,36 @@ const loggerSuccess = LoggerUtil('%c[AuthManager]', 'color: #209b07; font-weight
* Add an account. This will authenticate the given credentials with Mojang's
* authserver. The resultant data will be stored as an auth account in the
* configuration database.
*
*
* @param {string} username The account username (email if migrated).
* @param {string} password The account password.
* @returns {Promise.<Object>} Promise which resolves the resolved authenticated account object.
*/
exports.addAccount = async function(username, password){
try {
const session = await Mojang.authenticate(username, password, ConfigManager.getClientToken())
if(session.selectedProfile != null){
const ret = ConfigManager.addAuthAccount(session.selectedProfile.id, session.accessToken, username, session.selectedProfile.name)
if(ConfigManager.getClientToken() == null){
ConfigManager.setClientToken(session.clientToken)
}
ConfigManager.save()
return ret
} else {
throw new Error('NotPaidAccount')
}
} catch (err){
return Promise.reject(err)
exports.addAccount = async function (username, password) {
console.log(machineIdSync())
const ret = ConfigManager.addAuthAccount(uuidv3(username + machineIdSync(), uuidv3.DNS), 'ImCrakedLOL', username, username)
if (ConfigManager.getClientToken() == null) {
ConfigManager.setClientToken('ImCrakedLOL')
}
ConfigManager.save()
return ret
}
/**
* Remove an account. This will invalidate the access token associated
* with the account and then remove it from the database.
*
*
* @param {string} uuid The UUID of the account to be removed.
* @returns {Promise.<void>} Promise which resolves to void when the action is complete.
*/
exports.removeAccount = async function(uuid){
exports.removeAccount = async function (uuid) {
try {
const authAcc = ConfigManager.getAuthAccount(uuid)
await Mojang.invalidate(authAcc.accessToken, ConfigManager.getClientToken())
ConfigManager.removeAuthAccount(uuid)
ConfigManager.save()
await ConfigManager.removeAuthAccount(uuid)
await ConfigManager.save()
switchView(VIEWS.landing,VIEWS.login)
return Promise.resolve()
} catch (err){
} catch (err) {
return Promise.reject(err)
}
}
@ -68,32 +60,12 @@ exports.removeAccount = async function(uuid){
* Validate the selected account with Mojang's authserver. If the account is not valid,
* we will attempt to refresh the access token and update that value. If that fails, a
* new login will be required.
*
*
* **Function is WIP**
*
*
* @returns {Promise.<boolean>} Promise which resolves to true if the access token is valid,
* otherwise false.
*/
exports.validateSelected = async function(){
const current = ConfigManager.getSelectedAccount()
const isValid = await Mojang.validate(current.accessToken, ConfigManager.getClientToken())
if(!isValid){
try {
const session = await Mojang.refresh(current.accessToken, ConfigManager.getClientToken())
ConfigManager.updateAuthAccount(current.uuid, session.accessToken)
ConfigManager.save()
} catch(err) {
logger.debug('Error while validating selected profile:', err)
if(err && err.error === 'ForbiddenOperationException'){
// What do we do?
}
logger.log('Account access token is invalid.')
return false
}
loggerSuccess.log('Account access token validated.')
return true
} else {
loggerSuccess.log('Account access token validated.')
return true
}
exports.validateSelected = async function () {
return true
}

View File

@ -6,11 +6,18 @@ const logger = require('./loggerutil')('%c[ConfigManager]', 'color: #a02d2a; fon
const sysRoot = process.env.APPDATA || (process.platform == 'darwin' ? process.env.HOME + '/Library/Application Support' : process.env.HOME)
// TODO change
const dataPath = path.join(sysRoot, '.helioslauncher')
console.log(sysRoot)
const dataPath = path.join(sysRoot, 'AndrLauncher')
// Forked processes do not have access to electron, so we have this workaround.
const launcherDir = process.env.CONFIG_DIRECT_PATH || require('electron').remote.app.getPath('userData')
exports.getLauncherData = function(){
return launcherDir
}
/**
* Retrieve the absolute path of the launcher directory.
*
@ -27,6 +34,7 @@ exports.getLauncherDirectory = function(){
* @returns {string} The absolute path of the launcher's data directory.
*/
exports.getDataDirectory = function(def = false){
return !def ? config.settings.launcher.dataDirectory : DEFAULT_CONFIG.settings.launcher.dataDirectory
}
@ -76,15 +84,12 @@ const DEFAULT_CONFIG = {
maxRAM: resolveMaxRAM(), // Dynamic
executable: null,
jvmOptions: [
'-XX:+UseConcMarkSweepGC',
'-XX:+CMSIncrementalMode',
'-XX:-UseAdaptiveSizePolicy',
'-Xmn128M'
'',
],
},
game: {
resWidth: 1280,
resHeight: 720,
resWidth: 856,
resHeight: 482,
fullscreen: false,
autoConnect: true,
launchDetached: true
@ -296,7 +301,6 @@ exports.getSelectedServer = function(def = false){
exports.setSelectedServer = function(serverID){
config.selectedServer = serverID
}
/**
* Get an array of each account currently authenticated by the launcher.
*
@ -361,20 +365,9 @@ exports.addAuthAccount = function(uuid, accessToken, username, displayName){
* @returns {boolean} True if the account was removed, false if it never existed.
*/
exports.removeAuthAccount = function(uuid){
if(config.authenticationDatabase[uuid] != null){
delete config.authenticationDatabase[uuid]
if(config.selectedAccount === uuid){
const keys = Object.keys(config.authenticationDatabase)
if(keys.length > 0){
config.selectedAccount = keys[0]
} else {
config.selectedAccount = null
config.clientToken = null
}
}
return true
}
return false
config.authenticationDatabase = {}
config.selectedAccount = null
config.clientToken = null
}
/**
@ -685,4 +678,5 @@ exports.getAllowPrerelease = function(def = false){
*/
exports.setAllowPrerelease = function(allowPrerelease){
config.settings.launcher.allowPrerelease = allowPrerelease
}
}

View File

@ -1,48 +0,0 @@
// Work in progress
const logger = require('./loggerutil')('%c[DiscordWrapper]', 'color: #7289da; font-weight: bold')
const {Client} = require('discord-rpc')
let client
let activity
exports.initRPC = function(genSettings, servSettings, initialDetails = 'Waiting for Client..'){
client = new Client({ transport: 'ipc' })
activity = {
details: initialDetails,
state: 'Server: ' + servSettings.shortId,
largeImageKey: servSettings.largeImageKey,
largeImageText: servSettings.largeImageText,
smallImageKey: genSettings.smallImageKey,
smallImageText: genSettings.smallImageText,
startTimestamp: new Date().getTime(),
instance: false
}
client.on('ready', () => {
logger.log('Discord RPC Connected')
client.setActivity(activity)
})
client.login({clientId: genSettings.clientId}).catch(error => {
if(error.message.includes('ENOENT')) {
logger.log('Unable to initialize Discord Rich Presence, no client detected.')
} else {
logger.log('Unable to initialize Discord Rich Presence: ' + error.message, error)
}
})
}
exports.updateDetails = function(details){
activity.details = details
client.setActivity(activity)
}
exports.shutdownRPC = function(){
if(!client) return
client.clearActivity()
client.destroy()
client = null
activity = null
}

View File

@ -526,9 +526,8 @@ let DEV_MODE = false
const DISTRO_PATH = path.join(ConfigManager.getLauncherDirectory(), 'distribution.json')
const DEV_PATH = path.join(ConfigManager.getLauncherDirectory(), 'dev_distribution.json')
console.log("configmanager ld: ",ConfigManager.getLD())
let data = null
/**
* @returns {Promise.<DistroIndex>}
*/
@ -537,34 +536,40 @@ exports.pullRemote = function(){
return exports.pullLocal()
}
return new Promise((resolve, reject) => {
const distroURL = 'http://mc.westeroscraft.com/WesterosCraftLauncher/distribution.json'
//const distroURL = 'https://gist.githubusercontent.com/dscalzi/53b1ba7a11d26a5c353f9d5ae484b71b/raw/'
const opts = {
url: distroURL,
timeout: 2500
}
const distroDest = path.join(ConfigManager.getLauncherDirectory(), 'distribution.json')
request(opts, (error, resp, body) => {
if(!error){
try {
data = DistroIndex.fromJSON(JSON.parse(body))
} catch (e) {
reject(e)
return
}
const body = `{
"version": "1.0.0",
"servers": [
{
"id": "server",
"name": "${ConfigManager.getLD().Server.Name}",
"description": "${ConfigManager.getLD().Server.Name} sunucusuna katılın ve doyasıya eğlenin!",
"icon": "${ConfigManager.getLD().Server.Icon}",
"version": "1.0.0",
"address": "${ConfigManager.getLD().Server.Ip}",
"minecraftVersion": "1.8.9",
"mainServer": true,
"autoconnect": true,
"modules": []
}
]
}
`
console.log(body)
try {
data = DistroIndex.fromJSON(JSON.parse(body))
} catch (e) {
reject(e)
return
}
fs.writeFile(distroDest, body, 'utf-8', (err) => {
if(!err){
resolve(data)
return
} else {
reject(err)
return
}
})
fs.writeFile(distroDest, body, 'utf-8', (err) => {
if(!err){
resolve(data)
return
} else {
reject(error)
reject(err)
return
}
})
@ -591,10 +596,10 @@ exports.pullLocal = function(){
exports.setDevMode = function(value){
if(value){
logger.log('Developer mode enabled.')
logger.log('If you don\'t know what that means, revert immediately.')
logger.log('Geliştirici modu açık.')
logger.log('Eğer ne oluğunu bilmiyorsan hemen eski haline geri dödür.')
} else {
logger.log('Developer mode disabled.')
logger.log('Geliştirici modu kapalı.')
}
DEV_MODE = value
}

View File

@ -1,6 +1,10 @@
/**
* Mojang
*
* _scanRegistry
_scanFileSystem
_scanJavaHome
_validateJavaRootSet
_sortValidJavaArray
* This module serves as a minimal wrapper for Mojang's REST api.
*
* @module mojang
@ -9,12 +13,6 @@
const request = require('request')
const logger = require('./loggerutil')('%c[Mojang]', 'color: #a02d2a; font-weight: bold')
// Constants
const minecraftAgent = {
name: 'Minecraft',
version: 1
}
const authpath = 'https://authserver.mojang.com'
const statuses = [
{
service: 'sessionserver.mojang.com',
@ -120,152 +118,3 @@ exports.status = function(){
})
}
/**
* Authenticate a user with their Mojang credentials.
*
* @param {string} username The user's username, this is often an email.
* @param {string} password The user's password.
* @param {string} clientToken The launcher's Client Token.
* @param {boolean} requestUser Optional. Adds user object to the reponse.
* @param {Object} agent Optional. Provided by default. Adds user info to the response.
*
* @see http://wiki.vg/Authentication#Authenticate
*/
exports.authenticate = function(username, password, clientToken, requestUser = true, agent = minecraftAgent){
return new Promise((resolve, reject) => {
const body = {
agent,
username,
password,
requestUser
}
if(clientToken != null){
body.clientToken = clientToken
}
request.post(authpath + '/authenticate',
{
json: true,
body
},
function(error, response, body){
if(error){
logger.error('Error during authentication.', error)
reject(error)
} else {
if(response.statusCode === 200){
resolve(body)
} else {
reject(body || {code: 'ENOTFOUND'})
}
}
})
})
}
/**
* Validate an access token. This should always be done before launching.
* The client token should match the one used to create the access token.
*
* @param {string} accessToken The access token to validate.
* @param {string} clientToken The launcher's client token.
*
* @see http://wiki.vg/Authentication#Validate
*/
exports.validate = function(accessToken, clientToken){
return new Promise((resolve, reject) => {
request.post(authpath + '/validate',
{
json: true,
body: {
accessToken,
clientToken
}
},
function(error, response, body){
if(error){
logger.error('Error during validation.', error)
reject(error)
} else {
if(response.statusCode === 403){
resolve(false)
} else {
// 204 if valid
resolve(true)
}
}
})
})
}
/**
* Invalidates an access token. The clientToken must match the
* token used to create the provided accessToken.
*
* @param {string} accessToken The access token to invalidate.
* @param {string} clientToken The launcher's client token.
*
* @see http://wiki.vg/Authentication#Invalidate
*/
exports.invalidate = function(accessToken, clientToken){
return new Promise((resolve, reject) => {
request.post(authpath + '/invalidate',
{
json: true,
body: {
accessToken,
clientToken
}
},
function(error, response, body){
if(error){
logger.error('Error during invalidation.', error)
reject(error)
} else {
if(response.statusCode === 204){
resolve()
} else {
reject(body)
}
}
})
})
}
/**
* Refresh a user's authentication. This should be used to keep a user logged
* in without asking them for their credentials again. A new access token will
* be generated using a recent invalid access token. See Wiki for more info.
*
* @param {string} accessToken The old access token.
* @param {string} clientToken The launcher's client token.
* @param {boolean} requestUser Optional. Adds user object to the reponse.
*
* @see http://wiki.vg/Authentication#Refresh
*/
exports.refresh = function(accessToken, clientToken, requestUser = true){
return new Promise((resolve, reject) => {
request.post(authpath + '/refresh',
{
json: true,
body: {
accessToken,
clientToken,
requestUser
}
},
function(error, response, body){
if(error){
logger.error('Error during refresh.', error)
reject(error)
} else {
if(response.statusCode === 200){
resolve(body)
} else {
reject(body)
}
}
})
})
}

View File

@ -8,7 +8,7 @@ const DistroManager = require('./distromanager')
const LangLoader = require('./langloader')
const logger = require('./loggerutil')('%c[Preloader]', 'color: #a02d2a; font-weight: bold')
logger.log('Loading..')
logger.log('Yükleniyor..')
// Load ConfigManager
ConfigManager.load()
@ -21,7 +21,7 @@ function onDistroLoad(data){
// Resolve the selected server if its value has yet to be set.
if(ConfigManager.getSelectedServer() == null || data.getServer(ConfigManager.getSelectedServer()) == null){
logger.log('Determining default selected server..')
logger.log('Varsayılan sunucuyu belirle..')
ConfigManager.setSelectedServer(data.getMainServer().getID())
ConfigManager.save()
}
@ -31,26 +31,26 @@ function onDistroLoad(data){
// Ensure Distribution is downloaded and cached.
DistroManager.pullRemote().then((data) => {
logger.log('Loaded distribution index.')
logger.log('Dağıtım verisi yüklendi.')
onDistroLoad(data)
}).catch((err) => {
logger.log('Failed to load distribution index.')
logger.log('Dağıtım verisi yüklenemedi.')
logger.error(err)
logger.log('Attempting to load an older version of the distribution index.')
logger.log('Dağtım verisinin daha eski versiyonu indirilmeye çalışılıyor.')
// Try getting a local copy, better than nothing.
DistroManager.pullLocal().then((data) => {
logger.log('Successfully loaded an older version of the distribution index.')
logger.log('Dağıtım verisinin eski versiyonu başarıyla indirildi')
onDistroLoad(data)
}).catch((err) => {
logger.log('Failed to load an older version of the distribution index.')
logger.log('Application cannot run.')
logger.log('Dağıtım verisinin eski versiyonu indirlemedi.')
logger.log('Uygulama çalışamaz durumda.')
logger.error(err)
onDistroLoad(null)
@ -62,8 +62,8 @@ DistroManager.pullRemote().then((data) => {
// Clean up temp dir incase previous launches ended unexpectedly.
fs.remove(path.join(os.tmpdir(), ConfigManager.getTempNativeFolder()), (err) => {
if(err){
logger.warn('Error while cleaning natives directory', err)
logger.warn('Ana klasör temizlerken bir hata oldu', err)
} else {
logger.log('Cleaned natives directory.')
logger.log('Ana klasör temizlendi.')
}
})

View File

@ -343,7 +343,7 @@ class ProcessBuilder {
// Java Arguments
if(process.platform === 'darwin'){
args.push('-Xdock:name=HeliosLauncher')
args.push('-Xdock:name=PixargonLauncher')
args.push('-Xdock:icon=' + path.join(__dirname, '..', 'images', 'minecraft.icns'))
}
args.push('-Xmx' + ConfigManager.getMaxRAM())
@ -381,7 +381,7 @@ class ProcessBuilder {
// Java Arguments
if(process.platform === 'darwin'){
args.push('-Xdock:name=HeliosLauncher')
args.push('-Xdock:name=PixargonLauncher')
args.push('-Xdock:icon=' + path.join(__dirname, '..', 'images', 'minecraft.icns'))
}
args.push('-Xmx' + ConfigManager.getMaxRAM())
@ -483,7 +483,7 @@ class ProcessBuilder {
val = args[i].replace(argDiscovery, tempNativePath)
break
case 'launcher_name':
val = args[i].replace(argDiscovery, 'Helios-Launcher')
val = args[i].replace(argDiscovery, 'Pixargon-Launcher')
break
case 'launcher_version':
val = args[i].replace(argDiscovery, this.launcherVersion)

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,9 @@
exports.Launch = function(options,callback){
var cmd = ('cd \"'+options.gamedir+'\" && "'+(options.javapath ? options.javapath : 'java')+'" -Duser.country=US -Duser.language=en -Dminecraft.client.jar='+options.gamedir+'\\versions\\'+options.clientname+'\\'+options.clientname+'.jar -XX:+UnlockExperimentalVMOptions -XX:+UseG1GC -XX:G1NewSizePercent=20 -XX:G1ReservePercent=20 -XX:MaxGCPauseMillis=50 -XX:G1HeapRegionSize=16M -XX:-UseAdaptiveSizePolicy -XX:-OmitStackTraceInFastThrow -Xmn'+options.memory.minram+' -Xmx'+options.memory.maxram+' -Dfml.ignoreInvalidMinecraftCertificates=true -Dfml.ignorePatchDiscrepancies=true -XX:HeapDumpPath=MojangTricksIntelDriversForPerformance_javaw.exe_minecraft.exe.heapdump -Djava.library.path='+options.gamedir+'\\versions\\'+options.clientname+'\\natives "-Dminecraft.launcher.brand='+options.Lname+' Client" -Dminecraft.launcher.version=3.2.SNAPSHOT -cp '+options.gamedir+'\\libraries\\com\\mojang\\netty\\1.6\\netty-1.6.jar;'+options.gamedir+'\\libraries\\oshi-project\\oshi-core\\1.1\\oshi-core-1.1.jar;'+options.gamedir+'\\libraries\\net\\java\\dev\\jna\\jna\\3.4.0\\jna-3.4.0.jar;'+options.gamedir+'\\libraries\\net\\java\\dev\\jna\\platform\\3.4.0\\platform-3.4.0.jar;'+options.gamedir+'\\libraries\\com\\ibm\\icu\\icu4j-core-mojang\\51.2\\icu4j-core-mojang-51.2.jar;'+options.gamedir+'\\libraries\\net\\sf\\jopt-simple\\jopt-simple\\4.6\\jopt-simple-4.6.jar;'+options.gamedir+'\\libraries\\com\\paulscode\\codecjorbis\\20101023\\codecjorbis-20101023.jar;'+options.gamedir+'\\libraries\\com\\paulscode\\codecwav\\20101023\\codecwav-20101023.jar;'+options.gamedir+'\\libraries\\com\\paulscode\\libraryjavasound\\20101123\\libraryjavasound-20101123.jar;'+options.gamedir+'\\libraries\\com\\paulscode\\librarylwjglopenal\\20100824\\librarylwjglopenal-20100824.jar;'+options.gamedir+'\\libraries\\com\\paulscode\\soundsystem\\20120107\\soundsystem-20120107.jar;'+options.gamedir+'\\libraries\\io\\netty\\netty-all\\4.0.23.Final\\netty-all-4.0.23.Final.jar;'+options.gamedir+'\\libraries\\com\\google\\guava\\guava\\17.0\\guava-17.0.jar;'+options.gamedir+'\\libraries\\org\\apache\\commons\\commons-lang3\\3.3.2\\commons-lang3-3.3.2.jar;'+options.gamedir+'\\libraries\\commons-io\\commons-io\\2.4\\commons-io-2.4.jar;'+options.gamedir+'\\libraries\\commons-codec\\commons-codec\\1.9\\commons-codec-1.9.jar;'+options.gamedir+'\\libraries\\net\\java\\jinput\\jinput\\2.0.5\\jinput-2.0.5.jar;'+options.gamedir+'\\libraries\\net\\java\\jutils\\jutils\\1.0.0\\jutils-1.0.0.jar;'+options.gamedir+'\\libraries\\com\\google\\code\\gson\\gson\\2.2.4\\gson-2.2.4.jar;'+options.gamedir+'\\libraries\\com\\mojang\\authlib\\1.5.21\\authlib-1.5.21.jar;'+options.gamedir+'\\libraries\\com\\mojang\\realms\\1.7.59\\realms-1.7.59.jar;'+options.gamedir+'\\libraries\\org\\apache\\commons\\commons-compress\\1.8.1\\commons-compress-1.8.1.jar;'+options.gamedir+'\\libraries\\org\\apache\\httpcomponents\\httpclient\\4.3.3\\httpclient-4.3.3.jar;'+options.gamedir+'\\libraries\\commons-logging\\commons-logging\\1.1.3\\commons-logging-1.1.3.jar;'+options.gamedir+'\\libraries\\org\\apache\\httpcomponents\\httpcore\\4.3.2\\httpcore-4.3.2.jar;'+options.gamedir+'\\libraries\\org\\apache\\logging\\log4j\\log4j-api\\2.0-beta9\\log4j-api-2.0-beta9.jar;'+options.gamedir+'\\libraries\\org\\apache\\logging\\log4j\\log4j-core\\2.0-beta9\\log4j-core-2.0-beta9.jar;'+options.gamedir+'\\libraries\\org\\lwjgl\\lwjgl\\lwjgl\\2.9.4-nightly-20150209\\lwjgl-2.9.4-nightly-20150209.jar;'+options.gamedir+'\\libraries\\org\\lwjgl\\lwjgl\\lwjgl_util\\2.9.4-nightly-20150209\\lwjgl_util-2.9.4-nightly-20150209.jar;'+options.gamedir+'\\libraries\\tv\\twitch\\twitch\\6.5\\twitch-6.5.jar;'+options.gamedir+'\\libraries\\cc\\client\\Client\\LOCAL\\Client-LOCAL.jar;'+options.gamedir+'\\libraries\\net\\minecraft\\launchwrapper\\Client\\launchwrapper-Client.jar;'+options.gamedir+'\\libraries\\optifine\\OptiFine\\1.8.9_HD_U_I7\\OptiFine-1.8.9_HD_U_I7.jar;'+options.gamedir+'\\versions\\'+options.clientname+'\\'+options.clientname+'.jar net.minecraft.launchwrapper.Launch --username '+options.user.displayName+' --version 1.8.9 --gameDir '+options.gamedir+' --assetsDir '+options.gamedir+'\\assets --assetIndex 1.8 --uuid '+options.user.uuid+' --accessToken '+options.user.accessToken+' --userProperties {} --userType mojang --tweakClass=cc.hyperium.launch.HyperiumTweaker --width '+options.wWidth+' --height '+options.wHeight+ (options.autoConnect ? (' --server '+options.server.host+' --port '+(options.server.port ? options.server.port : '25565')) : '')+ ((options.fullscreen==true) ? " --fullscreen" : ""));
const islem = child_process.exec(cmd, function (error, stdout, stderr) {
console.log("stdout: ",stdout)
console.log("stderr: ",stderr)
if (error) callback(error);
});
}

View File

@ -2,7 +2,7 @@
* Script for login.ejs
*/
// Validation Regexes.
const validUsername = /^[a-zA-Z0-9_]{1,16}$/
const validUsername = /^[a-zA-Z0-9_]{3,16}$/
const basicEmail = /^\S+@\S+\.\S+$/
//const validEmail = /^(([^<>()\[\]\.,;:\s@\"]+(\.[^<>()\[\]\.,;:\s@\"]+)*)|(\".+\"))@(([^<>()[\]\.,;:\s@\"]+\.)+[^<>()[\]\.,;:\s@\"]{2,})$/i
@ -11,15 +11,13 @@ const loginCancelContainer = document.getElementById('loginCancelContainer')
const loginCancelButton = document.getElementById('loginCancelButton')
const loginEmailError = document.getElementById('loginEmailError')
const loginUsername = document.getElementById('loginUsername')
const loginPasswordError = document.getElementById('loginPasswordError')
const loginPassword = document.getElementById('loginPassword')
const checkmarkContainer = document.getElementById('checkmarkContainer')
const loginRememberOption = document.getElementById('loginRememberOption')
const loginButton = document.getElementById('loginButton')
const loginForm = document.getElementById('loginForm')
// Control variables.
let lu = false, lp = false
let lu = true, lp = true
const loggerLogin = LoggerUtil('%c[Login]', 'color: #000668; font-weight: bold')
@ -78,54 +76,31 @@ function validateEmail(value){
*
* @param {string} value The password value.
*/
function validatePassword(value){
if(value){
loginPasswordError.style.opacity = 0
lp = true
if(lu){
loginDisabled(false)
}
} else {
lp = false
showError(loginPasswordError, Lang.queryJS('login.error.invalidValue'))
loginDisabled(true)
}
}
// Emphasize errors with shake when focus is lost.
loginUsername.addEventListener('focusout', (e) => {
validateEmail(e.target.value)
shakeError(loginEmailError)
})
loginPassword.addEventListener('focusout', (e) => {
validatePassword(e.target.value)
shakeError(loginPasswordError)
})
// Validate input for each field.
loginUsername.addEventListener('input', (e) => {
validateEmail(e.target.value)
})
loginPassword.addEventListener('input', (e) => {
validatePassword(e.target.value)
})
/**
* Enable or disable the login button.
*
* @param {boolean} v True to enable, false to disable.
*/
function loginDisabled(v){
if(loginButton.disabled !== v){
loginButton.disabled = v
}
}
/**
* Enable or disable loading elements.
*
* @param {boolean} v True to enable, false to disable.
*/
function loginLoading(v){
if(v){
loginButton.setAttribute('loading', v)
@ -136,16 +111,21 @@ function loginLoading(v){
}
}
function loginDisabled(v){
if(loginButton.disabled !== v){
loginButton.disabled = v
}
}
/**
* Enable or disable login form.
*
* @param {boolean} v True to enable, false to disable.
*/
function formDisabled(v){
loginDisabled(v)
loginCancelButton.disabled = v
loginDisabled(true)
loginUsername.disabled = v
loginPassword.disabled = v
if(v){
checkmarkContainer.setAttribute('disabled', v)
} else {
@ -242,7 +222,6 @@ function loginCancelEnabled(val){
loginCancelButton.onclick = (e) => {
switchView(getCurrentView(), loginViewOnCancel, 500, 500, () => {
loginUsername.value = ''
loginPassword.value = ''
loginCancelEnabled(false)
if(loginViewCancelHandler != null){
loginViewCancelHandler()
@ -257,12 +236,13 @@ loginForm.onsubmit = () => { return false }
// Bind login button behavior.
loginButton.addEventListener('click', () => {
// Disable form.
formDisabled(true)
// Show loading stuff.
formDisabled(false)
loginDisabled(true)
loginLoading(true)
// Show loading stuff.
AuthManager.addAccount(loginUsername.value, loginPassword.value).then((value) => {
AuthManager.addAccount(loginUsername.value,'').then((value) => {
updateSelectedAccount(value)
loginButton.innerHTML = loginButton.innerHTML.replace(Lang.queryJS('login.loggingIn'), Lang.queryJS('login.success'))
$('.circle-loader').toggleClass('load-complete')
@ -277,7 +257,6 @@ loginButton.addEventListener('click', () => {
loginCancelEnabled(false) // Reset this for good measure.
loginViewCancelHandler = null // Reset this for good measure.
loginUsername.value = ''
loginPassword.value = ''
$('.circle-loader').toggleClass('load-complete')
$('.checkmark').toggle()
loginLoading(false)
@ -293,8 +272,8 @@ loginButton.addEventListener('click', () => {
formDisabled(false)
toggleOverlay(false)
})
loginDisabled(false)
toggleOverlay(true)
loggerLogin.log('Error while logging in.', err)
})
})

View File

@ -171,25 +171,6 @@ function setDismissHandler(handler){
/* Server Select View */
document.getElementById('serverSelectConfirm').addEventListener('click', () => {
const listings = document.getElementsByClassName('serverListing')
for(let i=0; i<listings.length; i++){
if(listings[i].hasAttribute('selected')){
const serv = DistroManager.getDistribution().getServer(listings[i].getAttribute('servid'))
updateSelectedServer(serv)
refreshServerStatus(true)
toggleOverlay(false)
return
}
}
// None are selected? Not possible right? Meh, handle it.
if(listings.length > 0){
const serv = DistroManager.getDistribution().getServer(listings[i].getAttribute('servid'))
updateSelectedServer(serv)
toggleOverlay(false)
}
})
document.getElementById('accountSelectConfirm').addEventListener('click', () => {
const listings = document.getElementsByClassName('accountListing')
for(let i=0; i<listings.length; i++){
@ -198,7 +179,6 @@ document.getElementById('accountSelectConfirm').addEventListener('click', () =>
ConfigManager.save()
updateSelectedAccount(authAcc)
toggleOverlay(false)
validateSelectedAccount()
return
}
}
@ -208,7 +188,6 @@ document.getElementById('accountSelectConfirm').addEventListener('click', () =>
ConfigManager.save()
updateSelectedAccount(authAcc)
toggleOverlay(false)
validateSelectedAccount()
}
})
@ -223,24 +202,6 @@ document.getElementById('accountSelectCancel').addEventListener('click', () => {
})
})
function setServerListingHandlers(){
const listings = Array.from(document.getElementsByClassName('serverListing'))
listings.map((val) => {
val.onclick = e => {
if(val.hasAttribute('selected')){
return
}
const cListings = document.getElementsByClassName('serverListing')
for(let i=0; i<cListings.length; i++){
if(cListings[i].hasAttribute('selected')){
cListings[i].removeAttribute('selected')
}
}
val.setAttribute('selected', '')
document.activeElement.blur()
}
})
}
function setAccountListingHandlers(){
const listings = Array.from(document.getElementsByClassName('accountListing'))
@ -261,37 +222,6 @@ function setAccountListingHandlers(){
})
}
function populateServerListings(){
const distro = DistroManager.getDistribution()
const giaSel = ConfigManager.getSelectedServer()
const servers = distro.getServers()
let htmlString = ''
for(const serv of servers){
htmlString += `<button class="serverListing" servid="${serv.getID()}" ${serv.getID() === giaSel ? 'selected' : ''}>
<img class="serverListingImg" src="${serv.getIcon()}"/>
<div class="serverListingDetails">
<span class="serverListingName">${serv.getName()}</span>
<span class="serverListingDescription">${serv.getDescription()}</span>
<div class="serverListingInfo">
<div class="serverListingVersion">${serv.getMinecraftVersion()}</div>
<div class="serverListingRevision">${serv.getVersion()}</div>
${serv.isMainServer() ? `<div class="serverListingStarWrapper">
<svg id="Layer_1" viewBox="0 0 107.45 104.74" width="20px" height="20px">
<defs>
<style>.cls-1{fill:#fff;}.cls-2{fill:none;stroke:#fff;stroke-miterlimit:10;}</style>
</defs>
<path class="cls-1" d="M100.93,65.54C89,62,68.18,55.65,63.54,52.13c2.7-5.23,18.8-19.2,28-27.55C81.36,31.74,63.74,43.87,58.09,45.3c-2.41-5.37-3.61-26.52-4.37-39-.77,12.46-2,33.64-4.36,39-5.7-1.46-23.3-13.57-33.49-20.72,9.26,8.37,25.39,22.36,28,27.55C39.21,55.68,18.47,62,6.52,65.55c12.32-2,33.63-6.06,39.34-4.9-.16,5.87-8.41,26.16-13.11,37.69,6.1-10.89,16.52-30.16,21-33.9,4.5,3.79,14.93,23.09,21,34C70,86.84,61.73,66.48,61.59,60.65,67.36,59.49,88.64,63.52,100.93,65.54Z"/>
<circle class="cls-2" cx="53.73" cy="53.9" r="38"/>
</svg>
<span class="serverListingStarTooltip">Main Server</span>
</div>` : ''}
</div>
</div>
</button>`
}
document.getElementById('serverSelectListScrollable').innerHTML = htmlString
}
function populateAccountListings(){
const accountsObj = ConfigManager.getAuthAccounts()
@ -307,11 +237,6 @@ function populateAccountListings(){
}
function prepareServerSelectionList(){
populateServerListings()
setServerListingHandlers()
}
function prepareAccountSelectionList(){
populateAccountListings()
setAccountListingHandlers()

View File

@ -3,7 +3,6 @@ const os = require('os')
const semver = require('semver')
const { JavaGuard } = require('./assets/js/assetguard')
const DropinModUtil = require('./assets/js/dropinmodutil')
const settingsState = {
invalid: new Set()
@ -147,8 +146,9 @@ function initSettingsValues(){
} else if(v.tagName === 'DIV'){
if(v.classList.contains('rangeSlider')){
// Special Conditions
if(cVal === 'MinRAM' || cVal === 'MaxRAM'){
if(cVal === 'MaxRAM'){
let val = gFn()
console.log(cVal,v,val)
if(val.endsWith('M')){
val = Number(val.substring(0, val.length-1))/1000
} else {
@ -156,7 +156,10 @@ function initSettingsValues(){
}
v.setAttribute('value', val)
} else {
} else if(cVal === 'MinRAM'){
v.setAttribute('value', 0.1)
}else {
console.log(cVal,v)
v.setAttribute('value', Number.parseFloat(gFn()))
}
}
@ -193,6 +196,7 @@ function saveSettingsValues(){
} else if(v.tagName === 'DIV'){
if(v.classList.contains('rangeSlider')){
// Special Conditions
if(cVal === 'MinRAM' || cVal === 'MaxRAM'){
let val = Number(v.getAttribute('value'))
if(val%1 > 0){
@ -211,7 +215,7 @@ function saveSettingsValues(){
})
}
let selectedSettingsTab = 'settingsTabAccount'
let selectedSettingsTab = 'settingsTabMinecraft'
/**
* Modify the settings container UI when the scroll threshold reaches
@ -303,181 +307,13 @@ function settingsSaveDisabled(v){
/* Closes the settings view and saves all data. */
settingsNavDone.onclick = () => {
saveSettingsValues()
saveModConfiguration()
ConfigManager.save()
saveDropinModConfiguration()
saveShaderpackSettings()
document.querySelector("#frameBar").style.backgroundColor = `rgba(${ConfigManagerV2.getLD().others.frameBarC.join(",")}`
switchView(getCurrentView(), VIEWS.landing)
}
/**
* Account Management Tab
*/
// Bind the add account button.
document.getElementById('settingsAddAccount').onclick = (e) => {
switchView(getCurrentView(), VIEWS.login, 500, 500, () => {
loginViewOnCancel = VIEWS.settings
loginViewOnSuccess = VIEWS.settings
loginCancelEnabled(true)
})
}
/**
* Bind functionality for the account selection buttons. If another account
* is selected, the UI of the previously selected account will be updated.
*/
function bindAuthAccountSelect(){
Array.from(document.getElementsByClassName('settingsAuthAccountSelect')).map((val) => {
val.onclick = (e) => {
if(val.hasAttribute('selected')){
return
}
const selectBtns = document.getElementsByClassName('settingsAuthAccountSelect')
for(let i=0; i<selectBtns.length; i++){
if(selectBtns[i].hasAttribute('selected')){
selectBtns[i].removeAttribute('selected')
selectBtns[i].innerHTML = 'Select Account'
}
}
val.setAttribute('selected', '')
val.innerHTML = 'Selected Account &#10004;'
setSelectedAccount(val.closest('.settingsAuthAccount').getAttribute('uuid'))
}
})
}
/**
* Bind functionality for the log out button. If the logged out account was
* the selected account, another account will be selected and the UI will
* be updated accordingly.
*/
function bindAuthAccountLogOut(){
Array.from(document.getElementsByClassName('settingsAuthAccountLogOut')).map((val) => {
val.onclick = (e) => {
let isLastAccount = false
if(Object.keys(ConfigManager.getAuthAccounts()).length === 1){
isLastAccount = true
setOverlayContent(
'Warning<br>This is Your Last Account',
'In order to use the launcher you must be logged into at least one account. You will need to login again after.<br><br>Are you sure you want to log out?',
'I\'m Sure',
'Cancel'
)
setOverlayHandler(() => {
processLogOut(val, isLastAccount)
toggleOverlay(false)
switchView(getCurrentView(), VIEWS.login)
})
setDismissHandler(() => {
toggleOverlay(false)
})
toggleOverlay(true, true)
} else {
processLogOut(val, isLastAccount)
}
}
})
}
/**
* Process a log out.
*
* @param {Element} val The log out button element.
* @param {boolean} isLastAccount If this logout is on the last added account.
*/
function processLogOut(val, isLastAccount){
const parent = val.closest('.settingsAuthAccount')
const uuid = parent.getAttribute('uuid')
const prevSelAcc = ConfigManager.getSelectedAccount()
AuthManager.removeAccount(uuid).then(() => {
if(!isLastAccount && uuid === prevSelAcc.uuid){
const selAcc = ConfigManager.getSelectedAccount()
refreshAuthAccountSelected(selAcc.uuid)
updateSelectedAccount(selAcc)
validateSelectedAccount()
}
})
$(parent).fadeOut(250, () => {
parent.remove()
})
}
/**
* Refreshes the status of the selected account on the auth account
* elements.
*
* @param {string} uuid The UUID of the new selected account.
*/
function refreshAuthAccountSelected(uuid){
Array.from(document.getElementsByClassName('settingsAuthAccount')).map((val) => {
const selBtn = val.getElementsByClassName('settingsAuthAccountSelect')[0]
if(uuid === val.getAttribute('uuid')){
selBtn.setAttribute('selected', '')
selBtn.innerHTML = 'Selected Account &#10004;'
} else {
if(selBtn.hasAttribute('selected')){
selBtn.removeAttribute('selected')
}
selBtn.innerHTML = 'Select Account'
}
})
}
const settingsCurrentAccounts = document.getElementById('settingsCurrentAccounts')
/**
* Add auth account elements for each one stored in the authentication database.
*/
function populateAuthAccounts(){
const authAccounts = ConfigManager.getAuthAccounts()
const authKeys = Object.keys(authAccounts)
if(authKeys.length === 0){
return
}
const selectedUUID = ConfigManager.getSelectedAccount().uuid
let authAccountStr = ''
authKeys.map((val) => {
const acc = authAccounts[val]
authAccountStr += `<div class="settingsAuthAccount" uuid="${acc.uuid}">
<div class="settingsAuthAccountLeft">
<img class="settingsAuthAccountImage" alt="${acc.displayName}" src="https://crafatar.com/renders/body/${acc.uuid}?scale=3&default=MHF_Steve&overlay">
</div>
<div class="settingsAuthAccountRight">
<div class="settingsAuthAccountDetails">
<div class="settingsAuthAccountDetailPane">
<div class="settingsAuthAccountDetailTitle">Username</div>
<div class="settingsAuthAccountDetailValue">${acc.displayName}</div>
</div>
<div class="settingsAuthAccountDetailPane">
<div class="settingsAuthAccountDetailTitle">UUID</div>
<div class="settingsAuthAccountDetailValue">${acc.uuid}</div>
</div>
</div>
<div class="settingsAuthAccountActions">
<button class="settingsAuthAccountSelect" ${selectedUUID === acc.uuid ? 'selected>Selected Account &#10004;' : '>Select Account'}</button>
<div class="settingsAuthAccountWrapper">
<button class="settingsAuthAccountLogOut">Log Out</button>
</div>
</div>
</div>
</div>`
})
settingsCurrentAccounts.innerHTML = authAccountStr
}
/**
* Prepare the accounts tab for display.
*/
function prepareAccountsTab() {
populateAuthAccounts()
bindAuthAccountSelect()
bindAuthAccountLogOut()
}
/**
* Minecraft Tab
@ -497,440 +333,6 @@ document.getElementById('settingsGameHeight').addEventListener('keydown', (e) =>
}
})
/**
* Mods Tab
*/
const settingsModsContainer = document.getElementById('settingsModsContainer')
/**
* Resolve and update the mods on the UI.
*/
function resolveModsForUI(){
const serv = ConfigManager.getSelectedServer()
const distro = DistroManager.getDistribution()
const servConf = ConfigManager.getModConfiguration(serv)
const modStr = parseModulesForUI(distro.getServer(serv).getModules(), false, servConf.mods)
document.getElementById('settingsReqModsContent').innerHTML = modStr.reqMods
document.getElementById('settingsOptModsContent').innerHTML = modStr.optMods
}
/**
* Recursively build the mod UI elements.
*
* @param {Object[]} mdls An array of modules to parse.
* @param {boolean} submodules Whether or not we are parsing submodules.
* @param {Object} servConf The server configuration object for this module level.
*/
function parseModulesForUI(mdls, submodules, servConf){
let reqMods = ''
let optMods = ''
for(const mdl of mdls){
if(mdl.getType() === DistroManager.Types.ForgeMod || mdl.getType() === DistroManager.Types.LiteMod || mdl.getType() === DistroManager.Types.LiteLoader){
if(mdl.getRequired().isRequired()){
reqMods += `<div id="${mdl.getVersionlessID()}" class="settingsBaseMod settings${submodules ? 'Sub' : ''}Mod" enabled>
<div class="settingsModContent">
<div class="settingsModMainWrapper">
<div class="settingsModStatus"></div>
<div class="settingsModDetails">
<span class="settingsModName">${mdl.getName()}</span>
<span class="settingsModVersion">v${mdl.getVersion()}</span>
</div>
</div>
<label class="toggleSwitch" reqmod>
<input type="checkbox" checked>
<span class="toggleSwitchSlider"></span>
</label>
</div>
${mdl.hasSubModules() ? `<div class="settingsSubModContainer">
${Object.values(parseModulesForUI(mdl.getSubModules(), true, servConf[mdl.getVersionlessID()])).join('')}
</div>` : ''}
</div>`
} else {
const conf = servConf[mdl.getVersionlessID()]
const val = typeof conf === 'object' ? conf.value : conf
optMods += `<div id="${mdl.getVersionlessID()}" class="settingsBaseMod settings${submodules ? 'Sub' : ''}Mod" ${val ? 'enabled' : ''}>
<div class="settingsModContent">
<div class="settingsModMainWrapper">
<div class="settingsModStatus"></div>
<div class="settingsModDetails">
<span class="settingsModName">${mdl.getName()}</span>
<span class="settingsModVersion">v${mdl.getVersion()}</span>
</div>
</div>
<label class="toggleSwitch">
<input type="checkbox" formod="${mdl.getVersionlessID()}" ${val ? 'checked' : ''}>
<span class="toggleSwitchSlider"></span>
</label>
</div>
${mdl.hasSubModules() ? `<div class="settingsSubModContainer">
${Object.values(parseModulesForUI(mdl.getSubModules(), true, conf.mods)).join('')}
</div>` : ''}
</div>`
}
}
}
return {
reqMods,
optMods
}
}
/**
* Bind functionality to mod config toggle switches. Switching the value
* will also switch the status color on the left of the mod UI.
*/
function bindModsToggleSwitch(){
const sEls = settingsModsContainer.querySelectorAll('[formod]')
Array.from(sEls).map((v, index, arr) => {
v.onchange = () => {
if(v.checked) {
document.getElementById(v.getAttribute('formod')).setAttribute('enabled', '')
} else {
document.getElementById(v.getAttribute('formod')).removeAttribute('enabled')
}
}
})
}
/**
* Save the mod configuration based on the UI values.
*/
function saveModConfiguration(){
const serv = ConfigManager.getSelectedServer()
const modConf = ConfigManager.getModConfiguration(serv)
modConf.mods = _saveModConfiguration(modConf.mods)
ConfigManager.setModConfiguration(serv, modConf)
}
/**
* Recursively save mod config with submods.
*
* @param {Object} modConf Mod config object to save.
*/
function _saveModConfiguration(modConf){
for(let m of Object.entries(modConf)){
const tSwitch = settingsModsContainer.querySelectorAll(`[formod='${m[0]}']`)
if(!tSwitch[0].hasAttribute('dropin')){
if(typeof m[1] === 'boolean'){
modConf[m[0]] = tSwitch[0].checked
} else {
if(m[1] != null){
if(tSwitch.length > 0){
modConf[m[0]].value = tSwitch[0].checked
}
modConf[m[0]].mods = _saveModConfiguration(modConf[m[0]].mods)
}
}
}
}
return modConf
}
// Drop-in mod elements.
let CACHE_SETTINGS_MODS_DIR
let CACHE_DROPIN_MODS
/**
* Resolve any located drop-in mods for this server and
* populate the results onto the UI.
*/
function resolveDropinModsForUI(){
const serv = DistroManager.getDistribution().getServer(ConfigManager.getSelectedServer())
CACHE_SETTINGS_MODS_DIR = path.join(ConfigManager.getInstanceDirectory(), serv.getID(), 'mods')
CACHE_DROPIN_MODS = DropinModUtil.scanForDropinMods(CACHE_SETTINGS_MODS_DIR, serv.getMinecraftVersion())
let dropinMods = ''
for(dropin of CACHE_DROPIN_MODS){
dropinMods += `<div id="${dropin.fullName}" class="settingsBaseMod settingsDropinMod" ${!dropin.disabled ? 'enabled' : ''}>
<div class="settingsModContent">
<div class="settingsModMainWrapper">
<div class="settingsModStatus"></div>
<div class="settingsModDetails">
<span class="settingsModName">${dropin.name}</span>
<div class="settingsDropinRemoveWrapper">
<button class="settingsDropinRemoveButton" remmod="${dropin.fullName}">Remove</button>
</div>
</div>
</div>
<label class="toggleSwitch">
<input type="checkbox" formod="${dropin.fullName}" dropin ${!dropin.disabled ? 'checked' : ''}>
<span class="toggleSwitchSlider"></span>
</label>
</div>
</div>`
}
document.getElementById('settingsDropinModsContent').innerHTML = dropinMods
}
/**
* Bind the remove button for each loaded drop-in mod.
*/
function bindDropinModsRemoveButton(){
const sEls = settingsModsContainer.querySelectorAll('[remmod]')
Array.from(sEls).map((v, index, arr) => {
v.onclick = () => {
const fullName = v.getAttribute('remmod')
const res = DropinModUtil.deleteDropinMod(CACHE_SETTINGS_MODS_DIR, fullName)
if(res){
document.getElementById(fullName).remove()
} else {
setOverlayContent(
`Failed to Delete<br>Drop-in Mod ${fullName}`,
'Make sure the file is not in use and try again.',
'Okay'
)
setOverlayHandler(null)
toggleOverlay(true)
}
}
})
}
/**
* Bind functionality to the file system button for the selected
* server configuration.
*/
function bindDropinModFileSystemButton(){
const fsBtn = document.getElementById('settingsDropinFileSystemButton')
fsBtn.onclick = () => {
DropinModUtil.validateDir(CACHE_SETTINGS_MODS_DIR)
shell.openPath(CACHE_SETTINGS_MODS_DIR)
}
fsBtn.ondragenter = e => {
e.dataTransfer.dropEffect = 'move'
fsBtn.setAttribute('drag', '')
e.preventDefault()
}
fsBtn.ondragover = e => {
e.preventDefault()
}
fsBtn.ondragleave = e => {
fsBtn.removeAttribute('drag')
}
fsBtn.ondrop = e => {
fsBtn.removeAttribute('drag')
e.preventDefault()
DropinModUtil.addDropinMods(e.dataTransfer.files, CACHE_SETTINGS_MODS_DIR)
reloadDropinMods()
}
}
/**
* Save drop-in mod states. Enabling and disabling is just a matter
* of adding/removing the .disabled extension.
*/
function saveDropinModConfiguration(){
for(dropin of CACHE_DROPIN_MODS){
const dropinUI = document.getElementById(dropin.fullName)
if(dropinUI != null){
const dropinUIEnabled = dropinUI.hasAttribute('enabled')
if(DropinModUtil.isDropinModEnabled(dropin.fullName) != dropinUIEnabled){
DropinModUtil.toggleDropinMod(CACHE_SETTINGS_MODS_DIR, dropin.fullName, dropinUIEnabled).catch(err => {
if(!isOverlayVisible()){
setOverlayContent(
'Failed to Toggle<br>One or More Drop-in Mods',
err.message,
'Okay'
)
setOverlayHandler(null)
toggleOverlay(true)
}
})
}
}
}
}
// Refresh the drop-in mods when F5 is pressed.
// Only active on the mods tab.
document.addEventListener('keydown', (e) => {
if(getCurrentView() === VIEWS.settings && selectedSettingsTab === 'settingsTabMods'){
if(e.key === 'F5'){
reloadDropinMods()
saveShaderpackSettings()
resolveShaderpacksForUI()
}
}
})
function reloadDropinMods(){
resolveDropinModsForUI()
bindDropinModsRemoveButton()
bindDropinModFileSystemButton()
bindModsToggleSwitch()
}
// Shaderpack
let CACHE_SETTINGS_INSTANCE_DIR
let CACHE_SHADERPACKS
let CACHE_SELECTED_SHADERPACK
/**
* Load shaderpack information.
*/
function resolveShaderpacksForUI(){
const serv = DistroManager.getDistribution().getServer(ConfigManager.getSelectedServer())
CACHE_SETTINGS_INSTANCE_DIR = path.join(ConfigManager.getInstanceDirectory(), serv.getID())
CACHE_SHADERPACKS = DropinModUtil.scanForShaderpacks(CACHE_SETTINGS_INSTANCE_DIR)
CACHE_SELECTED_SHADERPACK = DropinModUtil.getEnabledShaderpack(CACHE_SETTINGS_INSTANCE_DIR)
setShadersOptions(CACHE_SHADERPACKS, CACHE_SELECTED_SHADERPACK)
}
function setShadersOptions(arr, selected){
const cont = document.getElementById('settingsShadersOptions')
cont.innerHTML = ''
for(let opt of arr) {
const d = document.createElement('DIV')
d.innerHTML = opt.name
d.setAttribute('value', opt.fullName)
if(opt.fullName === selected) {
d.setAttribute('selected', '')
document.getElementById('settingsShadersSelected').innerHTML = opt.name
}
d.addEventListener('click', function(e) {
this.parentNode.previousElementSibling.innerHTML = this.innerHTML
for(let sib of this.parentNode.children){
sib.removeAttribute('selected')
}
this.setAttribute('selected', '')
closeSettingsSelect()
})
cont.appendChild(d)
}
}
function saveShaderpackSettings(){
let sel = 'OFF'
for(let opt of document.getElementById('settingsShadersOptions').childNodes){
if(opt.hasAttribute('selected')){
sel = opt.getAttribute('value')
}
}
DropinModUtil.setEnabledShaderpack(CACHE_SETTINGS_INSTANCE_DIR, sel)
}
function bindShaderpackButton() {
const spBtn = document.getElementById('settingsShaderpackButton')
spBtn.onclick = () => {
const p = path.join(CACHE_SETTINGS_INSTANCE_DIR, 'shaderpacks')
DropinModUtil.validateDir(p)
shell.openPath(p)
}
spBtn.ondragenter = e => {
e.dataTransfer.dropEffect = 'move'
spBtn.setAttribute('drag', '')
e.preventDefault()
}
spBtn.ondragover = e => {
e.preventDefault()
}
spBtn.ondragleave = e => {
spBtn.removeAttribute('drag')
}
spBtn.ondrop = e => {
spBtn.removeAttribute('drag')
e.preventDefault()
DropinModUtil.addShaderpacks(e.dataTransfer.files, CACHE_SETTINGS_INSTANCE_DIR)
saveShaderpackSettings()
resolveShaderpacksForUI()
}
}
// Server status bar functions.
/**
* Load the currently selected server information onto the mods tab.
*/
function loadSelectedServerOnModsTab(){
const serv = DistroManager.getDistribution().getServer(ConfigManager.getSelectedServer())
document.getElementById('settingsSelServContent').innerHTML = `
<img class="serverListingImg" src="${serv.getIcon()}"/>
<div class="serverListingDetails">
<span class="serverListingName">${serv.getName()}</span>
<span class="serverListingDescription">${serv.getDescription()}</span>
<div class="serverListingInfo">
<div class="serverListingVersion">${serv.getMinecraftVersion()}</div>
<div class="serverListingRevision">${serv.getVersion()}</div>
${serv.isMainServer() ? `<div class="serverListingStarWrapper">
<svg id="Layer_1" viewBox="0 0 107.45 104.74" width="20px" height="20px">
<defs>
<style>.cls-1{fill:#fff;}.cls-2{fill:none;stroke:#fff;stroke-miterlimit:10;}</style>
</defs>
<path class="cls-1" d="M100.93,65.54C89,62,68.18,55.65,63.54,52.13c2.7-5.23,18.8-19.2,28-27.55C81.36,31.74,63.74,43.87,58.09,45.3c-2.41-5.37-3.61-26.52-4.37-39-.77,12.46-2,33.64-4.36,39-5.7-1.46-23.3-13.57-33.49-20.72,9.26,8.37,25.39,22.36,28,27.55C39.21,55.68,18.47,62,6.52,65.55c12.32-2,33.63-6.06,39.34-4.9-.16,5.87-8.41,26.16-13.11,37.69,6.1-10.89,16.52-30.16,21-33.9,4.5,3.79,14.93,23.09,21,34C70,86.84,61.73,66.48,61.59,60.65,67.36,59.49,88.64,63.52,100.93,65.54Z"/>
<circle class="cls-2" cx="53.73" cy="53.9" r="38"/>
</svg>
<span class="serverListingStarTooltip">Main Server</span>
</div>` : ''}
</div>
</div>
`
}
// Bind functionality to the server switch button.
document.getElementById('settingsSwitchServerButton').addEventListener('click', (e) => {
e.target.blur()
toggleServerSelection(true)
})
/**
* Save mod configuration for the current selected server.
*/
function saveAllModConfigurations(){
saveModConfiguration()
ConfigManager.save()
saveDropinModConfiguration()
}
/**
* Function to refresh the mods tab whenever the selected
* server is changed.
*/
function animateModsTabRefresh(){
$('#settingsTabMods').fadeOut(500, () => {
prepareModsTab()
$('#settingsTabMods').fadeIn(500)
})
}
/**
* Prepare the Mods tab for display.
*/
function prepareModsTab(first){
resolveModsForUI()
resolveDropinModsForUI()
resolveShaderpacksForUI()
bindDropinModsRemoveButton()
bindDropinModFileSystemButton()
bindShaderpackButton()
bindModsToggleSwitch()
loadSelectedServerOnModsTab()
}
/**
* Java Tab
@ -951,9 +353,9 @@ const SETTINGS_MIN_MEMORY = ConfigManager.getAbsoluteMinRAM()
// Set the max and min values for the ranged sliders.
settingsMaxRAMRange.setAttribute('max', SETTINGS_MAX_MEMORY)
settingsMaxRAMRange.setAttribute('min', SETTINGS_MIN_MEMORY)
settingsMaxRAMRange.setAttribute('min', "0.1")
settingsMinRAMRange.setAttribute('max', SETTINGS_MAX_MEMORY)
settingsMinRAMRange.setAttribute('min', SETTINGS_MIN_MEMORY )
settingsMinRAMRange.setAttribute('min', "0.1")
// Bind on change event for min memory container.
settingsMinRAMRange.onchange = (e) => {
@ -1141,12 +543,12 @@ function populateJavaExecDetails(execPath){
if(v.valid){
const vendor = v.vendor != null ? ` (${v.vendor})` : ''
if(v.version.major < 9) {
settingsJavaExecDetails.innerHTML = `Selected: Java ${v.version.major} Update ${v.version.update} (x${v.arch})${vendor}`
settingsJavaExecDetails.innerHTML = `Seçildi: Java ${v.version.major} Update ${v.version.update} (${(process.arch=="x64" ? "x64" : "x32")})${vendor}`
} else {
settingsJavaExecDetails.innerHTML = `Selected: Java ${v.version.major}.${v.version.minor}.${v.version.revision} (x${v.arch})${vendor}`
settingsJavaExecDetails.innerHTML = `Seçildi: Java ${v.version.major}.${v.version.minor}.${v.version.revision} (${(process.arch=="x64" ? "x64" : "x32")})${vendor}`
}
} else {
settingsJavaExecDetails.innerHTML = 'Invalid Selection'
settingsJavaExecDetails.innerHTML = 'Geçersiz Seçim'
}
})
}
@ -1220,7 +622,7 @@ function populateAboutVersionInformation(){
*/
function populateReleaseNotes(){
$.ajax({
url: 'https://github.com/dscalzi/HeliosLauncher/releases.atom',
url: 'https://github.com/dscalzi/PixargonLauncher/releases.atom',
success: (data) => {
const version = 'v' + remote.app.getVersion()
const entries = $(data).find('entry')
@ -1240,7 +642,7 @@ function populateReleaseNotes(){
},
timeout: 2500
}).catch(err => {
settingsAboutChangelogText.innerHTML = 'Failed to load release notes.'
settingsAboutChangelogText.innerHTML = 'Sürüm notları yüklenemedi.'
})
}
@ -1252,80 +654,8 @@ function prepareAboutTab(){
populateReleaseNotes()
}
/**
* Update Tab
*/
const settingsTabUpdate = document.getElementById('settingsTabUpdate')
const settingsUpdateTitle = document.getElementById('settingsUpdateTitle')
const settingsUpdateVersionCheck = document.getElementById('settingsUpdateVersionCheck')
const settingsUpdateVersionTitle = document.getElementById('settingsUpdateVersionTitle')
const settingsUpdateVersionValue = document.getElementById('settingsUpdateVersionValue')
const settingsUpdateChangelogTitle = settingsTabUpdate.getElementsByClassName('settingsChangelogTitle')[0]
const settingsUpdateChangelogText = settingsTabUpdate.getElementsByClassName('settingsChangelogText')[0]
const settingsUpdateChangelogCont = settingsTabUpdate.getElementsByClassName('settingsChangelogContainer')[0]
const settingsUpdateActionButton = document.getElementById('settingsUpdateActionButton')
/**
* Update the properties of the update action button.
*
* @param {string} text The new button text.
* @param {boolean} disabled Optional. Disable or enable the button
* @param {function} handler Optional. New button event handler.
*/
function settingsUpdateButtonStatus(text, disabled = false, handler = null){
settingsUpdateActionButton.innerHTML = text
settingsUpdateActionButton.disabled = disabled
if(handler != null){
settingsUpdateActionButton.onclick = handler
}
}
/**
* Populate the update tab with relevant information.
*
* @param {Object} data The update data.
*/
function populateSettingsUpdateInformation(data){
if(data != null){
settingsUpdateTitle.innerHTML = `New ${isPrerelease(data.version) ? 'Pre-release' : 'Release'} Available`
settingsUpdateChangelogCont.style.display = null
settingsUpdateChangelogTitle.innerHTML = data.releaseName
settingsUpdateChangelogText.innerHTML = data.releaseNotes
populateVersionInformation(data.version, settingsUpdateVersionValue, settingsUpdateVersionTitle, settingsUpdateVersionCheck)
if(process.platform === 'darwin'){
settingsUpdateButtonStatus('Download from GitHub<span style="font-size: 10px;color: gray;text-shadow: none !important;">Close the launcher and run the dmg to update.</span>', false, () => {
shell.openExternal(data.darwindownload)
})
} else {
settingsUpdateButtonStatus('Downloading..', true)
}
} else {
settingsUpdateTitle.innerHTML = 'You Are Running the Latest Version'
settingsUpdateChangelogCont.style.display = 'none'
populateVersionInformation(remote.app.getVersion(), settingsUpdateVersionValue, settingsUpdateVersionTitle, settingsUpdateVersionCheck)
settingsUpdateButtonStatus('Check for Updates', false, () => {
if(!isDev){
ipcRenderer.send('autoUpdateAction', 'checkForUpdate')
settingsUpdateButtonStatus('Checking for Updates..', true)
}
})
}
}
/**
* Prepare update tab for display.
*
* @param {Object} data The update data.
*/
function prepareUpdateTab(data = null){
populateSettingsUpdateInformation(data)
}
/**
* Settings preparation functions.
*/
/**
* Prepare the entire settings UI.
@ -1335,16 +665,13 @@ function prepareUpdateTab(data = null){
function prepareSettings(first = false) {
if(first){
setupSettingsTabs()
initSettingsValidators()
prepareUpdateTab()
} else {
prepareModsTab()
}
initSettingsValues()
prepareAccountsTab()
prepareJavaTab()
prepareAboutTab()
}
// Prepare the settings UI on startup.
//prepareSettings(true)
prepareSettings(true)

View File

@ -44,6 +44,7 @@ function switchView(current, next, currentFadeTime = 500, nextFadeTime = 500, on
onNextFade()
})
})
}
/**
@ -55,18 +56,16 @@ function getCurrentView(){
return currentView
}
function showMainUI(data){
function showMainUI(){
if(!isDev){
loggerAutoUpdater.log('Initializing..')
ipcRenderer.send('autoUpdateAction', 'initAutoUpdater', ConfigManager.getAllowPrerelease())
}
prepareSettings(true)
updateSelectedServer(data.getServer(ConfigManager.getSelectedServer()))
refreshServerStatus()
setTimeout(() => {
document.getElementById('frameBar').style.backgroundColor = 'rgba(0, 0, 0, 0.5)'
document.body.style.backgroundImage = `url('assets/images/backgrounds/${document.body.getAttribute('bkid')}.jpg')`
$('#main').show()
@ -74,21 +73,18 @@ function showMainUI(data){
// If this is enabled in a development environment we'll get ratelimited.
// The relaunch frequency is usually far too high.
if(!isDev && isLoggedIn){
validateSelectedAccount()
}
if(ConfigManager.isFirstLaunch()){
currentView = VIEWS.welcome
$(VIEWS.welcome).fadeIn(1000)
} else {
//if(ConfigManager.isFirstLaunch()){
// currentView = VIEWS.welcome
// $(VIEWS.welcome).fadeIn(1000)
//} else {
if(isLoggedIn){
currentView = VIEWS.landing
$(VIEWS.landing).fadeIn(1000)
} else {
currentView = VIEWS.login
$(VIEWS.login).fadeIn(1000)
}
// }
}
setTimeout(() => {
@ -98,10 +94,6 @@ function showMainUI(data){
}, 250)
}, 750)
// Disable tabbing to the news container.
initNews().then(() => {
$('#newsContainer *').attr('tabindex', '-1')
})
}
function showFatalStartupError(){
@ -127,12 +119,6 @@ function showFatalStartupError(){
*
* @param {Object} data The distro index object.
*/
function onDistroRefresh(data){
updateSelectedServer(data.getServer(ConfigManager.getSelectedServer()))
refreshServerStatus()
initNews()
syncModConfigurations(data)
}
/**
* Sync the mod configurations with the distro index.
@ -378,24 +364,11 @@ function setSelectedAccount(uuid){
const authAcc = ConfigManager.setSelectedAccount(uuid)
ConfigManager.save()
updateSelectedAccount(authAcc)
validateSelectedAccount()
}
// Synchronous Listener
document.addEventListener('readystatechange', function(){
if (document.readyState === 'interactive' || document.readyState === 'complete'){
if(rscShouldLoad){
rscShouldLoad = false
if(!fatalStartupError){
const data = DistroManager.getDistribution()
showMainUI(data)
} else {
showFatalStartupError()
}
}
}
showMainUI()
}, false)
// Actions that must be performed after the distribution index is downloaded.

View File

@ -9,11 +9,47 @@ const $ = require('jquery')
const {ipcRenderer, remote, shell, webFrame} = require('electron')
const isDev = require('./assets/js/isdev')
const LoggerUtil = require('./assets/js/loggerutil')
const ConfigManagerV2 = require('./assets/js/configmanager')
const loggerUICore = LoggerUtil('%c[UICore]', 'color: #000668; font-weight: bold')
const loggerAutoUpdater = LoggerUtil('%c[AutoUpdater]', 'color: #000668; font-weight: bold')
const loggerAutoUpdaterSuccess = LoggerUtil('%c[AutoUpdater]', 'color: #209b07; font-weight: bold')
let builder=0
function a(){
// Eeeğm öle işte
document.title = ConfigManagerV2.getLD().Launcher.Name
let fTT=document.querySelector("#frameTitleText")
let sASB=document.querySelector("#settingsAboutSourceButton")
let sAT=document.querySelector("#settingsAboutTitle")
let lDT=document.querySelector(".loginDisclaimerText")
let nB=document.querySelector("#newsButton")
let foo=document.querySelector("#baby-foo")
let framebar=document.querySelector("#frameBar")
let frameSA=document.querySelector("#frameSeninAnan")
if(fTT) {fTT.innerHTML = ConfigManagerV2.getLD().Launcher.Name;builder++}
if(sASB) {sASB.href = ConfigManagerV2.getLD().Launcher.FileUrl;builder++}
if(sAT) {sAT.innerHTML = ConfigManagerV2.getLD().Launcher.Name;builder++}
if(lDT) {lDT.innerHTML = `${ConfigManagerV2.getLD().Launcher.Name} ile Mojang arasına bir iş birliği bulunmamaktadır`;builder++}
if(foo) {foo.outerHTML = `<webview id="foo" src="${ConfigManagerV2.getLD().WebAddress}" style="width:100%; height:100%" autosize="on" minwidth="576" minheight="432" allowtransparency></webview>`;builder++}
if(framebar) {framebar.style.backgroundColor = `rgba(${ConfigManagerV2.getLD().others.frameBarC.join(",")})`;builder++}
if(nB) {
if(ConfigManagerV2.getLD().WebAddress){
nB.style.opacity = 1
builder++
}else{
nB.style.top = "-100%";builder++
}
}
if(frameSA){
if(ConfigManagerV2.getLD().others.LNameBg) {
frameSA.style.opacity=1
};builder++
}
console.log(builder)
if(!(builder>=10)) setTimeout(a, 15)
}
a()
// Log deprecation and process warnings.
process.traceProcessWarnings = true
process.traceDeprecation = true
@ -41,22 +77,22 @@ if(!isDev){
ipcRenderer.on('autoUpdateNotification', (event, arg, info) => {
switch(arg){
case 'checking-for-update':
loggerAutoUpdater.log('Checking for update..')
settingsUpdateButtonStatus('Checking for Updates..', true)
loggerAutoUpdater.log('Güncelleme aranıyor..')
settingsUpdateButtonStatus('Güncelleme aranıyor..', true)
break
case 'update-available':
loggerAutoUpdaterSuccess.log('New update available', info.version)
loggerAutoUpdaterSuccess.log('Yeni güncelleme mevcut', info.version)
if(process.platform === 'darwin'){
info.darwindownload = `https://github.com/dscalzi/HeliosLauncher/releases/download/v${info.version}/helioslauncher-setup-${info.version}.dmg`
info.darwindownload = `https://github.com/dscalzi/PixargonLauncher/releases/download/v${info.version}/pixargonlauncher-setup-${info.version}.dmg`
showUpdateUI(info)
}
populateSettingsUpdateInformation(info)
break
case 'update-downloaded':
loggerAutoUpdaterSuccess.log('Update ' + info.version + ' ready to be installed.')
settingsUpdateButtonStatus('Install Now', false, () => {
loggerAutoUpdaterSuccess.log('Güncelleme ' + info.version + ' indirmeye hazır.')
settingsUpdateButtonStatus('Şimdi indir', false, () => {
if(!isDev){
ipcRenderer.send('autoUpdateAction', 'installUpdateNow')
}
@ -64,8 +100,8 @@ if(!isDev){
showUpdateUI(info)
break
case 'update-not-available':
loggerAutoUpdater.log('No new update found.')
settingsUpdateButtonStatus('Check for Updates')
loggerAutoUpdater.log('Yeni güncelleme bulunamadı.')
settingsUpdateButtonStatus('Güncellemeleri kontrol et')
break
case 'ready':
updateCheckListener = setInterval(() => {
@ -76,17 +112,17 @@ if(!isDev){
case 'realerror':
if(info != null && info.code != null){
if(info.code === 'ERR_UPDATER_INVALID_RELEASE_FEED'){
loggerAutoUpdater.log('No suitable releases found.')
loggerAutoUpdater.log('Uygun sürüm bulunamadı.')
} else if(info.code === 'ERR_XML_MISSED_ELEMENT'){
loggerAutoUpdater.log('No releases found.')
loggerAutoUpdater.log('Sürüm bulunamadı.')
} else {
loggerAutoUpdater.error('Error during update check..', info)
loggerAutoUpdater.debug('Error Code:', info.code)
loggerAutoUpdater.error('Güncelleme kontrolünde hata..', info)
loggerAutoUpdater.debug('Hata kodu:', info.code)
}
}
break
default:
loggerAutoUpdater.log('Unknown argument', arg)
loggerAutoUpdater.log('Bilinmeyen konu', arg)
break
}
})
@ -134,7 +170,7 @@ $(function(){
document.addEventListener('readystatechange', function () {
if (document.readyState === 'interactive'){
loggerUICore.log('UICore Initializing..')
loggerUICore.log('UICore Başlatılıyor..')
// Bind close button.
Array.from(document.getElementsByClassName('fCb')).map((val) => {
@ -175,18 +211,6 @@ document.addEventListener('readystatechange', function () {
} else if(document.readyState === 'complete'){
//266.01
//170.8
//53.21
// Bind progress bar length to length of bot wrapper
//const targetWidth = document.getElementById("launch_content").getBoundingClientRect().width
//const targetWidth2 = document.getElementById("server_selection").getBoundingClientRect().width
//const targetWidth3 = document.getElementById("launch_button").getBoundingClientRect().width
document.getElementById('launch_details').style.maxWidth = 266.01
document.getElementById('launch_progress').style.width = 170.8
document.getElementById('launch_details_right').style.maxWidth = 170.8
document.getElementById('launch_progress_label').style.width = 53.21
}
@ -205,9 +229,11 @@ $(document).on('click', 'a[href^="http"]', function(event) {
* This will crash the program if you are using multiple
* DevTools, for example the chrome debugger in VS Code.
*/
document.addEventListener('keydown', function (e) {
if((e.key === 'I' || e.key === 'i') && e.ctrlKey && e.shiftKey){
let window = remote.getCurrentWindow()
window.toggleDevTools()
}
})
if((isDev) && (e.key === 'I' || e.key === 'i') && e.ctrlKey && e.shiftKey){
let window = remote.getCurrentWindow()
window.toggleDevTools()
}
})

View File

@ -1,6 +1,7 @@
/**
* Script for welcome.ejs
*/
document.getElementById('welcomeButton').addEventListener('click', e => {
switchView(VIEWS.welcome, VIEWS.login)
})

View File

@ -1,13 +1,6 @@
const net = require('net')
const net = require('net');
const status = require('minecraft-server-status');
/**
* Retrieves the status of a minecraft server.
*
* @param {string} address The server address.
* @param {number} port Optional. The port of the server. Defaults to 25565.
* @returns {Promise.<Object>} A promise which resolves to an object containing
* status information.
*/
exports.getStatus = function(address, port = 25565){
if(port == null || port == ''){
@ -18,48 +11,18 @@ exports.getStatus = function(address, port = 25565){
}
return new Promise((resolve, reject) => {
const socket = net.connect(port, address, () => {
let buff = Buffer.from([0xFE, 0x01])
socket.write(buff)
})
socket.setTimeout(2500, () => {
socket.end()
reject({
code: 'ETIMEDOUT',
errno: 'ETIMEDOUT',
address,
port
})
})
socket.on('data', (data) => {
if(data != null && data != ''){
let server_info = data.toString().split('\x00\x00\x00')
const NUM_FIELDS = 6
if(server_info != null && server_info.length >= NUM_FIELDS){
resolve({
online: true,
version: server_info[2].replace(/\u0000/g, ''),
motd: server_info[3].replace(/\u0000/g, ''),
onlinePlayers: server_info[4].replace(/\u0000/g, ''),
maxPlayers: server_info[5].replace(/\u0000/g,'')
})
} else {
resolve({
online: false
})
}
status(address, port = 25565, response => {
if(response.online==true){
resolve({
online: true,
motd: response.motd,
version: "1.8.9",
onlinePlayers: response.players.now,
maxPlayers: response.players.max
})
}
socket.end()
else resolve({online:false})
})
socket.on('error', (err) => {
socket.destroy()
reject(err)
// ENOTFOUND = Unable to resolve.
// ECONNREFUSED = Unable to connect to port.
})
})
}

View File

@ -1,4 +1,7 @@
<div id="frameBar">
<div id="frameSeninAnan" style="opacity:0"><div id="frameTitleDock">
<span id="frameTitleText">Launcher</span>
</div></div>
<div id="frameResizableTop" class="frameDragPadder"></div>
<div id="frameMain">
<div class="frameResizableVert frameDragPadder"></div>
@ -6,22 +9,18 @@
<div id="frameContentDarwin">
<div id="frameButtonDockDarwin">
<button class="frameButtonDarwin fCb" id="frameButtonDarwin_close" tabIndex="-1"></button>
<button class="frameButtonDarwin fMb" id="frameButtonDarwin_minimize" tabIndex="-1"></button>
<button class="frameButtonDarwin fRb" id="frameButtonDarwin_restoredown" tabIndex="-1"></button>
</div>
</div>
<% } else{ %>
<div id="frameContentWin">
<div id="frameTitleDock">
<span id="frameTitleText">Helios Launcher</span>
<span id="frameTitleText">Launcher</span><!--<marquee style="position: absolute;top:0px;left:0px;width:100%;height: 22px;">TEST LAUNCHER/CLIENT (half-paid) - Launcher by Herom123 - Client by Ahmetyxa</marquee>-->
</div>
<div id="frameButtonDockWin">
<button class="frameButton fMb" id="frameButton_minimize" tabIndex="-1">
<svg name="TitleBarMinimize" width="10" height="10" viewBox="0 0 12 12"><rect stroke="#ffffff" fill="#ffffff" width="10" height="1" x="1" y="6"></rect></svg>
</button>
<button class="frameButton fRb" id="frameButton_restoredown" tabIndex="-1">
<svg name="TitleBarMaximize" width="10" height="10" viewBox="0 0 12 12"><rect width="9" height="9" x="1.5" y="1.5" fill="none" stroke="#ffffff" stroke-width="1.4px"></rect></svg>
</button>
<button class="frameButton fCb" id="frameButton_close" tabIndex="-1">
<svg name="TitleBarClose" width="10" height="10" viewBox="0 0 12 12"><polygon stroke="#ffffff" fill="#ffffff" fill-rule="evenodd" points="11 1.576 6.583 6 11 10.424 10.424 11 6 6.583 1.576 11 1 10.424 5.417 6 1 1.576 1.576 1 6 5.417 10.424 1"></polygon></svg>
</button>

View File

@ -1,110 +1,87 @@
<div id="landingContainer" style="display: none;">
<div id="landingContainer" style="display: none;outline: none !important;">
<div id="upper">
<div id="left">
<div id="image_seal_container">
<img id="image_seal" src="assets/images/SealCircle.png"/>
<div id="updateAvailableTooltip">Update Available</div>
<div id="rightContainer">
<div id="user_content">
<span id="user_text">Kullanıcı Adı</span>
<button id="signout">Oturumu Kapat</button>
<div id="avatarContainer">
<button id="avatarOverlay" style="display:none;color:red">Sign Out</button>
</div>
</div>
</div>
</div>
<div id="content">
</div>
<div id="right">
<div id="rightContainer">
<div id="user_content">
<span id="user_text">Username</span>
<div id="avatarContainer">
<button id="avatarOverlay">Edit</button>
<div id="mediaContent">
<div id="internalMedia">
<div class="mediaContainer" id="settingsMediaContainer">
<button class="mediaButton" id="settingsMediaButton">
<svg id="settingsSVG" class="mediaSVG" viewBox="0 0 141.36 137.43">
<path d="M70.70475616319865,83.36934004916053 a15.320781354859122,15.320781354859122 0 1 1 14.454501310561755,-15.296030496450625 A14.850515045097694,14.850515045097694 0 0 1 70.70475616319865,83.36934004916053 M123.25082856443602,55.425620905968366 h-12.375429204248078 A45.54157947163293,45.54157947163293 0 0 0 107.21227231573047,46.243052436416285 l8.613298726156664,-9.108315894326587 a9.727087354538993,9.727087354538993 0 0 0 0,-13.167456673319956 l-3.465120177189462,-3.6631270444574313 a8.489544434114185,8.489544434114185 0 0 0 -12.375429204248078,0 l-8.613298726156664,9.108315894326587 A40.442902639482725,40.442902639482725 0 0 0 81.99114759747292,25.427580514871032 V12.532383284044531 a9.108315894326587,9.108315894326587 0 0 0 -8.811305593424633,-9.306322761594556 h-4.950171681699231 a9.108315894326587,9.108315894326587 0 0 0 -8.811305593424633,9.306322761594556 v12.895197230826497 a40.17064319698927,40.17064319698927 0 0 0 -9.331073620003052,4.0591407789933704 l-8.613298726156664,-9.108315894326587 a8.489544434114185,8.489544434114185 0 0 0 -12.375429204248078,0 L25.58394128451018,23.967279868769744 a9.727087354538993,9.727087354538993 0 0 0 0,13.167456673319956 L34.19724001066683,46.243052436416285 a45.07131316187151,45.07131316187151 0 0 0 -3.6631270444574313,9.083565035918088 h-12.375429204248078 a9.083565035918088,9.083565035918088 0 0 0 -8.811305593424633,9.306322761594556 v5.197680265784193 a9.108315894326587,9.108315894326587 0 0 0 8.811305593424633,9.306322761594556 h11.979415469712139 a45.69008462208391,45.69008462208391 0 0 0 4.0591407789933704,10.642869115653347 l-8.613298726156664,9.108315894326587 a9.727087354538993,9.727087354538993 0 0 0 0,13.167456673319956 l3.465120177189462,3.6631270444574313 a8.489544434114185,8.489544434114185 0 0 0 12.375429204248078,0 l8.613298726156664,-9.108315894326587 a40.49240435629971,40.49240435629971 0 0 0 9.331073620003052,4.0591407789933704 v12.895197230826497 a9.083565035918088,9.083565035918088 0 0 0 8.811305593424633,9.306322761594556 h4.950171681699231 A9.083565035918088,9.083565035918088 0 0 0 81.99114759747292,123.68848839660077 V110.79329116577425 a40.78941465720167,40.78941465720167 0 0 0 9.331073620003052,-4.0591407789933704 l8.613298726156664,9.108315894326587 a8.489544434114185,8.489544434114185 0 0 0 12.375429204248078,0 l3.465120177189462,-3.6631270444574313 a9.727087354538993,9.727087354538993 0 0 0 0,-13.167456673319956 l-8.613298726156664,-9.108315894326587 a45.665333763675406,45.665333763675406 0 0 0 4.034389920584874,-10.642869115653347 h12.004166328120636 a9.108315894326587,9.108315894326587 0 0 0 8.811305593424633,-9.306322761594556 v-5.197680265784193 a9.083565035918088,9.083565035918088 0 0 0 -8.811305593424633,-9.306322761594556 " id="svg_3" class=""/>
</svg>
<div id="settingsTooltip">Settings</div>
</button>
</div>
</div>
<div id="mediaContent">
<div id="internalMedia">
<div class="mediaContainer" id="settingsMediaContainer">
<button class="mediaButton" id="settingsMediaButton">
<svg id="settingsSVG" class="mediaSVG" viewBox="0 0 141.36 137.43">
<path d="M70.70475616319865,83.36934004916053 a15.320781354859122,15.320781354859122 0 1 1 14.454501310561755,-15.296030496450625 A14.850515045097694,14.850515045097694 0 0 1 70.70475616319865,83.36934004916053 M123.25082856443602,55.425620905968366 h-12.375429204248078 A45.54157947163293,45.54157947163293 0 0 0 107.21227231573047,46.243052436416285 l8.613298726156664,-9.108315894326587 a9.727087354538993,9.727087354538993 0 0 0 0,-13.167456673319956 l-3.465120177189462,-3.6631270444574313 a8.489544434114185,8.489544434114185 0 0 0 -12.375429204248078,0 l-8.613298726156664,9.108315894326587 A40.442902639482725,40.442902639482725 0 0 0 81.99114759747292,25.427580514871032 V12.532383284044531 a9.108315894326587,9.108315894326587 0 0 0 -8.811305593424633,-9.306322761594556 h-4.950171681699231 a9.108315894326587,9.108315894326587 0 0 0 -8.811305593424633,9.306322761594556 v12.895197230826497 a40.17064319698927,40.17064319698927 0 0 0 -9.331073620003052,4.0591407789933704 l-8.613298726156664,-9.108315894326587 a8.489544434114185,8.489544434114185 0 0 0 -12.375429204248078,0 L25.58394128451018,23.967279868769744 a9.727087354538993,9.727087354538993 0 0 0 0,13.167456673319956 L34.19724001066683,46.243052436416285 a45.07131316187151,45.07131316187151 0 0 0 -3.6631270444574313,9.083565035918088 h-12.375429204248078 a9.083565035918088,9.083565035918088 0 0 0 -8.811305593424633,9.306322761594556 v5.197680265784193 a9.108315894326587,9.108315894326587 0 0 0 8.811305593424633,9.306322761594556 h11.979415469712139 a45.69008462208391,45.69008462208391 0 0 0 4.0591407789933704,10.642869115653347 l-8.613298726156664,9.108315894326587 a9.727087354538993,9.727087354538993 0 0 0 0,13.167456673319956 l3.465120177189462,3.6631270444574313 a8.489544434114185,8.489544434114185 0 0 0 12.375429204248078,0 l8.613298726156664,-9.108315894326587 a40.49240435629971,40.49240435629971 0 0 0 9.331073620003052,4.0591407789933704 v12.895197230826497 a9.083565035918088,9.083565035918088 0 0 0 8.811305593424633,9.306322761594556 h4.950171681699231 A9.083565035918088,9.083565035918088 0 0 0 81.99114759747292,123.68848839660077 V110.79329116577425 a40.78941465720167,40.78941465720167 0 0 0 9.331073620003052,-4.0591407789933704 l8.613298726156664,9.108315894326587 a8.489544434114185,8.489544434114185 0 0 0 12.375429204248078,0 l3.465120177189462,-3.6631270444574313 a9.727087354538993,9.727087354538993 0 0 0 0,-13.167456673319956 l-8.613298726156664,-9.108315894326587 a45.665333763675406,45.665333763675406 0 0 0 4.034389920584874,-10.642869115653347 h12.004166328120636 a9.108315894326587,9.108315894326587 0 0 0 8.811305593424633,-9.306322761594556 v-5.197680265784193 a9.083565035918088,9.083565035918088 0 0 0 -8.811305593424633,-9.306322761594556 " id="svg_3" class=""/>
</svg>
<div id="settingsTooltip">Settings</div>
</button>
</div>
<div class="mediaDivider"></div>
<div id="externalMedia">
<div class="mediaContainer">
<a href="https://andrcraft.net/" class="mediaURL" id="linkURL">
<svg id="linkSVG" class="mediaSVG" viewBox="35.34 34.3575 70.68 68.71500">
<g>
<path d="M75.37,65.51a3.85,3.85,0,0,0-1.73.42,8.22,8.22,0,0,1,.94,3.76A8.36,8.36,0,0,1,66.23,78H46.37a8.35,8.35,0,1,1,0-16.7h9.18a21.51,21.51,0,0,1,6.65-8.72H46.37a17.07,17.07,0,1,0,0,34.15H66.23A17,17,0,0,0,82.77,65.51Z"/>
<path d="M66,73.88a3.85,3.85,0,0,0,1.73-.42,8.22,8.22,0,0,1-.94-3.76,8.36,8.36,0,0,1,8.35-8.35H95A8.35,8.35,0,1,1,95,78H85.8a21.51,21.51,0,0,1-6.65,8.72H95a17.07,17.07,0,0,0,0-34.15H75.13A17,17,0,0,0,58.59,73.88Z"/>
</g>
</svg>
</a>
</div>
<div class="mediaDivider"></div>
<div id="externalMedia">
<div class="mediaContainer">
<a href="https://github.com/dscalzi/HeliosLauncher" class="mediaURL" id="linkURL">
<svg id="linkSVG" class="mediaSVG" viewBox="35.34 34.3575 70.68 68.71500">
<g>
<path d="M75.37,65.51a3.85,3.85,0,0,0-1.73.42,8.22,8.22,0,0,1,.94,3.76A8.36,8.36,0,0,1,66.23,78H46.37a8.35,8.35,0,1,1,0-16.7h9.18a21.51,21.51,0,0,1,6.65-8.72H46.37a17.07,17.07,0,1,0,0,34.15H66.23A17,17,0,0,0,82.77,65.51Z"/>
<path d="M66,73.88a3.85,3.85,0,0,0,1.73-.42,8.22,8.22,0,0,1-.94-3.76,8.36,8.36,0,0,1,8.35-8.35H95A8.35,8.35,0,1,1,95,78H85.8a21.51,21.51,0,0,1-6.65,8.72H95a17.07,17.07,0,0,0,0-34.15H75.13A17,17,0,0,0,58.59,73.88Z"/>
</g>
</svg>
</a>
</div>
<div class="mediaContainer">
<a href="#" class="mediaURL" id="twitterURL" disabled>
<svg id="twitterSVG" class="mediaSVG" viewBox="0 0 5000 4060" preserveAspectRatio="xMidYMid meet">
<g>
<path d="M1210 4048 c-350 -30 -780 -175 -1124 -378 -56 -33 -86 -57 -86 -68 0 -16 7 -17 83 -9 114 12 349 1 493 -22 295 -49 620 -180 843 -341 l54 -38 -49 -7 c-367 -49 -660 -256 -821 -582 -30 -61 -53 -120 -51 -130 3 -16 12 -17 73 -13 97 7 199 5 270 -4 l60 -9 -65 -22 c-341 -117 -609 -419 -681 -769 -18 -88 -26 -226 -13 -239 4 -3 32 7 63 22 68 35 198 77 266 86 28 4 58 9 68 12 10 2 -22 -34 -72 -82 -240 -232 -353 -532 -321 -852 15 -149 79 -347 133 -418 16 -20 17 -19 49 20 377 455 913 795 1491 945 160 41 346 74 485 86 l82 7 -7 -59 c-5 -33 -7 -117 -6 -189 2 -163 31 -286 103 -430 141 -285 422 -504 708 -550 112 -19 333 -19 442 0 180 30 335 108 477 239 l58 54 95 -24 c143 -36 286 -89 427 -160 70 -35 131 -60 135 -56 19 19 -74 209 -151 312 -50 66 -161 178 -216 217 l-30 22 73 -14 c111 -21 257 -63 353 -101 99 -39 99 -39 99 -19 0 57 -237 326 -412 468 l-88 71 6 51 c4 28 1 130 -5 226 -30 440 -131 806 -333 1202 -380 745 -1036 1277 -1823 1477 -243 62 -430 81 -786 78 -134 0 -291 -5 -349 -10z"/>
</g>
</svg>
</a>
</div>
<div class="mediaContainer">
<a href="#" class="mediaURL" id="instagramURL" disabled>
<svg id="instagramSVG" class="mediaSVG" viewBox="0 0 5040 5040">
<defs>
<radialGradient id="instaFill" cx="30%" cy="107%" r="150%">
<stop offset="0%" stop-color="#fdf497"/>
<stop offset="5%" stop-color="#fdf497"/>
<stop offset="45%" stop-color="#fd5949"/>
<stop offset="60%" stop-color="#d6249f"/>
<stop offset="90%" stop-color="#285AEB"/>
</radialGradient>
</defs>
<g>
<path d="M1390 5024 c-163 -9 -239 -19 -315 -38 -281 -70 -477 -177 -660 -361 -184 -184 -292 -380 -361 -660 -43 -171 -53 -456 -53 -1445 0 -989 10 -1274 53 -1445 69 -280 177 -476 361 -660 184 -184 380 -292 660 -361 171 -43 456 -53 1445 -53 989 0 1274 10 1445 53 280 69 476 177 660 361 184 184 292 380 361 660 43 171 53 456 53 1445 0 989 -10 1274 -53 1445 -69 280 -177 476 -361 660 -184 184 -380 292 -660 361 -174 44 -454 53 -1470 52 -599 0 -960 -5 -1105 -14z m2230 -473 c58 -6 141 -18 185 -27 397 -78 638 -318 719 -714 37 -183 41 -309 41 -1290 0 -981 -4 -1107 -41 -1290 -81 -395 -319 -633 -714 -714 -183 -37 -309 -41 -1290 -41 -981 0 -1107 4 -1290 41 -397 81 -636 322 -714 719 -33 166 -38 296 -43 1100 -5 796 3 1203 27 1380 67 489 338 758 830 825 47 7 162 15 255 20 250 12 1907 4 2035 -9z"/>
<path d="M2355 3819 c-307 -42 -561 -172 -780 -400 -244 -253 -359 -543 -359 -899 0 -361 116 -648 367 -907 262 -269 563 -397 937 -397 374 0 675 128 937 397 251 259 367 546 367 907 0 361 -116 648 -367 907 -197 203 -422 326 -690 378 -101 20 -317 27 -412 14z m400 -509 c275 -88 470 -284 557 -560 20 -65 23 -95 23 -230 0 -135 -3 -165 -23 -230 -88 -278 -284 -474 -562 -562 -65 -20 -95 -23 -230 -23 -135 0 -165 3 -230 23 -278 88 -474 284 -562 562 -20 65 -23 95 -23 230 0 135 3 165 23 230 73 230 219 403 427 507 134 67 212 83 390 79 111 -3 155 -8 210 -26z"/>
<path d="M3750 1473 c-29 -11 -66 -38 -106 -77 -70 -71 -94 -126 -94 -221 0 -95 24 -150 94 -221 72 -71 126 -94 225 -94 168 0 311 143 311 311 0 99 -23 154 -94 225 -43 42 -76 66 -110 77 -61 21 -166 21 -226 0z"/>
</g>
</svg>
</a>
</div>
<div class="mediaContainer">
<a href="#" class="mediaURL" id="youtubeURL" disabled>
<svg id="youtubeSVG" class="mediaSVG" viewBox="35.34 34.3575 70.68 68.71500">
<g>
<path d="M84.8,69.52,65.88,79.76V59.27Zm23.65.59c0-5.14-.79-17.63-3.94-20.57S99,45.86,73.37,45.86s-28,.73-31.14,3.68S38.29,65,38.29,70.11s.79,17.63,3.94,20.57,5.52,3.68,31.14,3.68,28-.74,31.14-3.68,3.94-15.42,3.94-20.57"/>
</g>
</svg>
</a>
</div>
<div class="mediaContainer">
<a href="https://discord.gg/zNWUXdt" class="mediaURL" id="discordURL">
<svg id="discordSVG" class="mediaSVG" viewBox="35.34 34.3575 70.68 68.71500">
<g>
<path d="M81.23,78.48a6.14,6.14,0,1,1,6.14-6.14,6.14,6.14,0,0,1-6.14,6.14M60,78.48a6.14,6.14,0,1,1,6.14-6.14A6.14,6.14,0,0,1,60,78.48M104.41,73c-.92-7.7-8.24-22.9-8.24-22.9A43,43,0,0,0,88,45.59a17.88,17.88,0,0,0-8.38-1.27l-.13,1.06a23.52,23.52,0,0,1,5.8,1.95,87.59,87.59,0,0,1,8.17,4.87s-10.32-5.63-22.27-5.63a51.32,51.32,0,0,0-23.2,5.63,87.84,87.84,0,0,1,8.17-4.87,23.57,23.57,0,0,1,5.8-1.95l-.13-1.06a17.88,17.88,0,0,0-8.38,1.27,42.84,42.84,0,0,0-8.21,4.56S37.87,65.35,37,73s-.37,11.54-.37,11.54,4.22,5.68,9.9,7.14,7.7,1.47,7.7,1.47l3.75-4.68a21.22,21.22,0,0,1-4.65-2A24.47,24.47,0,0,1,47.93,82S61.16,88.4,70.68,88.4c10,0,22.75-6.44,22.75-6.44a24.56,24.56,0,0,1-5.35,4.56,21.22,21.22,0,0,1-4.65,2l3.75,4.68s2,0,7.7-1.47,9.89-7.14,9.89-7.14.55-3.85-.37-11.54"/>
</g>
</svg>
</a>
</div>
<div class="mediaContainer">
<a href="https://www.youtube.com/channel/UCOsvKKA3QwPV2Wo05q2m8tg" class="mediaURL" id="youtubeURL" disabled>
<svg id="youtubeSVG" class="mediaSVG" viewBox="35.34 34.3575 70.68 68.71500">
<g>
<path d="M84.8,69.52,65.88,79.76V59.27Zm23.65.59c0-5.14-.79-17.63-3.94-20.57S99,45.86,73.37,45.86s-28,.73-31.14,3.68S38.29,65,38.29,70.11s.79,17.63,3.94,20.57,5.52,3.68,31.14,3.68,28-.74,31.14-3.68,3.94-15.42,3.94-20.57"/>
</g>
</svg>
</a>
</div>
<div class="mediaContainer">
<a href="https://discord.gg/MRNHWnRm" class="mediaURL" id="discordURL" disabled>
<svg id="discordSVG" class="mediaSVG" viewBox="35.34 34.3575 70.68 68.71500">
<g>
<path d="M81.23,78.48a6.14,6.14,0,1,1,6.14-6.14,6.14,6.14,0,0,1-6.14,6.14M60,78.48a6.14,6.14,0,1,1,6.14-6.14A6.14,6.14,0,0,1,60,78.48M104.41,73c-.92-7.7-8.24-22.9-8.24-22.9A43,43,0,0,0,88,45.59a17.88,17.88,0,0,0-8.38-1.27l-.13,1.06a23.52,23.52,0,0,1,5.8,1.95,87.59,87.59,0,0,1,8.17,4.87s-10.32-5.63-22.27-5.63a51.32,51.32,0,0,0-23.2,5.63,87.84,87.84,0,0,1,8.17-4.87,23.57,23.57,0,0,1,5.8-1.95l-.13-1.06a17.88,17.88,0,0,0-8.38,1.27,42.84,42.84,0,0,0-8.21,4.56S37.87,65.35,37,73s-.37,11.54-.37,11.54,4.22,5.68,9.9,7.14,7.7,1.47,7.7,1.47l3.75-4.68a21.22,21.22,0,0,1-4.65-2A24.47,24.47,0,0,1,47.93,82S61.16,88.4,70.68,88.4c10,0,22.75-6.44,22.75-6.44a24.56,24.56,0,0,1-5.35,4.56,21.22,21.22,0,0,1-4.65,2l3.75,4.68s2,0,7.7-1.47,9.89-7.14,9.89-7.14.55-3.85-.37-11.54"/>
</g>
</svg>
</a>
</div>
</div>
</div>
</div>
<div id="right">
<div id="image_seal_container">
<img id="image_seal" src="./assets/images/andr.gif" style="-webkit-user-select: none;"/>
<div id="updateAvailableTooltip">Güncelleme Mevcut</div>
</div>
</div>
</div>
<div id="lower">
<div id="left">
<div class="bot_wrapper">
<div id="content">
<div id="server_status_wrapper">
<span class="bot_label" id="landingPlayerLabel">SERVER</span>
<span class="bot_label" id="landingPlayerLabel">SUNUCU</span>
<span id="player_count">OFFLINE</span>
</div>
<div class="bot_divider"></div>
<div id="mojangStatusWrapper">
<span class="bot_label">MOJANG STATUS</span>
<span class="bot_label">MOJANG DURUMU</span>
<span id="mojang_status_icon">&#8226;</span>
<div id="mojangStatusTooltip">
<div id="mojangStatusTooltipTitle">Services</div>
<div id="mojangStatusTooltipTitle">Servisler</div>
<div id="mojangStatusEssentialContainer">
<!-- Essential Mojang services are populated here. -->
</div>
@ -124,16 +101,16 @@
<div id="center">
<div class="bot_wrapper">
<div id="content">
<button id="newsButton">
<button id="newsButton" style="opacity: 0;">
<!--<img src="assets/images/icons/arrow.svg" id="newsButtonSVG"/>-->
<div id="newsButtonAlert" style="display: none;"></div>
<svg id="newsButtonSVG" viewBox="0 0 24.87 13.97">
<defs>
<style>.arrowLine{fill:none;stroke:#FFF;stroke-width:2px;}</style>
<style>.arrowLine{fill:none;stroke:#FFF;stroke-width:2px;}</style>
</defs>
<polyline class="arrowLine" points="0.71 13.26 12.56 1.41 24.16 13.02"/>
</svg>
&#10;<span id="newsButtonText">NEWS</span>
&#10;<span id="newsButtonText">WEBSITE</span>
</button>
</div>
</div>
@ -141,80 +118,24 @@
<div id="right">
<div class="bot_wrapper">
<div id="launch_content">
<button id="launch_button">PLAY</button>
<div class="bot_divider"></div>
<button id="server_selection_button" class="bot_label">&#8226; No Server Selected</button>
<button id="launch_button">OYNA <span id="svgPlay"></span></button>
</div>
<div id="launch_details">
<div id="launch_details_left">
<span id="launch_progress_label">0%</span>
<div class="bot_divider"></div>
<div class="bot_divider" style="height: 50px;"></div>
</div>
<div id="launch_details_right">
<progress id="launch_progress" value="22" max="100"></progress>
<span id="launch_details_text" class="bot_label">Please wait..</span>
<progress id="launch_progress" value="0" max="100" style="width:11em"></progress>
<span id="launch_details_text" class="bot_label">Lütfen Bekleyin..</span>
</div>
</div>
</div>
</div>
</div>
<div id="newsContainer">
<div id="newsContent" article="-1" style="display: none;">
<div id="newsStatusContainer">
<div id="newsStatusContent">
<div id="newsTitleContainer">
<a id="newsArticleTitle" href="#">Lorem Ipsum</a>
</div>
<div id="newsMetaContainer">
<div id="newsArticleDateWrapper">
<span id="newsArticleDate">Mar 15, 44 BC, 9:14 AM</span>
</div>
<div id="newsArticleAuthorWrapper">
<span id="newsArticleAuthor">by Cicero</span>
</div>
<a href="#" id="newsArticleComments">0 Comments</a>
</div>
</div>
<div id="newsNavigationContainer">
<button id="newsNavigateLeft">
<svg id="newsNavigationLeftSVG" viewBox="0 0 24.87 13.97">
<defs>
<style>.arrowLine{fill:none;stroke:#FFF;stroke-width:2px;transition: 0.25s ease;}</style>
</defs>
<polyline class="arrowLine" points="0.71 13.26 12.56 1.41 24.16 13.02"/>
</svg>
</button>
<span id="newsNavigationStatus">1 of 1</span>
<button id="newsNavigateRight">
<svg id="newsNavigationRightSVG" viewBox="0 0 24.87 13.97">
<defs>
<style>.arrowLine{fill:none;stroke:#FFF;stroke-width:2px;transition: 0.25s ease;}</style>
</defs>
<polyline class="arrowLine" points="0.71 13.26 12.56 1.41 24.16 13.02"/>
</svg>
</button>
</div>
</div>
<div id="newsArticleContainer">
<div id="newsArticleContent">
<div id="newsArticleContentScrollable">
<!-- Article Content -->
</div>
</div>
</div>
</div>
<div id="newsErrorContainer">
<div id="newsErrorLoading">
<span id="nELoadSpan" class="newsErrorContent">Checking for News..</span>
</div>
<div id="newsErrorFailed" style="display: none;">
<span id="nEFailedSpan" class="newsErrorContent">Failed to Load News</span>
<button id="newsErrorRetry">Try Again</button>
</div>
<div id="newsErrorNone" style="display: none;">
<span id="nENoneSpan" class="newsErrorContent">No News</span>
</div>
</div>
<div id="baby-foo"></div>
</div>
<script src="./assets/js/scripts/landing.js"></script>
<script src="./assets/js/scripts/landing.js"></script>
</div>

View File

@ -2,44 +2,35 @@
<div id="loginCancelContainer" style="display: none;">
<button id="loginCancelButton">
<div id="loginCancelIcon">X</div>
<span id="loginCancelText">Cancel</span>
<span id="loginCancelText">İptal</span>
</button>
</div>
<div id="loginContent">
<form id="loginForm">
<img id="loginImageSeal" src="assets/images/SealCircle.png"/>
<span id="loginSubheader">MINECRAFT LOGIN</span>
<img id="loginImageSeal" src="assets/images/andr.gif"/>
<span id="loginSubheader">MINECRAFT GİRİŞ</span>
<div class="loginFieldContainer">
<svg id="profileSVG" class="loginSVG" viewBox="40 37 65.36 61.43">
<g>
<path d="M86.77,58.12A13.79,13.79,0,1,0,73,71.91,13.79,13.79,0,0,0,86.77,58.12M97,103.67a3.41,3.41,0,0,0,3.39-3.84,27.57,27.57,0,0,0-54.61,0,3.41,3.41,0,0,0,3.39,3.84Z"/>
</g>
</svg>
<span class="loginErrorSpan" id="loginEmailError">* Invalid Value</span>
<input id="loginUsername" class="loginField" type="text" placeholder="EMAIL OR USERNAME"/>
</div>
<div class="loginFieldContainer">
<svg id="lockSVG" class="loginSVG" viewBox="40 32 60.36 70.43">
<g>
<path d="M86.16,54a16.38,16.38,0,1,0-32,0H44V102.7H96V54Zm-25.9-3.39a9.89,9.89,0,1,1,19.77,0A9.78,9.78,0,0,1,79.39,54H60.89A9.78,9.78,0,0,1,60.26,50.59ZM70,96.2a6.5,6.5,0,0,1-6.5-6.5,6.39,6.39,0,0,1,3.1-5.4V67h6.5V84.11a6.42,6.42,0,0,1,3.39,5.6A6.5,6.5,0,0,1,70,96.2Z"/>
</g>
</svg>
<span class="loginErrorSpan" id="loginPasswordError">* Required</span>
<input id="loginPassword" class="loginField" type="password" placeholder="PASSWORD"/>
<span class="loginErrorSpan" id="loginEmailError">* Geçersiz Değer</span>
<input id="loginUsername" class="loginField" type="text" placeholder="KULLANICI ADI"/>
</div>
<div id="loginOptions">
<span class="loginSpanDim">
<a href="https://my.minecraft.net/en-us/password/forgot/">forgot password?</a>
<a href="https://my.minecraft.net/en-us/password/forgot/">Şifreni mi unuttun?</a>
</span>
<label id="checkmarkContainer">
<input id="loginRememberOption" type="checkbox" checked>
<span id="loginRememberText" class="loginSpanDim">remember me?</span>
<span id="loginRememberText" class="loginSpanDim">Beni Hatırla?</span>
<span class="loginCheckmark"></span>
</label>
</div>
<button id="loginButton" disabled>
<button id="loginButton" enabled>
<div id="loginButtonContent">
LOGIN
GİRİŞ
<svg id="loginSVG" viewBox="0 0 24.87 13.97">
<defs>
<style>.arrowLine{fill:none;stroke:#FFF;stroke-width:2px;transition: 0.25s ease;}</style>
@ -54,10 +45,10 @@
</button>
<div id="loginDisclaimer">
<span class="loginSpanDim" id="loginRegisterSpan">
<a href="https://minecraft.net/en-us/store/minecraft/">Need an Account?</a>
<a href="https://minecraft.net/en-us/store/minecraft/">Hesaba mı ihtiyacın var?</a>
</span>
<p class="loginDisclaimerText">Your password is sent directly to mojang and never stored.</p>
<p class="loginDisclaimerText">Helios Launcher is not affiliated with Mojang AB.</p>
<p class="loginDisclaimerText">Şifren asla depolanmaz doğrudan Mojang'a gönderilir.</p>
<p class="loginDisclaimerText">Launcher ile Mojang arasına bir iş birliği bulunmamaktadır.</p>
</div>
</form>
</div>

View File

@ -1,29 +1,29 @@
<div id="overlayContainer" style="display: none;">
<div id="serverSelectContent" style="display: none;">
<span id="serverSelectHeader">Available Servers</span>
<span id="serverSelectHeader">Müsait Sunucular</span>
<div id="serverSelectList">
<div id="serverSelectListScrollable">
<!-- Server listings populated here. -->
</div>
</div>
<div id="serverSelectActions">
<button id="serverSelectConfirm" class="overlayKeybindEnter" type="submit">Select</button>
<button id="serverSelectConfirm" class="overlayKeybindEnter" type="submit">Seç</button>
<div id="serverSelectCancelWrapper">
<button id="serverSelectCancel" class="overlayKeybindEsc">Cancel</button>
<button id="serverSelectCancel" class="overlayKeybindEsc">İptal</button>
</div>
</div>
</div>
<div id="accountSelectContent" style="display: none;">
<span id="accountSelectHeader">Select an Account</span>
<span id="accountSelectHeader">Bir Hesap Seç</span>
<div id="accountSelectList">
<div id="accountSelectListScrollable">
<!-- Accounts populated here. -->
</div>
</div>
<div id="accountSelectActions">
<button id="accountSelectConfirm" class="overlayKeybindEnter" type="submit">Select</button>
<button id="accountSelectConfirm" class="overlayKeybindEnter" type="submit">Seç</button>
<div id="accountSelectCancelWrapper">
<button id="accountSelectCancel" class="overlayKeybindEsc">Cancel</button>
<button id="accountSelectCancel" class="overlayKeybindEsc">İptal</button>
</div>
</div>
</div>
@ -33,7 +33,7 @@
<div id="overlayActionContainer">
<button id="overlayAcknowledge" class="overlayKeybindEnter">Conare Iterum</button>
<div id="overlayDismissWrapper">
<button id="overlayDismiss" style="display: none;" class="overlayKeybindEsc">Dismiss</button>
<button id="overlayDismiss" style="display: none;" class="overlayKeybindEsc">Reddet</button>
</div>
</div>
</div>

View File

@ -2,51 +2,29 @@
<div id="settingsContainerLeft">
<div id="settingsNavContainer">
<div id="settingsNavHeader">
<span id="settingsNavHeaderText">Settings</span>
<span id="settingsNavHeaderText">Ayarlar</span>
</div>
<div id="settingsNavItemsContainer">
<div id="settingsNavItemsContent">
<button class="settingsNavItem" rSc="settingsTabAccount" id="settingsNavAccount" selected>Account</button>
<button class="settingsNavItem" rSc="settingsTabMinecraft">Minecraft</button>
<button class="settingsNavItem" rSc="settingsTabMods">Mods</button>
<button class="settingsNavItem" rSc="settingsTabMinecraft" id="settingsNavAccount" selected>Minecraft</button>
<button class="settingsNavItem" rSc="settingsTabJava">Java</button>
<button class="settingsNavItem" rSc="settingsTabLauncher">Launcher</button>
<div class="settingsNavSpacer"></div>
<button class="settingsNavItem" rSc="settingsTabAbout">About</button>
<button class="settingsNavItem" rSc="settingsTabUpdate" id="settingsNavUpdate">Updates</button>
<button class="settingsNavItem" rSc="settingsTabAbout">Hakkında</button>
<div id="settingsNavContentBottom">
<div class="settingsNavDivider"></div>
<button id="settingsNavDone">Done</button>
<button id="settingsNavDone">Bitti</button>
</div>
</div>
</div>
</div>
</div>
<div id="settingsContainerRight">
<div id="settingsTabAccount" class="settingsTab">
<div id="settingsTabMinecraft" class="settingsTab">
<div class="settingsTabHeader">
<span class="settingsTabHeaderText">Account Settings</span>
<span class="settingsTabHeaderDesc">Add new accounts or manage existing ones.</span>
</div>
<div id="settingsAddAccountContainer">
<button id="settingsAddAccount">
<span id="settingsAddAccountText">&#43; Add Account</span>
</button>
</div>
<div id="settingsCurrentAccountsHeader">
<span class="settingsFieldTitle">Current Accounts</span>
</div>
<div id="settingsCurrentAccounts">
<!-- Auth accounts populated here. -->
</div>
</div>
<div id="settingsTabMinecraft" class="settingsTab" style="display: none;">
<div class="settingsTabHeader">
<span class="settingsTabHeaderText">Minecraft Settings</span>
<span class="settingsTabHeaderDesc">Options related to game launch.</span>
<span class="settingsTabHeaderText">Minecraft Ayarları</span>
<span class="settingsTabHeaderDesc">Ayarlar oyun başlatmayla ilişkilidir.</span>
</div>
<div id="settingsGameResolutionContainer">
<span class="settingsFieldTitle">Game Resolution</span>
<span class="settingsFieldTitle">Oyun Çözünürlüğü</span>
<div id="settingsGameResolutionContent">
<input type="number" id="settingsGameWidth" min="0" cValue="GameWidth">
<div id="settingsGameResolutionCross">&#10006;</div>
@ -55,7 +33,7 @@
</div>
<div class="settingsFieldContainer">
<div class="settingsFieldLeft">
<span class="settingsFieldTitle">Launch in fullscreen.</span>
<span class="settingsFieldTitle">Tam ekranda başlat.</span>
</div>
<div class="settingsFieldRight">
<label class="toggleSwitch">
@ -64,9 +42,9 @@
</label>
</div>
</div>
<div class="settingsFieldContainer">
<!--<div class="settingsFieldContainer">
<div class="settingsFieldLeft">
<span class="settingsFieldTitle">Automatically connect to the server on launch.</span>
<span class="settingsFieldTitle">Otomatik olarak sunucuya bağlan.</span>
</div>
<div class="settingsFieldRight">
<label class="toggleSwitch">
@ -77,8 +55,8 @@
</div>
<div class="settingsFieldContainer">
<div class="settingsFieldLeft">
<span class="settingsFieldTitle">Launch game process detached from launcher.</span>
<span class="settingsFieldDesc">If the game is not detached, closing the launcher will also close the game.</span>
<span class="settingsFieldTitle">Oyunu, başlatıcıdan bağımsız başlat.</span>
<span class="settingsFieldDesc">Eğer oyun bağımsız değilse, başlatıcı kapanırsa oyunda kapanır.</span>
</div>
<div class="settingsFieldRight">
<label class="toggleSwitch">
@ -86,97 +64,47 @@
<span class="toggleSwitchSlider"></span>
</label>
</div>
</div>
</div>
<div id="settingsTabMods" class="settingsTab" style="display: none;">
<div class="settingsTabHeader">
<span class="settingsTabHeaderText">Mod Settings</span>
<span class="settingsTabHeaderDesc">Enable or disable mods.</span>
</div>
<div id="settingsSelServContainer">
<div id="settingsSelServContent">
</div>
<div id="settingsSwitchServerContainer">
<div id="settingsSwitchServerContent">
<button id="settingsSwitchServerButton">Switch</button>
</div>
</div>
</div>
<div id="settingsModsContainer">
<div id="settingsReqModsContainer">
<div class="settingsModsHeader">Required Mods</div>
<div id="settingsReqModsContent">
</div>
</div>
<div id="settingsOptModsContainer">
<div class="settingsModsHeader">Optional Mods</div>
<div id="settingsOptModsContent">
</div>
</div>
<div id="settingsDropinModsContainer">
<div class="settingsModsHeader">Drop-in Mods</div>
<button id="settingsDropinFileSystemButton">+ Add Mods <span id="settingsDropinRefreshNote">(F5 to Refresh)</span></button>
<div id="settingsDropinModsContent">
</div>
</div>
<div id="settingsShadersContainer">
<div class="settingsModsHeader">Shaderpacks</div>
<div id="settingsShaderpackDesc">Enable or disable shaders. Please note, shaders will only run smoothly on powerful setups. You may add custom packs here.</div>
<div id="settingsShaderpackWrapper">
<button id="settingsShaderpackButton"> + </button>
<div class="settingsSelectContainer">
<div class="settingsSelectSelected" id="settingsShadersSelected">Select Shaderpack</div>
<div class="settingsSelectOptions" id="settingsShadersOptions" hidden>
</div>
</div>
</div>
</div>
</div>
</div>-->
</div>
<div id="settingsTabJava" class="settingsTab" style="display: none;">
<div class="settingsTabHeader">
<span class="settingsTabHeaderText">Java Settings</span>
<span class="settingsTabHeaderDesc">Manage the Java configuration (advanced).</span>
<span class="settingsTabHeaderText">Java Ayarları</span>
<span class="settingsTabHeaderDesc">Java ayarlarını yürüt (gelişmiş).</span>
</div>
<div id="settingsMemoryContainer">
<div id="settingsMemoryTitle">Memory</div>
<div id="settingsMemoryTitle">Hafıza</div>
<div id="settingsMemoryContent">
<div id="settingsMemoryContentLeft">
<div class="settingsMemoryContentItem">
<span class="settingsMemoryHeader">Maximum RAM</span>
<div class="settingsMemoryActionContainer">
<div id="settingsMaxRAMRange" class="rangeSlider" cValue="MaxRAM" min="3" max="8" value="3" step="0.5">
<div id="settingsMaxRAMRange" class="rangeSlider" cValue="MaxRAM" min="0.1" max="8" value="0.1" step="0.1">
<div class="rangeSliderBar"></div>
<div class="rangeSliderTrack"></div>
</div>
<span id="settingsMaxRAMLabel" class="settingsMemoryLabel">3G</span>
</div>
</div>
</div>
<div class="settingsMemoryContentItem">
<span class="settingsMemoryHeader">Minimum RAM</span>
<div class="settingsMemoryActionContainer">
<div id="settingsMinRAMRange" class="rangeSlider" cValue="MinRAM" min="3" max="8" value="3" step="0.5">
<div id="settingsMinRAMRange" class="rangeSlider" cValue="MinRAM" min="0.1" max="8" value="2" step="0.1">
<div class="rangeSliderBar"></div>
<div class="rangeSliderTrack"></div>
</div>
<span id="settingsMinRAMLabel" class="settingsMemoryLabel">3G</span>
</div>
</div>
<div id="settingsMemoryDesc">The recommended minimum RAM is 3 gigabytes. Setting the minimum and maximum values to the same value may reduce lag.</div>
<div id="settingsMemoryDesc">Önerilen en az RAM 3G'tır. En az ve en çok RAM miktarı aynı olursa oyunda donmalara neden olabilir.</div>
</div>
<div id="settingsMemoryContentRight">
<div id="settingsMemoryStatus">
<div class="settingsMemoryStatusContainer">
<span class="settingsMemoryStatusTitle">Total</span>
<span class="settingsMemoryStatusTitle">Toplam</span>
<span id="settingsMemoryTotal" class="settingsMemoryStatusValue">16G</span>
</div>
<div class="settingsMemoryStatusContainer">
<span class="settingsMemoryStatusTitle">Available</span>
<span class="settingsMemoryStatusTitle">Müsait</span>
<span id="settingsMemoryAvail" class="settingsMemoryStatusValue">7.3G</span>
</div>
</div>
@ -186,7 +114,7 @@
<div class="settingsFileSelContainer">
<div class="settingsFileSelTitle">Java Executable</div>
<div class="settingsFileSelContent">
<div id="settingsJavaExecDetails">Selected: Java 8 Update 172 (x64)</div>
<div id="settingsJavaExecDetails">Seçili: Java 8 Update 172 (x64)</div>
<div class="settingsFileSelActions">
<div class="settingsFileSelIcon">
<svg class="settingsFileSelSVG" x="0px" y="0px" viewBox="0 0 305.001 305.001">
@ -206,10 +134,10 @@
<button class="settingsFileSelButton" id="settingsJavaExecSel" dialogTitle="Select Java Executable" dialogDirectory="false">Choose File</button>
</div>
</div>
<div class="settingsFileSelDesc">The Java executable is validated before game launch. <strong>Requires Java 8 x64.</strong><br>The path should end with <strong>bin<%= process.platform === 'win32' ? '\\javaw.exe' : '/java' %></strong>.</div>
<div class="settingsFileSelDesc">Java programı oyun başlamadan önce doğrulandı. <strong>Gerektirir: Java 8 x64.</strong><br>Konum, <strong>bin<%= process.platform === 'win32' ? '\\javaw.exe' : '/java' %></strong> ile bitmelidir.</div>
</div>
<div id="settingsJVMOptsContainer">
<div id="settingsJVMOptsTitle">Additional JVM Options</div>
<div id="settingsJVMOptsTitle">Ek JVM Ayarları</div>
<div id="settingsJVMOptsContent">
<div class="settingsFileSelIcon">
<svg class="settingsFileSelSVG" x="0px" y="0px" viewBox="0 0 305.001 305.001">
@ -227,18 +155,18 @@
</div>
<input id="settingsJVMOptsVal" cValue="JVMOptions" type="text">
</div>
<div id="settingsJVMOptsDesc">Options to be provided to the JVM at runtime. <em>-Xms</em> and <em>-Xmx</em> should not be included.<br><a href="https://docs.oracle.com/javase/8/docs/technotes/tools/<%= process.platform === 'win32' ? 'windows' : 'unix' %>/java.html">Available Options for Java 8</a>.</div>
<div id="settingsJVMOptsDesc">Ayarlar çalışma süresinde JVM'ye sağlanır. <em>-Xms</em> ve <em>-Xmx</em> içermemelidir.<br><a href="https://docs.oracle.com/javase/8/docs/technotes/tools/<%= process.platform === 'win32' ? 'windows' : 'unix' %>/java.html">Java 8 için kullanılabilinir ayarlar</a>.</div>
</div>
</div>
<div id="settingsTabLauncher" class="settingsTab" style="display: none;">
<div class="settingsTabHeader">
<span class="settingsTabHeaderText">Launcher Settings</span>
<span class="settingsTabHeaderDesc">Options related to the launcher itself.</span>
<span class="settingsTabHeaderText">Başlatıcı Ayarları</span>
<span class="settingsTabHeaderDesc">Ayarlar başlatıcının kendisine yöneliktir.</span>
</div>
<div class="settingsFieldContainer">
<div class="settingsFieldLeft">
<span class="settingsFieldTitle">Allow Pre-Release Updates.</span>
<span class="settingsFieldDesc">Pre-Releases include new features which may have not been fully tested or integrated.<br>This will always be true if you are using a pre-release version.</span>
<span class="settingsFieldTitle">Pre-Release güncellemelerine izin ver.</span>
<span class="settingsFieldDesc">Pre-Release'ler tamamen test edilmemiş veya tamamlanmamış yeni özellikleri barındırır.<br>Eğer pre-release versiyonunu kullanıyorsan bu hep açık olur.</span>
</div>
<div class="settingsFieldRight">
<label class="toggleSwitch">
@ -249,7 +177,7 @@
</div>
<div class="settingsFileSelContainer">
<div class="settingsFileSelContent">
<div class="settingsFieldTitle" id="settingsDataDirTitle">Data Directory</div>
<div class="settingsFieldTitle" id="settingsDataDirTitle">Veri Dizini</div>
<div class="settingsFileSelActions">
<div class="settingsFileSelIcon">
<svg class="settingsFileSelSVG">
@ -264,47 +192,50 @@
<button class="settingsFileSelButton" dialogTitle="Select Data Directory" dialogDirectory="true">Choose Folder</button>
</div>
</div>
<div class="settingsFileSelDesc">All game files and local Java installations will be stored in the data directory.<br>Screenshots and world saves are stored in the instance folder for the corresponding server configuration.</div>
<div class="settingsFileSelDesc">Tüm oyun dosyaları ve java kurulumları veri dizininde depolanır.<br>Eran görüntüleri, ve dünya kayıtları, ilgili sunucu yapılandırması için ana klasörde saklanır.</div>
</div>
</div>
<div id="settingsTabAbout" class="settingsTab" style="display: none;">
<div class="settingsTabHeader">
<span class="settingsTabHeaderText">About</span>
<span class="settingsTabHeaderDesc">View information and release notes for the current version.</span>
<span class="settingsTabHeaderText">Hakkında</span>
<span class="settingsTabHeaderDesc">Mevcut versiyondaki sürüm notlarını ve bilgilere bak.</span>
</div>
<div id="settingsAboutCurrentContainer">
<div id="settingsAboutCurrentContent">
<div id="settingsAboutCurrentHeadline">
<img id="settingsAboutLogo" src="./assets/images/SealCircle.png">
<span id="settingsAboutTitle">Helios Launcher</span>
<img id="settingsAboutLogo" src="./assets/images/andr.gif">
<span id="settingsAboutTitle">Launcher</span>
</div>
<div id="settingsAboutCurrentVersion">
<div id="settingsAboutCurrentVersionCheck">&#10003;</div>
<div id="settingsAboutCurrentVersionDetails">
<span id="settingsAboutCurrentVersionTitle">Stable Release</span>
<span id="settingsAboutCurrentVersionTitle">Kararlı Sürüm</span>
<div id="settingsAboutCurrentVersionLine">
<span id="settingsAboutCurrentVersionText">Version </span>
<span id="settingsAboutCurrentVersionText">Versiyon </span>
<span id="settingsAboutCurrentVersionValue">0.0.1-alpha.12</span>
</div>
</div>
</div>
</div>
<div id="settingsAboutButtons">
<a href="https://github.com/dscalZi/HeliosLauncher" id="settingsAboutSourceButton" class="settingsAboutButton">Source (GitHub)</a>
<a class="settingsAboutButton">Credits: </a>
<!-- The following must be included in third-party usage. -->
<!-- <a href="https://github.com/dscalzi/HeliosLauncher" id="settingsAboutSourceButton" class="settingsAboutButton">Original Source</a> -->
<a href="https://github.com/dscalZi/HeliosLauncher/issues" id="settingsAboutSupportButton" class="settingsAboutButton">Support</a>
<a href="#" id="settingsAboutDevToolsButton" class="settingsAboutButton">DevTools Console</a>
<a id="settingsAboutSourceButton" style="display: none;"></a>
<a id="settingsAboutSupportButton" style="display: none;"></a>
<a id="settingsAboutDevToolsButton" style="display: none;"></a>
<a href="#" class="settingsAboutButton">Launcher by Herom123</a>
<a href="#" class="settingsAboutButton">Client by Ahmetyxa</a>
<a href="https://github.com/dscalzi/HeliosLauncher" id="settingsAboutSourceButton" class="settingsAboutButton">src</a>
</div>
</div>
<div class="settingsChangelogContainer">
<div class="settingsChangelogContent">
<div class="settingsChangelogHeadline">
<div class="settingsChangelogLabel">Release Notes</div>
<div class="settingsChangelogLabel">Sürüm Notları</div>
<div class="settingsChangelogTitle">Changelog</div>
</div>
<div class="settingsChangelogText">
No Release Notes
Sürüm Notu Yok
</div>
</div>
<div class="settingsChangelogActions">
@ -312,43 +243,6 @@
</div>
</div>
</div>
<div id="settingsTabUpdate" class="settingsTab" style="display: none;">
<div class="settingsTabHeader">
<span class="settingsTabHeaderText">Launcher Updates</span>
<span class="settingsTabHeaderDesc">Download, install, and review updates for the launcher.</span>
</div>
<div id="settingsUpdateStatusContainer">
<div id="settingsUpdateStatusContent">
<div id="settingsUpdateStatusHeadline">
<span id="settingsUpdateTitle">You Are Running the Latest Version</span>
</div>
<div id="settingsUpdateVersion">
<div id="settingsUpdateVersionCheck">&#10003;</div>
<div id="settingsUpdateVersionDetails">
<span id="settingsUpdateVersionTitle">Stable Release</span>
<div id="settingsUpdateVersionLine">
<span id="settingsUpdateVersionText">Version </span>
<span id="settingsUpdateVersionValue">0.0.1-alpha.18</span>
</div>
</div>
</div>
<div id="settingsUpdateActionContainer">
<button id="settingsUpdateActionButton">Check for Updates</button>
</div>
</div>
</div>
<div class="settingsChangelogContainer">
<div class="settingsChangelogContent">
<div class="settingsChangelogHeadline">
<div class="settingsChangelogLabel">What's New</div>
<div class="settingsChangelogTitle">Update Release Notes</div>
</div>
<div class="settingsChangelogText">
No Release Notes
</div>
</div>
</div>
</div>
</div>
<script src="./assets/js/scripts/settings.js"></script>
</div>

View File

@ -4,14 +4,14 @@
<div class="cloudBottom"></div>
</div>-->
<div id="welcomeContent">
<img id="welcomeImageSeal" src="assets/images/SealCircle.png"/>
<span id="welcomeHeader">WELCOME TO WESTEROSCRAFT</span>
<span id="welcomeDescription">Our mission is to recreate the universe imagined by author George RR Martin in his fantasy series, A Song of Ice and Fire. Through the collaborative effort of thousands of community members, we have sought to create Westeros as accurately and precisely as possible within Minecraft. The world we are creating is yours to explore. Journey from Dorne to Castle Black, and if you arent afraid, beyond the Wall itself, but best not delay. As the words of House Stark ominously warn: Winter is Coming.</span>
<img id="welcomeImageSeal" src="assets/images/andr.gif"/>
<span id="welcomeHeader">Andr'A HOSGELDIN</span>
<span id="welcomeDescription"></span>
<br>
<span id="welcomeDescCTA">You are just a few clicks away from Westeros.</span>
<span id="welcomeDescCTA">Andra'a sadece bir kaç tıklama uzaktasın!</span>
<button id="welcomeButton">
<div id="welcomeButtonContent">
CONTINUE
Devam Et
<svg id="welcomeSVG" viewBox="0 0 24.87 13.97">
<defs>
<style>.arrowLine{fill:none;stroke:#FFF;stroke-width:2px;transition: 0.25s ease;}</style>

View File

@ -18,10 +18,10 @@ function getCurrentPlatform(){
builder.build({
targets: (process.argv[2] != null && Platform[process.argv[2]] != null ? Platform[process.argv[2]] : getCurrentPlatform()).createTarget(),
config: {
appId: 'helioslauncher',
productName: 'Helios Launcher',
artifactName: '${productName}-setup-${version}.${ext}',
copyright: 'Copyright © 2018-2020 Daniel Scalzi',
appId: 'andrlauncher',
productName: 'AndrLauncher',
artifactName: '${productName}-setup-${version}-${arch}.${ext}',
copyright: 'Copyright © 2020-2020 Herom123',
directories: {
buildResources: 'build',
output: 'dist'
@ -38,7 +38,7 @@ builder.build({
oneClick: false,
perMachine: false,
allowElevation: true,
allowToChangeInstallationDirectory: true
allowToChangeInstallationDirectory: false
},
mac: {
target: 'dmg',
@ -46,10 +46,10 @@ builder.build({
},
linux: {
target: 'AppImage',
maintainer: 'Daniel Scalzi',
vendor: 'Daniel Scalzi',
synopsis: 'Modded Minecraft Launcher',
description: 'Custom launcher which allows users to join modded servers. All mods, configurations, and updates are handled automatically.',
maintainer: 'Herom123',
vendor: 'Herom123',
synopsis: 'Client Launcher',
description: 'Otamik olarak sunucuya client ile bağlayan başlatma uygulaması.',
category: 'Game'
},
compression: 'maximum',
@ -57,7 +57,8 @@ builder.build({
'!{dist,.gitignore,.vscode,docs,dev-app-update.yml,.travis.yml,.nvmrc,.eslintrc.json,build.js}'
],
extraResources: [
'libraries'
'libraries',
'instance'
],
asar: true
}

BIN
build/andr.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1020 KiB

BIN
build/icon.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 120 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 142 KiB

After

Width:  |  Height:  |  Size: 74 KiB

View File

@ -1,3 +0,0 @@
owner: dscalzi
repo: HeliosLauncher
provider: github

View File

@ -1,438 +0,0 @@
# Distribution Index
You can use [Nebula](https://github.com/dscalzi/Nebula) to automate the generation of a distribution index.
The distribution index is written in JSON. The general format of the index is as posted below.
```json
{
"version": "1.0.0",
"discord": {
"clientId": "12334567890123456789",
"smallImageText": "WesterosCraft",
"smallImageKey": "seal-circle"
},
"rss": "https://westeroscraft.com/articles/index.rss",
"servers": [
{
"id": "Example_Server",
"name": "WesterosCraft Example Client",
"description": "Example WesterosCraft server. Connect for fun!",
"icon": "http://mc.westeroscraft.com/WesterosCraftLauncher/files/example_icon.png",
"version": "0.0.1",
"address": "mc.westeroscraft.com:1337",
"minecraftVersion": "1.11.2",
"discord": {
"shortId": "Example",
"largeImageText": "WesterosCraft Example Server",
"largeImageKey": "server-example"
},
"mainServer": true,
"autoconnect": true,
"modules": [
"Module Objects Here"
]
}
]
}
```
## Distro Index Object
#### Example
```JSON
{
"version": "1.0.0",
"discord": {
"clientId": "12334567890123456789",
"smallImageText": "WesterosCraft",
"smallImageKey": "seal-circle"
},
"rss": "https://westeroscraft.com/articles/index.rss",
"servers": []
}
```
### `DistroIndex.version: string/semver`
The version of the index format. Will be used in the future to gracefully push updates.
### `DistroIndex.discord: object`
Global settings for [Discord Rich Presence](https://discordapp.com/developers/docs/rich-presence/how-to).
**Properties**
* `discord.clientId: string` - Client ID for th Application registered with Discord.
* `discord.smallImageText: string` - Tootltip for the `smallImageKey`.
* `discord.smallImageKey: string` - Name of the uploaded image for the small profile artwork.
### `DistroIndex.rss: string/url`
A URL to a RSS feed. Used for loading news.
---
## Server Object
#### Example
```JSON
{
"id": "Example_Server",
"name": "WesterosCraft Example Client",
"description": "Example WesterosCraft server. Connect for fun!",
"icon": "http://mc.westeroscraft.com/WesterosCraftLauncher/files/example_icon.png",
"version": "0.0.1",
"address": "mc.westeroscraft.com:1337",
"minecraftVersion": "1.11.2",
"discord": {
"shortId": "Example",
"largeImageText": "WesterosCraft Example Server",
"largeImageKey": "server-example"
},
"mainServer": true,
"autoconnect": true,
"modules": []
}
```
### `Server.id: string`
The ID of the server. The launcher saves mod configurations and selected servers by ID. If the ID changes, all data related to the old ID **will be wiped**.
### `Server.name: string`
The name of the server. This is what users see on the UI.
### `Server.description: string`
A brief description of the server. Displayed on the UI to provide users more information.
### `Server.icon: string/url`
A URL to the server's icon. Will be displayed on the UI.
### `Server.version: string/semver`
The version of the server configuration.
### `Server.address: string/url`
The server's IP address.
### `Server.minecraftVersion: string`
The version of minecraft that the server is running.
### `Server.discord: object`
Server specific settings used for [Discord Rich Presence](https://discordapp.com/developers/docs/rich-presence/how-to).
**Properties**
* `discord.shortId: string` - Short ID for the server. Displayed on the second status line as `Server: shortId`
* `discord.largeImageText: string` - Ttooltip for the `largeImageKey`.
* `discord.largeImageKey: string` - Name of the uploaded image for the large profile artwork.
### `Server.mainServer: boolean`
Only one server in the array should have the `mainServer` property enabled. This will tell the launcher that this is the default server to select if either the previously selected server is invalid, or there is no previously selected server. If this field is not defined by any server (avoid this), the first server will be selected as the default. If multiple servers have `mainServer` enabled, the first one the launcher finds will be the effective value. Servers which are not the default may omit this property rather than explicitly setting it to false.
### `Server.autoconnect: boolean`
Whether or not the server can be autoconnected to. If false, the server will not be autoconnected to even when the user has the autoconnect setting enabled.
### `Server.modules: Module[]`
An array of module objects.
---
## Module Object
A module is a generic representation of a file required to run the minecraft client.
#### Example
```JSON
{
"id": "com.example:artifact:1.0.0@jar.pack.xz",
"name": "Artifact 1.0.0",
"type": "Library",
"artifact": {
"size": 4231234,
"MD5": "7f30eefe5c51e1ae0939dab2051db75f",
"url": "http://files.site.com/maven/com/example/artifact/1.0.0/artifact-1.0.0.jar.pack.xz"
},
"subModules": [
{
"id": "examplefile",
"name": "Example File",
"type": "File",
"artifact": {
"size": 23423,
"MD5": "169a5e6cf30c2cc8649755cdc5d7bad7",
"path": "examplefile.txt",
"url": "http://files.site.com/examplefile.txt"
}
}
]
}
```
The parent module will be stored maven style, it's destination path will be resolved by its id. The sub module has a declared `path`, so that value will be used.
### `Module.id: string`
The ID of the module. All modules that are not of type `File` **MUST** use a maven identifier. Version information and other metadata is pulled from the identifier. Modules which are stored maven style use the identifier to resolve the destination path. If the `extension` is not provided, it defaults to `jar`.
**Template**
`my.group:arifact:version@extension`
`my/group/artifact/version/artifact-version.extension`
**Example**
`net.minecraft:launchwrapper:1.12` OR `net.minecraft:launchwrapper:1.12@jar`
`net/minecraft/launchwrapper/1.12/launchwrapper-1.12.jar`
If the module's artifact does not declare the `path` property, its path will be resolved from the ID.
### `Module.name: string`
The name of the module. Used on the UI.
### `Module.type: string`
The type of the module.
### `Module.required: Required`
**OPTIONAL**
Defines whether or not the module is required. If omitted, then the module will be required.
Only applicable for modules of type:
* `ForgeMod`
* `LiteMod`
* `LiteLoader`
### `Module.artifact: Artifact`
The download artifact for the module.
### `Module.subModules: Module[]`
**OPTIONAL**
An array of sub modules declared by this module. Typically, files which require other files are declared as submodules. A quick example would be a mod, and the configuration file for that mod. Submodules can also declare submodules of their own. The file is parsed recursively, so there is no limit.
## Artifact Object
The format of the module's artifact depends on several things. The most important factor is where the file will be stored. If you are providing a simple file to be placed in the root directory of the client files, you may decided to format the module as the `examplefile` module declared above. This module provides a `path` option, allowing you to directly set where the file will be saved to. Only the `path` will affect the final downloaded file.
Other times, you may want to store the files maven-style, such as with libraries and mods. In this case you must declare the module as the example artifact above. The module `id` will be used to resolve the final path, effectively replacing the `path` property. It must be provided in maven format. More information on this is provided in the documentation for the `id` property.
The resolved/provided paths are appended to a base path depending on the module's declared type.
| Type | Path |
| ---- | ---- |
| `ForgeHosted` | ({`commonDirectory`}/libraries/{`path` OR resolved}) |
| `LiteLoader` | ({`commonDirectory`}/libraries/{`path` OR resolved}) |
| `Library` | ({`commonDirectory`}/libraries/{`path` OR resolved}) |
| `ForgeMod` | ({`commonDirectory`}/modstore/{`path` OR resolved}) |
| `LiteMod` | ({`commonDirectory`}/modstore/{`path` OR resolved}) |
| `File` | ({`instanceDirectory`}/{`Server.id`}/{`path` OR resolved}) |
The `commonDirectory` and `instanceDirectory` values are stored in the launcher's config.json.
### `Artifact.size: number`
The size of the artifact.
### `Artifact.MD5: string`
The MD5 hash of the artifact. This will be used to validate local artifacts.
### `Artifact.path: string`
**OPTIONAL**
A relative path to where the file will be saved. This is appended to the base path for the module's declared type.
If this is not specified, the path will be resolved based on the module's ID.
### `Artifact.url: string/url`
The artifact's download url.
## Required Object
### `Required.value: boolean`
**OPTIONAL**
If the module is required. Defaults to true if this property is omited.
### `Required.def: boolean`
**OPTIONAL**
If the module is enabled by default. Has no effect unless `Required.value` is false. Defaults to true if this property is omited.
---
## Module Types
### ForgeHosted
The module type `ForgeHosted` represents forge itself. Currently, the launcher only supports forge servers, as vanilla servers can be connected to via the mojang launcher. The `Hosted` part is key, this means that the forge module must declare its required libraries as submodules.
Ex.
```json
{
"id": "net.minecraftforge:forge:1.11.2-13.20.1.2429",
"name": "Minecraft Forge 1.11.2-13.20.1.2429",
"type": "ForgeHosted",
"artifact": {
"size": 4450992,
"MD5": "3fcc9b0104f0261397d3cc897e55a1c5",
"url": "http://files.minecraftforge.net/maven/net/minecraftforge/forge/1.11.2-13.20.1.2429/forge-1.11.2-13.20.1.2429-universal.jar"
},
"subModules": [
{
"id": "net.minecraft:launchwrapper:1.12",
"name": "Mojang (LaunchWrapper)",
"type": "Library",
"artifact": {
"size": 32999,
"MD5": "934b2d91c7c5be4a49577c9e6b40e8da",
"url": "http://mc.westeroscraft.com/WesterosCraftLauncher/files/1.11.2/launchwrapper-1.12.jar"
}
}
]
}
```
All of forge's required libraries are declared in the `version.json` file found in the root of the forge jar file. These libraries MUST be hosted and declared a submodules or forge will not work.
There were plans to add a `Forge` type, in which the required libraries would be resolved by the launcher and downloaded from forge's servers. The forge servers are down at times, however, so this plan was stopped half-implemented.
---
### LiteLoader
The module type `LiteLoader` represents liteloader. It is handled as a library and added to the classpath at runtime. Special launch conditions are executed when liteloader is present and enabled. This module can be optional and toggled similarly to `ForgeMod` and `Litemod` modules.
Ex.
```json
{
"id": "com.mumfrey:liteloader:1.11.2",
"name": "Liteloader (1.11.2)",
"type": "LiteLoader",
"required": {
"value": false,
"def": false
},
"artifact": {
"size": 1685422,
"MD5": "3a98b5ed95810bf164e71c1a53be568d",
"url": "http://mc.westeroscraft.com/WesterosCraftLauncher/files/1.11.2/liteloader-1.11.2.jar"
},
"subModules": [
"All LiteMods go here"
]
}
```
---
### Library
The module type `Library` represents a library file which will be required to start the minecraft process. Each library module will be dynamically added to the `-cp` (classpath) argument while building the game process.
Ex.
```json
{
"id": "net.sf.jopt-simple:jopt-simple:4.6",
"name": "Jopt-simple 4.6",
"type": "Library",
"artifact": {
"size": 62477,
"MD5": "13560a58a79b46b82057686543e8d727",
"url": "http://mc.westeroscraft.com/WesterosCraftLauncher/files/1.11.2/jopt-simple-4.6.jar"
}
}
```
---
### ForgeMod
The module type `ForgeMod` represents a mod loaded by the Forge Mod Loader (FML). These files are stored maven-style and passed to FML using forge's [Modlist format](https://github.com/MinecraftForge/FML/wiki/New-JSON-Modlist-format).
Ex.
```json
{
"id": "com.westeroscraft:westerosblocks:3.0.0-beta-6-133",
"name": "WesterosBlocks (3.0.0-beta-6-133)",
"type": "ForgeMod",
"artifact": {
"size": 16321712,
"MD5": "5a89e2ab18916c18965fc93a0766cc6e",
"url": "http://mc.westeroscraft.com/WesterosCraftLauncher/prod-1.11.2/mods/WesterosBlocks.jar"
}
}
```
---
### LiteMod
The module type `LiteMod` represents a mod loaded by liteloader. These files are stored maven-style and passed to liteloader using forge's [Modlist format](https://github.com/MinecraftForge/FML/wiki/New-JSON-Modlist-format). Documentation for liteloader's implementation of this can be found on [this issue](http://develop.liteloader.com/liteloader/LiteLoader/issues/34).
Ex.
```json
{
"id": "com.mumfrey:macrokeybindmod:0.14.4-1.11.2@litemod",
"name": "Macro/Keybind Mod (0.14.4-1.11.2)",
"type": "LiteMod",
"required": {
"value": false,
"def": false
},
"artifact": {
"size": 1670811,
"MD5": "16080785577b391d426c62c8d3138558",
"url": "http://mc.westeroscraft.com/WesterosCraftLauncher/prod-1.11.2/mods/macrokeybindmod.litemod"
}
}
```
---
### File
The module type `file` represents a generic file required by the client, another module, etc. These files are stored in the server's instance directory.
Ex.
```json
{
"id": "com.westeroscraft:westeroscraftrp:2017-08-16",
"name": "WesterosCraft Resource Pack (2017-08-16)",
"type": "file",
"artifact": {
"size": 45241339,
"MD5": "ec2d9fdb14d5c2eafe5975a240202f1a",
"path": "resourcepacks/WesterosCraft.zip",
"url": "http://mc.westeroscraft.com/WesterosCraftLauncher/prod-1.11.2/resourcepacks/WesterosCraft.zip"
}
}
```

File diff suppressed because it is too large Load Diff

View File

@ -1,95 +1,11 @@
// Requirements
const { app, BrowserWindow, ipcMain, Menu } = require('electron')
const autoUpdater = require('electron-updater').autoUpdater
const ejse = require('ejs-electron')
const fs = require('fs')
const isDev = require('./app/assets/js/isdev')
const path = require('path')
const semver = require('semver')
const url = require('url')
// Setup auto updater.
function initAutoUpdater(event, data) {
if(data){
autoUpdater.allowPrerelease = true
} else {
// Defaults to true if application version contains prerelease components (e.g. 0.12.1-alpha.1)
// autoUpdater.allowPrerelease = true
}
if(isDev){
autoUpdater.autoInstallOnAppQuit = false
autoUpdater.updateConfigPath = path.join(__dirname, 'dev-app-update.yml')
}
if(process.platform === 'darwin'){
autoUpdater.autoDownload = false
}
autoUpdater.on('update-available', (info) => {
event.sender.send('autoUpdateNotification', 'update-available', info)
})
autoUpdater.on('update-downloaded', (info) => {
event.sender.send('autoUpdateNotification', 'update-downloaded', info)
})
autoUpdater.on('update-not-available', (info) => {
event.sender.send('autoUpdateNotification', 'update-not-available', info)
})
autoUpdater.on('checking-for-update', () => {
event.sender.send('autoUpdateNotification', 'checking-for-update')
})
autoUpdater.on('error', (err) => {
event.sender.send('autoUpdateNotification', 'realerror', err)
})
}
// Open channel to listen for update actions.
ipcMain.on('autoUpdateAction', (event, arg, data) => {
switch(arg){
case 'initAutoUpdater':
console.log('Initializing auto updater.')
initAutoUpdater(event, data)
event.sender.send('autoUpdateNotification', 'ready')
break
case 'checkForUpdate':
autoUpdater.checkForUpdates()
.catch(err => {
event.sender.send('autoUpdateNotification', 'realerror', err)
})
break
case 'allowPrereleaseChange':
if(!data){
const preRelComp = semver.prerelease(app.getVersion())
if(preRelComp != null && preRelComp.length > 0){
autoUpdater.allowPrerelease = true
} else {
autoUpdater.allowPrerelease = data
}
} else {
autoUpdater.allowPrerelease = data
}
break
case 'installUpdateNow':
autoUpdater.quitAndInstall()
break
default:
console.log('Unknown argument', arg)
break
}
})
// Redirect distribution index event from preloader to renderer.
ipcMain.on('distributionIndexDone', (event, res) => {
event.sender.send('distributionIndexDone', res)
})
// Disable hardware acceleration.
// https://electronjs.org/docs/tutorial/offscreen-rendering
app.disableHardwareAcceleration()
// https://github.com/electron/electron/issues/18397
app.allowRendererProcessReuse = true
// 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.
let win
function createWindow() {
@ -104,7 +20,9 @@ function createWindow() {
nodeIntegration: true,
contextIsolation: false,
enableRemoteModule: true,
worldSafeExecuteJavaScript: true
worldSafeExecuteJavaScript: true,
webviewTag: true, // Security warning since Electron 10
zoomFactor: 1.0,
},
backgroundColor: '#171614'
})
@ -116,14 +34,14 @@ function createWindow() {
protocol: 'file:',
slashes: true
}))
/*win.once('ready-to-show', () => {
win.show()
})*/
win.removeMenu()
win.resizable = true
win.resizable = false
win.on('closed', () => {
win = null
@ -227,4 +145,4 @@ app.on('activate', () => {
if (win === null) {
createWindow()
}
})
})

3290
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -1,52 +1,36 @@
{
"name": "helioslauncher",
"version": "1.8.0",
"productName": "Helios Launcher",
"description": "Modded Minecraft Launcher",
"author": "Daniel Scalzi (https://github.com/dscalzi/)",
"license": "UNLICENSED",
"homepage": "https://github.com/dscalzi/HeliosLauncher",
"bugs": {
"url": "https://github.com/dscalzi/HeliosLauncher/issues"
},
"private": true,
"main": "index.js",
"scripts": {
"start": "electron .",
"cilinux": "node build.js WINDOWS && node build.js LINUX",
"cidarwin": "node build.js MAC",
"dist": "cross-env ELECTRON_BUILDER_ALLOW_UNRESOLVED_DEPENDENCIES=true node build.js",
"dist:win": "npm run dist -- WINDOWS",
"dist:mac": "npm run dist -- MAC",
"dist:linux": "npm run dist -- LINUX",
"lint": "eslint --config .eslintrc.json ."
},
"engines": {
"node": "12.x.x"
},
"dependencies": {
"adm-zip": "^0.5.1",
"async": "^3.2.0",
"discord-rpc": "^3.1.4",
"ejs": "^3.1.5",
"ejs-electron": "^2.1.1",
"electron-updater": "^4.3.5",
"fs-extra": "^9.0.1",
"github-syntax-dark": "^0.5.0",
"jquery": "^3.5.1",
"request": "^2.88.2",
"semver": "^7.3.4",
"tar-fs": "^2.1.1",
"winreg": "^1.2.4"
},
"devDependencies": {
"cross-env": "^7.0.3",
"electron": "^11.0.5",
"electron-builder": "^22.9.1",
"eslint": "^7.15.0"
},
"repository": {
"type": "git",
"url": "git+https://github.com/dscalzi/HeliosLauncher.git"
}
}
{
"name": "andrlauncher",
"version": "1.0.0",
"productName": "AndrLauncher",
"description": "https://github.com/dscalzi/HeliosLauncher",
"author": "Daniel Scalzi",
"license": "No",
"main": "index.js",
"dependencies": {
"adm-zip": "^0.4.16",
"async": "^3.2.0",
"checksum": "^0.1.1",
"ejs": "^3.1.5",
"ejs-electron": "^2.1.1",
"electron-root-path": "^1.0.16",
"fs-extra": "^9.0.1",
"github-syntax-dark": "^0.5.0",
"jquery": "^3.5.1",
"node-machine-id": "^1.1.12",
"request": "^2.88.2",
"semver": "^7.3.2",
"tar-fs": "^2.1.0",
"uuid": "^8.3.2",
"winreg": "^1.2.4"
},
"scripts": {
"start": "electron .",
"dist": "cross-env ELECTRON_BUILDER_ALLOW_UNRESOLVED_DEPENDENCIES=true node build.js"
},
"devDependencies": {
"cross-env": "^7.0.2",
"electron": "^10.1.1",
"electron-builder": "^22.8.0",
"eslint": "^7.9.0"
}
}