Skip to content

Commit

Permalink
Added desktop app version
Browse files Browse the repository at this point in the history
  • Loading branch information
A-Herzog committed Jul 4, 2024
1 parent 7c9d24d commit 09dc702
Show file tree
Hide file tree
Showing 12 changed files with 133 additions and 10 deletions.
4 changes: 1 addition & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,9 @@ To use statistical quality control just go to

![Website status](https://img.shields.io/website?url=https%3A%2F%2Fa-herzog.github.io%2FQC%2F)

<!--
You can also download queue calculator as an offline usable Windows application:
You can also download statistical quality control as an offline usable Windows application:

**[QC.exe](https://github.com/A-Herzog/QC/releases/latest/download/QC.exe)**
-->

## License

Expand Down
6 changes: 6 additions & 0 deletions desktop-app/0_Prepare.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
cd ..
call neu.cmd create myapp
mkdir bin
move myapp\bin\*.* bin
rmdir /S /Q myapp
cd desktop-app
3 changes: 3 additions & 0 deletions desktop-app/1_Test.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
cd ..
call neu.cmd run
cd desktop-app
11 changes: 11 additions & 0 deletions desktop-app/2_Build.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
cd ..
del QC.exe
del QC_Linux_MacOS.zip
call neu.cmd build --release
cd desktop-app
"C:\Program Files (x86)\NSIS\makensis.exe" Launcher.nsi
move QC.exe ..
cd ..
move .\dist\QC-release.zip QC_Linux_MacOS.zip
rmdir /S /Q dist
cd desktop-app
4 changes: 4 additions & 0 deletions desktop-app/3_Clean.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
cd ..
rmdir /S /Q bin
rmdir /S /Q .tmp
cd desktop-app
15 changes: 15 additions & 0 deletions desktop-app/HOWTO.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# How to build a desktop app of QC

QC can be used as a web service.
To use the service just go to

**[a-herzog.github.io/QC](https://a-herzog.github.io/QC/)**

QC can also be built to a exe file. Neutralinojs is used for building the standalone app.
Follow these steps to build the stand alone app:

1. Install [NSIS](nsis.sourceforge.net/)
2. Install Neutralinojs: `npm install -g @neutralinojs/neu`
2. Run `0_Prepare.bat` to add the Neutralinojs files to the QC folder.
3. Run `1_Test.bat` to test the standalone app or `2_Build.bat` to build the app. The exe file will appear in the root folder (one level up).
4. Run `3_Clean.bat` to delete the Neutralinojs files created in step 2.
39 changes: 39 additions & 0 deletions desktop-app/Launcher.nsi
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
!define PrgName "Statistical quality control"
!define PrgTempPathName "Statistical quality control"
!define PrgFileName "QC"
!define PrgIcon "..\docs\favicon.ico"
!define Copyright "Alexander Herzog"

Name "${PrgName}"
Caption "${PrgName}"
Icon "${PrgIcon}"
OutFile "${PrgFileName}.exe"

VIProductVersion "1.0.0.0"
VIAddVersionKey "ProductName" "${PrgName}"
VIAddVersionKey "FileDescription" "${PrgName}"
VIAddVersionKey "LegalCopyright" "${Copyright}"
VIAddVersionKey "CompanyName" "${Copyright}"
VIAddVersionKey "FileVersion" "1.0"
VIAddVersionKey "InternalName" "${PrgName}"

ManifestDPIAware true

SilentInstall silent
AutoCloseWindow true
ShowInstDetails nevershow
;ShowInstDetails show

RequestExecutionLevel user

Section ""
SetOutPath "$TEMP\${PrgTempPathName}"

File "..\dist\QC\QC-win_x64.exe"
File "..\dist\QC\resources.neu"
; File "..\dist\QC\WebView2Loader.dll"

ExecWait "$TEMP\${PrgTempPathName}\QC-win_x64.exe"

RmDir /r "$TEMP\${PrgTempPathName}"
SectionEnd
4 changes: 2 additions & 2 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
See the License for the specific language governing permissions and
limitations under the License.
-->
<title>Statistische Qualitätssicherung</title>
<title>Statistical quality control</title>
<meta name="description" content="Statistical quality control">
<meta name="keywords" content="Statistical quality control">
<!-- Begin of language independent part -->
Expand Down Expand Up @@ -89,7 +89,7 @@ <h3 class="h5 text-uppercase" id="appName2">&nbsp;</h3>
<ul class="list-unstyled">
<li>&copy; <a href="https://github.com/A-Herzog" target="_blank">Alexander Herzog</a></li>
<li>
<a href="https://github.com/A-Herzog/StatisticalQualityControl" target="_blank" class="bi-github"> GitHub</a>
<a href="https://github.com/A-Herzog/QC" target="_blank" class="bi-github"> GitHub</a>
<span id="infoLocalDataOnly1">,
<a href="https://aka.ms/impressum" target="_blank" id="linkImprint"></a>,
<a href="https://docs.github.com/site-policy/privacy-policies/github-privacy-statement" target="_blank" id="linkPrivacy"></a>
Expand Down
4 changes: 1 addition & 3 deletions docs/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,7 @@ if (isDesktopApp) {
link.classList.add("link-primary");
}
} else {
/*
const downloadA='<a id="downloadApp" target="_blank" href="https://github.com/A-Herzog/Distributions/releases/latest/download/Distributions.exe" style="display: none;"></a>';
const downloadA='<a id="downloadApp" target="_blank" href="https://github.com/A-Herzog/QC/releases/latest/download/QC.exe" style="display: none;"></a>';
const downloadButton='<button class="btn btn-primary my-1 bi-windows" onclick="document.getElementById(\'downloadApp\').click();"> '+language.GUI.downloadButton+'</button>';
downloadInfoArea.innerHTML="<p class='mt-3'>"+language.GUI.downloadLabel+"</p><p>"+downloadA+downloadButton+"</p>";
*/
}
2 changes: 1 addition & 1 deletion docs/index_de.html
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ <h3 class="h5 text-uppercase" id="appName2">&nbsp;</h3>
<ul class="list-unstyled">
<li>&copy; <a href="https://github.com/A-Herzog" target="_blank">Alexander Herzog</a></li>
<li>
<a href="https://github.com/A-Herzog/StatisticalQualityControl" target="_blank" class="bi-github"> GitHub</a>
<a href="https://github.com/A-Herzog/QC" target="_blank" class="bi-github"> GitHub</a>
<span id="infoLocalDataOnly1">,
<a href="https://aka.ms/impressum" target="_blank" id="linkImprint"></a>,
<a href="https://docs.github.com/site-policy/privacy-policies/github-privacy-statement" target="_blank" id="linkPrivacy"></a>
Expand Down
2 changes: 1 addition & 1 deletion docs/libs/neutralino.js

Large diffs are not rendered by default.

49 changes: 49 additions & 0 deletions neutralino.config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
{
"$schema": "https://raw.githubusercontent.com/neutralinojs/neutralinojs/main/schemas/neutralino.config.schema.json",
"applicationId": "QC",
"version": "2.0.0",
"defaultMode": "window",
"port": 0,
"documentRoot": "/docs/",
"url": "/",
"enableServer": true,
"enableNativeAPI": true,
"tokenSecurity": "one-time",
"logging": {
"enabled": false,
"writeToLogFile": false
},
"nativeAllowList": [
"app.*",
"os.*",
"window.*",
"debug.log"
],
"modes": {
"window": {
"title": "Statistical quality control",
"width": 1440,
"height": 900,
"minWidth": 1024,
"minHeight": 768,
"center": true,
"fullScreen": false,
"alwaysOnTop": false,
"icon": "/docs/favicon.ico",
"enableInspector": false,
"borderless": false,
"maximize": false,
"hidden": false,
"resizable": true,
"exitProcessOnClose": false,
"useSavedState": false
}
},
"cli": {
"binaryName": "QC",
"resourcesPath": "/docs/",
"clientLibrary": "docs/libs/neutralino.js",
"binaryVersion": "5.0.0",
"clientVersion": "5.0.1"
}
}

0 comments on commit 09dc702

Please sign in to comment.