mirror of
https://github.com/EpicMorg/UniversalValveToolbox.git
synced 2025-02-10 13:48:47 +03:00
1.0.0.4
1.0.0.4
This commit is contained in:
commit
2a5d07df9b
@ -10,6 +10,13 @@
|
|||||||
|
|
||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
|
## 1.0.0.4
|
||||||
|
#### Whats new
|
||||||
|
* Fixed `SteamInit` on program initialization and added tries to launch `Steam`
|
||||||
|
* Fixed `Run project` option
|
||||||
|
* Added support of new engines
|
||||||
|
* Added some default addons, but not linked with any engines
|
||||||
|
|
||||||
## 1.0.0.3
|
## 1.0.0.3
|
||||||
#### Whats new
|
#### Whats new
|
||||||
* Migrated to @Facepunch [Steamworks](https://github.com/Facepunch/Facepunch.Steamworks)
|
* Migrated to @Facepunch [Steamworks](https://github.com/Facepunch/Facepunch.Steamworks)
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
using Steamworks;
|
using Microsoft.Win32;
|
||||||
|
using Steamworks;
|
||||||
using System;
|
using System;
|
||||||
|
using System.Diagnostics;
|
||||||
using System.Windows.Forms;
|
using System.Windows.Forms;
|
||||||
using UniversalValveToolbox.Model.Provider;
|
using UniversalValveToolbox.Model.Provider;
|
||||||
using UniversalValveToolbox.Utils;
|
using UniversalValveToolbox.Utils;
|
||||||
@ -14,12 +16,47 @@ namespace UniversalValveToolbox {
|
|||||||
var dataProvide = new DataProvider();
|
var dataProvide = new DataProvider();
|
||||||
var currSettings = dataProvide.Settings;
|
var currSettings = dataProvide.Settings;
|
||||||
|
|
||||||
LanguageManager.UpdateLanguage(currSettings.Language);
|
|
||||||
|
|
||||||
SteamClient.Init(currSettings.ToolsAppId);
|
|
||||||
|
|
||||||
Application.EnableVisualStyles();
|
Application.EnableVisualStyles();
|
||||||
Application.SetCompatibleTextRenderingDefault(false);
|
Application.SetCompatibleTextRenderingDefault(false);
|
||||||
|
|
||||||
|
LanguageManager.UpdateLanguage(currSettings.Language);
|
||||||
|
|
||||||
|
try { SteamClient.Init(currSettings.ToolsAppId); }
|
||||||
|
catch (Exception ex) {
|
||||||
|
|
||||||
|
DialogResult result = MessageBox.Show(@"Some error was occurred when trying to init Steam API:" + Environment.NewLine +
|
||||||
|
"---------------------------------------------------------------------------" + Environment.NewLine +
|
||||||
|
ex.Message + Environment.NewLine +
|
||||||
|
"---------------------------------------------------------------------------" + Environment.NewLine +
|
||||||
|
"Try to launch Steam?",
|
||||||
|
"Error!", MessageBoxButtons.YesNo, MessageBoxIcon.Error);
|
||||||
|
if (result == DialogResult.Yes)
|
||||||
|
{
|
||||||
|
try {
|
||||||
|
string steamPATH = "";
|
||||||
|
RegistryKey key = Registry.CurrentUser.OpenSubKey(@"SOFTWARE\Valve\Steam");
|
||||||
|
steamPATH = key.GetValue("SteamExe").ToString();
|
||||||
|
Process.Start(steamPATH);
|
||||||
|
key.Close();
|
||||||
|
}
|
||||||
|
catch (Exception exs) {
|
||||||
|
MessageBox.Show(@"Sorry. Steam launch failed because:" + Environment.NewLine +
|
||||||
|
"---------------------------------------------------------------------------" + Environment.NewLine +
|
||||||
|
exs.Message + Environment.NewLine +
|
||||||
|
"---------------------------------------------------------------------------" + Environment.NewLine +
|
||||||
|
"Application will be terminated.",
|
||||||
|
"Error!", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
||||||
|
Application.Exit();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
MessageBox.Show("Application will be terminated.", "Warning!", MessageBoxButtons.OK, MessageBoxIcon.Warning);
|
||||||
|
Application.Exit();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
Application.Run(new FormMain());
|
Application.Run(new FormMain());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -33,5 +33,5 @@ using System.Runtime.InteropServices;
|
|||||||
// You can specify all the values or you can default the Build and Revision Numbers
|
// You can specify all the values or you can default the Build and Revision Numbers
|
||||||
// by using the '*' as shown below:
|
// by using the '*' as shown below:
|
||||||
// [assembly: AssemblyVersion("1.0.*")]
|
// [assembly: AssemblyVersion("1.0.*")]
|
||||||
[assembly: AssemblyVersion("1.0.0.3")]
|
[assembly: AssemblyVersion("1.0.0.4")]
|
||||||
[assembly: AssemblyFileVersion("1.0.0.3")]
|
[assembly: AssemblyFileVersion("1.0.0.4")]
|
||||||
|
@ -456,8 +456,14 @@ namespace UniversalValveToolbox
|
|||||||
{
|
{
|
||||||
if (RUN_PROJECT_ID.Equals(selectItem.Tag) && SelectedProject != null)
|
if (RUN_PROJECT_ID.Equals(selectItem.Tag) && SelectedProject != null)
|
||||||
{
|
{
|
||||||
var pathEngineBin = Path.Combine(SteamApps.AppInstallDir(SelectedEngine.Appid), SelectedEngine.Bin);
|
//var pathEngineBin = Path.Combine(SteamApps.AppInstallDir(SelectedEngine.Appid), SelectedEngine.Bin);
|
||||||
|
var pathEngineBin = dataProvider.Settings.ToolboxMod switch
|
||||||
|
{
|
||||||
|
ToolboxMod.retail => Path.Combine(SteamApps.AppInstallDir(SelectedEngine.Appid), SelectedEngine.Bin),
|
||||||
|
ToolboxMod.bundle => Path.Combine(SteamApps.AppInstallDir(dataProvider.Settings.BundleAppID), SelectedEngine.Bin),
|
||||||
|
ToolboxMod.dev => Path.Combine(dataProvider.Settings.DevEnginePath, SelectedEngine.Bin),
|
||||||
|
_ => throw new Exception($"Unrecognised engine type: {dataProvider.Settings.ToolboxMod}")
|
||||||
|
};
|
||||||
|
|
||||||
Process.Start(pathEngineBin, $"-steam -game \"{SelectedProject?.Path ?? string.Empty}\" {SelectedProject.Args}");
|
Process.Start(pathEngineBin, $"-steam -game \"{SelectedProject?.Path ?? string.Empty}\" {SelectedProject.Args}");
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user