Upload via GUI (22 Dateien)

This commit is contained in:
Git Manager GUI
2026-08-01 21:34:03 +02:00
parent a74efdfd8f
commit 56212fba73
4 changed files with 19 additions and 11 deletions

4
package-lock.json generated
View File

@@ -1,12 +1,12 @@
{
"name": "aeromc",
"version": "0.24.0",
"version": "1.0.0-beta",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "aeromc",
"version": "0.24.0",
"version": "1.0.0-beta",
"license": "MIT",
"dependencies": {
"skinview3d": "^3.4.2",

View File

@@ -1,6 +1,7 @@
{
"name": "aeromc",
"version": "0.37.1",
"productName": "AeroMC",
"version": "1.0.0-beta",
"description": "AeroMC Instanz-basierter Minecraft-Launcher (à la MultiMC/Prism)",
"homepage": "https://M_Viper.de",
"main": "src/main.js",
@@ -12,8 +13,8 @@
"license": "MIT",
"scripts": {
"start": "electron .",
"build": "electron-builder --win nsis --x64 && node -e \"const fs=require('fs');const path=require('path');['dist/builder-debug.yml','dist/builder-effective-config.yaml','dist/win-unpacked'].forEach((target)=>fs.rmSync(target,{recursive:true,force:true}));if(fs.existsSync('dist')){const source=path.join('dist','AeroMC.exe');const target=path.join('dist','AeroMC-Setup.exe');if(fs.existsSync(target))fs.rmSync(target,{force:true});if(fs.existsSync(source))fs.renameSync(source,target);for(const name of fs.readdirSync('dist')){if((name.endsWith('.exe')&&name!=='AeroMC-Setup.exe')||name.endsWith('.blockmap')){fs.rmSync(path.join('dist',name),{force:true})}}}\"",
"build:portable": "electron-builder --win portable --x64 && node -e \"const fs=require('fs');const path=require('path');['dist/builder-debug.yml','dist/builder-effective-config.yaml','dist/win-unpacked'].forEach((target)=>fs.rmSync(target,{recursive:true,force:true}));if(fs.existsSync('dist')){for(const name of fs.readdirSync('dist')){if((name.endsWith('.exe')&&name!=='AeroMC.exe')||name.endsWith('.blockmap')){fs.rmSync(path.join('dist',name),{force:true})}}}\""
"build": "electron-builder --win nsis --x64 && node -e \"const fs=require('fs');const path=require('path');['dist/builder-debug.yml','dist/builder-effective-config.yaml','dist/win-unpacked'].forEach((target)=>fs.rmSync(target,{recursive:true,force:true}));if(fs.existsSync('dist')){const source=path.join('dist','AeroMC.exe');const target=path.join('dist','AeroMC-Setup.exe');if(fs.existsSync(target))fs.rmSync(target,{force:true});if(fs.existsSync(source))fs.renameSync(source,target);for(const name of fs.readdirSync('dist')){if((name.endsWith('.exe')&&name!=='AeroMC-Setup.exe'&&name!=='AeroMC-Portable.exe')||name.endsWith('.blockmap')){fs.rmSync(path.join('dist',name),{force:true})}}}\"",
"build:portable": "electron-builder --win portable --x64 && node -e \"const fs=require('fs');const path=require('path');['dist/builder-debug.yml','dist/builder-effective-config.yaml','dist/win-unpacked'].forEach((target)=>fs.rmSync(target,{recursive:true,force:true}));if(fs.existsSync('dist')){const source=path.join('dist','AeroMC.exe');const target=path.join('dist','AeroMC-Portable.exe');if(fs.existsSync(target))fs.rmSync(target,{force:true});if(fs.existsSync(source))fs.renameSync(source,target);for(const name of fs.readdirSync('dist')){if((name.endsWith('.exe')&&name!=='AeroMC-Setup.exe'&&name!=='AeroMC-Portable.exe')||name.endsWith('.blockmap')){fs.rmSync(path.join('dist',name),{force:true})}}}\""
},
"build": {
"appId": "com.aeromc.launcher",

View File

@@ -751,7 +751,7 @@ ipcMain.handle('update:install', async (_e, asset) => {
});
ipcMain.handle('app:info', () => ({
name: pkg.build?.productName || pkg.name || 'AeroMC',
name: pkg.productName || pkg.build?.productName || pkg.name || 'AeroMC',
version: app.getVersion(),
author: pkg.author || '',
homepage: pkg.homepage || '',

View File

@@ -727,13 +727,20 @@ function closeContextMenu() {
el('ctx-menu').classList.add('hidden');
}
function formatVersionLabel(version) {
return String(version || '')
.replace(/^v/i, '')
.replace(/-beta$/i, ' Beta')
.trim() || '';
}
// ---------- Automatische Updates ----------
let pendingUpdate = null;
function showUpdateDialog(info) {
pendingUpdate = info;
el('upd-current').textContent = 'v' + info.currentVersion;
el('upd-new').textContent = 'v' + info.latestVersion;
el('upd-current').textContent = formatVersionLabel(info.currentVersion);
el('upd-new').textContent = formatVersionLabel(info.latestVersion);
el('upd-notes').textContent = (info.notes || '').trim() || 'Keine Änderungshinweise hinterlegt.';
el('upd-progress').classList.add('hidden');
el('upd-bar-fill').style.width = '0%';
@@ -1706,7 +1713,7 @@ async function openSettings() {
const info = await window.api.appInfo();
el('s-appinfo').innerHTML = [
['Name', info.name || 'AeroMC'],
['Version', info.version || ''],
['Version', formatVersionLabel(info.version)],
['Autor', info.author || 'Nicht hinterlegt'],
['Webseite', info.homepage || 'Nicht hinterlegt', info.homepage || ''],
['Gitseite', info.gitpage || 'Nicht hinterlegt', info.gitpage || ''],
@@ -2169,11 +2176,11 @@ function wire() {
if (info.error) { st.textContent = '✖ ' + info.error; return; }
if (info.noReleases) { st.textContent = 'Noch keine Veröffentlichung vorhanden.'; return; }
if (info.available) {
st.textContent = `Version ${info.latestVersion} verfügbar.`;
st.textContent = `Version ${formatVersionLabel(info.latestVersion)} verfügbar.`;
hide('modal-settings');
showUpdateDialog(info);
} else {
st.textContent = `Du hast bereits die neueste Version (v${info.currentVersion}).`;
st.textContent = `Du hast bereits die neueste Version (${formatVersionLabel(info.currentVersion)}).`;
}
});
}