Skip to content

Commit

Permalink
v1.6.8
Browse files Browse the repository at this point in the history
  • Loading branch information
xan105 committed Jul 22, 2022
1 parent 1507bc5 commit 82777a0
Show file tree
Hide file tree
Showing 11 changed files with 37 additions and 26 deletions.
4 changes: 2 additions & 2 deletions app/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion app/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "Achievement-Watcher",
"description": "A sexy achievement file parser with real-time notification.",
"version": "1.6.7",
"version": "1.6.8",
"main": "./electron/init.js",
"engines": {
"node": "~14.0.0"
Expand Down
4 changes: 4 additions & 0 deletions service/watchdog/notification/toaster.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,8 @@ module.exports = async (message, option = {}) => {
debug.error(err);
});
}catch(err){ debug.error(err) }
} else {
debug.log("Skipping souvenir: video");
}

if (options.souvenir.screenshot) {
Expand All @@ -84,6 +86,8 @@ module.exports = async (message, option = {}) => {
.catch( (err) => { debug.error(err) });
}
}catch(err){ debug.error(err) }
} else {
debug.log("Skipping souvenir: screenshot");
}

if (options.notify)
Expand Down
4 changes: 2 additions & 2 deletions service/watchdog/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion service/watchdog/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "Achievement-Watchdog",
"description": "Sidekick to Achievement Watcher for live notification on achievement unlocking",
"version": "2.3.3",
"version": "2.3.4",
"main": "watchdog.js",
"engines": {
"node": "~14.0.0"
Expand Down
6 changes: 3 additions & 3 deletions service/watchdog/queryUserNotificationState.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
//From notification-state-ffi: https://github.com/xan105/node-notification-state-ffi | MIT license
//CJS. Use above lib when moving to ESM
const { promisify } = require('util');
const ffi require('ffi-napi');
const ref require('ref-napi');
const ffi = require('ffi-napi');
const ref = require('ref-napi');

const QUERY_USER_NOTIFICATION_STATE = {
1: "QUNS_NOT_PRESENT", //A screen saver is displayed, the machine is locked, or a nonactive Fast User Switching session is in progress
Expand All @@ -15,7 +15,7 @@ const QUERY_USER_NOTIFICATION_STATE = {
};

const lib = ffi.Library("shell32.dll", {
SHQueryUserNotificationState: ["long", ["*int32"]],
SHQueryUserNotificationState: ["long", ["int32 *"], { abi: ffi.FFI_WIN64 }]
});

async function queryUserNotificationState(){
Expand Down
33 changes: 20 additions & 13 deletions service/watchdog/watchdog.js
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ var app = {
} else if (self.options.notification_advanced.checkIfProcessIsRunning) {
if(await isFullscreenAppRunning()){
isRunning = true;
debug.warn("Fullscreen application detected on primary display. Assuming process is running");
debug.log("Fullscreen application detected on primary display. Assuming process is running");
}
else if (game.binary)
{
Expand Down Expand Up @@ -225,18 +225,25 @@ var app = {
try{
if (self.options.action.target){
debug.log(`Action: ${self.options.action.target}`);
const exec = spawn(self.options.action.target, { cwd: self.options.action.cwd || path.parse(self.options.action.target).dir, stdio: "ignore", detached: true, windowsHide: self.options.action.hide ?? true,
env : { ...process.env,
AW_APPID: appID.toString(),
AW_GAME: game.name.toString(),
AW_ACHIEVEMENT: ach.name.toString(),
AW_DISPLAYNAME: ach.displayName.toString(),
AW_DESCRIPTION: ach.description?.toString() || "",
AW_ICON: ach.icon?.toString() || "",
AW_TIME: achievements[i].UnlockTime.toString()
}
});
exec.unref();
if (await fs.exists(self.options.action.target))
{
const exec = spawn(self.options.action.target, { cwd: self.options.action.cwd || path.parse(self.options.action.target).dir, stdio: "ignore", detached: true, windowsHide: self.options.action.hide ?? true,
env : { ...process.env,
AW_APPID: appID.toString(),
AW_GAME: game.name.toString(),
AW_ACHIEVEMENT: ach.name.toString(),
AW_DISPLAYNAME: ach.displayName.toString(),
AW_DESCRIPTION: ach.description?.toString() || "",
AW_ICON: ach.icon?.toString() || "",
AW_TIME: achievements[i].UnlockTime.toString()
}
});
exec.unref();
} else {
debug.warn("Action target missing");
}
}else{
debug.log("No action set");
}
}catch(err){
debug.error(`Action failed: ${err}`);
Expand Down
2 changes: 1 addition & 1 deletion setup/AchievementWatcher.iss
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
[Setup]
#define AppUserModelID "io.github.xan105.achievement.watcher"
#define AppName "Achievement Watcher"
#define OurVersion "1.6.7"
#define OurVersion "1.6.8"
#define Author "Anthony Beaumont"
#define Website "https://github.com/xan105/Achievement-Watcher"
#define DonationURL "https://www.paypal.me/xan105"
Expand Down
2 changes: 1 addition & 1 deletion setup/rcedit/rcedit.cmd
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@echo off
cd "%~dp0"
xcopy /Y ..\..\app\node_modules\electron\dist\electron.exe ..\{{app}}\AchievementWatcher.exe
rcedit-x64.exe ..\{{app}}\AchievementWatcher.exe --set-icon %~dp0..\{{app}}\icon.ico --set-file-version "1.6.7" --set-product-version "1.6.7" --set-version-string "CompanyName" "Anthony Beaumont" --set-version-string "ProductName" "Achievement Watcher" --set-version-string "FileDescription" "Achievement Watcher" --set-version-string "OriginalFilename" "AchievementWatcher.exe" --set-version-string "InternalName" "AchievementWatcher" --set-version-string "LegalCopyright" "Copyright 2019-2022 Anthony Beaumont."
rcedit-x64.exe ..\{{app}}\AchievementWatcher.exe --set-icon %~dp0..\{{app}}\icon.ico --set-file-version "1.6.8" --set-product-version "1.6.8" --set-version-string "CompanyName" "Anthony Beaumont" --set-version-string "ProductName" "Achievement Watcher" --set-version-string "FileDescription" "Achievement Watcher" --set-version-string "OriginalFilename" "AchievementWatcher.exe" --set-version-string "InternalName" "AchievementWatcher" --set-version-string "LegalCopyright" "Copyright 2019-2022 Anthony Beaumont."
2 changes: 1 addition & 1 deletion setup/version.ini
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
[version]
latest=1.6.7
latest=1.6.8
2 changes: 1 addition & 1 deletion setup/{{app}}/nw/watchdog.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@
"env": ["NODE_SKIP_PLATFORM_CHECK=1"],
"fileCheck": [
{"sum": "02cd30da48078c3c7cee213891b0bfb013e33435245519de7e84b12750bcc072", "size": 56239104},
{"file": "../watchdog/watchdog.js", "sum": "76a1ebf85f27f46aa20753879d9102ebf4ea76d5af30f888017a097aedb03d9d", "size": 17122}
{"file": "../watchdog/watchdog.js", "sum": "62af044f185ea96f0ff3123c4e425320706a2d4824abae65027f34d706cfe886", "size": 17440}
]
}

0 comments on commit 82777a0

Please sign in to comment.