Skip to content

Commit

Permalink
v0.6.3c
Browse files Browse the repository at this point in the history
- Улучшен код.
- Исправлен баг при повторном запуске программы после добавления мода.
- Добавлено сообщение о неудаче добавления мода.
- Добавлено уведомление о перезагрузке программы для добавления мода.
- Все окна загрузки объединены в одно.
  • Loading branch information
VerZsuT committed Sep 1, 2021
1 parent 97f21e8 commit 2edcf98
Show file tree
Hide file tree
Showing 66 changed files with 1,757 additions and 1,196 deletions.
24 changes: 19 additions & 5 deletions docs/download.html
Original file line number Diff line number Diff line change
@@ -1,23 +1,27 @@
<!DOCTYPE html>
<html>

<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="Скачать SnowRunner XML Editor Desktop (последняя версия).">
<meta name="keywords" content="SnowRunner XML Editor Desktop, SnowRunner XML Editor, SnowRunner, XML, Editor, Desktop, скачать, бесплатно, редактор, редактор файлов, редактор файлов SnowRunner">
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.0-beta3/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-eOJMYsd53ii+scO/bJGFsiCZc+5NDVN2yr8+0RDqr0Ql0h+rP48ckxlpbzKgwra6" crossorigin="anonymous">
<meta name="keywords"
content="SnowRunner XML Editor Desktop, SnowRunner XML Editor, SnowRunner, XML, Editor, Desktop, скачать, бесплатно, редактор, редактор файлов, редактор файлов SnowRunner">
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.0-beta3/dist/css/bootstrap.min.css" rel="stylesheet"
integrity="sha384-eOJMYsd53ii+scO/bJGFsiCZc+5NDVN2yr8+0RDqr0Ql0h+rP48ckxlpbzKgwra6" crossorigin="anonymous">
<link rel="stylesheet" href="./style.css">
<script defer src="./script.js"></script>
<title>Скачать SnowRunner XML Editor Desktop</title>
</head>

<body>
<header>
<h1 class="h1 red-text">SnowRunner XML Editor Desktop</h1>
</header>

<div class="release">
<h2 class="title">v0.6.3b (новейший)</h2>
<h2 class="title">v0.6.3c (новейший)</h2>
<div class="description">
<ul>
<b>v0.6.3</b>
Expand All @@ -26,7 +30,8 @@ <h2 class="title">v0.6.3b (новейший)</h2>
<li>Добавлена возможность ручного выбора .pak файла модификации.</li>
<li>Добавлены картинки для 'Tatra 805' и 'Tatra T813'.</li>
<li>Исправлен баг в DE переводе.</li>
<li>Немного изменены названия настроек. Убрано 'показывать окно WinRAR' и 'не вставлять подпись'.</li>
<li>Немного изменены названия настроек. Убрано 'показывать окно WinRAR' и 'не вставлять подпись'.
</li>
</ul>
<b>v0.6.3a</b>
<ul>
Expand All @@ -38,9 +43,17 @@ <h2 class="title">v0.6.3b (новейший)</h2>
<ul>
<li>Теперь если программа не находит DLC, то она отключает их поддержку.</li>
</ul>
<b>v0.6.3c</b>
<ul>
<li>Улучшен код.</li>
<li>Исправлен баг при повторном запуске программы после добавления мода.</li>
<li>Добавлено сообщение о неудаче добавления мода.</li>
<li>Добавлено уведомление о перезагрузке программы для добавления мода.</li>
<li>Все окна загрузки объединены в одно.</li>
</ul>
</ul>
</div>
<button class="download btn btn-primary" version="v0.6.3b">Скачать</button>
<button class="download btn btn-primary" version="v0.6.3c">Скачать</button>
</div>

<div class="release">
Expand Down Expand Up @@ -80,4 +93,5 @@ <h2 class="title">v0.5.8</h2>
<button class="download btn btn-primary" version="v0.5.8">Скачать</button>
</div>
</body>

</html>
5 changes: 4 additions & 1 deletion docs/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,10 @@ header {
border-bottom: 1px solid lightgray;
}

a:hover { background: rgb(64 124 199); }
a:hover {
background: rgb(64 124 199);
}

