From 39c6a68d603aab89f0930c0894961c4bc55fb3ca Mon Sep 17 00:00:00 2001 From: Izakbar Date: Sat, 8 Feb 2025 21:25:11 +0000 Subject: [PATCH] eve-o preview -> eve-o-preview lutris install script --- src/Eve-O-Mock/Properties/AssemblyInfo.cs | 28 ++++++++ .../ApplicationBase/ExceptionHandler.cs | 6 +- .../Implementation/ConfigurationStorage.cs | 2 +- src/Eve-O-Preview/Eve-O-Preview.csproj | 2 +- src/Eve-O-Preview/Program.cs | 2 +- .../Services/Implementation/ProcessMonitor.cs | 2 +- .../Implementation/ThumbnailManager.cs | 2 +- .../Services/Implementation/WindowManager.cs | 1 - .../View/Implementation/MainForm.Designer.cs | 8 +-- src/eve-o-preview.yaml | 66 +++++++++++++++++++ 10 files changed, 106 insertions(+), 13 deletions(-) create mode 100644 src/Eve-O-Mock/Properties/AssemblyInfo.cs create mode 100644 src/eve-o-preview.yaml diff --git a/src/Eve-O-Mock/Properties/AssemblyInfo.cs b/src/Eve-O-Mock/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..f69f53c --- /dev/null +++ b/src/Eve-O-Mock/Properties/AssemblyInfo.cs @@ -0,0 +1,28 @@ +using System; +using System.Reflection; +using System.Runtime.InteropServices; +using System.Windows; + +[assembly: AssemblyTitle("EVE Online mock executable for the EVE-O-Preview project")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("EVE-O Mock")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +[assembly: ComVisible(false)] + +[assembly: ThemeInfo( + ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located + //(used if a resource is not found in the page, + // or application resource dictionaries) + ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located + //(used if a resource is not found in the page, + // app, or any theme specific resource dictionaries) +)] + +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] + +[assembly: CLSCompliant(true)] \ No newline at end of file diff --git a/src/Eve-O-Preview/ApplicationBase/ExceptionHandler.cs b/src/Eve-O-Preview/ApplicationBase/ExceptionHandler.cs index f1669b6..fc11559 100644 --- a/src/Eve-O-Preview/ApplicationBase/ExceptionHandler.cs +++ b/src/Eve-O-Preview/ApplicationBase/ExceptionHandler.cs @@ -12,8 +12,8 @@ namespace EveOPreview // So this dumb and non elegant approach is used sealed class ExceptionHandler { - private const string EXCEPTION_DUMP_FILE_NAME = "EVE-O Preview.log"; - private const string EXCEPTION_MESSAGE = "EVE-O Preview has encountered a problem and needs to close. Additional information has been saved in the crash log file."; + private const string EXCEPTION_DUMP_FILE_NAME = "EVE-O-Preview.log"; + private const string EXCEPTION_MESSAGE = "EVE-O-Preview has encountered a problem and needs to close. Additional information has been saved in the crash log file."; public void SetupExceptionHandlers() { @@ -41,7 +41,7 @@ namespace EveOPreview String exceptionMessage = exception.ToString(); File.WriteAllText(ExceptionHandler.EXCEPTION_DUMP_FILE_NAME, exceptionMessage); - MessageBox.Show(ExceptionHandler.EXCEPTION_MESSAGE, @"EVE-O Preview", MessageBoxButtons.OK, MessageBoxIcon.Error); + MessageBox.Show(ExceptionHandler.EXCEPTION_MESSAGE, @"EVE-O-Preview", MessageBoxButtons.OK, MessageBoxIcon.Error); } catch { diff --git a/src/Eve-O-Preview/Configuration/Implementation/ConfigurationStorage.cs b/src/Eve-O-Preview/Configuration/Implementation/ConfigurationStorage.cs index 637c497..7eacd1c 100644 --- a/src/Eve-O-Preview/Configuration/Implementation/ConfigurationStorage.cs +++ b/src/Eve-O-Preview/Configuration/Implementation/ConfigurationStorage.cs @@ -5,7 +5,7 @@ namespace EveOPreview.Configuration.Implementation { class ConfigurationStorage : IConfigurationStorage { - private const string CONFIGURATION_FILE_NAME = "EVE-O Preview.json"; + private const string CONFIGURATION_FILE_NAME = "EVE-O-Preview.json"; private readonly IAppConfig _appConfig; private readonly IThumbnailConfiguration _thumbnailConfiguration; diff --git a/src/Eve-O-Preview/Eve-O-Preview.csproj b/src/Eve-O-Preview/Eve-O-Preview.csproj index fc79024..04b4c71 100644 --- a/src/Eve-O-Preview/Eve-O-Preview.csproj +++ b/src/Eve-O-Preview/Eve-O-Preview.csproj @@ -4,7 +4,7 @@ net8.0-windows8.0 WinExe EveOPreview - EVE-O Preview + EVE-O-Preview publish\ true Disk diff --git a/src/Eve-O-Preview/Program.cs b/src/Eve-O-Preview/Program.cs index e1d1118..865f9f4 100644 --- a/src/Eve-O-Preview/Program.cs +++ b/src/Eve-O-Preview/Program.cs @@ -11,7 +11,7 @@ namespace EveOPreview { static class Program { - private static string MUTEX_NAME = "EVE-O Preview Single Instance Mutex"; + private static string MUTEX_NAME = "EVE-O-Preview Single Instance Mutex"; private static Mutex _singleInstanceMutex; diff --git a/src/Eve-O-Preview/Services/Implementation/ProcessMonitor.cs b/src/Eve-O-Preview/Services/Implementation/ProcessMonitor.cs index 2de2e7f..f3e6e8f 100644 --- a/src/Eve-O-Preview/Services/Implementation/ProcessMonitor.cs +++ b/src/Eve-O-Preview/Services/Implementation/ProcessMonitor.cs @@ -9,7 +9,7 @@ namespace EveOPreview.Services.Implementation { #region Private constants private const string DEFAULT_PROCESS_NAME = "ExeFile"; - private const string CURRENT_PROCESS_NAME = "EVE-O Preview"; + private const string CURRENT_PROCESS_NAME = "EVE-O-Preview"; #endregion #region Private fields diff --git a/src/Eve-O-Preview/Services/Implementation/ThumbnailManager.cs b/src/Eve-O-Preview/Services/Implementation/ThumbnailManager.cs index 13208be..f1275d8 100644 --- a/src/Eve-O-Preview/Services/Implementation/ThumbnailManager.cs +++ b/src/Eve-O-Preview/Services/Implementation/ThumbnailManager.cs @@ -686,7 +686,7 @@ namespace EveOPreview.Services return false; } - // Check whether the currently active window belongs to EVE-O Preview itself + // Check whether the currently active window belongs to EVE-O-Preview itself private bool IsMainWindowActive(IntPtr windowHandle) { return (this._processMonitor.GetMainProcess().Handle == windowHandle); diff --git a/src/Eve-O-Preview/Services/Implementation/WindowManager.cs b/src/Eve-O-Preview/Services/Implementation/WindowManager.cs index c170274..a37df74 100644 --- a/src/Eve-O-Preview/Services/Implementation/WindowManager.cs +++ b/src/Eve-O-Preview/Services/Implementation/WindowManager.cs @@ -105,7 +105,6 @@ namespace EveOPreview.Services.Implementation { cmd = "-c \"wmctrl -a \"\"" + windowName + "\"\"\""; } - System.Diagnostics.Process.Start("/bin/bash", cmd); } diff --git a/src/Eve-O-Preview/View/Implementation/MainForm.Designer.cs b/src/Eve-O-Preview/View/Implementation/MainForm.Designer.cs index 849e6e3..aa8e654 100644 --- a/src/Eve-O-Preview/View/Implementation/MainForm.Designer.cs +++ b/src/Eve-O-Preview/View/Implementation/MainForm.Designer.cs @@ -186,7 +186,7 @@ namespace EveOPreview.View TitleMenuItem.Enabled = false; TitleMenuItem.Name = "TitleMenuItem"; TitleMenuItem.Size = new System.Drawing.Size(151, 22); - TitleMenuItem.Text = "EVE-O Preview"; + TitleMenuItem.Text = "EVE-O-Preview"; // // SeparatorMenuItem // @@ -1149,7 +1149,7 @@ namespace EveOPreview.View NameLabel.Name = "NameLabel"; NameLabel.Size = new System.Drawing.Size(130, 20); NameLabel.TabIndex = 3; - NameLabel.Text = "EVE-O Preview"; + NameLabel.Text = "EVE-O-Preview"; // // DocumentationLink // @@ -1168,7 +1168,7 @@ namespace EveOPreview.View // this.NotifyIcon.ContextMenuStrip = this.TrayMenu; this.NotifyIcon.Icon = ((System.Drawing.Icon)(resources.GetObject("NotifyIcon.Icon"))); - this.NotifyIcon.Text = "EVE-O Preview"; + this.NotifyIcon.Text = "EVE-O-Preview"; this.NotifyIcon.Visible = true; this.NotifyIcon.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.RestoreMainForm_Handler); // @@ -1195,7 +1195,7 @@ namespace EveOPreview.View this.Margin = new System.Windows.Forms.Padding(0); this.MaximizeBox = false; this.Name = "MainForm"; - this.Text = "EVE-O Preview"; + this.Text = "EVE-O-Preview"; this.TopMost = true; this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.MainFormClosing_Handler); this.Load += new System.EventHandler(this.MainFormResize_Handler); diff --git a/src/eve-o-preview.yaml b/src/eve-o-preview.yaml new file mode 100644 index 0000000..7cbd63c --- /dev/null +++ b/src/eve-o-preview.yaml @@ -0,0 +1,66 @@ +game_slug: eve-online +slug: test +name: EVE Online +version: test +runner: linux +script: + files: + - setup: + filename: installer.exe + url: https://launcher.ccpgames.com/eve-online/release/win32/x64/eve-online-latest+Setup.exe + - eve-o-preview: EVE_O_PREVIEW + - wine: https://github.com/Kron4ek/Wine-Builds/releases/download/10.0/wine-10.0-staging-amd64.tar.xz + - winetricks: https://raw.githubusercontent.com/Winetricks/winetricks/refs/tags/20240105/src/winetricks + - dotnet8: https://download.visualstudio.microsoft.com/download/pr/f1e7ffc8-c278-4339-b460-517420724524/f36bb75b2e86a52338c4d3a90f8dac9b/windowsdesktop-runtime-8.0.12-win-x64.exe + game: + exe: $GAMEDIR/launch.sh + installer: + - extract: + file: wine + dst: $GAMEDIR/runner-wine + - extract: + file: eve-o-preview + dst: $GAMEDIR + - chmodx: $winetricks + - merge: + src: setup + dst: $GAMEDIR + - write_file: + file: $GAMEDIR/launch.sh + content: | + #!/usr/bin/env bash + export WINEPREFIX="$GAMEDIR" + + # Disable esync to avoid a bug that causes high cpu usage + export PROTON_NO_ESYNC=1 + + cd "$GAMEDIR" + + # Start EVE-O in the background + "./runner-wine/bin/wine" "./EVE-O Preview.exe" & + # We start the launcher by calling the installer again because, otherwise, there is a Javascript exception when calling the actual executable. No idea why. + "./runner-wine/bin/wine" "./installer.exe" + - chmodx: $GAMEDIR/launch.sh + - execute: + disable_runtime: true # With runtime enabled, all certificate validations by winetricks fail + description: Close EVE-O and the launcher after they open. Re-launch the game to install eve. + command: | + # Lutris is currently in a transition period where they are looking to support umu-launcher + proton fully + # As a result, they have not released a new version of wine-ge in a long time, and wine-ge 8 is not working + # with the latest version of EVE-O and their installer scripts don't support automatically using a non-wine-ge version of wine. + # This script is a hacky workaround to use wine-staging 10 more easily with minimal user action until we can swap back to using a properly support proton-version + + set -e + export WINE="$(pwd)/runner-wine/bin/wine" + export WINEPREFIX="$GAMEDIR" + + # Begin installation + "$winetricks" -q msdelta vkd3d vcrun2022 dxvk2030 + # Need to install dotnet8 with the actual installer because winetricks version is not working + "$GAMEDIR"/runner-wine/bin/wine "$dotnet8" + "$GAMEDIR/runner-wine/bin/wine" "EVE-O Preview.exe" + "$GAMEDIR"/runner-wine/bin/wine "./installer.exe" + + # cleanup + rm "$winetricks" + rm "$dotnet8"