mirror of
https://gitlab.com/ryzen-controller-team/ryzen-controller.git
synced 2024-12-22 18:13:28 +07:00
Added options to select ryzenadj.exe.
This commit is contained in:
parent
32089ec336
commit
57a9e70d49
15
README.md
15
README.md
@ -4,18 +4,9 @@
|
|||||||
|
|
||||||
### Pre-requisite
|
### Pre-requisite
|
||||||
|
|
||||||
- Go to https://github.com/FlyGoat/RyzenAdj/releases
|
- Go to https://github.com/FlyGoat/RyzenAdj/releases and download the latest compiled version.
|
||||||
- Download the latest compiled version.
|
- Execute Ryzen Controller, go select ryzenadj.exe into settings tab.
|
||||||
- Put the content into the bin folder where the "RyzenController.exe" is.
|
- Enjoy!
|
||||||
- So you have
|
|
||||||
```
|
|
||||||
RyzenFolder/
|
|
||||||
| RyzenController.exe
|
|
||||||
| | bin/
|
|
||||||
| | | ryzenadj.exe
|
|
||||||
| | | WinRing0x64.dll
|
|
||||||
| | | WinRing0x64.sys
|
|
||||||
```
|
|
||||||
|
|
||||||
## For developpers
|
## For developpers
|
||||||
|
|
||||||
|
130
index.html
130
index.html
@ -12,6 +12,7 @@
|
|||||||
<h1>Ryzen Controller</h1>
|
<h1>Ryzen Controller</h1>
|
||||||
|
|
||||||
<ul uk-switcher uk-tab>
|
<ul uk-switcher uk-tab>
|
||||||
|
<li><a href="#">Controller</a></li>
|
||||||
<li><a href="#">Settings</a></li>
|
<li><a href="#">Settings</a></li>
|
||||||
<li><a href="#">Presets</a></li>
|
<li><a href="#">Presets</a></li>
|
||||||
<li><a href="#">Logs</a></li>
|
<li><a href="#">Logs</a></li>
|
||||||
@ -20,76 +21,89 @@
|
|||||||
|
|
||||||
|
|
||||||
<li class="uk-container">
|
<li class="uk-container">
|
||||||
<ul uk-accordion="multiple: true">
|
<ul uk-accordion="multiple: true">
|
||||||
<li>
|
<li>
|
||||||
<a class="uk-accordion-title" href="#">STAPM Limit (W)</a>
|
<a class="uk-accordion-title" href="#">STAPM Limit (W)</a>
|
||||||
<div class="uk-accordion-content">
|
<div class="uk-accordion-content">
|
||||||
<div class="uk-grid-small" uk-grid>
|
<div class="uk-grid-small" uk-grid>
|
||||||
<div class="uk-width-1-4@s">
|
<div class="uk-width-1-4@s">
|
||||||
<input class="uk-input" type="number" min="5" max="60" value="20" id="stapm_limit_w" repeat="stapm_limit_w_range">
|
<input class="uk-input" type="number" min="5" max="60" value="20" id="stapm_limit_w" repeat="stapm_limit_w_range">
|
||||||
</div>
|
</div>
|
||||||
<div class="uk-width-2-3@s">
|
<div class="uk-width-2-3@s">
|
||||||
<input class="uk-range" type="range" min="5" max="60" value="20" repeat="stapm_limit_w" id="stapm_limit_w_range">
|
<input class="uk-range" type="range" min="5" max="60" value="20" repeat="stapm_limit_w" id="stapm_limit_w_range">
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</div>
|
||||||
<li>
|
</li>
|
||||||
<a class="uk-accordion-title" href="#">PPT Fast Limit (W)</a>
|
<li>
|
||||||
<div class="uk-accordion-content">
|
<a class="uk-accordion-title" href="#">PPT Fast Limit (W)</a>
|
||||||
<div class="uk-grid-small" uk-grid>
|
<div class="uk-accordion-content">
|
||||||
<div class="uk-width-1-4@s">
|
<div class="uk-grid-small" uk-grid>
|
||||||
<input class="uk-input" type="number" min="5" max="60" value="25" id="ppt_fast_limit_w" repeat="ppt_fast_limit_w_range">
|
<div class="uk-width-1-4@s">
|
||||||
</div>
|
<input class="uk-input" type="number" min="5" max="60" value="25" id="ppt_fast_limit_w" repeat="ppt_fast_limit_w_range">
|
||||||
<div class="uk-width-2-3@s">
|
</div>
|
||||||
<input class="uk-range" type="range" min="5" max="60" value="25" repeat="ppt_fast_limit_w" id="ppt_fast_limit_w_range">
|
<div class="uk-width-2-3@s">
|
||||||
</div>
|
<input class="uk-range" type="range" min="5" max="60" value="25" repeat="ppt_fast_limit_w" id="ppt_fast_limit_w_range">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</div>
|
||||||
<li>
|
</li>
|
||||||
<a class="uk-accordion-title" href="#">PPT Slow Limit (W)</a>
|
<li>
|
||||||
<div class="uk-accordion-content">
|
<a class="uk-accordion-title" href="#">PPT Slow Limit (W)</a>
|
||||||
<div class="uk-grid-small" uk-grid>
|
<div class="uk-accordion-content">
|
||||||
<div class="uk-width-1-4@s">
|
<div class="uk-grid-small" uk-grid>
|
||||||
<input class="uk-input" type="number" min="5" max="60" value="10" id="ppt_slow_limit_w" repeat="ppt_slow_limit_w_range">
|
<div class="uk-width-1-4@s">
|
||||||
</div>
|
<input class="uk-input" type="number" min="5" max="60" value="10" id="ppt_slow_limit_w" repeat="ppt_slow_limit_w_range">
|
||||||
<div class="uk-width-2-3@s">
|
</div>
|
||||||
<input class="uk-range" type="range" min="5" max="60" value="10" repeat="ppt_slow_limit_w" id="ppt_slow_limit_w_range">
|
<div class="uk-width-2-3@s">
|
||||||
</div>
|
<input class="uk-range" type="range" min="5" max="60" value="10" repeat="ppt_slow_limit_w" id="ppt_slow_limit_w_range">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</div>
|
||||||
<li>
|
</li>
|
||||||
<a class="uk-accordion-title" href="#">Temperature Limit (°C)</a>
|
<li>
|
||||||
<div class="uk-accordion-content">
|
<a class="uk-accordion-title" href="#">Temperature Limit (°C)</a>
|
||||||
<div class="uk-grid-small" uk-grid>
|
<div class="uk-accordion-content">
|
||||||
<div class="uk-width-1-4@s">
|
<div class="uk-grid-small" uk-grid>
|
||||||
<input class="uk-input" type="number" min="50" max="100" value="80" id="temperature_limit_c" repeat="temperature_limit_c_range">
|
<div class="uk-width-1-4@s">
|
||||||
</div>
|
<input class="uk-input" type="number" min="50" max="100" value="80" id="temperature_limit_c" repeat="temperature_limit_c_range">
|
||||||
<div class="uk-width-2-3@s">
|
</div>
|
||||||
<input class="uk-range" type="range" min="50" max="100" value="80" repeat="temperature_limit_c" id="temperature_limit_c_range">
|
<div class="uk-width-2-3@s">
|
||||||
</div>
|
<input class="uk-range" type="range" min="50" max="100" value="80" repeat="temperature_limit_c" id="temperature_limit_c_range">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</div>
|
||||||
<li>
|
</li>
|
||||||
<a class="uk-accordion-title" href="#">VRM Current (A)</a>
|
<li>
|
||||||
<div class="uk-accordion-content">
|
<a class="uk-accordion-title" href="#">VRM Current (A)</a>
|
||||||
<div class="uk-grid-small" uk-grid>
|
<div class="uk-accordion-content">
|
||||||
<div class="uk-width-1-4@s">
|
<div class="uk-grid-small" uk-grid>
|
||||||
<input class="uk-input" type="number" min="20" max="100" value="30" id="vrm_current_m_a" repeat="vrm_current_m_a_range">
|
<div class="uk-width-1-4@s">
|
||||||
</div>
|
<input class="uk-input" type="number" min="20" max="100" value="30" id="vrm_current_m_a" repeat="vrm_current_m_a_range">
|
||||||
<div class="uk-width-2-3@s">
|
</div>
|
||||||
<input class="uk-range" type="range" min="20" max="100" value="30" repeat="vrm_current_m_a" id="vrm_current_m_a_range">
|
<div class="uk-width-2-3@s">
|
||||||
</div>
|
<input class="uk-range" type="range" min="20" max="100" value="30" repeat="vrm_current_m_a" id="vrm_current_m_a_range">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</div>
|
||||||
</ul>
|
</li>
|
||||||
<button class="uk-button uk-button-default" onClick="applyRyzenSettings()">Apply</button>
|
</ul>
|
||||||
|
<button class="uk-button uk-button-default" onClick="applyRyzenSettings()">Apply</button>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
|
<li class="uk-container">
|
||||||
|
<h2>Ryzenadj path:</h2>
|
||||||
|
<div class="uk-grid-small" uk-grid>
|
||||||
|
<div class="uk-width-2-3@s">
|
||||||
|
<input class="uk-input" type="text" id="ryzen_adj_path">
|
||||||
|
</div>
|
||||||
|
<div class="uk-width-1-3@s">
|
||||||
|
<button class="uk-button uk-button-default" type="button" onClick="askingForRyzenAdjExecutablePath()">
|
||||||
|
Select path to ryzenadj.exe
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
<li class="uk-container">Will be available soon!</li>
|
<li class="uk-container">Will be available soon!</li>
|
||||||
<li class="uk-container">Will be available soon!</li>
|
<li class="uk-container">Will be available soon!</li>
|
||||||
|
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
ready(function(){
|
ready(function(){
|
||||||
registerRepeaterForAllInput();
|
registerRepeaterForAllInput();
|
||||||
checkForAdminRights();
|
checkForAdminRights();
|
||||||
|
preFillSettings();
|
||||||
});
|
});
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -17,7 +18,7 @@ function applyRyzenSettings(e) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const child = require('child_process').execFile;
|
const child = require('child_process').execFile;
|
||||||
const executablePath = getCurrentWorkingDirectory() + "\\bin\\ryzenadj.exe";
|
const executablePath = getRyzenAdjExecutablePath();
|
||||||
|
|
||||||
var parameters = [];
|
var parameters = [];
|
||||||
for (const option in settings) {
|
for (const option in settings) {
|
||||||
|
@ -89,3 +89,46 @@ function notification(type, message) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Will return the ryzenadj.exe path registered, or default one if not provided.
|
||||||
|
*/
|
||||||
|
function getRyzenAdjExecutablePath() {
|
||||||
|
const settings = require('electron-settings');
|
||||||
|
var ryzen_adj_path = settings.get('settings.ryzen_adj_path');
|
||||||
|
if (!ryzen_adj_path) {
|
||||||
|
ryzen_adj_path = getCurrentWorkingDirectory() + "\\bin\\ryzenadj.exe";
|
||||||
|
}
|
||||||
|
return ryzen_adj_path;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Will fill settings page on render with saved data.
|
||||||
|
*/
|
||||||
|
function preFillSettings() {
|
||||||
|
var ryzen_adj_path = document.getElementById('ryzen_adj_path');
|
||||||
|
var fs = require('fs');
|
||||||
|
ryzen_adj_path.value = getRyzenAdjExecutablePath();
|
||||||
|
if (!fs.existsSync(ryzen_adj_path.value)) {
|
||||||
|
notification('danger', "Path to ryzenadj.exe is wrong, please fix it in settings tab.");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function askingForRyzenAdjExecutablePath() {
|
||||||
|
var remote = require('electron').remote;
|
||||||
|
var dialog = remote.require('electron').dialog;
|
||||||
|
|
||||||
|
var path = dialog.showOpenDialog({
|
||||||
|
properties: ['openFile']
|
||||||
|
}, function (filePaths) {
|
||||||
|
if (typeof filePaths[0] !== 'undefined') {
|
||||||
|
const settings = require('electron-settings');
|
||||||
|
settings.set("settings", {
|
||||||
|
ryzen_adj_path: filePaths[0]
|
||||||
|
});
|
||||||
|
notification('primary', 'Path to ryzenAdj.exe has been saved.');
|
||||||
|
} else {
|
||||||
|
notification('warning', 'No path given, nothing changed.');
|
||||||
|
}
|
||||||
|
preFillSettings();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
20
package-lock.json
generated
20
package-lock.json
generated
@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"name": "electron-quick-start",
|
"name": "ryzen-controller",
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"lockfileVersion": 1,
|
"lockfileVersion": 1,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
@ -196,6 +196,11 @@
|
|||||||
"integrity": "sha1-BKEGZywYsIWrd02YPfo+oTjyIgU=",
|
"integrity": "sha1-BKEGZywYsIWrd02YPfo+oTjyIgU=",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
|
"clone": {
|
||||||
|
"version": "2.1.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/clone/-/clone-2.1.2.tgz",
|
||||||
|
"integrity": "sha1-G39Ln1kfHo+DZwQBYANFoCiHQ18="
|
||||||
|
},
|
||||||
"code-point-at": {
|
"code-point-at": {
|
||||||
"version": "1.1.0",
|
"version": "1.1.0",
|
||||||
"resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz",
|
"resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz",
|
||||||
@ -484,6 +489,15 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"electron-settings": {
|
||||||
|
"version": "3.2.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/electron-settings/-/electron-settings-3.2.0.tgz",
|
||||||
|
"integrity": "sha512-7U+vDKd5Gch4Z9K6FjGq80eB3Anwz2GuPc2h/6hOiuvZrS1w+UNPcAA0oAU8G1s9sWAVEadCsr4ZJR6J4iTdzA==",
|
||||||
|
"requires": {
|
||||||
|
"clone": "^2.1.1",
|
||||||
|
"jsonfile": "^4.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
"env-paths": {
|
"env-paths": {
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/env-paths/-/env-paths-1.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/env-paths/-/env-paths-1.0.0.tgz",
|
||||||
@ -755,8 +769,7 @@
|
|||||||
"graceful-fs": {
|
"graceful-fs": {
|
||||||
"version": "4.1.15",
|
"version": "4.1.15",
|
||||||
"resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.15.tgz",
|
"resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.15.tgz",
|
||||||
"integrity": "sha512-6uHUhOPEBgQ24HM+r6b/QwWfZq+yiFcipKFrOFiBEnWdy5sdzYoi+pJeQaPI5qOLRFqWmAXUPQNsielzdLoecA==",
|
"integrity": "sha512-6uHUhOPEBgQ24HM+r6b/QwWfZq+yiFcipKFrOFiBEnWdy5sdzYoi+pJeQaPI5qOLRFqWmAXUPQNsielzdLoecA=="
|
||||||
"dev": true
|
|
||||||
},
|
},
|
||||||
"har-schema": {
|
"har-schema": {
|
||||||
"version": "2.0.0",
|
"version": "2.0.0",
|
||||||
@ -916,7 +929,6 @@
|
|||||||
"version": "4.0.0",
|
"version": "4.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz",
|
||||||
"integrity": "sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss=",
|
"integrity": "sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss=",
|
||||||
"dev": true,
|
|
||||||
"requires": {
|
"requires": {
|
||||||
"graceful-fs": "^4.1.6"
|
"graceful-fs": "^4.1.6"
|
||||||
}
|
}
|
||||||
|
@ -23,6 +23,7 @@
|
|||||||
"electron-packager": "^13.1.0"
|
"electron-packager": "^13.1.0"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
"electron-settings": "^3.2.0",
|
||||||
"uikit": "^3.0.3"
|
"uikit": "^3.0.3"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user