a:active {
background: rgb(64 87 199);
box-shadow: 0 3px rgb(64 87 199) inset;
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Large diffs are not rendered by default.

36 changes: 35 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1 +1,35 @@
{"name":"snowrunner-xml-editor-desktop","productName":"SnowRunner XML Editor","version":"0.6.3b","description":"Allows you to visually edit the game's XML files.","repository":{"type":"git","url":"https://github.com/VerZsuT/SnowRunner-XML-Editor-Desktop.git"},"main":"src/app/index.js","scripts":{"start":"electron-forge start","build":"node preBuild.js && npm run package && node postBuild.js","package":"electron-forge package --platform=win32 --arch=ia32"},"keywords":[],"author":{"name":"VerZsuT","email":"verzsut@gmail.com"},"license":"MIT","config":{"forge":{"packagerConfig":{"ignore":["node_modules","docs","postBuild.js","preBuild.js",".gitignore"],"icon":"./src/icons/favicon.ico"}}},"devDependencies":{"@electron-forge/cli":"^6.0.0-beta.54","electron":"^12.0.2"},"dependencies":{}}
{
"name": "snowrunner-xml-editor-desktop",
"productName": "SnowRunner XML Editor",
"version": "0.6.3c",
"description": "Allows you to visually edit the game's XML files.",
"repository": {
"type": "git",
"url": "https://github.com/VerZsuT/SnowRunner-XML-Editor-Desktop.git"
},
"main": "src/app/index.js",
"scripts": {
"start": "electron-forge start",
"build": "node preBuild.js && npm run package && node postBuild.js",
"package": "electron-forge package --platform=win32 --arch=ia32"
},
"keywords": [],
"author": {
"name": "VerZsuT",
"email": "verzsut@gmail.com"
},
"license": "MIT",
"config": {
"forge": {
"packagerConfig": {
"ignore": ["node_modules", "docs", "postBuild.js", "preBuild.js", ".gitignore"],
"icon": "./src/icons/favicon.ico"
}
}
},
"devDependencies": {
"@electron-forge/cli": "^6.0.0-beta.54",
"electron": "^12.0.2"
},
"dependencies": {}
}
30 changes: 24 additions & 6 deletions postBuild.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,21 @@
const { execSync } = require('child_process')
const { createHash } = require('crypto')
const { renameSync, readdirSync, statSync, readFileSync, writeFileSync, rmdirSync, existsSync, rmSync } = require('fs')
const { join } = require('path')
const {
execSync
} = require('child_process')
const {
createHash
} = require('crypto')
const {
renameSync,
readdirSync,
statSync,
readFileSync,
writeFileSync,
existsSync,
rmSync
} = require('fs')
const {
join
} = require('path')

const paths = {
out: join(__dirname, 'out'),
Expand Down Expand Up @@ -41,9 +55,13 @@ if (existsSync(paths.sxmle_updater)) {
console.log('[POST_BUILD][STAGE_3]: Success.')

console.log('[POST_BUILD][STAGE_3]: Adding files for auto update...')
rmSync(join(paths.sxmle_updater, 'files'), {recursive: true})
rmSync(join(paths.sxmle_updater, 'files'), {
recursive: true
})
renameSync(join(paths.renamed, 'resources', 'app'), join(paths.sxmle_updater, 'files'))
rmSync(join(paths.renamed), {recursive: true})
rmSync(join(paths.renamed), {
recursive: true
})
console.log('[POST_BUILD][STAGE_3]: Success.')
}

Expand Down
21 changes: 17 additions & 4 deletions preBuild.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
const { rmSync, mkdirSync, readFileSync, existsSync, writeFileSync } = require('fs')
const { join } = require('path')
const {
rmSync,
mkdirSync,
readFileSync,
existsSync,
writeFileSync
} = require('fs')
const {
join
} = require('path')

const paths = {
out: join(__dirname, 'out'),
Expand All @@ -9,7 +17,9 @@ const paths = {
public: join(__dirname, '..', 'sxmle_updater', 'public.json')
}

rmSync(paths.out, {recursive: true})
rmSync(paths.out, {
recursive: true
})
mkdirSync(paths.out)

console.log('[PRE_BUILD][LOG]: Processing pre build...')
Expand All @@ -24,7 +34,10 @@ console.log('[PRE_BUILD][STAGE_1]: Reading package-lock.json...')
const packageLock = JSON.parse(readFileSync(paths.packageLock).toString())
console.log('[PRE_BUILD][STAGE_1]: Success.')
console.log('[PRE_BUILD][STAGE_1]: Reading public.json...')
let public = {latestVersion: '', canAutoUpdate: true}
let public = {
latestVersion: '',
canAutoUpdate: true
}
if (existsSync(paths.public)) {
public = JSON.parse(readFileSync(paths.public).toString())
}
Expand Down
2 changes: 1 addition & 1 deletion src/app/config.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "0.6.3b",
"version": "0.6.3c",
"lang": "EN",
"buildType": "dev",
"paths": {
Expand Down
Binary file added src/app/docs/config.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 2edcf98

Please sign in to comment.