From 7628866def9258eb9f930728d86317ae03cfe7b7 Mon Sep 17 00:00:00 2001 From: Andre Bernet Date: Sat, 18 Mar 2017 23:59:57 +0100 Subject: [PATCH] Register .otx files on Win --- companion/src/mainwindow.cpp | 6 +----- companion/targets/windows/companion-vs.nsi.in | 10 ++++------ 2 files changed, 5 insertions(+), 11 deletions(-) diff --git a/companion/src/mainwindow.cpp b/companion/src/mainwindow.cpp index ceb3ce158..292b408a7 100644 --- a/companion/src/mainwindow.cpp +++ b/companion/src/mainwindow.cpp @@ -122,11 +122,7 @@ MainWindow::MainWindow(): if (!str.isEmpty()) { int fileType = getStorageType(str); - if (fileType==STORAGE_TYPE_HEX) { - writeFlash(str); - } - - if (fileType==STORAGE_TYPE_EEPE || fileType==STORAGE_TYPE_EEPM || fileType==STORAGE_TYPE_BIN) { + if (fileType==STORAGE_TYPE_EEPE || fileType==STORAGE_TYPE_EEPM || fileType==STORAGE_TYPE_BIN || fileType==STORAGE_TYPE_OTX) { MdiChild * child = createMdiChild(); if (child->loadFile(str)) { if (!(printing && model >= 0 && (getCurrentFirmware()->getCapability(Models) == 0 || modelgetCapability(Models)) && !printfilename.isEmpty())) { diff --git a/companion/targets/windows/companion-vs.nsi.in b/companion/targets/windows/companion-vs.nsi.in index 1fcda2ea3..ad1ba21f6 100644 --- a/companion/targets/windows/companion-vs.nsi.in +++ b/companion/targets/windows/companion-vs.nsi.in @@ -147,11 +147,9 @@ Section "OpenTX Companion" SecDummy ;Store installation folder WriteRegStr HKCU "Software\OpenTX\Companion @VERSION_FAMILY@" "" $INSTDIR - ;Associate with extentions ,bin and .hex - ${registerExtension} "$INSTDIR\companion.exe" ".bin" "BIN_File" - ${registerExtension} "$INSTDIR\companion.exe" ".hex" "HEX_File" - ${registerExtension} "$INSTDIR\companion.exe" ".companion" "EEPE_File" - ${registerExtension} "$INSTDIR\companion.exe" ".eepm" "EEPM_File" + ;Associate with extentions .otx, .bin (TODO: remove .bin) + ${registerExtension} "$INSTDIR\companion.exe" ".bin" "BIN File" + ${registerExtension} "$INSTDIR\companion.exe" ".otx" "OpenTX Settings File" ;Create uninstaller WriteUninstaller "$INSTDIR\Uninstall.exe" @@ -235,7 +233,7 @@ Section "Uninstall" ${unregisterExtension} ".bin" "BIN File" ${unregisterExtension} ".hex" "HEX File" ${unregisterExtension} ".eepm" "EEPE File" - ${unregisterExtension} ".otx" "OpenTX Archive" + ${unregisterExtension} ".otx" "OpenTX Settings File" !insertmacro MUI_STARTMENU_GETFOLDER Application $StartMenuFolder