Skip to content

(devtool) installer text adjustment #441

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 35 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
74cb4cc
Update de.json
jzy-chitong56 Nov 22, 2024
e1e2f0b
Update de.json
jzy-chitong56 Nov 22, 2024
6466d0d
Update de.json
jzy-chitong56 Nov 22, 2024
0fd51f4
Update de.json
jzy-chitong56 Nov 22, 2024
e14b66d
Update en.json
jzy-chitong56 Nov 22, 2024
7ffc718
Update de.json
jzy-chitong56 Nov 22, 2024
7977523
Update en.json
jzy-chitong56 Nov 22, 2024
4afd3ff
Update es.json
jzy-chitong56 Nov 22, 2024
901681f
Update de.json
jzy-chitong56 Nov 22, 2024
974fa1a
Update fr.json
jzy-chitong56 Nov 22, 2024
9f0ca64
Update no.json
jzy-chitong56 Nov 22, 2024
d2a1292
Update pt.json
jzy-chitong56 Nov 22, 2024
946c325
Update ro.json
jzy-chitong56 Nov 22, 2024
1f94e67
Update ru.json
jzy-chitong56 Nov 22, 2024
4b9c3cc
Update sv.json
jzy-chitong56 Nov 22, 2024
271b46b
Update zh.json
jzy-chitong56 Nov 22, 2024
418e603
Update zh.json
jzy-chitong56 Nov 22, 2024
f580259
Update main.ts
jzy-chitong56 Nov 22, 2024
23450e7
Update zh.json
jzy-chitong56 Nov 22, 2024
7e6c150
Update zh.json
jzy-chitong56 Nov 22, 2024
5c2126f
Update MakeVERBase.bat
jzy-chitong56 Nov 22, 2024
2a5c137
Update main.ts
jzy-chitong56 Nov 22, 2024
7d4808c
更新 install.js
jzy-chitong56 Nov 22, 2024
375aa01
Update menu.service.ts
jzy-chitong56 Nov 30, 2024
5d3b374
Update install.js
jzy-chitong56 Nov 30, 2024
842087d
Add files via upload
jzy-chitong56 Nov 30, 2024
5d43eee
Update InstallAppointVERToMap.bat
jzy-chitong56 Nov 30, 2024
87fdc04
Update InstallAppointVERToMap.bat
jzy-chitong56 Dec 8, 2024
9e96eab
Update InstallAppointVERToMap.bat
jzy-chitong56 Dec 9, 2024
8295e6d
Update InstallAppointVERToMap.bat
jzy-chitong56 Dec 10, 2024
910d5ff
Update package.json
jzy-chitong56 Dec 10, 2024
edf1072
Update main.ts
jzy-chitong56 Dec 10, 2024
01f3e7a
Update main.ts
jzy-chitong56 Dec 10, 2024
182e39c
Update main.ts
jzy-chitong56 Dec 10, 2024
836ace7
fix
jzy-chitong56 Mar 15, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 23 additions & 3 deletions Electron/AMAI-release/install.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,8 @@ const installOnDirectory = async () => {
process.send(`ERROR: Cannot find ${process.cwd()}\\${blizzardPath}`)
return
}
if (vsAICommander && !fs.existsSync(`Scripts\\${ver}\\vsai\Blizzard.j`)) {
process.send(`ERROR: Cannot find ${process.cwd()}\\Scripts\\${ver}\\vsai\Blizzard.j`)
if (vsAICommander && !fs.existsSync(`Scripts\\${ver}\\vsai\\Blizzard.j`)) {
process.send(`ERROR: Cannot find ${process.cwd()}\\Scripts\\${ver}\\vsai\\Blizzard.j`)
return
}

Expand Down Expand Up @@ -163,7 +163,7 @@ const installOnDirectory = async () => {
[
'a',
file,
`Scripts\\${ver}\\vsai\*.ai`,
`Scripts\\${ver}\\vsai\\*.ai`,
`Scripts`
],
{ encoding : `utf8` }
Expand Down Expand Up @@ -207,6 +207,26 @@ const installOnDirectory = async () => {
process.send(f2AddToMPQ.error.message)
: process.send(installCommander ? `Installing commander ${file}` : `Installing VS Vanilla AI commander ${file}`);

} else {
const f2AddToMPQ = spawnSync(
`MPQEditor.exe`,
Copy link
Owner

@SMUnlimited SMUnlimited Nov 30, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is dangerous, as uninstalling all the time could break maps that never installed the commander but do have a custom blizzard.j.

This needs to be an option or new menu options to run the uninstalls.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are a few buttons, it may be necessary to readjust the layout

[
'd',
file,
`Scripts\\Blizzard.j`,
],
{ encoding : `utf8` }
);
if (f2AddToMPQ.status == 5) {
process.send(`WARN: ${file} to disable ${bj} script failed, you may not have valid permissions or are blocked by windows UAC. Ensure map files are not in a UAC protected location`)
continue;
} else if (f2AddToMPQ.status > 0) {
process.send(`WARN: ${file} Possibly failed to disable ${bj} script, Unknown error occurred: ${f2AddToMPQ.status}`)
continue;
}
f2AddToMPQ.error ?
process.send(f2AddToMPQ.error.message)
: process.send(`Disable commander ${file}`);
}

const f3AddToMPQ = spawnSync(
Expand Down
6 changes: 5 additions & 1 deletion Electron/app/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,11 @@ const installTrans = () => {
}
translations = data as { [key: string]: string };
if (win != null) {
win.setTitle(translations['PAGES.HOME.TITLE'] || '')
let rawVersion = __APP_VERSION__ || '';
let version = rawVersion ? `v${rawVersion}` : '';
let appName = translations['PAGES.HOME.TITLE'] || '';
let WinTitle = `${appName} ${version}`;
win.setTitle(WinTitle)
}
});
}
Expand Down
1 change: 1 addition & 0 deletions Electron/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
"ng": "ng",
"start": "cross-env ELECTRON_ENV=development npm-run-all -p electron:serve ng:serve",
"ng:serve": "ng serve -c web -o",
"prebuild": "node -e \"const fs = require('fs'); const pkg = require('./package.json'); const content = fs.readFileSync('./app/main.ts', 'utf8').toString(); fs.writeFileSync('./app/main.ts', content.replace('__APP_VERSION__', JSON.stringify(pkg.version)))\"",
"build": "npm run electron:serve-tsc && ng build --base-href ./",
"build:dev": "npm run build -- -c dev",
"build:prod": "npm run build -- -c production",
Expand Down
92 changes: 88 additions & 4 deletions Electron/src/app/core/services/menu/menu.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,25 +20,109 @@ export class MenuService {
{
label: 'Install Opt Reforged on Folder with Commander',
click: () => {
this.electronService.ipcRenderer.send('install', 'REFORGED', true, true, true, false);
this.electronService.ipcRenderer.send('install', 'REFORGED', true, 1, true, true);
}
},
{
label: 'Install Opt Reforged on Folder with VS AI Commander',
click: () => {
this.electronService.ipcRenderer.send('install', 'REFORGED', true, 2, true, true);
}
},
{
label: 'Install Opt Reforged on Folder (No Commander)',
click: () => {
this.electronService.ipcRenderer.send('install', true, false, true, false);
this.electronService.ipcRenderer.send('install', 'REFORGED', true, 0, true, true);
}
},
{
label: 'Install Opt Reforged on Map with Commander',
click: () => {
this.electronService.ipcRenderer.send('install','REFORGED', false, true, true, false);
this.electronService.ipcRenderer.send('install','REFORGED', false, 1, true, true);
}
},
{
label: 'Install Opt Reforged on Map with VS AI Commander',
click: () => {
this.electronService.ipcRenderer.send('install','REFORGED', false, 2, true, true);
}
},
{
label: 'Install Opt Reforged on Map (No Commander)',
click: () => {
this.electronService.ipcRenderer.send('install', false, false, true, false);
this.electronService.ipcRenderer.send('install', 'REFORGED', false, 0, true, true);
}
},
{
label: 'Install Opt TFT on Folder with Commander',
click: () => {
this.electronService.ipcRenderer.send('install', 'TFT', true, 1, true, true);
}
},
{
label: 'Install Opt TFT on Folder with VS AI Commander',
click: () => {
this.electronService.ipcRenderer.send('install', 'TFT', true, 2, true, true);
}
},
{
label: 'Install Opt TFT on Folder (No Commander)',
click: () => {
this.electronService.ipcRenderer.send('install', 'TFT', true, 0, true, true);
}
},
{
label: 'Install Opt TFT on Map with Commander',
click: () => {
this.electronService.ipcRenderer.send('install','TFT', false, 1, true, true);
}
},
{
label: 'Install Opt TFT on Map with VS AI Commander',
click: () => {
this.electronService.ipcRenderer.send('install','TFT', false, 2, true, true);
}
},
{
label: 'Install Opt TFT on Map (No Commander)',
click: () => {
this.electronService.ipcRenderer.send('install', 'TFT', false, 0, true, true);
}
},
{
label: 'Install Opt ROC on Folder with Commander',
click: () => {
this.electronService.ipcRenderer.send('install', 'ROC', true, 1, true, true);
}
},
{
label: 'Install Opt ROC on Folder with VS AI Commander',
click: () => {
this.electronService.ipcRenderer.send('install', 'ROC', true, 2, true, true);
}
},
{
label: 'Install Opt ROC on Folder (No Commander)',
click: () => {
this.electronService.ipcRenderer.send('install', 'ROC', true, 0, true, true);
}
},
{
label: 'Install Opt ROC on Map with Commander',
click: () => {
this.electronService.ipcRenderer.send('install','ROC', false, 1, true, true);
}
},
{
label: 'Install Opt ROC on Map with VS AI Commander',
click: () => {
this.electronService.ipcRenderer.send('install','ROC', false, 2, true, true);
}
},
{
label: 'Install Opt ROC on Map (No Commander)',
click: () => {
this.electronService.ipcRenderer.send('install', 'ROC', false, 0, true, true);
}
},
// TODO: recreate MakeTFT script
Expand Down
7 changes: 5 additions & 2 deletions Electron/src/assets/i18n/de.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
{
"PAGES": {
"CURRENT_LANGUAGE": {
"TIPS": "this Deutsch json"
},
"HOME": {
"TITLE": "AMAI-Installationsprogramm",
"CHOOSE_GAME_VERSION": "Spielversion wählen",
Expand All @@ -9,8 +12,8 @@
"INCLUDE_COMMANDER": "Kommandant installieren",
"INCLUDE_COMMANDER_VSAI": "Gegen Vanilla KI",
"INCLUDE_COMMANDER_OFF": "Kein Kommandant",
"OPTIMISE": "Optimierte Skripte verwenden",
"FORCELANG": "Standardsprache der KI überschreiben"
"OPTIMISE": "Verringerung der Systemlast",
"FORCELANG": "AI Chat Sprache überschreiben"
},
"APP": {
"INSTALLING": "Installation in {{path}}",
Expand Down
7 changes: 5 additions & 2 deletions Electron/src/assets/i18n/en.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
{
"PAGES": {
"CURRENT_LANGUAGE": {
"TIPS": "this English json"
},
"HOME": {
"TITLE": "AMAI Installer",
"CHOOSE_GAME_VERSION": "Choose Game Version",
Expand All @@ -9,8 +12,8 @@
"INCLUDE_COMMANDER": "Install Commander",
"INCLUDE_COMMANDER_VSAI": "Vs Vanilla AI",
"INCLUDE_COMMANDER_OFF": "No Commander",
"OPTIMISE": "Use Optimised Scripts",
"FORCELANG": "Override Default AI Language"
"OPTIMISE": "Reduce System Load",
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should make an onhover tooltip rather than change the message here.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, no one may have read it, but I rely entirely on AI to consult a little bit on HTML adjustments, and the changes may not be as good as those made by professional engineers
like How to add a standard question mark icon after text, with a mouse move in button prompt

"FORCELANG": "Overwrite AI Chat Language"
},
"APP": {
"INSTALLING": "Installing into {{path}}",
Expand Down
7 changes: 5 additions & 2 deletions Electron/src/assets/i18n/es.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
{
"PAGES": {
"CURRENT_LANGUAGE": {
"TIPS": "this Spanish json"
},
"HOME": {
"TITLE": "Instalador de AMAI",
"CHOOSE_GAME_VERSION": "Elegir versión del juego",
Expand All @@ -9,8 +12,8 @@
"INCLUDE_COMMANDER": "Incluir comandante",
"INCLUDE_COMMANDER_VSAI": "Contra IA Vanilla",
"INCLUDE_COMMANDER_OFF": "Sin Comandante",
"OPTIMISE": "Usar scripts optimizados",
"FORCELANG": "Sobrescribir el idioma predeterminado de la IA"
"OPTIMISE": "Reducir la carga del sistema",
"FORCELANG": "Cubrir el lenguaje de chat de Ia"
},
"APP": {
"INSTALLING": "Instalando en {{path}}",
Expand Down
7 changes: 5 additions & 2 deletions Electron/src/assets/i18n/fr.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
{
"PAGES": {
"CURRENT_LANGUAGE": {
"TIPS": "this French json"
},
"HOME": {
"TITLE": "Installeur AMAI",
"CHOOSE_GAME_VERSION": "Choisir la version du jeu",
Expand All @@ -9,8 +12,8 @@
"INCLUDE_COMMANDER": "Installer le commandant",
"INCLUDE_COMMANDER_VSAI": "Contre IA Vanilla",
"INCLUDE_COMMANDER_OFF": "Pas de Commandant",
"OPTIMISE": "Utiliser des scripts optimisés",
"FORCELANG": "Remplacer la langue par défaut de l'IA"
"OPTIMISE": "Réduire la charge du système",
"FORCELANG": "Couvrir le langage de chat ai"
},
"APP": {
"INSTALLING": "Installation dans {{path}}",
Expand Down
7 changes: 5 additions & 2 deletions Electron/src/assets/i18n/no.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
{
"PAGES": {
"CURRENT_LANGUAGE": {
"TIPS": "this Norwegian json"
},
"HOME": {
"TITLE": "AMAI Installer",
"CHOOSE_GAME_VERSION": "Velg spillversjon",
Expand All @@ -9,8 +12,8 @@
"INCLUDE_COMMANDER": "Inkluder kommandant",
"INCLUDE_COMMANDER_VSAI": "Mot Vanilla AI",
"INCLUDE_COMMANDER_OFF": "Ingen Kommandant",
"OPTIMISE": "Bruk optimaliserte skript",
"FORCELANG": "Overstyr standard AI-språk"
"OPTIMISE": "Reduser systemmengden",
"FORCELANG": "Overskriv AI-samtalespråk"
},
"APP": {
"INSTALLING": "Installerer i {{path}}",
Expand Down
7 changes: 5 additions & 2 deletions Electron/src/assets/i18n/pt.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
{
"PAGES": {
"CURRENT_LANGUAGE": {
"TIPS": "this Portuguese json"
},
"HOME": {
"TITLE": "Instalador do AMAI",
"CHOOSE_GAME_VERSION": "Escolher versão do jogo",
Expand All @@ -9,8 +12,8 @@
"INCLUDE_COMMANDER": "Incluir comandante",
"INCLUDE_COMMANDER_VSAI": "Contra IA Vanilla",
"INCLUDE_COMMANDER_OFF": "Sem Comandante",
"OPTIMISE": "Usar scripts otimizados",
"FORCELANG": "Substituir idioma padrão da IA"
"OPTIMISE": "Reduzir a carga do sistema",
"FORCELANG": "Substituir a linguagem de conversação AI"
},
"APP": {
"INSTALLING": "Instalando em {{path}}",
Expand Down
7 changes: 5 additions & 2 deletions Electron/src/assets/i18n/ro.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
{
"PAGES": {
"CURRENT_LANGUAGE": {
"TIPS": "this Romanian json"
},
"HOME": {
"TITLE": "Instalator AMAI",
"CHOOSE_GAME_VERSION": "Alege versiunea jocului",
Expand All @@ -9,8 +12,8 @@
"INCLUDE_COMMANDER": "Include comandant",
"INCLUDE_COMMANDER_VSAI": "Împotriva AI Vanilla",
"INCLUDE_COMMANDER_OFF": "Fără comandant",
"OPTIMISE": "Utilizați scripturi optimizate",
"FORCELANG": "Suprascrieți limba implicită a AI"
"OPTIMISE": "Reducerea sarcinii sistemului",
"FORCELANG": "Suprascrie limbajul de chat AI"
},
"APP": {
"INSTALLING": "Instalare în curs la {{path}}",
Expand Down
7 changes: 5 additions & 2 deletions Electron/src/assets/i18n/ru.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
{
"PAGES": {
"CURRENT_LANGUAGE": {
"TIPS": "this Russian json"
},
"HOME": {
"TITLE": "Установщик AMAI",
"CHOOSE_GAME_VERSION": "Выберите версию игры",
Expand All @@ -9,8 +12,8 @@
"INCLUDE_COMMANDER": "Включить командира",
"INCLUDE_COMMANDER_VSAI": "Против Vanilla ИИ",
"INCLUDE_COMMANDER_OFF": "Без командира",
"OPTIMISE": "Использовать оптимизированные скрипты",
"FORCELANG": "Переопределить язык по умолчанию ИИ"
"OPTIMISE": "Снижение нагрузки системы",
"FORCELANG": "Скачать язык разговора"
},
"APP": {
"INSTALLING": "Установка в {{path}}",
Expand Down
7 changes: 5 additions & 2 deletions Electron/src/assets/i18n/sv.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
{
"PAGES": {
"CURRENT_LANGUAGE": {
"TIPS": "this Swedish json"
},
"HOME": {
"TITLE": "AMAI Installerare",
"CHOOSE_GAME_VERSION": "Välj spelversion",
Expand All @@ -9,8 +12,8 @@
"INCLUDE_COMMANDER": "Inkludera befälhavare",
"INCLUDE_COMMANDER_VSAI": "Mot Vanilla AI",
"INCLUDE_COMMANDER_OFF": "Ingen befälhavare",
"OPTIMISE": "Använd optimerade skript",
"FORCELANG": "Åsidosätt standard AI-språk"
"OPTIMISE": "Minska systembelastningen",
"FORCELANG": "Skriv över AI-chattspråk"
},
"APP": {
"INSTALLING": "Installerar i {{path}}",
Expand Down
9 changes: 6 additions & 3 deletions Electron/src/assets/i18n/zh.json
Original file line number Diff line number Diff line change
@@ -1,16 +1,19 @@
{
"PAGES": {
"CURRENT_LANGUAGE": {
"TIPS": "this Chinese json"
},
"HOME": {
"TITLE": "AMAI 安装器",
"CHOOSE_GAME_VERSION": "选择游戏版本",
"ADVANCED_SETTING": "高级设置",
"INSTALL_ON_FOLDER": "按文件夹安装",
"INSTALL_ON_MAP": "按地图安装",
"INCLUDE_COMMANDER": "安装控制台",
"INCLUDE_COMMANDER_VSAI": "安装VS AI控制台",
"INCLUDE_COMMANDER_VSAI": "AMAI VS 暴雪AI",
"INCLUDE_COMMANDER_OFF": "不安装控制台",
"OPTIMISE": "使用优化脚本",
"FORCELANG": "覆盖默认AI语言"
"OPTIMISE": "降低系统负载",
"FORCELANG": "覆盖AI聊天语言"
},
"APP": {
"INSTALLING": "正在安装 {{path}}",
Expand Down
Loading