diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index 65739f1..17fc7ef 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -64,15 +64,15 @@ jobs: tagName: nightly releaseName: 'Emerald Nightly' releaseBody: | - # Emerald Legacy Launcher (Nightly) + # LCE Emerald Launcher (Nightly) # What to download? - - `Emerald.Legacy.Launcher-*.rpm` for GNU/Linux (RHEL) - - `Emerald.Legacy.Launcher-*.deb` for GNU/Linux (Debian+Ubuntu) - - `Emerald.Legacy.Launcher-*.AppImage` for GNU/Linux (Universal) - - `Emerald.Legacy.Launcher-*_x64.dmg` for macOS (Intel) - - `Emerald.Legacy.Launcher-*_aarch64.dmg` for macOS (M-series) - - `Emerald.Legacy.Launcher-*.exe` for Windows (Setup) - - `Emerald.Legacy.Launcher-*.msi` for Windows (Setup) + - `LCE.Emerald.Launcher-*.rpm` for GNU/Linux (RHEL) + - `LCE.Emerald.Launcher-*.deb` for GNU/Linux (Debian+Ubuntu) + - `LCE.Emerald.Launcher-*.AppImage` for GNU/Linux (Universal) + - `LCE.Emerald.Launcher-*_x64.dmg` for macOS (Intel) + - `LCE.Emerald.Launcher-*_aarch64.dmg` for macOS (M-series) + - `LCE.Emerald.Launcher-*.exe` for Windows (Setup) + - `LCE.Emerald.Launcher-*.msi` for Windows (Setup) --- # Windows SmartScreen This software is completely safe. Because the launcher is unsigned, you will see a "Windows protected your PC" window. To proceed: @@ -101,12 +101,12 @@ jobs: submodules: true - uses: flatpak/flatpak-github-actions/flatpak-builder@v6 with: - bundle: io.github.Emerald_Legacy_Launcher.Emerald_Legacy_Launcher.flatpak - manifest-path: flatpak/io.github.Emerald_Legacy_Launcher.Emerald_Legacy_Launcher.yml + bundle: io.github.LCE_Emerald_Launcher.LCE_Emerald_Launcher.flatpak + manifest-path: flatpak/io.github.LCE_Emerald_Launcher.LCE_Emerald_Launcher.yml cache-key: flatpak-builder-${{ github.sha }} - uses: softprops/action-gh-release@v2 with: - files: io.github.Emerald_Legacy_Launcher.Emerald_Legacy_Launcher.flatpak + files: io.github.LCE_Emerald_Launcher.LCE_Emerald_Launcher.flatpak tag_name: nightly env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index c897102..92e319f 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -79,31 +79,31 @@ jobs: pkgbuild --root "$APP_PATH/.." \ --install-location /Applications \ --scripts pkg_temp/scripts \ - --identifier "com.emerald.legacy" \ + --identifier "com.lce.emerald" \ --version "1.0.0" \ --install-location "/Applications" \ --root "$APP_PATH" \ - "Emerald-Legacy-Launcher.pkg" + "LCE-Emerald-Launcher.pkg" # Move PKG to bundle directory mkdir -p src-tauri/target/release/bundle/macos/ - mv "Emerald-Legacy-Launcher.pkg" src-tauri/target/release/bundle/macos/ + mv "LCE-Emerald-Launcher.pkg" src-tauri/target/release/bundle/macos/ - uses: tauri-apps/tauri-action@v0 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: tagName: v__VERSION__ - releaseName: 'Emerald v__VERSION__' + releaseName: 'LCE Emerald v__VERSION__' releaseBody: | # What to download? - - `Emerald.Legacy.Launcher-*.rpm` for GNU/Linux (RHEL) - - `Emerald.Legacy.Launcher-*.deb` for GNU/Linux (Debian+Ubuntu) - - `Emerald.Legacy.Launcher-*.AppImage` for GNU/Linux (Universal, Currently Broken) - - `Emerald.Legacy.Launcher-*_x64.dmg` for macOS (Intel) - - `Emerald.Legacy.Launcher-*_aarch64.dmg` for macOS (M-series) - - `Emerald.Legacy.Launcher-*.exe` for Windows (Setup) - - `Emerald.Legacy.Launcher-*.msi` for Windows (Setup) - - `Emerald.Legacy.Launcher.flatpak` for GNU/Linux (Flatpak, Recommended) + - `LCE.Emerald.Launcher-*.rpm` for GNU/Linux (RHEL) + - `LCE.Emerald.Launcher-*.deb` for GNU/Linux (Debian+Ubuntu) + - `LCE.Emerald.Launcher-*.AppImage` for GNU/Linux (Universal, Currently Broken) + - `LCE.Emerald.Launcher-*_x64.dmg` for macOS (Intel) + - `LCE.Emerald.Launcher-*_aarch64.dmg` for macOS (M-series) + - `LCE.Emerald.Launcher-*.exe` for Windows (Setup) + - `LCE.Emerald.Launcher-*.msi` for Windows (Setup) + - `io.github.LCE_Emerald_Launcher.LCE_Emerald_Launcher.flatpak` for GNU/Linux (Flatpak, Recommended) --- # Windows SmartScreen This software is completely safe. Because the launcher is unsigned, you will see a "Windows protected your PC" window. To proceed: @@ -134,12 +134,12 @@ jobs: run: sleep 10 - uses: flatpak/flatpak-github-actions/flatpak-builder@v6 with: - bundle: Emerald.Legacy.Launcher.flatpak - manifest-path: flatpak/io.github.Emerald_Legacy_Launcher.Emerald_Legacy_Launcher.yml + bundle: io.github.LCE_Emerald_Launcher.LCE_Emerald_Launcher.flatpak + manifest-path: flatpak/io.github.LCE_Emerald_Launcher.LCE_Emerald_Launcher.yml cache-key: flatpak-builder-${{ github.sha }} - uses: softprops/action-gh-release@v2 with: tag_name: v${{ needs.get-version.outputs.version }} - files: Emerald.Legacy.Launcher.flatpak + files: io.github.LCE_Emerald_Launcher.LCE_Emerald_Launcher.flatpak env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/scripts/fix-macos-quarantine.sh b/scripts/fix-macos-quarantine.sh index dccf22d..5a8747b 100755 --- a/scripts/fix-macos-quarantine.sh +++ b/scripts/fix-macos-quarantine.sh @@ -6,7 +6,7 @@ set -e APP_PATH="$1" -BUNDLE_ID="com.emerald.legacy" +BUNDLE_ID="com.lce.emerald" if [ -z "$APP_PATH" ]; then echo "Usage: $0 " diff --git a/src-tauri/src/lib.rs b/src-tauri/src/lib.rs index 02feec9..3a719c5 100644 --- a/src-tauri/src/lib.rs +++ b/src-tauri/src/lib.rs @@ -146,7 +146,7 @@ fn unix_path_to_wine_z_path(unix_path: &PathBuf) -> String { } fn get_config_path(app: &AppHandle) -> PathBuf { - get_app_dir(app).join("emerald_legacy_config.json") + get_app_dir(app).join("lce_emerald_config.json") } #[tauri::command] @@ -161,12 +161,21 @@ fn save_config(app: AppHandle, config: AppConfig) { #[tauri::command] fn load_config(app: AppHandle) -> AppConfig { let path = get_config_path(&app); - if let Ok(content) = fs::read_to_string(path) { + if let Ok(content) = fs::read_to_string(&path) { if let Ok(config) = serde_json::from_str(&content) { return config; } } + let old_json_path = get_app_dir(&app).join("emerald_legacy_config.json"); + if let Ok(content) = fs::read_to_string(&old_json_path) { + if let Ok(config) = serde_json::from_str::(&content) { + let _ = save_config(app.clone(), config.clone()); + let _ = fs::remove_file(old_json_path); + return config; + } + } + let old_path = get_app_dir(&app).join("emerald_legacy_config.txt"); let username = fs::read_to_string(old_path).unwrap_or_else(|_| "Player".into()); AppConfig { @@ -500,7 +509,7 @@ async fn setup_macos_runtime(window: tauri::Window, app: AppHandle) -> Result<() let archive_path = runtime_dir.join(format!("gptk_{}", asset.name)); let response = client .get(&asset.browser_download_url) - .header("User-Agent", "Emerald-Legacy-Launcher") + .header("User-Agent", "LCE-Emerald-Launcher") .send() .await .map_err(|e| e.to_string())?