diff --git a/Client/Installer/MainWindow.xaml.cs b/Client/Installer/MainWindow.xaml.cs
index 3552997..606e683 100644
--- a/Client/Installer/MainWindow.xaml.cs
+++ b/Client/Installer/MainWindow.xaml.cs
@@ -58,64 +58,53 @@ namespace RageCoop.Client.Installer
{
UpdateStatus("Checking requirements");
var shvPath = Path.Combine(root, "ScriptHookV.dll");
- var shvdnPath = Path.Combine(root, "ScriptHookVDotNet3.dll");
var scriptsPath = Path.Combine(root, "Scripts");
- var lemonPath = Path.Combine(scriptsPath, "LemonUI.SHVDN3.dll");
- var installPath = Path.Combine(scriptsPath, "RageCoop");
- if (Directory.GetParent(Assembly.GetExecutingAssembly().Location).FullName == installPath)
+ var installPath = Path.Combine(root, "RageCoop", "Scripts");
+ var legacyPath = Path.Combine(scriptsPath, "RageCoop");
+ if (Directory.GetParent(Assembly.GetExecutingAssembly().Location).FullName.StartsWith(installPath))
{
throw new InvalidOperationException("The installer is not meant to be run in the game folder, please extract the zip to somewhere else and run again.");
}
- Directory.CreateDirectory(installPath);
if (!File.Exists(shvPath))
{
MessageBox.Show("Please install ScriptHookV first!");
Environment.Exit(1);
}
- if (!File.Exists(shvdnPath))
- {
- MessageBox.Show("Please install ScriptHookVDotNet first!");
- Environment.Exit(1);
- }
- var shvdnVer = GetVer(shvdnPath);
- if (shvdnVer < new Version(3, 5, 1))
- {
- MessageBox.Show("Please update ScriptHookVDotNet to latest version!" +
- $"\nCurrent version is {shvdnVer}, 3.5.1 or higher is required");
- Environment.Exit(1);
- }
- if (File.Exists(lemonPath))
- {
- var lemonVer = GetVer(lemonPath);
- if (lemonVer < new Version(1, 7))
- {
- UpdateStatus("Updating LemonUI");
- File.WriteAllBytes(lemonPath, getLemon());
- }
- }
+
+ Directory.CreateDirectory(installPath);
+
+ File.Copy("ScriptHookVDotNet.dll", Path.Combine(root, "ScriptHookVDotNet.asi"), true);
+ File.Copy("ScriptHookVDotNet3.dll", Path.Combine(root, "ScriptHookVDotNet3.dll"), true);
UpdateStatus("Removing old versions");
foreach (var f in Directory.GetFiles(scriptsPath, "RageCoop.*", SearchOption.AllDirectories))
{
- if (f.EndsWith("RageCoop.Client.Settings.xml")) { continue; }
File.Delete(f);
}
+
+ // 1.5 installation check
+ if (Directory.Exists(legacyPath))
+ {
+ Directory.Delete(legacyPath, true);
+ }
+
foreach (var f in Directory.GetFiles(installPath, "*.dll", SearchOption.AllDirectories))
{
File.Delete(f);
}
- if (File.Exists("RageCoop.Core.dll") && File.Exists("RageCoop.Client.dll"))
+ if (File.Exists("RageCoop.Core.dll") && File.Exists("RageCoop.Client.dll") && File.Exists("RageCoop.Client.Loader.dll"))
{
UpdateStatus("Installing...");
CoreUtils.CopyFilesRecursively(new DirectoryInfo(Directory.GetCurrentDirectory()), new DirectoryInfo(installPath));
+ File.Copy("RageCoop.Client.Loader.dll", Path.Combine(scriptsPath, "RageCoop.Client.Loader.dll"), true);
Finish();
}
else
{
- throw new Exception("Required files are missing, please re-download the zip from official website");
+ throw new Exception("Required files are missing, please re-download the installer from official website");
}
void Finish()
@@ -124,7 +113,7 @@ namespace RageCoop.Client.Installer
checkKeys:
UpdateStatus("Checking conflicts");
var menyooConfig = Path.Combine(root, @"menyooStuff\menyooConfig.ini");
- var settingsPath = Path.Combine(installPath, @"Data\RageCoop.Client.Settings.xml");
+ var settingsPath = Path.Combine(root, Util.SettingsPath);
Settings settings = null;
try
{
@@ -199,15 +188,5 @@ namespace RageCoop.Client.Installer
Dispatcher.BeginInvoke(new Action(() => Status.Content = status));
}
- private Version GetVer(string location)
- {
- return Version.Parse(FileVersionInfo.GetVersionInfo(location).FileVersion);
- }
-
- private byte[] getLemon()
- {
- return (byte[])Resource.ResourceManager.GetObject("LemonUI_SHVDN3");
- }
-
}
}
diff --git a/Client/Installer/RageCoop.Client.Installer.csproj b/Client/Installer/RageCoop.Client.Installer.csproj
index f3b51ee..86cc5a2 100644
--- a/Client/Installer/RageCoop.Client.Installer.csproj
+++ b/Client/Installer/RageCoop.Client.Installer.csproj
@@ -47,4 +47,8 @@
+
+
+
+
diff --git a/Client/Installer/RageCoop.Client.Installer.csproj.user b/Client/Installer/RageCoop.Client.Installer.csproj.user
new file mode 100644
index 0000000..0b1b88b
--- /dev/null
+++ b/Client/Installer/RageCoop.Client.Installer.csproj.user
@@ -0,0 +1,9 @@
+
+
+
+
+
+ Designer
+
+
+
\ No newline at end of file
diff --git a/Client/Installer/Resource.Designer.cs b/Client/Installer/Resource.Designer.cs
index 6b21ddd..60ba9e7 100644
--- a/Client/Installer/Resource.Designer.cs
+++ b/Client/Installer/Resource.Designer.cs
@@ -59,15 +59,5 @@ namespace RageCoop.Client.Installer {
resourceCulture = value;
}
}
-
- ///
- /// Looks up a localized resource of type System.Byte[].
- ///
- internal static byte[] LemonUI_SHVDN3 {
- get {
- object obj = ResourceManager.GetObject("LemonUI_SHVDN3", resourceCulture);
- return ((byte[])(obj));
- }
- }
}
}
diff --git a/Client/Installer/Resource.resx b/Client/Installer/Resource.resx
index f3ceacb..2f96abe 100644
--- a/Client/Installer/Resource.resx
+++ b/Client/Installer/Resource.resx
@@ -118,7 +118,4 @@
System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
-
- Resources\LemonUI.SHVDN3.dll;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
-
\ No newline at end of file
diff --git a/Client/Installer/Resources/LemonUI.SHVDN3.dll b/Client/Installer/Resources/LemonUI.SHVDN3.dll
deleted file mode 100644
index c998d32..0000000
Binary files a/Client/Installer/Resources/LemonUI.SHVDN3.dll and /dev/null differ
diff --git a/Client/Scripts/Menus/Sub/UpdateMenu.cs b/Client/Scripts/Menus/Sub/UpdateMenu.cs
index 7554596..cb462e1 100644
--- a/Client/Scripts/Menus/Sub/UpdateMenu.cs
+++ b/Client/Scripts/Menus/Sub/UpdateMenu.cs
@@ -65,20 +65,18 @@ namespace RageCoop.Client.Menus
{
_updatingItem.AltTitle = "Installing...";
});
- Directory.CreateDirectory(@"Scripts\RageCoop");
- foreach (var f in Directory.GetFiles(@"Scripts\RageCoop", "*.dll", SearchOption.AllDirectories))
+ var insatllPath = @"RageCoop\Scripts";
+ Directory.CreateDirectory(insatllPath);
+ foreach (var f in Directory.GetFiles(insatllPath, "*.dll", SearchOption.AllDirectories))
{
try { File.Delete(f); }
catch { }
}
- new FastZip().ExtractZip(_downloadPath, "Scripts", FastZip.Overwrite.Always, null, null, null, true);
+ new FastZip().ExtractZip(_downloadPath, insatllPath, FastZip.Overwrite.Always, null, null, null, true);
try { File.Delete(_downloadPath); } catch { }
- try { File.Delete(Path.Combine("Scripts", "RageCoop.Client.Installer.exe")); } catch { }
- API.QueueAction(() =>
- {
- Loader.LoaderContext.RequestUnload();
- IsUpdating = false;
- });
+ try { File.Delete(Path.Combine(insatllPath, "RageCoop.Client.Installer.exe")); } catch { }
+ Loader.LoaderContext.RequestUnload();
+ IsUpdating = false;
}
catch (Exception ex)
{
diff --git a/Client/Scripts/Properties/AssemblyInfo.cs b/Client/Scripts/Properties/AssemblyInfo.cs
index 20d8ea4..8a1ec3e 100644
--- a/Client/Scripts/Properties/AssemblyInfo.cs
+++ b/Client/Scripts/Properties/AssemblyInfo.cs
@@ -16,7 +16,7 @@ using System.Resources;
// Version informationr(
-[assembly: AssemblyVersion("1.5.4.328")]
-[assembly: AssemblyFileVersion("1.5.4.328")]
+[assembly: AssemblyVersion("1.5.4.333")]
+[assembly: AssemblyFileVersion("1.5.4.333")]
[assembly: NeutralResourcesLanguageAttribute( "en-US" )]
diff --git a/Client/Scripts/Util/Util.cs b/Client/Scripts/Util/Util.cs
index 0a1d098..1107049 100644
--- a/Client/Scripts/Util/Util.cs
+++ b/Client/Scripts/Util/Util.cs
@@ -25,7 +25,13 @@ namespace RageCoop.Client
{
if (AppDomain.CurrentDomain.GetData("RageCoop.Client.LoaderContext") == null)
{
- throw new Exception($"Client not loaded with loader, please re-install using the installer to fix this issue");
+ var error = $"Client not loaded with loader, please re-install using the installer to fix this issue";
+ try
+ {
+ GTA.UI.Notification.Show("~r~" + error);
+ }
+ catch { }
+ throw new Exception(error);
}
}
public static SizeF ResolutionMaintainRatio
diff --git a/RageCoop-V.sln b/RageCoop-V.sln
index 951e3e7..714563f 100644
--- a/RageCoop-V.sln
+++ b/RageCoop-V.sln
@@ -11,7 +11,9 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "RageCoop.Client", "Client\S
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "RageCoop.Client.Installer", "Client\Installer\RageCoop.Client.Installer.csproj", "{576D8610-0C28-4B60-BE2B-8657EA7CEE1B}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "RageCoop.Client.Loader", "Client\Loader\RageCoop.Client.Loader.csproj", "{D2A39C1C-2454-4411-8BA1-BE34EEB9042F}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "RageCoop.Client.Loader", "Client\Loader\RageCoop.Client.Loader.csproj", "{FC8CBDBB-6DC3-43AF-B34D-092E476410A5}"
+EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Client", "Client", "{531656CF-7269-488D-B042-741BC96C3941}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
@@ -53,18 +55,23 @@ Global
{576D8610-0C28-4B60-BE2B-8657EA7CEE1B}.Release|Any CPU.Build.0 = Release|Any CPU
{576D8610-0C28-4B60-BE2B-8657EA7CEE1B}.Release|x64.ActiveCfg = Release|Any CPU
{576D8610-0C28-4B60-BE2B-8657EA7CEE1B}.Release|x64.Build.0 = Release|Any CPU
- {D2A39C1C-2454-4411-8BA1-BE34EEB9042F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {D2A39C1C-2454-4411-8BA1-BE34EEB9042F}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {D2A39C1C-2454-4411-8BA1-BE34EEB9042F}.Debug|x64.ActiveCfg = Debug|Any CPU
- {D2A39C1C-2454-4411-8BA1-BE34EEB9042F}.Debug|x64.Build.0 = Debug|Any CPU
- {D2A39C1C-2454-4411-8BA1-BE34EEB9042F}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {D2A39C1C-2454-4411-8BA1-BE34EEB9042F}.Release|Any CPU.Build.0 = Release|Any CPU
- {D2A39C1C-2454-4411-8BA1-BE34EEB9042F}.Release|x64.ActiveCfg = Release|Any CPU
- {D2A39C1C-2454-4411-8BA1-BE34EEB9042F}.Release|x64.Build.0 = Release|Any CPU
+ {FC8CBDBB-6DC3-43AF-B34D-092E476410A5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {FC8CBDBB-6DC3-43AF-B34D-092E476410A5}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {FC8CBDBB-6DC3-43AF-B34D-092E476410A5}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {FC8CBDBB-6DC3-43AF-B34D-092E476410A5}.Debug|x64.Build.0 = Debug|Any CPU
+ {FC8CBDBB-6DC3-43AF-B34D-092E476410A5}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {FC8CBDBB-6DC3-43AF-B34D-092E476410A5}.Release|Any CPU.Build.0 = Release|Any CPU
+ {FC8CBDBB-6DC3-43AF-B34D-092E476410A5}.Release|x64.ActiveCfg = Release|Any CPU
+ {FC8CBDBB-6DC3-43AF-B34D-092E476410A5}.Release|x64.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
+ GlobalSection(NestedProjects) = preSolution
+ {EF56D109-1F22-43E0-9DFF-CFCFB94E0681} = {531656CF-7269-488D-B042-741BC96C3941}
+ {576D8610-0C28-4B60-BE2B-8657EA7CEE1B} = {531656CF-7269-488D-B042-741BC96C3941}
+ {FC8CBDBB-6DC3-43AF-B34D-092E476410A5} = {531656CF-7269-488D-B042-741BC96C3941}
+ EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {6CC7EA75-E4FF-4534-8EB6-0AEECF2620B7}
EndGlobalSection
diff --git a/Server/Properties/AssemblyInfo.cs b/Server/Properties/AssemblyInfo.cs
index 39a452a..034e73d 100644
--- a/Server/Properties/AssemblyInfo.cs
+++ b/Server/Properties/AssemblyInfo.cs
@@ -15,7 +15,7 @@ using System.Resources;
[assembly: AssemblyCulture("")]
// Version information
-[assembly: AssemblyVersion("1.5.4.100")]
-[assembly: AssemblyFileVersion("1.5.4.100")]
+[assembly: AssemblyVersion("1.5.4.105")]
+[assembly: AssemblyFileVersion("1.5.4.105")]
[assembly: NeutralResourcesLanguageAttribute( "en-US" )]