Skip to content

Commit

Permalink
Revert "Added start menu shortcut"
Browse files Browse the repository at this point in the history
This reverts commit 206f5ab.
  • Loading branch information
CarbonNeuron committed Jan 8, 2021
1 parent 206f5ab commit 959f012
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 53 deletions.
21 changes: 0 additions & 21 deletions AUCapture-WPF/AUCapture-WPF.csproj
Expand Up @@ -43,30 +43,10 @@
</PropertyGroup>

<ItemGroup>
<None Remove="logo\Logo.ico" />
<None Remove="logo\Logo.png" />
<None Remove="SplashScreens\SplashScreenPop.png" />
</ItemGroup>

<ItemGroup>
<COMReference Include="IWshRuntimeLibrary.dll">
<WrapperTool>tlbimp</WrapperTool>
<VersionMinor>0</VersionMinor>
<VersionMajor>1</VersionMajor>
<Guid>f935dc20-1cf0-11d0-adb9-00c04fd58a0b</Guid>
<Lcid>0</Lcid>
<Isolated>false</Isolated>
</COMReference>
<COMReference Include="Shell32.dll">
<WrapperTool>tlbimp</WrapperTool>
<VersionMinor>0</VersionMinor>
<VersionMajor>1</VersionMajor>
<Guid>50a7e9b0-70ef-11d1-b75a-00a0c90564fe</Guid>
<Lcid>0</Lcid>
<Isolated>false</Isolated>
</COMReference>
</ItemGroup>


<ItemGroup>
<TrimmerRootAssembly Include="System.Runtime" />
Expand Down Expand Up @@ -104,7 +84,6 @@
</ItemGroup>

<ItemGroup>
<Resource Include="logo\Logo.ico" />
<Resource Include="logo\Logo.png" />
<Resource Include="SplashScreens\SplashScreenChristmas.png" />
<Resource Include="SplashScreens\SplashScreenNormal.png" />
Expand Down
32 changes: 0 additions & 32 deletions AUCapture-WPF/App.xaml.cs
Expand Up @@ -4,9 +4,7 @@
using System.IO;
using System.Media;
using System.Reflection;
using System.Resources;
using System.Runtime.InteropServices;
using System.Security.Cryptography;
using System.Threading;
using System.Threading.Tasks;
using System.Windows;
Expand All @@ -19,9 +17,6 @@
using NLog.Targets;
using WpfScreenHelper;
using IPCAdapter = AUCapture_WPF.IPC.IPCAdapter;
using IWshRuntimeLibrary;
using NLog.Fluent;
using File = IWshRuntimeLibrary.File;
using URIStartResult = AUCapture_WPF.IPC.URIStartResult;

namespace AUCapture_WPF
Expand All @@ -41,17 +36,6 @@ public void OnTokenHandler(object sender, StartToken token)
socket.Connect(token.Host, token.ConnectCode);
}

public static void CreateShortcut(string shortcutName, string shortcutPath, string targetFileLocation, string description, string iconPath)
{
string shortcutLocation = System.IO.Path.Combine(shortcutPath, shortcutName + ".lnk");
WshShell shell = new WshShell();
IWshShortcut shortcut = (IWshShortcut)shell.CreateShortcut(shortcutLocation);

shortcut.Description = description; // The description of the shortcut
shortcut.IconLocation = iconPath; // The icon of the shortcut
shortcut.TargetPath = targetFileLocation; // The path of the file that will launch when the shortcut is run
shortcut.Save(); // Save the shortcut
}
protected override void OnStartup(StartupEventArgs e)
{
base.OnStartup(e);
Expand Down Expand Up @@ -127,22 +111,6 @@ protected override void OnStartup(StartupEventArgs e)
{
Environment.Exit(0);
};
var logoResource = Application.GetResourceStream(new Uri("/logo/Logo.ico", UriKind.Relative)).Stream; //Load this stream
if (logoResource is not null)
{
var logoPath = Path.Join(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), "AmongUsCapture", "AmongUsGUI", "Logo.ico");
FileStream fileStream = System.IO.File.Open(logoPath, FileMode.Create);
fileStream.Seek(0, SeekOrigin.Begin);
logoResource.CopyTo(fileStream);
logoResource.Flush();
}
CreateShortcut("AutoMuteUs Capture",
Environment.GetFolderPath(Environment.SpecialFolder.StartMenu),
GetExecutablePath(),
"AutoMuteUs Capture Program",
Path.Join(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), "AmongUsCapture", "AmongUsGUI", "Logo.ico"));


mainWindow.Show();

}
Expand Down
Binary file removed AUCapture-WPF/logo/Logo.ico
Binary file not shown.

0 comments on commit 959f012

Please sign in to comment.