Updated installer and standalone release

This commit is contained in:
Stone-Red-Code
2021-08-17 18:37:41 +02:00
parent bbb6873887
commit 3c61c021d4
10 changed files with 138 additions and 42 deletions
Binary file not shown.
+54 -40
View File
@@ -61,59 +61,73 @@ namespace DesktopMagic
public MainWindow() public MainWindow()
{ {
logFilePath = applicationDataPath + "\\Log.txt"; try
Logger = new Logger(LogTarget.File, logFilePath, "{<dateTime>:HH:mm:ss} | {<level>,-7} | {<source>,-15} | {<lineNumber>,-4} | {<memberName>,10} | {<message>}"); {
key = Registry.CurrentUser.CreateSubKey(@"Software\" + AppName); logFilePath = applicationDataPath + "\\Log.txt";
Logger = new Logger(LogTarget.File, logFilePath, "{<dateTime>:HH:mm:ss} | {<level>,-7} | {<source>,-15} | {<lineNumber>,-4} | {<memberName>,10} | {<message>}");
key = Registry.CurrentUser.CreateSubKey(@"Software\" + AppName);
Stream iconStream = Application.GetResourceStream(new Uri("pack://application:,,,/DesktopMagic;component/icon.ico")).Stream; Stream iconStream = Application.GetResourceStream(new Uri("pack://application:,,,/DesktopMagic;component/icon.ico")).Stream;
notifyIcon.Click += TaskbarIcon_TrayLeftClick; notifyIcon.Click += TaskbarIcon_TrayLeftClick;
notifyIcon.Visible = true; notifyIcon.Visible = true;
notifyIcon.Text = AppName; notifyIcon.Text = AppName;
notifyIcon.Icon = new System.Drawing.Icon(iconStream); notifyIcon.Icon = new System.Drawing.Icon(iconStream);
InitializeComponent(); InitializeComponent();
SetLanguageDictionary(); SetLanguageDictionary();
this.Title = AppName; this.Title = AppName;
}
catch (Exception ex)
{
MessageBox.Show(ex.ToString());
}
} }
#region load #region load
private void Window_Loaded(object sender, RoutedEventArgs e) private void Window_Loaded(object sender, RoutedEventArgs e)
{ {
Logger.ClearLogFile(); try
if (!Directory.Exists(applicationDataPath))
{ {
_ = Directory.CreateDirectory(applicationDataPath); Logger.ClearLogFile();
}
Logger.Log("Created ApplicationData Folder", "Main");
if (!Directory.Exists(applicationDataPath + "\\Plugins")) if (!Directory.Exists(applicationDataPath))
{
_ = Directory.CreateDirectory(applicationDataPath);
}
Logger.Log("Created ApplicationData Folder", "Main");
if (!Directory.Exists(applicationDataPath + "\\Plugins"))
{
_ = Directory.CreateDirectory(applicationDataPath + "\\Plugins");
}
Logger.Log("Created Plugins Folder", "Main");
if (!File.Exists(applicationDataPath + "\\layouts.save"))
{
File.WriteAllText(applicationDataPath + "\\layouts.save", ";" + (string)FindResource("default"));
}
Logger.Log("Created layouts.save file", "Main");
_ = optionsComboBox.Items.Add(new Tuple<string, int>((string)FindResource("musicVisualizer"), 0));
//Write To Log File and Load Elements
Logger.Log("Loading Plugin names", "Main");
LoadPlugins();
Logger.Log("Loading Layout names", "Main");
LoadLayoutNames();
Logger.Log("Loading Layout", "Main");
LoadLayout();
loaded = true;
Logger.Log("Window Loaded", "Main");
}
catch (Exception ex)
{ {
_ = Directory.CreateDirectory(applicationDataPath + "\\Plugins"); MessageBox.Show(ex.ToString());
} }
Logger.Log("Created Plugins Folder", "Main");
if (!File.Exists(applicationDataPath + "\\layouts.save"))
{
File.WriteAllText(applicationDataPath + "\\layouts.save", ";" + (string)FindResource("default"));
}
Logger.Log("Created layouts.save file", "Main");
_ = optionsComboBox.Items.Add(new Tuple<string, int>((string)FindResource("musicVisualizer"), 0));
//Write To Log File and Load Elements
Logger.Log("Loading Plugin names", "Main");
LoadPlugins();
Logger.Log("Loading Layout names", "Main");
LoadLayoutNames();
Logger.Log("Loading Layout", "Main");
LoadLayout();
loaded = true;
Logger.Log("Window Loaded", "Main");
} }
private void LoadPlugins() private void LoadPlugins()
@@ -66,6 +66,20 @@
], ],
"assetTargetFallback": true, "assetTargetFallback": true,
"warn": true, "warn": true,
"downloadDependencies": [
{
"name": "Microsoft.AspNetCore.App.Runtime.win-x86",
"version": "[5.0.9, 5.0.9]"
},
{
"name": "Microsoft.NETCore.App.Runtime.win-x86",
"version": "[5.0.9, 5.0.9]"
},
{
"name": "Microsoft.WindowsDesktop.App.Runtime.win-x86",
"version": "[5.0.9, 5.0.9]"
}
],
"frameworkReferences": { "frameworkReferences": {
"Microsoft.NETCore.App": { "Microsoft.NETCore.App": {
"privateAssets": "all" "privateAssets": "all"
@@ -73,6 +87,11 @@
}, },
"runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\5.0.400\\RuntimeIdentifierGraph.json" "runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\5.0.400\\RuntimeIdentifierGraph.json"
} }
},
"runtimes": {
"win-x86": {
"#import": []
}
} }
} }
} }
@@ -57,6 +57,47 @@
"build/Vsxmd.targets": {} "build/Vsxmd.targets": {}
} }
} }
},
"net5.0/win-x86": {
"Microsoft.NETCore.Platforms/5.0.0": {
"type": "package",
"compile": {
"lib/netstandard1.0/_._": {}
},
"runtime": {
"lib/netstandard1.0/_._": {}
}
},
"Microsoft.Win32.SystemEvents/5.0.0": {
"type": "package",
"dependencies": {
"Microsoft.NETCore.Platforms": "5.0.0"
},
"compile": {
"ref/netstandard2.0/_._": {}
},
"runtime": {
"runtimes/win/lib/netcoreapp3.0/Microsoft.Win32.SystemEvents.dll": {}
}
},
"System.Drawing.Common/5.0.2": {
"type": "package",
"dependencies": {
"Microsoft.Win32.SystemEvents": "5.0.0"
},
"compile": {
"ref/netcoreapp3.0/System.Drawing.Common.dll": {}
},
"runtime": {
"runtimes/win/lib/netcoreapp3.0/System.Drawing.Common.dll": {}
}
},
"Vsxmd/1.4.5": {
"type": "package",
"build": {
"build/Vsxmd.targets": {}
}
}
} }
}, },
"libraries": { "libraries": {
@@ -240,6 +281,20 @@
], ],
"assetTargetFallback": true, "assetTargetFallback": true,
"warn": true, "warn": true,
"downloadDependencies": [
{
"name": "Microsoft.AspNetCore.App.Runtime.win-x86",
"version": "[5.0.9, 5.0.9]"
},
{
"name": "Microsoft.NETCore.App.Runtime.win-x86",
"version": "[5.0.9, 5.0.9]"
},
{
"name": "Microsoft.WindowsDesktop.App.Runtime.win-x86",
"version": "[5.0.9, 5.0.9]"
}
],
"frameworkReferences": { "frameworkReferences": {
"Microsoft.NETCore.App": { "Microsoft.NETCore.App": {
"privateAssets": "all" "privateAssets": "all"
@@ -247,6 +302,11 @@
}, },
"runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\5.0.400\\RuntimeIdentifierGraph.json" "runtimeIdentifierGraphPath": "C:\\Program Files\\dotnet\\sdk\\5.0.400\\RuntimeIdentifierGraph.json"
} }
},
"runtimes": {
"win-x86": {
"#import": []
}
} }
} }
} }
@@ -1,13 +1,16 @@
{ {
"version": 2, "version": 2,
"dgSpecHash": "DePY+NmPPolbFZEQfF/BclhlaHW5e9A0c0KFBniYdpUMi2mrXUjkQw5rGqYNJTenSasOdPdRGhzycT+XwTkE9w==", "dgSpecHash": "fOE+bI0gEfedmn7JaJivSPCHQ/HXI0iR7p6Pd4Ka/IfTuazMk4M0Vi0X5UnM0R4UXVcHDy8FnjtX6Ha/hR2qrg==",
"success": true, "success": true,
"projectFilePath": "C:\\Users\\David\\Programmieren\\DesktopMagic\\src\\DesktopMagicPluginAPI\\DesktopMagicPluginAPI.csproj", "projectFilePath": "C:\\Users\\David\\Programmieren\\DesktopMagic\\src\\DesktopMagicPluginAPI\\DesktopMagicPluginAPI.csproj",
"expectedPackageFiles": [ "expectedPackageFiles": [
"C:\\Users\\David\\.nuget\\packages\\microsoft.netcore.platforms\\5.0.0\\microsoft.netcore.platforms.5.0.0.nupkg.sha512", "C:\\Users\\David\\.nuget\\packages\\microsoft.netcore.platforms\\5.0.0\\microsoft.netcore.platforms.5.0.0.nupkg.sha512",
"C:\\Users\\David\\.nuget\\packages\\microsoft.win32.systemevents\\5.0.0\\microsoft.win32.systemevents.5.0.0.nupkg.sha512", "C:\\Users\\David\\.nuget\\packages\\microsoft.win32.systemevents\\5.0.0\\microsoft.win32.systemevents.5.0.0.nupkg.sha512",
"C:\\Users\\David\\.nuget\\packages\\system.drawing.common\\5.0.2\\system.drawing.common.5.0.2.nupkg.sha512", "C:\\Users\\David\\.nuget\\packages\\system.drawing.common\\5.0.2\\system.drawing.common.5.0.2.nupkg.sha512",
"C:\\Users\\David\\.nuget\\packages\\vsxmd\\1.4.5\\vsxmd.1.4.5.nupkg.sha512" "C:\\Users\\David\\.nuget\\packages\\vsxmd\\1.4.5\\vsxmd.1.4.5.nupkg.sha512",
"C:\\Users\\David\\.nuget\\packages\\microsoft.netcore.app.runtime.win-x86\\5.0.9\\microsoft.netcore.app.runtime.win-x86.5.0.9.nupkg.sha512",
"C:\\Users\\David\\.nuget\\packages\\microsoft.windowsdesktop.app.runtime.win-x86\\5.0.9\\microsoft.windowsdesktop.app.runtime.win-x86.5.0.9.nupkg.sha512",
"C:\\Users\\David\\.nuget\\packages\\microsoft.aspnetcore.app.runtime.win-x86\\5.0.9\\microsoft.aspnetcore.app.runtime.win-x86.5.0.9.nupkg.sha512"
], ],
"logs": [] "logs": []
} }