Skip to content

Commit

Permalink
Merge pull request #334 from Kyusung4698/develop
Browse files Browse the repository at this point in the history
0.6.5 (2020-03-16)
  • Loading branch information
Kyusung4698 authored Mar 16, 2020
2 parents d6b7907 + 7b0ca24 commit dafc881
Show file tree
Hide file tree
Showing 10 changed files with 2,804 additions and 1,455 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -49,3 +49,6 @@ testem.log
# System Files
.DS_Store
Thumbs.db

# custom
animation.flag
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
## 0.6.5 (2020-03-16)

- add requestExecutionLevel highest (#333)
- add hardware acceleration toggle as tray option (#329, #327)
- add aero is enabled check
- add iohook vc redist error handling (#325)
- update readme (esc/ space) (#330)
- fix multiline `Added Small Passive Skills grant` stat (#324)
- fix singular/ plural stats (#320)

## 0.6.4 (2020-03-15)

- add support for canonical stats variation (#313)
Expand Down
25 changes: 18 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# PoE Overlay 0.6.4
# PoE Overlay 0.6.5

An Overlay for Path of Exile. The ***core aspect*** is to blend in with the game. Built with Electron and Angular.

Expand Down Expand Up @@ -57,7 +57,7 @@ This project is currently in a ***pilot phase***. If you encounter any bugs or h

| Module | Status | Notes |
| ------------- |-------------: | ------- |
| Core | 100% | + overlay<br>+ global shortcuts<br>+ user settings (language, league)<br>+ custom shortcuts<br>+ ~~auto updating~~ version check
| Core | 100% | + overlay<br>+ global shortcuts<br>+ user settings (language, league)<br>+ custom shortcuts<br>+ auto updating
| Shared | 100% | + item frame<br>+ currency frame<br>+ item parser in all languages<br>+ item parser mods
| Evaluate | 100% | + Basic search implemented <br>+ User settings (display currency, translated language) <br>+ Chart to display values instead of avg <br>+ Advanced search with filter on modifiers |
| Command | 100% | + bind in-game commmands to shortcuts (/dnd, /hideout) |
Expand All @@ -72,20 +72,26 @@ This project is currently in a ***pilot phase***. If you encounter any bugs or h

These instructions will set you up to run and enjoy the overlay.

#### Supports

* Windows 10 x64
* Windows 7 (partial; no scroll support)
* Linux coming soon

#### Prerequisites

* Path of Exile ***must be*** in windowed fullscreen mode
* PoE Overlay should run with privileged rights
* You may need to install [vc_redist](https://support.microsoft.com/en-us/help/2977003/the-latest-supported-visual-c-downloads)
* PoE Overlay ***should run*** with privileged rights
* You ***may need*** to install [vc_redist](https://support.microsoft.com/en-us/help/2977003/the-latest-supported-visual-c-downloads)

#### Installing

1. Head over to [Releases](https://github.com/Kyusung4698/PoE-Overlay/releases) and download one of the following files
1. `poe-overlay-Setup-0.6.4.exe` to install locally. This supports auto update/ auto launch.
2. `poe-overlay-0.6.4.exe` portable version. This does not support auto update/ auto launch.
1. `poe-overlay-Setup-0.6.5.exe` to install locally. This supports auto update/ auto launch.
2. `poe-overlay-0.6.5.exe` portable version. This does not support auto update/ auto launch.
2. Run either of your downloaded file
3. Start Path of Exile
4. Wait until you can see `PoE Overlay 0.6.4` in the bottom left corner
4. Wait until you can see `PoE Overlay 0.6.5` in the bottom left corner
5. Hit `f7` and set `Language` and `League` to meet your game settings

#### Shortcuts
Expand All @@ -107,6 +113,11 @@ You can change these shortcuts in the user settings menu.
| `f6` | Toggle DND
| `f7` | Opens the user settings menu
| `f8` | Exits overlay
| `numpad1` | Open `https://www.poelab.com/`
| `numpad2` | Open `https://wraeclast.com/`
| `esc` | Close latest dialog
| `space` | Close all dialogs


## Developer

Expand Down
12 changes: 10 additions & 2 deletions electron-builder.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,10 @@
"nsis",
"portable"
],
"publisherName": ["Nicklas Ronge"]
"requestedExecutionLevel": "highestAvailable",
"publisherName": [
"Nicklas Ronge"
]
},
"linux": {
"icon": "dist/favicon.png",
Expand All @@ -35,6 +38,11 @@
},
"nsis": {
"allowToChangeInstallationDirectory": true,
"oneClick": false
"perMachine": true,
"oneClick": false,
"shortcutName": "PoE Overlay"
},
"portable": {
"requestExecutionLevel": "highest"
}
}
56 changes: 33 additions & 23 deletions hook.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import activeWin from 'active-win';
import iohook from 'iohook';
import { Subject, Subscription } from 'rxjs';
import { throttleTime } from 'rxjs/operators';

Expand Down Expand Up @@ -106,32 +105,43 @@ export function off(event: 'change' | 'wheel') {
}

export function register(): void {
iohook.start();

activeCheckSubscription = activeCheck$.pipe(
throttleTime(500, undefined, {
trailing: true,
leading: false
})
).subscribe(() => {
checkActive();
import('iohook').then(x => {
const iohook = x.default;
iohook.start();

activeCheckSubscription = activeCheck$.pipe(
throttleTime(500, undefined, {
trailing: true,
leading: false
})
).subscribe(() => {
checkActive();
});

iohook.on('keydown', onKeydown);
iohook.on('keyup', onKeyup);
iohook.on('mousewheel', onMousewheel);
iohook.on('mouseup', onMouseclick);
}).catch(() => {
alert('Failed to import iohook. Please make sure you have vc_redist installed.');
});

iohook.on('keydown', onKeydown);
iohook.on('keyup', onKeyup);
iohook.on('mousewheel', onMousewheel);
iohook.on('mouseup', onMouseclick);
}

export function unregister(): void {
iohook.off('keydown', onKeydown);
iohook.off('keyup', onKeyup);
iohook.off('mousewheel', onMousewheel);
iohook.off('mouseup', onMouseclick);
import('iohook').then(x => {
const iohook = x.default;

if (activeCheckSubscription) {
activeCheckSubscription.unsubscribe();
}
iohook.off('keydown', onKeydown);
iohook.off('keyup', onKeyup);
iohook.off('mousewheel', onMousewheel);
iohook.off('mouseup', onMouseclick);

iohook.stop();
if (activeCheckSubscription) {
activeCheckSubscription.unsubscribe();
}

iohook.stop();
}).catch(() => {
alert('Failed to import iohook. Please make sure you have vc_redist installed.');
});
}
38 changes: 32 additions & 6 deletions main.ts
Original file line number Diff line number Diff line change
@@ -1,24 +1,40 @@
import AutoLaunch from 'auto-launch';
import { app, BrowserWindow, Display, ipcMain, Menu, MenuItem, MenuItemConstructorOptions, screen, Tray } from 'electron';
import { app, BrowserWindow, Display, ipcMain, Menu, MenuItem, MenuItemConstructorOptions, screen, systemPreferences, Tray } from 'electron';
import * as log from 'electron-log';
import { autoUpdater } from 'electron-updater';
import * as fs from 'fs';
import * as path from 'path';
import * as robot from 'robotjs';
import * as url from 'url';
import * as hook from './hook';

if (!app.requestSingleInstanceLock()) {
app.quit();
app.exit();
}

app.allowRendererProcessReuse = true;
if (process.platform === 'win32' && !systemPreferences.isAeroGlassEnabled()) {
alert('Aero needs to be enabled.')
app.exit();
}

app.allowRendererProcessReuse = false;

app.commandLine.appendSwitch('high-dpi-support', 'true');
app.commandLine.appendSwitch('force-device-scale-factor', '1');

log.transports.file.level = 'info';
log.info('App starting...');

let animationPath = path.join(app.getPath('userData'), 'animation.flag');

log.info(`App checking for animation flag: ${animationPath}.`);

let animationExists = fs.existsSync(animationPath);
if (animationExists) {
app.disableHardwareAcceleration();
log.info('App disabled hardware acceleration');
}

autoUpdater.logger = log;

const args = process.argv.slice(1),
Expand Down Expand Up @@ -185,7 +201,7 @@ ipcMain.on('app-quit-and-install', event => {

ipcMain.on('app-version', event => {
const version = app.getVersion();
log.info('version: ', version)
log.info('App Version: ', version)
event.returnValue = version;
});

Expand All @@ -210,7 +226,6 @@ function createWindow(): BrowserWindow {

// Create the browser window.
win = new BrowserWindow({
// fullscreen: true,
width: bounds.width,
height: bounds.height,
x: bounds.x,
Expand Down Expand Up @@ -329,6 +344,17 @@ function createTray(): Tray {
label: 'Relaunch', type: 'normal',
click: () => win.webContents.send('app-relaunch')
},
{
label: 'Hardware Acceleration', type: 'checkbox',
checked: !animationExists, click: () => {
if (animationExists) {
fs.unlinkSync(animationPath);
} else {
fs.writeFileSync(animationPath, 'true');
}
win.webContents.send('app-relaunch');
}
},
{
label: 'Exit', type: 'normal',
click: () => app.quit()
Expand All @@ -343,7 +369,7 @@ function createTray(): Tray {
};

menu = Menu.buildFromTemplate(items);
tray.setToolTip(`PoE-Overlay: ${app.getVersion()}`);
tray.setToolTip(`PoE Overlay: ${app.getVersion()}`);
tray.setContextMenu(menu);
tray.on('double-click', () => win.webContents.send('show-user-settings'));
return tray;
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "poe-overlay",
"version": "0.6.4",
"version": "0.6.5",
"private": true,
"description": "A Overlay for Path of Exile. Built with Electron and Angular.",
"main": "main.js",
Expand Down
1 change: 0 additions & 1 deletion src/app/core/service/dialog/dialog.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ export class DialogService {
left: `${left}px`,
top: `${top}px`,
},
backdropClass: 'backdrop-clear',
data
});

Expand Down
Loading

0 comments on commit dafc881

Please sign in to comment.