Skip to content

Commit

Permalink
Update NeptuneRunner
Browse files Browse the repository at this point in the history
  • Loading branch information
C0Newb committed Apr 25, 2023
1 parent 13f5338 commit 68c655e
Show file tree
Hide file tree
Showing 7 changed files with 26 additions and 13 deletions.
4 changes: 2 additions & 2 deletions Server/NeptuneRunner/NeptuneRunner/NeptuneNotification.cs
Original file line number Diff line number Diff line change
Expand Up @@ -592,7 +592,7 @@ public bool Push() {
try {
if (Program.ToastNotifier == null) {
try {
Program.ToastNotifier = ToastNotificationManager.CreateToastNotifier(TaskBar.ApplicationId); //(TaskBar.ApplicationId);
Program.ToastNotifier = ToastNotificationManagerCompat.CreateToastNotifier(); //(TaskBar.ApplicationId); //(TaskBar.ApplicationId);
} catch (Exception) {
// well
return false;
Expand Down Expand Up @@ -644,7 +644,7 @@ public NotificationUpdateResult Update() {
try {
if (Program.ToastNotifier == null) {
try {
Program.ToastNotifier = ToastNotificationManager.CreateToastNotifier(TaskBar.ApplicationId); //(TaskBar.ApplicationId);
Program.ToastNotifier = ToastNotificationManagerCompat.CreateToastNotifier(); //(TaskBar.ApplicationId);
} catch (Exception) {}
}

Expand Down
15 changes: 14 additions & 1 deletion Server/NeptuneRunner/NeptuneRunner/NeptuneRunner.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
<Deterministic>true</Deterministic>
<NuGetPackageImportStamp>
</NuGetPackageImportStamp>
<IsWebBootstrapper>false</IsWebBootstrapper>
<PublishUrl>publish\</PublishUrl>
<Install>true</Install>
<InstallFrom>Disk</InstallFrom>
Expand All @@ -27,7 +28,6 @@
<MapFileExtensions>true</MapFileExtensions>
<ApplicationRevision>0</ApplicationRevision>
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
<IsWebBootstrapper>false</IsWebBootstrapper>
<UseApplicationTrust>false</UseApplicationTrust>
<BootstrapperEnabled>true</BootstrapperEnabled>
</PropertyGroup>
Expand Down Expand Up @@ -58,6 +58,19 @@
<PropertyGroup>
<StartupObject>NeptuneRunner.Program</StartupObject>
</PropertyGroup>
<PropertyGroup>
<SignManifests>false</SignManifests>
</PropertyGroup>
<PropertyGroup>
<ManifestCertificateThumbprint>3C39E4A4A1F129071A7EAC2DCF960D6919521824</ManifestCertificateThumbprint>
</PropertyGroup>
<PropertyGroup>
<SignAssembly>false</SignAssembly>
</PropertyGroup>
<PropertyGroup>
<AssemblyOriginatorKeyFile>
</AssemblyOriginatorKeyFile>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Core" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public static void RegisterAppForNotificationSupport(bool force = false) {
if (!File.Exists(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + "\\Microsoft\\Windows\\Start Menu\\Programs\\" + TaskBar.ApplicationName + ".lnk") || force) {
string exePath = Process.GetCurrentProcess().MainModule.FileName;
InstallShortcut(exePath);
RegisterComServer(exePath);
//RegisterComServer(exePath);
}
}

Expand Down
10 changes: 5 additions & 5 deletions Server/NeptuneRunner/NeptuneRunner/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ internal class Program {

public static Queue<string> IPCDataQueue = new Queue<string>(0);

public static ToastNotifier ToastNotifier;
public static ToastNotifierCompat ToastNotifier;


#region Properties
Expand Down Expand Up @@ -263,16 +263,16 @@ public static void Main(string[] args) {
NotificationRegisty.RegisterAppForNotificationSupport(true); // Setup notification support
//Notifications.NotificationActivator.Initialize(ToastActivated); // Initialize

//ToastNotificationManagerCompat.OnActivated += ToastNotificationManagerCompat_OnActivated;
Notifications.NotificationActivator.Initialize(ToastActivated);
ToastNotifier = ToastNotificationManager.CreateToastNotifier(TaskBar.ApplicationId);
ToastNotificationManagerCompat.OnActivated += ToastNotificationManagerCompat_OnActivated;
//Notifications.NotificationActivator.Initialize(ToastActivated);
ToastNotifier = ToastNotificationManagerCompat.CreateToastNotifier();
} catch (Exception) {
try {
ToastNotificationManagerCompat.Uninstall();
NotificationRegisty.UninstallShortcut();

NotificationRegisty.RegisterAppForNotificationSupport(true);
ToastNotifier = ToastNotificationManager.CreateToastNotifier(TaskBar.ApplicationId);
ToastNotifier = ToastNotificationManagerCompat.CreateToastNotifier();
} catch (Exception e) {
MessageBox.Show("Neptune was unable to register the ToastNotifier into Windows. Because of this, notifications quality will be degraded. "
+ Environment.NewLine + "Restarting Neptune may help, but do make sure notifications are enabled for your system in the Settings app."
Expand Down
4 changes: 2 additions & 2 deletions Server/NeptuneRunner/NeptuneRunner/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,6 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("0.9.0.0")]
[assembly: AssemblyFileVersion("0.9.0.0")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: NeutralResourcesLanguage("en-US")]
Binary file modified Server/NeptuneRunner/build/NeptuneRunner.exe
Binary file not shown.
4 changes: 2 additions & 2 deletions Server/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,15 @@ const isWin = process.platform === "win32"; // Can change notification handling
* Debug mode - special stuff
* @type {boolean}
*/
const debug = true; // change this later idk
const debug = false; // change this later idk

/**
* output the silly log level to console (it goes every other level > silly, silly is the lowest priority, literal spam)
* @type {boolean}
*/
const displaySilly = false; //
Error.stackTraceLimit = (debug)? 8 : 4;
global.consoleVisible = true;
global.consoleVisible = false;


/** @namespace Neptune */
Expand Down

0 comments on commit 68c655e

Please sign in to comment.