From 3ea75caa419cfb20565994b5469d8d08f38e96ff Mon Sep 17 00:00:00 2001 From: Ad5001 Date: Thu, 26 Aug 2021 19:34:12 +0200 Subject: [PATCH] Fixing issue with opening files on Windows. --- build-windows.bat | 3 ++- win/installer.nsi | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/build-windows.bat b/build-windows.bat index 70d3de0..ed31a37 100644 --- a/build-windows.bat +++ b/build-windows.bat @@ -1,2 +1,3 @@ -python -m pip install -U pyinstaller +rem Need pyinstaller >= 4.3, or there is an issue regarding the PATH of the building. +python -m pip install -U pyinstaller>=4.3 pyinstaller --add-data "logplotter.svg;." --add-data "LogarithmPlotter/qml;qml" --noconsole LogarithmPlotter/logarithmplotter.py --icon=win/logarithmplotter.ico -n logarithmplotter diff --git a/win/installer.nsi b/win/installer.nsi index 1ceaab2..67c4f91 100644 --- a/win/installer.nsi +++ b/win/installer.nsi @@ -184,8 +184,8 @@ Section "" ; Registering mime type WriteRegStr HKLM ${REG_LPFCLASS} "" "Logarithm Plot File" WriteRegStr HKLM "${REG_LPFCLASS}\DefaultIcon" "" "$INSTDIR\logarithmplotter.exe,0" ; I'd like to put the logplotterfile icon, but this seems far too difficult to do. - WriteRegStr HKLM "${REG_LPFCLASS}\shell\open\command" "" "$INSTDIR\logarithmplotter.exe $\"$$1$\"" - WriteRegStr HKLM "${REG_LPFCLASS}\shell\edit\command" "" "$INSTDIR\logarithmplotter.exe $\"$$1$\"" + WriteRegStr HKLM "${REG_LPFCLASS}\shell\open\command" "" "$INSTDIR\logarithmplotter.exe $\"$%1$\"" + WriteRegStr HKLM "${REG_LPFCLASS}\shell\edit\command" "" "$INSTDIR\logarithmplotter.exe $\"$%1$\"" WriteRegStr HKLM ${REG_LPFEXT} "" "${PROG_ID}" WriteRegStr HKLM ${REG_LPFEXT} "Content Type" "application/x-logarithm-plot" WriteRegStr HKLM ${REG_LPFEXT} "PerceivedType" "Application"