From c8078d352a7f54a4a97d25af080155d3f875536a Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Mon, 16 Jun 2014 22:49:34 -0700 Subject: java: Bump java library versions for next release Prepare for future release by bumping java versions now Signed-off-by: Keith Packard --- micropeak/MicroData.java | 4 ++-- micropeak/MicroDataPoint.java | 2 +- micropeak/MicroDeviceDialog.java | 2 +- micropeak/MicroDownload.java | 4 ++-- micropeak/MicroExport.java | 4 ++-- micropeak/MicroFile.java | 4 ++-- micropeak/MicroFileChooser.java | 4 ++-- micropeak/MicroFrame.java | 2 +- micropeak/MicroGraph.java | 4 ++-- micropeak/MicroPeak.java | 4 ++-- micropeak/MicroRaw.java | 4 ++-- micropeak/MicroSave.java | 4 ++-- micropeak/MicroSerial.java | 2 +- micropeak/MicroSerialLog.java | 2 +- micropeak/MicroStats.java | 4 ++-- micropeak/MicroStatsTable.java | 4 ++-- micropeak/MicroUSB.java | 2 +- 17 files changed, 28 insertions(+), 28 deletions(-) (limited to 'micropeak') diff --git a/micropeak/MicroData.java b/micropeak/MicroData.java index ca211f16..6c9447aa 100644 --- a/micropeak/MicroData.java +++ b/micropeak/MicroData.java @@ -20,8 +20,8 @@ package org.altusmetrum.micropeak; import java.lang.*; import java.io.*; import java.util.*; -import org.altusmetrum.altoslib_4.*; -import org.altusmetrum.altosuilib_2.*; +import org.altusmetrum.altoslib_5.*; +import org.altusmetrum.altosuilib_3.*; class MicroIterator implements Iterator { int i; diff --git a/micropeak/MicroDataPoint.java b/micropeak/MicroDataPoint.java index 5a5e8c37..849ae536 100644 --- a/micropeak/MicroDataPoint.java +++ b/micropeak/MicroDataPoint.java @@ -17,7 +17,7 @@ package org.altusmetrum.micropeak; -import org.altusmetrum.altosuilib_2.*; +import org.altusmetrum.altosuilib_3.*; public class MicroDataPoint implements AltosUIDataPoint { public double time; diff --git a/micropeak/MicroDeviceDialog.java b/micropeak/MicroDeviceDialog.java index 305421a7..304eac7d 100644 --- a/micropeak/MicroDeviceDialog.java +++ b/micropeak/MicroDeviceDialog.java @@ -21,7 +21,7 @@ import javax.swing.*; import java.awt.*; import java.awt.event.*; import java.util.*; -import org.altusmetrum.altosuilib_2.*; +import org.altusmetrum.altosuilib_3.*; public class MicroDeviceDialog extends AltosDeviceDialog { diff --git a/micropeak/MicroDownload.java b/micropeak/MicroDownload.java index 1c70e1d1..32dd0450 100644 --- a/micropeak/MicroDownload.java +++ b/micropeak/MicroDownload.java @@ -23,8 +23,8 @@ import javax.swing.*; import java.io.*; import java.util.concurrent.*; import java.util.*; -import org.altusmetrum.altoslib_4.*; -import org.altusmetrum.altosuilib_2.*; +import org.altusmetrum.altoslib_5.*; +import org.altusmetrum.altosuilib_3.*; public class MicroDownload extends AltosUIDialog implements Runnable, ActionListener, MicroSerialLog, WindowListener { MicroPeak owner; diff --git a/micropeak/MicroExport.java b/micropeak/MicroExport.java index 87d5499b..8d62ace6 100644 --- a/micropeak/MicroExport.java +++ b/micropeak/MicroExport.java @@ -23,8 +23,8 @@ import java.util.ArrayList; import java.awt.*; import javax.swing.*; import javax.swing.filechooser.FileNameExtensionFilter; -import org.altusmetrum.altoslib_4.*; -import org.altusmetrum.altosuilib_2.*; +import org.altusmetrum.altoslib_5.*; +import org.altusmetrum.altosuilib_3.*; public class MicroExport extends JFileChooser { diff --git a/micropeak/MicroFile.java b/micropeak/MicroFile.java index 019346ae..d6abfcb7 100644 --- a/micropeak/MicroFile.java +++ b/micropeak/MicroFile.java @@ -19,8 +19,8 @@ package org.altusmetrum.micropeak; import java.io.*; import java.util.*; -import org.altusmetrum.altoslib_4.*; -import org.altusmetrum.altosuilib_2.*; +import org.altusmetrum.altoslib_5.*; +import org.altusmetrum.altosuilib_3.*; public class MicroFile { diff --git a/micropeak/MicroFileChooser.java b/micropeak/MicroFileChooser.java index 00b6690a..371c22d0 100644 --- a/micropeak/MicroFileChooser.java +++ b/micropeak/MicroFileChooser.java @@ -20,8 +20,8 @@ package org.altusmetrum.micropeak; import javax.swing.*; import javax.swing.filechooser.FileNameExtensionFilter; import java.io.*; -import org.altusmetrum.altoslib_4.*; -import org.altusmetrum.altosuilib_2.*; +import org.altusmetrum.altoslib_5.*; +import org.altusmetrum.altosuilib_3.*; public class MicroFileChooser extends JFileChooser { JFrame frame; diff --git a/micropeak/MicroFrame.java b/micropeak/MicroFrame.java index 5bfe5bf7..f82d1c5e 100644 --- a/micropeak/MicroFrame.java +++ b/micropeak/MicroFrame.java @@ -21,7 +21,7 @@ import java.awt.*; import java.awt.event.*; import javax.swing.*; import java.util.*; -import org.altusmetrum.altosuilib_2.*; +import org.altusmetrum.altosuilib_3.*; public class MicroFrame extends AltosUIFrame { static String[] micro_icon_names = { diff --git a/micropeak/MicroGraph.java b/micropeak/MicroGraph.java index f9968919..811b1e7c 100644 --- a/micropeak/MicroGraph.java +++ b/micropeak/MicroGraph.java @@ -22,8 +22,8 @@ import java.util.ArrayList; import java.awt.*; import javax.swing.*; -import org.altusmetrum.altoslib_4.*; -import org.altusmetrum.altosuilib_2.*; +import org.altusmetrum.altoslib_5.*; +import org.altusmetrum.altosuilib_3.*; import org.jfree.ui.*; import org.jfree.chart.*; diff --git a/micropeak/MicroPeak.java b/micropeak/MicroPeak.java index 19e91660..d7d393ba 100644 --- a/micropeak/MicroPeak.java +++ b/micropeak/MicroPeak.java @@ -23,8 +23,8 @@ import javax.swing.*; import java.io.*; import java.util.concurrent.*; import java.util.*; -import org.altusmetrum.altoslib_4.*; -import org.altusmetrum.altosuilib_2.*; +import org.altusmetrum.altoslib_5.*; +import org.altusmetrum.altosuilib_3.*; public class MicroPeak extends MicroFrame implements ActionListener, ItemListener { diff --git a/micropeak/MicroRaw.java b/micropeak/MicroRaw.java index 26d62012..7a225dcb 100644 --- a/micropeak/MicroRaw.java +++ b/micropeak/MicroRaw.java @@ -20,8 +20,8 @@ package org.altusmetrum.micropeak; import java.awt.*; import java.io.*; import javax.swing.*; -import org.altusmetrum.altoslib_4.*; -import org.altusmetrum.altosuilib_2.*; +import org.altusmetrum.altoslib_5.*; +import org.altusmetrum.altosuilib_3.*; public class MicroRaw extends JTextArea { diff --git a/micropeak/MicroSave.java b/micropeak/MicroSave.java index 7c5d6abe..9497fb33 100644 --- a/micropeak/MicroSave.java +++ b/micropeak/MicroSave.java @@ -24,8 +24,8 @@ import javax.swing.filechooser.FileNameExtensionFilter; import java.io.*; import java.util.concurrent.*; import java.util.*; -import org.altusmetrum.altoslib_4.*; -import org.altusmetrum.altosuilib_2.*; +import org.altusmetrum.altoslib_5.*; +import org.altusmetrum.altosuilib_3.*; public class MicroSave extends JFileChooser { diff --git a/micropeak/MicroSerial.java b/micropeak/MicroSerial.java index 37b68636..f5108c22 100644 --- a/micropeak/MicroSerial.java +++ b/micropeak/MicroSerial.java @@ -20,7 +20,7 @@ package org.altusmetrum.micropeak; import java.util.*; import java.io.*; import libaltosJNI.*; -import org.altusmetrum.altosuilib_2.*; +import org.altusmetrum.altosuilib_3.*; public class MicroSerial extends InputStream { SWIGTYPE_p_altos_file file; diff --git a/micropeak/MicroSerialLog.java b/micropeak/MicroSerialLog.java index 7300f06d..c49b69ab 100644 --- a/micropeak/MicroSerialLog.java +++ b/micropeak/MicroSerialLog.java @@ -20,7 +20,7 @@ package org.altusmetrum.micropeak; import java.util.*; import java.io.*; import libaltosJNI.*; -import org.altusmetrum.altosuilib_2.*; +import org.altusmetrum.altosuilib_3.*; public interface MicroSerialLog { diff --git a/micropeak/MicroStats.java b/micropeak/MicroStats.java index 45c9f225..3fc05bd6 100644 --- a/micropeak/MicroStats.java +++ b/micropeak/MicroStats.java @@ -18,8 +18,8 @@ package org.altusmetrum.micropeak; import java.io.*; -import org.altusmetrum.altoslib_4.*; -import org.altusmetrum.altosuilib_2.*; +import org.altusmetrum.altoslib_5.*; +import org.altusmetrum.altosuilib_3.*; public class MicroStats { double coast_height; diff --git a/micropeak/MicroStatsTable.java b/micropeak/MicroStatsTable.java index 3b17e731..d6265fe8 100644 --- a/micropeak/MicroStatsTable.java +++ b/micropeak/MicroStatsTable.java @@ -19,8 +19,8 @@ package org.altusmetrum.micropeak; import java.awt.*; import javax.swing.*; -import org.altusmetrum.altoslib_4.*; -import org.altusmetrum.altosuilib_2.*; +import org.altusmetrum.altoslib_5.*; +import org.altusmetrum.altosuilib_3.*; public class MicroStatsTable extends JComponent implements AltosFontListener { GridBagLayout layout; diff --git a/micropeak/MicroUSB.java b/micropeak/MicroUSB.java index 437fa0bc..24f6722b 100644 --- a/micropeak/MicroUSB.java +++ b/micropeak/MicroUSB.java @@ -19,7 +19,7 @@ package org.altusmetrum.micropeak; import java.util.*; import libaltosJNI.*; -import org.altusmetrum.altosuilib_2.*; +import org.altusmetrum.altosuilib_3.*; public class MicroUSB extends altos_device implements AltosDevice { -- cgit v1.2.3 From 3f4e765c05ddbae83ca0c0176572cd698f285d08 Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Tue, 17 Jun 2014 20:46:33 -0700 Subject: Fix java version detection and downloading Move java stuff to a common include file, java.nsh Let any version no older than 1.6 serve by using ${VersionCompare} Use version 6 downloads as those don't require a click-through agreement. Signed-off-by: Keith Packard --- altosui/Instdrv/NSIS/Includes/java.nsh | 50 ++++++++++++++++++++++++++++++++++ altosui/altos-windows.nsi.in | 47 ++------------------------------ micropeak/Makefile.am | 2 +- micropeak/micropeak-windows.nsi.in | 46 ++----------------------------- telegps/telegps-windows.nsi.in | 47 ++------------------------------ 5 files changed, 58 insertions(+), 134 deletions(-) create mode 100644 altosui/Instdrv/NSIS/Includes/java.nsh (limited to 'micropeak') diff --git a/altosui/Instdrv/NSIS/Includes/java.nsh b/altosui/Instdrv/NSIS/Includes/java.nsh new file mode 100644 index 00000000..ebf1c5b9 --- /dev/null +++ b/altosui/Instdrv/NSIS/Includes/java.nsh @@ -0,0 +1,50 @@ +!include WordFunc.nsh + +; Definitions for Java Detection + +!define JRE_VERSION "1.6" +!define JRE32_URL "http://javadl.sun.com/webapps/download/AutoDL?BundleId=52247&/jre-6u27-windows-i586.exe" +!define JRE64_URL "http://javadl.sun.com/webapps/download/AutoDL?BundleId=52249&/jre-6u27-windows-x64.exe" + +Var JavaDownload +Var JavaBits + +Function GetJRE + ${If} ${RunningX64} + StrCpy $JavaDownload ${JRE64_URL} + StrCpy $JavaBits "64" + ${Else} + StrCpy $JavaDownload ${JRE32_URL} + StrCpy $JavaBits "32" + ${EndIf} + + MessageBox MB_OK "This product uses Java ${JRE_VERSION}, \ + $JavaBits bits, it will now \ + be downloaded and installed" + + StrCpy $2 "$TEMP\Java Runtime Environment.exe" + nsisdl::download /TIMEOUT=30000 $JavaDownload $2 + Pop $R0 ;Get the return value + StrCmp $R0 "success" +3 + MessageBox MB_OK "Download failed: $R0" + Quit + ExecWait $2 + Delete $2 +FunctionEnd + +Function DetectJRE + ReadRegStr $2 HKLM "SOFTWARE\JavaSoft\Java Runtime Environment" \ + "CurrentVersion" + + DetailPrint "Desired Java version ${JRE_VERSION}" + DetailPrint "Actual Java version $2" + + ${VersionCompare} $2 ${JRE_VERSION} $3 + + IntCmp $3 1 done done + + Call GetJRE + +done: + +FunctionEnd diff --git a/altosui/altos-windows.nsi.in b/altosui/altos-windows.nsi.in index b72772e2..ab5ac453 100644 --- a/altosui/altos-windows.nsi.in +++ b/altosui/altos-windows.nsi.in @@ -1,10 +1,8 @@ !addplugindir Instdrv/NSIS/Plugins +!addincludedir Instdrv/NSIS/Includes !include x64.nsh -; Definitions for Java 1.7 Detection -!define JRE_VERSION "1.7" -!define JRE_ALTERNATE "1.6" -!define JRE32_URL "http://javadl.sun.com/webapps/download/AutoDL?BundleId=83383&/jre-7u51-windows-i586.exe" -!define JRE64_URL "http://javadl.sun.com/webapps/download/AutoDL?BundleId=83385&/jre-7u51-windows-x64.exe" +!include java.nsh + !define PRODUCT_NAME "Altus Metrum Windows Software" Name "Altus Metrum Installer" @@ -35,45 +33,6 @@ Function .onInit ${EndIf} FunctionEnd -Var JavaDownload -Var JavaBits - -Function GetJRE - ${If} ${RunningX64} - StrCpy $JavaDownload ${JRE64_URL} - StrCpy $JavaBits "64" - ${Else} - StrCpy $JavaDownload ${JRE32_URL} - StrCpy $JavaBits "32" - ${EndIf} - - MessageBox MB_OK "${PRODUCT_NAME} uses Java ${JRE_VERSION}, \ - $JavaBits bits, it will now \ - be downloaded and installed" - - StrCpy $2 "$TEMP\Java Runtime Environment.exe" - nsisdl::download /TIMEOUT=30000 $JavaDownload $2 - Pop $R0 ;Get the return value - StrCmp $R0 "success" +3 - MessageBox MB_OK "Download failed: $R0" - Quit - ExecWait $2 - Delete $2 -FunctionEnd - -Function DetectJRE - ReadRegStr $2 HKLM "SOFTWARE\JavaSoft\Java Runtime Environment" \ - "CurrentVersion" - - StrCmp $2 ${JRE_VERSION} done - - StrCmp $2 ${JRE_ALTERNATE} done - - Call GetJRE - - done: -FunctionEnd - ; Pages to present Page license diff --git a/micropeak/Makefile.am b/micropeak/Makefile.am index 216874df..39ebc43a 100644 --- a/micropeak/Makefile.am +++ b/micropeak/Makefile.am @@ -272,7 +272,7 @@ $(MACOSX_DIST): $(MACOSX_FILES) $(WINDOWS_DIST): $(WINDOWS_FILES) micropeak-windows.nsi -rm -f $@ - makensis -Omicropeak-windows.log "-XOutFile $@" "-DVERSION=$(VERSION)" micropeak-windows.nsi + makensis -Omicropeak-windows.log "-XOutFile $@" "-DVERSION=$(VERSION)" micropeak-windows.nsi || (cat micropeak-windows.log && exit 1) Manifest.txt: Makefile echo 'Main-Class: org.altusmetrum.micropeak.MicroPeak' > $@ diff --git a/micropeak/micropeak-windows.nsi.in b/micropeak/micropeak-windows.nsi.in index 6dc9d8c1..bb5da1bb 100644 --- a/micropeak/micropeak-windows.nsi.in +++ b/micropeak/micropeak-windows.nsi.in @@ -1,11 +1,7 @@ !addplugindir Instdrv/NSIS/Plugins +!addincludedir ../altosui/Instdrv/NSIS/Includes !include x64.nsh -; Definitions for Java 1.7 Detection -!define JRE_VERSION "1.7" -!define JRE_ALTERNATE "1.6" -!define JRE32_URL "http://javadl.sun.com/webapps/download/AutoDL?BundleId=83383&/jre-7u51-windows-i586.exe" -!define JRE64_URL "http://javadl.sun.com/webapps/download/AutoDL?BundleId=83385&/jre-7u51-windows-x64.exe" -!define PRODUCT_NAME "Altus Metrum Windows Software" +!include java.nsh Name "Altus Metrum MicroPeak Installer" @@ -35,44 +31,6 @@ Function .onInit ${EndIf} FunctionEnd -Var JavaDownload -Var JavaBits - -Function GetJRE - ${If} ${RunningX64} - StrCpy $JavaDownload ${JRE64_URL} - StrCpy $JavaBits "64" - ${Else} - StrCpy $JavaDownload ${JRE32_URL} - StrCpy $JavaBits "32" - ${EndIf} - - MessageBox MB_OK "${PRODUCT_NAME} uses Java ${JRE_VERSION}, \ - $JavaBits bits, it will now \ - be downloaded and installed" - - StrCpy $2 "$TEMP\Java Runtime Environment.exe" - nsisdl::download /TIMEOUT=30000 $JavaDownload $2 - Pop $R0 ;Get the return value - StrCmp $R0 "success" +3 - MessageBox MB_OK "Download failed: $R0" - Quit - ExecWait $2 - Delete $2 -FunctionEnd - -Function DetectJRE - ReadRegStr $2 HKLM "SOFTWARE\JavaSoft\Java Runtime Environment" \ - "CurrentVersion" - StrCmp $2 ${JRE_VERSION} done - - StrCmp $2 ${JRE_ALTERNATE} done - - Call GetJRE - - done: -FunctionEnd - ; Pages to present Page license diff --git a/telegps/telegps-windows.nsi.in b/telegps/telegps-windows.nsi.in index e6798c46..b4145520 100644 --- a/telegps/telegps-windows.nsi.in +++ b/telegps/telegps-windows.nsi.in @@ -1,11 +1,7 @@ !addplugindir ../altosui/Instdrv/NSIS/Plugins +!addincludedir ../altosui/Instdrv/NSIS/Includes !include x64.nsh -; Definitions for Java 1.7 Detection -!define JRE_VERSION "1.7" -!define JRE_ALTERNATE "1.6" -!define JRE32_URL "http://javadl.sun.com/webapps/download/AutoDL?BundleId=83383&/jre-7u51-windows-i586.exe" -!define JRE64_URL "http://javadl.sun.com/webapps/download/AutoDL?BundleId=83385&/jre-7u51-windows-x64.exe" -!define PRODUCT_NAME "TeleGPS Windows Software" +!include java.nsh Name "TeleGPS Installer" @@ -35,45 +31,6 @@ Function .onInit ${EndIf} FunctionEnd -Var JavaDownload -Var JavaBits - -Function GetJRE - ${If} ${RunningX64} - StrCpy $JavaDownload ${JRE64_URL} - StrCpy $JavaBits "64" - ${Else} - StrCpy $JavaDownload ${JRE32_URL} - StrCpy $JavaBits "32" - ${EndIf} - - MessageBox MB_OK "${PRODUCT_NAME} uses Java ${JRE_VERSION}, \ - $JavaBits bits, it will now \ - be downloaded and installed" - - StrCpy $2 "$TEMP\Java Runtime Environment.exe" - nsisdl::download /TIMEOUT=30000 $JavaDownload $2 - Pop $R0 ;Get the return value - StrCmp $R0 "success" +3 - MessageBox MB_OK "Download failed: $R0" - Quit - ExecWait $2 - Delete $2 -FunctionEnd - -Function DetectJRE - ReadRegStr $2 HKLM "SOFTWARE\JavaSoft\Java Runtime Environment" \ - "CurrentVersion" - - StrCmp $2 ${JRE_VERSION} done - - StrCmp $2 ${JRE_ALTERNATE} done - - Call GetJRE - - done: -FunctionEnd - ; Pages to present Page license -- cgit v1.2.3 From 5871225a0c442cf5afa41a444ff8bfb8f4002721 Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Wed, 18 Jun 2014 02:16:51 -0700 Subject: windows installer: Create file associations for Windows. This makes icons appear for the files in the file manager, and lets you double-click on the files to open the appropriate application. Signed-off-by: Keith Packard --- altosui/Makefile.am | 2 +- altosui/altos-windows.nsi.in | 118 ++++++++++++++++++++++++++++-------- micropeak/Makefile.am | 2 +- micropeak/micropeak-windows.nsi.in | 120 +++++++++++++++++++++++++++---------- telegps/Makefile.am | 2 +- telegps/telegps-windows.nsi.in | 118 ++++++++++++++++++++++++++++-------- 6 files changed, 277 insertions(+), 85 deletions(-) (limited to 'micropeak') diff --git a/altosui/Makefile.am b/altosui/Makefile.am index 98a5e193..45f4467a 100644 --- a/altosui/Makefile.am +++ b/altosui/Makefile.am @@ -90,7 +90,7 @@ ICONJAR= -C $(ICONDIR) altus-metrum-16.png \ -C $(ICONDIR) altus-metrum-128.png \ -C $(ICONDIR) altus-metrum-256.png -WINDOWS_ICON=$(ICONDIR)/altus-metrum.ico +WINDOWS_ICON=$(ICONDIR)/altus-metrum.ico $(ICONDIR)/altus-metrum.exe MACOSX_ICON=$(ICONDIR)/AltosUIIcon.icns # Firmware diff --git a/altosui/altos-windows.nsi.in b/altosui/altos-windows.nsi.in index ab5ac453..da36ad90 100644 --- a/altosui/altos-windows.nsi.in +++ b/altosui/altos-windows.nsi.in @@ -2,16 +2,22 @@ !addincludedir Instdrv/NSIS/Includes !include x64.nsh !include java.nsh +!include refresh-sh.nsh -!define PRODUCT_NAME "Altus Metrum Windows Software" +!define REG_NAME "Altus Metrum" +!define PROG_ID "org.altusmetrum.altosui.1" +!define PROG_ALTOSUI "org.altusmetrum.altosui.1" +!define FAT_NAME "altosui-fat.jar" +!define ICO_ICO "altus-metrum.ico" +!define ICO_EXE "altus-metrum.exe" -Name "Altus Metrum Installer" +Name "${REG_NAME} Installer" ; Default install directory InstallDir "$PROGRAMFILES\AltusMetrum" ; Tell the installer where to re-install a new version -InstallDirRegKey HKLM "Software\AltusMetrum" "Install_Dir" +InstallDirRegKey HKLM "Software\${REG_NAME}" "Install_Dir" LicenseText "GNU General Public License Version 2" LicenseData "../COPYING" @@ -21,7 +27,7 @@ RequestExecutionLevel admin ShowInstDetails Show -ComponentText "Altus Metrum Software and Driver Installer" +ComponentText "${REG_NAME} Software and Driver Installer" Function .onInit DetailPrint "Checking host operating system" @@ -33,6 +39,16 @@ Function .onInit ${EndIf} FunctionEnd +Function un.onInit + DetailPrint "Checking host operating system" + ${If} ${RunningX64} + DetailPrint "Installer running on 64-bit host" + SetRegView 64 + StrCpy $INSTDIR "$PROGRAMFILES64\AltusMetrum" + ${DisableX64FSRedirection} + ${EndIf} +FunctionEnd + ; Pages to present Page license @@ -68,12 +84,12 @@ done: SectionEnd -Section "AltosUI Application" +Section "${REG_NAME} Application" Call DetectJRE SetOutPath $INSTDIR - File "altosui-fat.jar" + File "${FAT_NAME}" File "altoslib_@ALTOSLIB_VERSION@.jar" File "altosuilib_@ALTOSUILIB_VERSION@.jar" File "cmudict04.jar" @@ -88,13 +104,13 @@ Section "AltosUI Application" File "*.dll" - File "../icon/*.ico" + File "../icon/${ICO_ICO}" - CreateShortCut "$SMPROGRAMS\AltusMetrum.lnk" "$SYSDIR\javaw.exe" "-jar altosui-fat.jar" "$INSTDIR\altus-metrum.ico" + CreateShortCut "$SMPROGRAMS\${REG_NAME}.lnk" "$SYSDIR\javaw.exe" "-jar ${FAT_NAME}" "$INSTDIR\${ICO_ICO}" SectionEnd -Section "AltosUI Desktop Shortcut" - CreateShortCut "$DESKTOP\AltusMetrum.lnk" "$INSTDIR\altosui-fat.jar" "" "$INSTDIR\altus-metrum.ico" +Section "${REG_NAME} Desktop Shortcut" + CreateShortCut "$DESKTOP\${REG_NAME}.lnk" "$INSTDIR\${FAT_NAME}" "" "$INSTDIR\${ICO_ICO}" SectionEnd Section "TeleMetrum, TeleDongle and TeleBT Firmware" @@ -126,38 +142,88 @@ Section "Documentation" File "../doc/telemini.pdf" SectionEnd +Section "File Associations" + + SetOutPath $INSTDIR + + File "../icon/${ICO_EXE}" + + ; application elements + + WriteRegStr HKCR "${PROG_ID}" "" "Altus Metrum Data File" + WriteRegStr HKCR "${PROG_ID}" "FriendlyTypeName" "Altus Metrum Data File" + WriteRegStr HKCR "${PROG_ID}\CurVer" "" "${PROG_ID}" + WriteRegStr HKCR "${PROG_ID}\DefaultIcon" "" '"$INSTDIR\${ICO_EXE}",-101' + WriteRegExpandStr HKCR "${PROG_ID}\shell\play\command" "" '"%SYSTEMROOT%\System32\javaw.exe" -Djava.library.path="$INSTDIR" -jar "$INSTDIR\${FAT_NAME}" "%1"' + + ; .eeprom elements + + WriteRegStr HKCR ".eeprom" "" "${PROG_ALTOSUI}" + WriteRegStr HKCR ".eeprom" "PerceivedType" "Altus Metrum Log File" + WriteRegStr HKCR ".eeprom" "Content Type" "application/altosui" + + WriteRegStr HKCR ".eeprom\OpenWithProgids" "${PROG_ID}" "" + WriteRegStr HKCR ".eeprom\${PROG_ID}" "" "${REG_NAME}" + + ; .telem elements + + WriteRegStr HKCR ".telem" "" "${PROG_ALTOSUI}" + WriteRegStr HKCR ".telem" "PerceivedType" "Altus Metrum Telemetry File" + WriteRegStr HKCR ".telem" "Content Type" "application/altosui" + + WriteRegStr HKCR ".telem\OpenWithProgids" "${PROG_ID}" "" + WriteRegStr HKCR ".telem\${PROG_ID}" "" "${REG_NAME}" + + Call RefreshShellIcons +SectionEnd + Section "Uninstaller" ; Deal with the uninstaller + ${DisableX64FSRedirection} SetOutPath $INSTDIR ; Write the install path to the registry - WriteRegStr HKLM SOFTWARE\AltusMetrum "Install_Dir" "$INSTDIR" + WriteRegStr HKLM "SOFTWARE\${REG_NAME}" "Install_Dir" "$INSTDIR" ; Write the uninstall keys for windows - WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\AltusMetrum" "DisplayName" "Altus Metrum" - WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\AltusMetrum" "UninstallString" '"$INSTDIR\uninstall.exe"' - WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\AltusMetrum" "NoModify" "1" - WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\AltusMetrum" "NoRepair" "1" + WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\${REG_NAME}" "DisplayName" "${REG_NAME}" + WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\${REG_NAME}" "UninstallString" '"$INSTDIR\uninstall-${REG_NAME}.exe"' + WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\${REG_NAME}" "NoModify" "1" + WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\${REG_NAME}" "NoRepair" "1" - WriteUninstaller "uninstall.exe" + WriteUninstaller "uninstall-${REG_NAME}.exe" SectionEnd Section "Uninstall" - DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\AltusMetrum" - DeleteRegKey HKLM "Software\AltusMetrum" - Delete "$INSTDIR\*.*" - RMDir "$INSTDIR" + ${DisableX64FSRedirection} - ; Remove devices - InstDrv::InitDriverSetup /NOUNLOAD {4D36E96D-E325-11CE-BFC1-08002BE10318} AltusMetrumSerial - InstDrv::DeleteOemInfFiles /NOUNLOAD - InstDrv::RemoveAllDevices + DeleteRegKey HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\${REG_NAME}" + DeleteRegKey HKLM "SOFTWARE\${REG_NAME}" + + DetailPrint "Delete uninstall reg entries" + + DeleteRegKey HKCR "${PROG_ID}" + + DeleteRegKey HKCR ".eeprom\${PROG_ID}" + DeleteRegValue HKCR ".eeprom\OpenWithProgids" "${PROG_ID}" + + DeleteRegKey HKCR ".telem\${PROG_ID}" + DeleteRegValue HKCR ".telem\OpenWithProgids" "${PROG_ID}" + + DetailPrint "Delete file association reg entries" + + Delete "$INSTDIR\${FAT_NAME}" + Delete "$INSTDIR\uninstall-${REG_NAME}.exe" + + Delete "$INSTDIR\${ICO_ICO}" + Delete "$INSTDIR\${ICO_EXE}" ; Remove shortcuts, if any - Delete "$SMPROGRAMS\AltusMetrum.lnk" - Delete "$DESKTOP\AltusMetrum.lnk" + Delete "$SMPROGRAMS\${REG_NAME}.lnk" + Delete "$DESKTOP\${REG_NAME}.lnk" + Call un.RefreshShellIcons SectionEnd diff --git a/micropeak/Makefile.am b/micropeak/Makefile.am index 39ebc43a..1e09e523 100644 --- a/micropeak/Makefile.am +++ b/micropeak/Makefile.am @@ -71,7 +71,7 @@ ICONJAR= -C $(ICONDIR) micropeak-16.png \ -C $(ICONDIR) micropeak-128.png \ -C $(ICONDIR) micropeak-256.png -WINDOWS_ICON=$(ICONDIR)/micro-peak.ico +WINDOWS_ICON=$(ICONDIR)/micro-peak.ico $(ICONDIR)/micro-peak.exe MACOSX_ICON=$(ICONDIR)/MicroPeak.icns desktopdir = $(datadir)/applications diff --git a/micropeak/micropeak-windows.nsi.in b/micropeak/micropeak-windows.nsi.in index bb5da1bb..d8e47505 100644 --- a/micropeak/micropeak-windows.nsi.in +++ b/micropeak/micropeak-windows.nsi.in @@ -1,15 +1,22 @@ -!addplugindir Instdrv/NSIS/Plugins +!addplugindir ../altosui/Instdrv/NSIS/Plugins !addincludedir ../altosui/Instdrv/NSIS/Includes !include x64.nsh !include java.nsh +!include refresh-sh.nsh -Name "Altus Metrum MicroPeak Installer" +!define REG_NAME "MicroPeak" +!define PROG_ID "org.altusmetrum.micropeak.1" +!define FAT_NAME "micropeak-fat.jar" +!define ICO_ICO "micro-peak.ico" +!define ICO_EXE "micro-peak.exe" + +Name "${REG_NAME} Installer" ; Default install directory InstallDir "$PROGRAMFILES\AltusMetrum" ; Tell the installer where to re-install a new version -InstallDirRegKey HKLM "Software\AltusMetrum" "Install_Dir" +InstallDirRegKey HKLM "Software\${REG_NAME}" "Install_Dir" LicenseText "GNU General Public License Version 2" LicenseData "../COPYING" @@ -19,7 +26,7 @@ RequestExecutionLevel admin ShowInstDetails Show -ComponentText "Altus Metrum MicroPeak Software Installer" +ComponentText "${REG_NAME} Software and Driver Installer" Function .onInit DetailPrint "Checking host operating system" @@ -31,6 +38,16 @@ Function .onInit ${EndIf} FunctionEnd +Function un.onInit + DetailPrint "Checking host operating system" + ${If} ${RunningX64} + DetailPrint "Installer running on 64-bit host" + SetRegView 64 + StrCpy $INSTDIR "$PROGRAMFILES64\AltusMetrum" + ${DisableX64FSRedirection} + ${EndIf} +FunctionEnd + ; Pages to present Page license @@ -43,12 +60,21 @@ UninstPage instfiles ; And the stuff to install -Section "MicroPeak Application" +Section "FTDI USB Driver" + SetOutPath $INSTDIR + + File "CDM20824_Setup.exe" + + StrCpy $2 "$INSTDIR\CDM20824_Setup.exe" + ExecWait $2 +SectionEnd + +Section "${REG_NAME} Application" Call DetectJRE SetOutPath $INSTDIR - File "micropeak-fat.jar" + File "${FAT_NAME}" File "altoslib_@ALTOSLIB_VERSION@.jar" File "altosuilib_@ALTOSUILIB_VERSION@.jar" File "jfreechart.jar" @@ -56,22 +82,13 @@ Section "MicroPeak Application" File "*.dll" - File "../icon/*.ico" + File "../icon/${ICO_ICO}" - CreateShortCut "$SMPROGRAMS\MicroPeak.lnk" "$SYSDIR\javaw.exe" "-jar micropeak-fat.jar" "$INSTDIR\micro-peak.ico" + CreateShortCut "$SMPROGRAMS\${REG_NAME}.lnk" "$SYSDIR\javaw.exe" "-jar ${FAT_NAME}" "$INSTDIR\${ICO_ICO}" SectionEnd -Section "FTDI USB Driver" - SetOutPath $INSTDIR - - File "CDM20824_Setup.exe" - - StrCpy $2 "$INSTDIR\CDM20824_Setup.exe" - ExecWait $2 -SectionEnd - -Section "MicroPeak Desktop Shortcut" - CreateShortCut "$DESKTOP\MicroPeak.lnk" "$INSTDIR\micropeak-fat.jar" "" "$INSTDIR\micro-peak.ico" +Section "${REG_NAME} Desktop Shortcut" + CreateShortCut "$DESKTOP\${REG_NAME}.lnk" "$INSTDIR\${FAT_NAME}" "" "$INSTDIR\${ICO_ICO}" SectionEnd Section "Documentation" @@ -81,33 +98,74 @@ Section "Documentation" File "../doc/micropeak.pdf" SectionEnd +Section "File Associations" + + SetOutPath $INSTDIR + + File "../icon/${ICO_EXE}" + + ; application elements + + WriteRegStr HKCR "${PROG_ID}" "" "MicroPeak Data File" + WriteRegStr HKCR "${PROG_ID}" "FriendlyTypeName" "MicroPeak Data File" + WriteRegStr HKCR "${PROG_ID}\CurVer" "" "${PROG_ID}" + WriteRegStr HKCR "${PROG_ID}\DefaultIcon" "" '"$INSTDIR\${ICO_EXE}",-101' + WriteRegExpandStr HKCR "${PROG_ID}\shell\play\command" "" '"%SYSTEMROOT%\System32\javaw.exe" -Djava.library.path="$INSTDIR" -jar "$INSTDIR\${FAT_NAME}" "%1"' + + ; .mpd elements + + WriteRegStr HKCR ".mpd" "" "${PROG_ID}" + WriteRegStr HKCR ".mpd" "PerceivedType" "MicroPeak Data File" + WriteRegStr HKCR ".mpd" "Content Type" "application/micropeak" + + WriteRegStr HKCR ".mpd\OpenWithProgids" "${PROG_ID}" "" + WriteRegStr HKCR ".mpd\${PROG_ID}" "" "${REG_NAME}" + + Call RefreshShellIcons +SectionEnd + Section "Uninstaller" ; Deal with the uninstaller + ${DisableX64FSRedirection} SetOutPath $INSTDIR ; Write the install path to the registry - WriteRegStr HKLM SOFTWARE\AltusMetrum "Install_Dir" "$INSTDIR" + WriteRegStr HKLM "SOFTWARE\${REG_NAME}" "Install_Dir" "$INSTDIR" ; Write the uninstall keys for windows - WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\AltusMetrum" "DisplayName" "Altus Metrum" - WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\AltusMetrum" "UninstallString" '"$INSTDIR\uninstall.exe"' - WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\AltusMetrum" "NoModify" "1" - WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\AltusMetrum" "NoRepair" "1" + WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\${REG_NAME}" "DisplayName" "${REG_NAME}" + WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\${REG_NAME}" "UninstallString" '"$INSTDIR\uninstall-${REG_NAME}.exe"' + WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\${REG_NAME}" "NoModify" "1" + WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\${REG_NAME}" "NoRepair" "1" - WriteUninstaller "uninstall.exe" + WriteUninstaller "uninstall-${REG_NAME}.exe" SectionEnd Section "Uninstall" - DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\AltusMetrum" - DeleteRegKey HKLM "Software\AltusMetrum" - Delete "$INSTDIR\*.*" - RMDir "$INSTDIR" + ${DisableX64FSRedirection} + + DeleteRegKey HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\${REG_NAME}" + DeleteRegKey HKLM "SOFTWARE\${REG_NAME}" + + DetailPrint "Delete uninstall reg entries" + + DeleteRegKey HKCR "${PROG_ID}" + + DeleteRegKey HKCR ".mpd\${PROG_ID}" + DeleteRegValue HKCR ".mpd\OpenWithProgids" "${PROG_ID}" + + Delete "$INSTDIR\${FAT_NAME}" + Delete "$INSTDIR\uninstall-${REG_NAME}.exe" + + Delete "$INSTDIR\${ICO_ICO}" + Delete "$INSTDIR\${ICO_EXE}" ; Remove shortcuts, if any - Delete "$SMPROGRAMS\MicroPeak.lnk" - Delete "$DESKTOP\MicroPeak.lnk" + Delete "$SMPROGRAMS\${REG_NAME}.lnk" + Delete "$DESKTOP\${REG_NAME}.lnk" + Call un.RefreshShellIcons SectionEnd diff --git a/telegps/Makefile.am b/telegps/Makefile.am index 7b550e9e..8868c723 100644 --- a/telegps/Makefile.am +++ b/telegps/Makefile.am @@ -73,7 +73,7 @@ ICONJAR= -C $(ICONDIR) telegps-16.png \ -C $(ICONDIR) telegps-128.png \ -C $(ICONDIR) telegps-256.png -WINDOWS_ICON=$(ICONDIR)/telegps.ico +WINDOWS_ICON=$(ICONDIR)/telegps.ico $(ICONDIR)/telegps.exe MACOSX_ICON=$(ICONDIR)/TeleGPS.icns # Firmware diff --git a/telegps/telegps-windows.nsi.in b/telegps/telegps-windows.nsi.in index b4145520..3f9648f9 100644 --- a/telegps/telegps-windows.nsi.in +++ b/telegps/telegps-windows.nsi.in @@ -2,14 +2,22 @@ !addincludedir ../altosui/Instdrv/NSIS/Includes !include x64.nsh !include java.nsh +!include refresh-sh.nsh -Name "TeleGPS Installer" +!define REG_NAME "TeleGPS" +!define PROG_ID "org.altusmetrum.telegps.1" +!define PROG_ALTOSUI "org.altusmetrum.altosui.1" +!define FAT_NAME "telegps-fat.jar" +!define ICO_ICO "telegps.ico" +!define ICO_EXE "telegps.exe" + +Name "${REG_NAME} Installer" ; Default install directory InstallDir "$PROGRAMFILES\AltusMetrum" ; Tell the installer where to re-install a new version -InstallDirRegKey HKLM "Software\AltusMetrum" "Install_Dir" +InstallDirRegKey HKLM "Software\${REG_NAME}" "Install_Dir" LicenseText "GNU General Public License Version 2" LicenseData "../COPYING" @@ -19,7 +27,7 @@ RequestExecutionLevel admin ShowInstDetails Show -ComponentText "TeleGPS Software Installer" +ComponentText "${REG_NAME} Software and Driver Installer" Function .onInit DetailPrint "Checking host operating system" @@ -31,6 +39,16 @@ Function .onInit ${EndIf} FunctionEnd +Function un.onInit + DetailPrint "Checking host operating system" + ${If} ${RunningX64} + DetailPrint "Installer running on 64-bit host" + SetRegView 64 + StrCpy $INSTDIR "$PROGRAMFILES64\AltusMetrum" + ${DisableX64FSRedirection} + ${EndIf} +FunctionEnd + ; Pages to present Page license @@ -66,12 +84,12 @@ done: SectionEnd -Section "TeleGPS Application" +Section "${REG_NAME} Application" Call DetectJRE SetOutPath $INSTDIR - File "telegps-fat.jar" + File "${FAT_NAME}" File "altoslib_@ALTOSLIB_VERSION@.jar" File "altosuilib_@ALTOSUILIB_VERSION@.jar" File "cmudict04.jar" @@ -86,13 +104,13 @@ Section "TeleGPS Application" File "*.dll" - File "../icon/*.ico" + File "../icon/${ICO_ICO}" - CreateShortCut "$SMPROGRAMS\TeleGPS.lnk" "$SYSDIR\javaw.exe" "-jar telegps-fat.jar" "$INSTDIR\telegps.ico" + CreateShortCut "$SMPROGRAMS\${REG_NAME}.lnk" "$SYSDIR\javaw.exe" "-jar ${FAT_NAME}" "$INSTDIR\${ICO_ICO}" SectionEnd -Section "TeleGPS Desktop Shortcut" - CreateShortCut "$DESKTOP\TeleGPS.lnk" "$INSTDIR\telegps-fat.jar" "" "$INSTDIR\telegps.ico" +Section "${REG_NAME} Desktop Shortcut" + CreateShortCut "$DESKTOP\${REG_NAME}.lnk" "$INSTDIR\${FAT_NAME}" "" "$INSTDIR\${ICO_ICO}" SectionEnd Section "TeleGPS, TeleDongle and TeleBT Firmware" @@ -114,38 +132,88 @@ Section "Documentation" File "../doc/telemetry.pdf" SectionEnd +Section "File Associations" + + SetOutPath $INSTDIR + + File "../icon/${ICO_EXE}" + + ; application elements + + WriteRegStr HKCR "${PROG_ID}" "" "Altus Metrum Data File" + WriteRegStr HKCR "${PROG_ID}" "FriendlyTypeName" "Altus Metrum Data File" + WriteRegStr HKCR "${PROG_ID}\CurVer" "" "${PROG_ID}" + WriteRegStr HKCR "${PROG_ID}\DefaultIcon" "" '"$INSTDIR\${ICO_EXE}",-101' + WriteRegExpandStr HKCR "${PROG_ID}\shell\play\command" "" '"%SYSTEMROOT%\System32\javaw.exe" -Djava.library.path="$INSTDIR" -jar "$INSTDIR\${FAT_NAME}" "%1"' + + ; .eeprom elements + + WriteRegStr HKCR ".eeprom" "" "${PROG_ALTOSUI}" + WriteRegStr HKCR ".eeprom" "PerceivedType" "Altus Metrum Log File" + WriteRegStr HKCR ".eeprom" "Content Type" "application/altosui" + + WriteRegStr HKCR ".eeprom\OpenWithProgids" "${PROG_ID}" "" + WriteRegStr HKCR ".eeprom\${PROG_ID}" "" "${REG_NAME}" + + ; .telem elements + + WriteRegStr HKCR ".telem" "" "${PROG_ALTOSUI}" + WriteRegStr HKCR ".telem" "PerceivedType" "Altus Metrum Telemetry File" + WriteRegStr HKCR ".telem" "Content Type" "application/altosui" + + WriteRegStr HKCR ".telem\OpenWithProgids" "${PROG_ID}" "" + WriteRegStr HKCR ".telem\${PROG_ID}" "" "${REG_NAME}" + + Call RefreshShellIcons +SectionEnd + Section "Uninstaller" ; Deal with the uninstaller + ${DisableX64FSRedirection} SetOutPath $INSTDIR ; Write the install path to the registry - WriteRegStr HKLM SOFTWARE\AltusMetrum "Install_Dir" "$INSTDIR" + WriteRegStr HKLM "SOFTWARE\${REG_NAME}" "Install_Dir" "$INSTDIR" ; Write the uninstall keys for windows - WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\AltusMetrum" "DisplayName" "Altus Metrum" - WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\AltusMetrum" "UninstallString" '"$INSTDIR\uninstall.exe"' - WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\AltusMetrum" "NoModify" "1" - WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\AltusMetrum" "NoRepair" "1" + WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\${REG_NAME}" "DisplayName" "${REG_NAME}" + WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\${REG_NAME}" "UninstallString" '"$INSTDIR\uninstall-${REG_NAME}.exe"' + WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\${REG_NAME}" "NoModify" "1" + WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\${REG_NAME}" "NoRepair" "1" - WriteUninstaller "uninstall.exe" + WriteUninstaller "uninstall-${REG_NAME}.exe" SectionEnd Section "Uninstall" - DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\AltusMetrum" - DeleteRegKey HKLM "Software\AltusMetrum" - Delete "$INSTDIR\*.*" - RMDir "$INSTDIR" + ${DisableX64FSRedirection} - ; Remove devices - InstDrv::InitDriverSetup /NOUNLOAD {4D36E96D-E325-11CE-BFC1-08002BE10318} AltusMetrumSerial - InstDrv::DeleteOemInfFiles /NOUNLOAD - InstDrv::RemoveAllDevices + DeleteRegKey HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\${REG_NAME}" + DeleteRegKey HKLM "SOFTWARE\${REG_NAME}" + + DetailPrint "Delete uninstall reg entries" + + DeleteRegKey HKCR "${PROG_ID}" + + DeleteRegKey HKCR ".eeprom\${PROG_ID}" + DeleteRegValue HKCR ".eeprom\OpenWithProgids" "${PROG_ID}" + + DeleteRegKey HKCR ".telem\${PROG_ID}" + DeleteRegValue HKCR ".telem\OpenWithProgids" "${PROG_ID}" + + DetailPrint "Delete file association reg entries" + + Delete "$INSTDIR\${FAT_NAME}" + Delete "$INSTDIR\uninstall-${REG_NAME}.exe" + + Delete "$INSTDIR\${ICO_ICO}" + Delete "$INSTDIR\${ICO_EXE}" ; Remove shortcuts, if any - Delete "$SMPROGRAMS\TeleGPS.lnk" - Delete "$DESKTOP\TeleGPS.lnk" + Delete "$SMPROGRAMS\${REG_NAME}.lnk" + Delete "$DESKTOP\${REG_NAME}.lnk" + Call un.RefreshShellIcons SectionEnd -- cgit v1.2.3 From fac94c593285eacda57de257fa2be0548341b567 Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Wed, 18 Jun 2014 14:15:27 -0700 Subject: macosx: Define icons for our file types on OS X Adds definitions to the Info.plist files shipped to specify which icons to show for .telem, .eeprom and .mpd files. Note that the applications don't respond to open apple events, so double clicking on a file only starts the application. Signed-off-by: Keith Packard --- altosui/Info.plist.in | 27 +++++++++++++++++++++++++++ micropeak/Info.plist.in | 15 +++++++++++++++ telegps/Info.plist.in | 27 +++++++++++++++++++++++++++ 3 files changed, 69 insertions(+) (limited to 'micropeak') diff --git a/altosui/Info.plist.in b/altosui/Info.plist.in index 46dea171..bae6d52c 100644 --- a/altosui/Info.plist.in +++ b/altosui/Info.plist.in @@ -24,6 +24,33 @@ 6.0 CFBundleIconFile AltosUIIcon.icns + CFBundleDocumentTypes + + + CFBundleTypeName + Telemetry + CFBundleTypeIconFile + AltosUIIcon.icns + CFBundleTypeExtensions + + telem + + CFBundleTypeRole + Editor + + + CFBundleTypeName + Eeprom + CFBundleTypeIconFile + AltosUIIcon.icns + CFBundleTypeExtensions + + eeprom + + CFBundleTypeRole + Editor + + Java MainClass diff --git a/micropeak/Info.plist.in b/micropeak/Info.plist.in index 40984c5a..8f751079 100644 --- a/micropeak/Info.plist.in +++ b/micropeak/Info.plist.in @@ -24,6 +24,21 @@ 6.0 CFBundleIconFile MicroPeak.icns + CFBundleDocumentTypes + + + CFBundleTypeName + MicroPeak data file + CFBundleTypeIconFile + MicroPeak.icns + CFBundleTypeExtensions + + mpd + + CFBundleTypeRole + Editor + + Java MainClass diff --git a/telegps/Info.plist.in b/telegps/Info.plist.in index df05bb6e..7dbb77d1 100644 --- a/telegps/Info.plist.in +++ b/telegps/Info.plist.in @@ -24,6 +24,33 @@ 6.0 CFBundleIconFile TeleGPS.icns + CFBundleDocumentTypes + + + CFBundleTypeName + Telemetry + CFBundleTypeIconFile + TeleGPS.icns + CFBundleTypeExtensions + + telem + + CFBundleTypeRole + Editor + + + CFBundleTypeName + Eeprom + CFBundleTypeIconFile + TeleGPS.icns + CFBundleTypeExtensions + + eeprom + + CFBundleTypeRole + Editor + + Java MainClass -- cgit v1.2.3 From 7767a045d446ea2bc5fe1ec98d89274155f956c4 Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Wed, 18 Jun 2014 16:18:05 -0700 Subject: macosx: Respond to apple messages in all apps This connects the callbacks in AltosUIFrame to actually do something useful with them. Signed-off-by: Keith Packard --- altosui/AltosUI.java | 15 +++++++++++++++ micropeak/MicroPeak.java | 15 +++++++++++++++ telegps/TeleGPS.java | 24 +++++++++++++++++++++++- 3 files changed, 53 insertions(+), 1 deletion(-) (limited to 'micropeak') diff --git a/altosui/AltosUI.java b/altosui/AltosUI.java index 1eb03805..0aa5d03c 100644 --- a/altosui/AltosUI.java +++ b/altosui/AltosUI.java @@ -99,10 +99,25 @@ public class AltosUI extends AltosUIFrame { return b; } + /* OSXAdapter interfaces */ + public void macosx_file_handler(String path) { + process_graph(new File(path)); + } + + public void macosx_quit_handler() { + System.exit(0); + } + + public void macosx_preferences_handler() { + ConfigureAltosUI(); + } + public AltosUI() { load_library(null); + register_for_macosx_events(); + AltosUIPreferences.set_component(this); pane = getContentPane(); diff --git a/micropeak/MicroPeak.java b/micropeak/MicroPeak.java index d7d393ba..8bdf4b77 100644 --- a/micropeak/MicroPeak.java +++ b/micropeak/MicroPeak.java @@ -190,10 +190,25 @@ public class MicroPeak extends MicroFrame implements ActionListener, ItemListene public void itemStateChanged(ItemEvent e) { } + /* OSXAdapter interfaces */ + public void macosx_file_handler(String path) { + CommandGraph(new File(path)); + } + + public void macosx_quit_handler() { + System.exit(0); + } + + public void macosx_preferences_handler() { + Preferences(); + } + public MicroPeak() { ++number_of_windows; + register_for_macosx_events(); + AltosUIPreferences.set_component(this); container = getContentPane(); diff --git a/telegps/TeleGPS.java b/telegps/TeleGPS.java index f765ee23..e78c2124 100644 --- a/telegps/TeleGPS.java +++ b/telegps/TeleGPS.java @@ -410,16 +410,38 @@ public class TeleGPS private JMenu make_menu(String label, String[][] items) { JMenu menu = new JMenu(label); - for (int i = 0; i < items.length; i++) + for (int i = 0; i < items.length; i++) { + if (MAC_OS_X) { + if (items[i][1].equals("exit")) + continue; + if (items[i][1].equals("preferences")) + continue; + } add_menu(menu, items[i][0], items[i][1]); + } menu_bar.add(menu); return menu; } + /* OSXAdapter interfaces */ + public void macosx_file_handler(String path) { + process_graph(new File(path)); + } + + public void macosx_quit_handler() { + System.exit(0); + } + + public void macosx_preferences_handler() { + preferences(); + } + public TeleGPS() { AltosUIPreferences.set_component(this); + register_for_macosx_events(); + reader = null; bag = getContentPane(); -- cgit v1.2.3 From 37856672c57f2fd91184c2391a201bbbdc48545e Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Thu, 19 Jun 2014 10:25:07 -0700 Subject: linux: .desktop files must begin with organization name The spec requires that .desktop files start with the organization name, so I've renamed all of them to altusmetrum-.desktop Signed-off-by: Keith Packard --- altosui/Makefile.am | 6 +++--- altosui/altos.desktop.in | 10 ---------- altosui/altusmetrum-altosui.desktop.in | 11 +++++++++++ micropeak/Makefile.am | 4 ++-- micropeak/altusmetrum-micropeak.desktop.in | 10 ++++++++++ micropeak/micropeak.desktop.in | 10 ---------- telegps/Makefile.am | 8 ++++---- telegps/altusmetrum-telegps.desktop.in | 10 ++++++++++ telegps/telegps.desktop.in | 10 ---------- 9 files changed, 40 insertions(+), 39 deletions(-) delete mode 100644 altosui/altos.desktop.in create mode 100644 altosui/altusmetrum-altosui.desktop.in create mode 100644 micropeak/altusmetrum-micropeak.desktop.in delete mode 100644 micropeak/micropeak.desktop.in create mode 100644 telegps/altusmetrum-telegps.desktop.in delete mode 100644 telegps/telegps.desktop.in (limited to 'micropeak') diff --git a/altosui/Makefile.am b/altosui/Makefile.am index 352fb430..bc074a95 100644 --- a/altosui/Makefile.am +++ b/altosui/Makefile.am @@ -64,7 +64,7 @@ LIBALTOS= \ altos.dll desktopdir = $(datadir)/applications -desktop_file = altos.desktop +desktop_file = altusmetrum-altosui.desktop desktop_SCRIPTS = $(desktop_file) JAR=altosui.jar @@ -141,7 +141,7 @@ FAT_FILES=$(FATJAR) $(ALTOSLIB_CLASS) $(ALTOSUILIB_CLASS) $(FREETTS_CLASS) $(JFR LINUX_LIBS=libaltos32.so libaltos64.so -LINUX_FILES=$(FAT_FILES) $(LINUX_LIBS) $(FIRMWARE) $(DOC) altos.desktop.in ../icon/altusmetrum.svg +LINUX_FILES=$(FAT_FILES) $(LINUX_LIBS) $(FIRMWARE) $(DOC) $(desktop_file).in ../icon/altusmetrum.svg LINUX_EXTRA=altosui-fat MACOSX_INFO_PLIST=Info.plist @@ -161,7 +161,7 @@ clean-local: EXTRA_DIST = $(desktop_file).in $(desktop_file): $(desktop_file).in - sed -e 's#%bindir%#@bindir@#' -e 's#%icondir%#$(datadir)/icons/hicolor/scalable/apps#' ${srcdir}/altos.desktop.in > $@ + sed -e 's#%bindir%#@bindir@#' -e 's#%icondir%#$(datadir)/icons/hicolor/scalable/apps#' ${srcdir}/$(desktop_file).in > $@ chmod +x $@ if FATINSTALL diff --git a/altosui/altos.desktop.in b/altosui/altos.desktop.in deleted file mode 100644 index 66114348..00000000 --- a/altosui/altos.desktop.in +++ /dev/null @@ -1,10 +0,0 @@ -[Desktop Entry] -Type=Application -Name=AltOS UI -GenericName=Altus Metrum Ground Station -Comment=View and log downlink data from Altus Metrum products -Icon=%icondir%/altusmetrum.svg -Exec=%bindir%/altosui %f -Terminal=false -MimeType=text/plain; -Categories=Education;Electronics;Science; diff --git a/altosui/altusmetrum-altosui.desktop.in b/altosui/altusmetrum-altosui.desktop.in new file mode 100644 index 00000000..716571ce --- /dev/null +++ b/altosui/altusmetrum-altosui.desktop.in @@ -0,0 +1,11 @@ +[Desktop Entry] +Type=Application +Version=1.0 +Name=AltOS UI +GenericName=Altus Metrum Ground Station +Comment=View and log downlink data from Altus Metrum products +Icon=%icondir%/altusmetrum.svg +Exec=%bindir%/altosui %f +Terminal=false +MimeType=application/vnd.altusmetrum.telemetry;application/vnd.altusmetrum.eeprom +Categories=Education;Electronics;Science; diff --git a/micropeak/Makefile.am b/micropeak/Makefile.am index 1e09e523..37d5ca63 100644 --- a/micropeak/Makefile.am +++ b/micropeak/Makefile.am @@ -75,7 +75,7 @@ WINDOWS_ICON=$(ICONDIR)/micro-peak.ico $(ICONDIR)/micro-peak.exe MACOSX_ICON=$(ICONDIR)/MicroPeak.icns desktopdir = $(datadir)/applications -desktop_file = micropeak.desktop +desktop_file = altusmetrum-micropeak.desktop desktop_SCRIPTS = $(desktop_file) all-local: micropeak-test micropeak-jdb $(JAR) @@ -92,7 +92,7 @@ clean-local: EXTRA_DIST = $(desktop_file).in $(desktop_file): $(desktop_file).in - sed -e 's#%bindir%#@bindir@#' -e 's#%icondir%#$(datadir)/icons/hicolor/scalable/apps#' ${srcdir}/micropeak.desktop.in > $@ + sed -e 's#%bindir%#@bindir@#' -e 's#%icondir%#$(datadir)/icons/hicolor/scalable/apps#' ${srcdir}/$(desktop_file).in > $@ chmod +x $@ LINUX_DIST=MicroPeak-Linux-$(VERSION).tar.bz2 diff --git a/micropeak/altusmetrum-micropeak.desktop.in b/micropeak/altusmetrum-micropeak.desktop.in new file mode 100644 index 00000000..f7d258ec --- /dev/null +++ b/micropeak/altusmetrum-micropeak.desktop.in @@ -0,0 +1,10 @@ +[Desktop Entry] +Type=Application +Name=MicroPeak +GenericName=MicroPeak Download and Analysis +Comment=View and log data from MicroPeak altimeters +Icon=%icondir%/micropeak.svg +Exec=%bindir%/micropeak %f +Terminal=false +MimeType=application/vnd.altusmetrum.micropeak +Categories=Education;Electronics;Science; diff --git a/micropeak/micropeak.desktop.in b/micropeak/micropeak.desktop.in deleted file mode 100644 index abdf286f..00000000 --- a/micropeak/micropeak.desktop.in +++ /dev/null @@ -1,10 +0,0 @@ -[Desktop Entry] -Type=Application -Name=MicroPeak -GenericName=MicroPeak download and analysis -Comment=View and log data from MicroPeak altimeters -Icon=%icondir%/micropeak.svg -Exec=%bindir%/micropeak %f -Terminal=false -MimeType=text/plain; -Categories=Education;Electronics;Science; diff --git a/telegps/Makefile.am b/telegps/Makefile.am index 8868c723..c4f6a58b 100644 --- a/telegps/Makefile.am +++ b/telegps/Makefile.am @@ -89,7 +89,7 @@ FIRMWARE_TG=$(FIRMWARE_TG_1_0) FIRMWARE=$(FIRMWARE_TG) $(FIRMWARE_TD) $(FIRMWARE_TBT) desktopdir = $(datadir)/applications -desktop_file = telegps.desktop +desktop_file = altusmetrum-telegps.desktop desktop_SCRIPTS = $(desktop_file) all-local: telegps-test telegps-jdb $(JAR) @@ -106,7 +106,7 @@ clean-local: EXTRA_DIST = $(desktop_file).in $(desktop_file): $(desktop_file).in - sed -e 's#%bindir%#@bindir@#' -e 's#%icondir%#$(datadir)/icons/hicolor/scalable/apps#' ${srcdir}/telegps.desktop.in > $@ + sed -e 's#%bindir%#@bindir@#' -e 's#%icondir%#$(datadir)/icons/hicolor/scalable/apps#' ${srcdir}/$(desktop_file).in > $@ chmod +x $@ LINUX_DIST=TeleGPS-Linux-$(VERSION).tar.bz2 @@ -120,8 +120,8 @@ DOC=$(TELEGPS_DOC) FAT_FILES=$(FATJAR) $(ALTOSLIB_CLASS) $(ALTOSUILIB_CLASS) $(FREETTS_CLASS) $(JFREECHART_CLASS) $(JCOMMON_CLASS) -LINUX_FILES=$(FAT_FILES) libaltos.so $(FIRMWARE) $(DOC) telegps.desktop.in ../icon/telegps.svg -LINUX_EXTRA=telegps-fat telegps.desktop.in +LINUX_FILES=$(FAT_FILES) libaltos.so $(FIRMWARE) $(DOC) $(desktop_file).in ../icon/telegps.svg +LINUX_EXTRA=telegps-fat $(desktop_file).in MACOSX_INFO_PLIST=Info.plist MACOSX_README=ReadMe-Mac.rtf diff --git a/telegps/altusmetrum-telegps.desktop.in b/telegps/altusmetrum-telegps.desktop.in new file mode 100644 index 00000000..76c1eb42 --- /dev/null +++ b/telegps/altusmetrum-telegps.desktop.in @@ -0,0 +1,10 @@ +[Desktop Entry] +Type=Application +Name=TeleGPS +GenericName=TeleGPS monitor, download and analysis +Comment=View and log data from TeleGPS tracking devices +Icon=%icondir%/telegps.svg +Exec=%bindir%/telegps %f +Terminal=false +MimeType=application/vnd.altusmetrum.telemetry;application/vnd.altusmetrum.eeprom +Categories=Education;Electronics;Science; diff --git a/telegps/telegps.desktop.in b/telegps/telegps.desktop.in deleted file mode 100644 index 3d249d8a..00000000 --- a/telegps/telegps.desktop.in +++ /dev/null @@ -1,10 +0,0 @@ -[Desktop Entry] -Type=Application -Name=TeleGPS -GenericName=TeleGPS monitor, download and analysis -Comment=View and log data from TeleGPS tracking devices -Icon=%icondir%/telegps.svg -Exec=%bindir%/telegps %f -Terminal=false -MimeType=text/plain; -Categories=Education;Electronics;Science; -- cgit v1.2.3 From 1b0f56ddb2b85b68232c22a7a8b8744cb9ad76f9 Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Thu, 19 Jun 2014 14:33:27 -0700 Subject: Rename icon files to fit XDG specifications. Add file icons. Add mime types Our SVG icons now follow XDG standards by including a vendor prefix. The new file type icons include application-vnd.altusmetrum as a prefix so that they match the mime types declared. Signed-off-by: Keith Packard --- altosui/.gitignore | 2 +- altosui/Info.plist.in | 6 +- altosui/Makefile.am | 52 +-- altosui/altos-windows.nsi.in | 83 +++-- altosui/altusmetrum-altosui.desktop.in | 2 +- icon/.gitignore | 6 +- icon/Makefile.am | 156 +++++--- icon/altus-metrum.rc | 1 - icon/altusmetrum-altosui.svg | 250 +++++++++++++ icon/altusmetrum-micropeak.svg | 219 ++++++++++++ icon/altusmetrum-telegps.svg | 324 +++++++++++++++++ icon/altusmetrum.svg | 250 ------------- icon/application-vnd.altusmetrum.eeprom.svg | 397 +++++++++++++++++++++ icon/application-vnd.altusmetrum.micropeak.svg | 1 + icon/application-vnd.altusmetrum.telemetry.svg | 397 +++++++++++++++++++++ icon/creating-linux-icons | 29 ++ icon/micro-peak.rc | 1 - icon/micropeak.svg | 219 ------------ icon/org-altusmetrum-mimetypes.xml | 16 + icon/telegps.rc | 1 - icon/telegps.svg | 324 ----------------- micropeak/.gitignore | 2 +- micropeak/Info.plist.in | 4 +- micropeak/Makefile.am | 48 +-- .../Contents/Resources/MicroPeak.icns | Bin 133711 -> 0 bytes micropeak/altusmetrum-micropeak.desktop.in | 2 +- micropeak/micropeak-windows.nsi.in | 51 +-- telegps/.gitignore | 2 +- telegps/Info.plist.in | 6 +- telegps/Makefile.am | 51 +-- telegps/altusmetrum-telegps.desktop.in | 2 +- telegps/telegps-windows.nsi.in | 83 +++-- 32 files changed, 1975 insertions(+), 1012 deletions(-) delete mode 100644 icon/altus-metrum.rc create mode 100644 icon/altusmetrum-altosui.svg create mode 100644 icon/altusmetrum-micropeak.svg create mode 100644 icon/altusmetrum-telegps.svg delete mode 100644 icon/altusmetrum.svg create mode 100644 icon/application-vnd.altusmetrum.eeprom.svg create mode 120000 icon/application-vnd.altusmetrum.micropeak.svg create mode 100644 icon/application-vnd.altusmetrum.telemetry.svg create mode 100644 icon/creating-linux-icons delete mode 100644 icon/micro-peak.rc delete mode 100644 icon/micropeak.svg create mode 100644 icon/org-altusmetrum-mimetypes.xml delete mode 100644 icon/telegps.rc delete mode 100644 icon/telegps.svg delete mode 100644 micropeak/MicroPeak.app/Contents/Resources/MicroPeak.icns (limited to 'micropeak') diff --git a/altosui/.gitignore b/altosui/.gitignore index 10b600e4..b0c8264b 100644 --- a/altosui/.gitignore +++ b/altosui/.gitignore @@ -17,7 +17,7 @@ Altos-Linux-*.tar.bz2 Altos-Linux-*.sh Altos-Mac-*.zip Altos-Windows-*.exe -altos.desktop +altusmetrum-altosui.desktop *.dll *.dylib *.so diff --git a/altosui/Info.plist.in b/altosui/Info.plist.in index bae6d52c..8dc797d6 100644 --- a/altosui/Info.plist.in +++ b/altosui/Info.plist.in @@ -23,14 +23,14 @@ CFBundleInfoDictionaryVersion 6.0 CFBundleIconFile - AltosUIIcon.icns + altusmetrum-altosui.icns CFBundleDocumentTypes CFBundleTypeName Telemetry CFBundleTypeIconFile - AltosUIIcon.icns + application-vnd.altusmetrum.telemetry.icns CFBundleTypeExtensions telem @@ -42,7 +42,7 @@ CFBundleTypeName Eeprom CFBundleTypeIconFile - AltosUIIcon.icns + application-vnd.altusmetrum.eeprom.icns CFBundleTypeExtensions eeprom diff --git a/altosui/Makefile.am b/altosui/Makefile.am index bc074a95..45d75699 100644 --- a/altosui/Makefile.am +++ b/altosui/Makefile.am @@ -72,26 +72,37 @@ JAR=altosui.jar FATJAR=altosui-fat.jar # Icons -ICONDIR=$(top_srcdir)/icon +ICONDIR=../icon JAVA_ICONS=\ - $(ICONDIR)/altus-metrum-16.png \ - $(ICONDIR)/altus-metrum-32.png \ - $(ICONDIR)/altus-metrum-48.png \ - $(ICONDIR)/altus-metrum-64.png \ - $(ICONDIR)/altus-metrum-128.png \ - $(ICONDIR)/altus-metrum-256.png + $(ICONDIR)/altusmetrum-altosui-16.png \ + $(ICONDIR)/altusmetrum-altosui-32.png \ + $(ICONDIR)/altusmetrum-altosui-48.png \ + $(ICONDIR)/altusmetrum-altosui-64.png \ + $(ICONDIR)/altusmetrum-altosui-128.png\ + $(ICONDIR)/altusmetrum-altosui-256.png # icon base names for jar -ICONJAR= -C $(ICONDIR) altus-metrum-16.png \ - -C $(ICONDIR) altus-metrum-32.png \ - -C $(ICONDIR) altus-metrum-48.png \ - -C $(ICONDIR) altus-metrum-64.png \ - -C $(ICONDIR) altus-metrum-128.png \ - -C $(ICONDIR) altus-metrum-256.png - -WINDOWS_ICON=$(ICONDIR)/altus-metrum.ico $(ICONDIR)/altus-metrum.exe -MACOSX_ICON=$(ICONDIR)/AltosUIIcon.icns +ICONJAR= \ + -C $(ICONDIR) altusmetrum-altosui-16.png \ + -C $(ICONDIR) altusmetrum-altosui-32.png \ + -C $(ICONDIR) altusmetrum-altosui-48.png \ + -C $(ICONDIR) altusmetrum-altosui-64.png \ + -C $(ICONDIR) altusmetrum-altosui-128.png\ + -C $(ICONDIR) altusmetrum-altosui-256.png + +WINDOWS_ICONS =\ + $(ICONDIR)/altusmetrum-altosui.ico \ + $(ICONDIR)/altusmetrum-altosui.exe + $(ICONDIR)/application-vnd.altusmetrum.eeprom.ico \ + $(ICONDIR)/application-vnd.altusmetrum.eeprom.exe \ + $(ICONDIR)/application-vnd.altusmetrum.telemetry.ico \ + $(ICONDIR)/application-vnd.altusmetrum.telemetry.exe + +MACOSX_ICONS =\ + $(ICONDIR)/altusmetrum-altosui.icns \ + $(ICONDIR)/application-vnd.altusmetrum.eeprom.icns \ + $(ICONDIR)/application-vnd.altusmetrum.telemetry.icns # Firmware FIRMWARE_TD_0_2=$(top_srcdir)/src/teledongle-v0.2/teledongle-v0.2-$(VERSION).ihx @@ -141,14 +152,14 @@ FAT_FILES=$(FATJAR) $(ALTOSLIB_CLASS) $(ALTOSUILIB_CLASS) $(FREETTS_CLASS) $(JFR LINUX_LIBS=libaltos32.so libaltos64.so -LINUX_FILES=$(FAT_FILES) $(LINUX_LIBS) $(FIRMWARE) $(DOC) $(desktop_file).in ../icon/altusmetrum.svg +LINUX_FILES=$(FAT_FILES) $(LINUX_LIBS) $(FIRMWARE) $(DOC) $(desktop_file).in $(ICONDIR)/altusmetrum-altosui.svg LINUX_EXTRA=altosui-fat MACOSX_INFO_PLIST=Info.plist -MACOSX_FILES=$(FAT_FILES) libaltos.dylib $(MACOSX_INFO_PLIST) $(DOC) ReadMe-Mac.rtf $(MACOSX_ICON) +MACOSX_FILES=$(FAT_FILES) libaltos.dylib $(MACOSX_INFO_PLIST) $(DOC) ReadMe-Mac.rtf $(MACOSX_ICONS) MACOSX_EXTRA=$(FIRMWARE) -WINDOWS_FILES=$(FAT_FILES) $(FIRMWARE) altos.dll altos64.dll $(top_srcdir)/altusmetrum.inf $(top_srcdir)/altusmetrum.cat $(WINDOWS_ICON) +WINDOWS_FILES=$(FAT_FILES) $(FIRMWARE) altos.dll altos64.dll $(top_srcdir)/altusmetrum.inf $(top_srcdir)/altusmetrum.cat $(WINDOWS_ICONS) all-local: classes/altosui $(JAR) altosui altosui-test altosui-jdb @@ -195,7 +206,6 @@ else fat: $(LINUX_DIST) $(LINUX_SH) $(MACOSX_DIST) $(WINDOWS_DIST) endif - altosuidir=$(datadir)/java install-altosuiJAVA: altosui.jar @@ -325,7 +335,7 @@ $(MACOSX_DIST): $(MACOSX_FILES) $(MACOSX_EXTRA) Makefile cp -a $(DOC) macosx/Doc cp -p Info.plist macosx/AltosUI.app/Contents mkdir -p macosx/AltOS-$(VERSION) macosx/AltosUI.app/Contents/Resources/Java - cp -p $(MACOSX_ICON) macosx/AltosUI.app/Contents/Resources + cp -p $(MACOSX_ICONS) macosx/AltosUI.app/Contents/Resources cp -p $(FATJAR) macosx/AltosUI.app/Contents/Resources/Java/altosui.jar cp -p libaltos.dylib macosx/AltosUI.app/Contents/Resources/Java cp -p $(ALTOSLIB_CLASS) macosx/AltosUI.app/Contents/Resources/Java diff --git a/altosui/altos-windows.nsi.in b/altosui/altos-windows.nsi.in index c6da097e..07de5b13 100644 --- a/altosui/altos-windows.nsi.in +++ b/altosui/altos-windows.nsi.in @@ -4,12 +4,14 @@ !include java.nsh !include refresh-sh.nsh -!define REG_NAME "Altus Metrum" -!define PROG_ID "org.altusmetrum.altosui.1" -!define PROG_ALTOSUI "org.altusmetrum.altosui.1" -!define FAT_NAME "altosui-fat.jar" -!define ICO_ICO "altus-metrum.ico" -!define ICO_EXE "altus-metrum.exe" +!define REG_NAME "Altus Metrum" +!define PROG_ID_TELEM "altusmetrum.altosui.telem.1" +!define PROG_ID_EEPROM "altusmetrum.altosui.eeprom.1" +!define FAT_NAME "altosui-fat.jar" +!define WIN_APP_ICON "altusmetrum-altosui.ico" +!define WIN_APP_EXE "altusmetrum-altosui.exe" +!define WIN_TELEM_EXE "application-vnd.altusmetrum.telemetry.exe" +!define WIN_EEPROM_EXE "application-vnd.altusmetrum.eeprom.exe" Name "${REG_NAME} Installer" @@ -104,13 +106,13 @@ Section "${REG_NAME} Application" File "*.dll" - File "../icon/${ICO_ICO}" + File "../icon/${WIN_APP_ICON}" - CreateShortCut "$SMPROGRAMS\${REG_NAME}.lnk" "$SYSDIR\javaw.exe" "-jar ${FAT_NAME}" "$INSTDIR\${ICO_ICO}" + CreateShortCut "$SMPROGRAMS\${REG_NAME}.lnk" "$SYSDIR\javaw.exe" "-jar ${FAT_NAME}" "$INSTDIR\${WIN_APP_ICON}" SectionEnd Section "${REG_NAME} Desktop Shortcut" - CreateShortCut "$DESKTOP\${REG_NAME}.lnk" "$INSTDIR\${FAT_NAME}" "" "$INSTDIR\${ICO_ICO}" + CreateShortCut "$DESKTOP\${REG_NAME}.lnk" "$INSTDIR\${FAT_NAME}" "" "$INSTDIR\${WIN_APP_ICON}" SectionEnd Section "TeleMetrum, TeleDongle and TeleBT Firmware" @@ -145,35 +147,51 @@ SectionEnd Section "File Associations" + ${DisableX64FSRedirection} + SetOutPath $INSTDIR - File "../icon/${ICO_EXE}" + File "../icon/${WIN_APP_EXE}" + File "../icon/${WIN_TELEM_EXE}" + File "../icon/${WIN_EEPROM_EXE}" - ; application elements - - WriteRegStr HKCR "${PROG_ID}" "" "Altus Metrum Data File" - WriteRegStr HKCR "${PROG_ID}" "FriendlyTypeName" "Altus Metrum Data File" - WriteRegStr HKCR "${PROG_ID}\CurVer" "" "${PROG_ID}" - WriteRegStr HKCR "${PROG_ID}\DefaultIcon" "" '"$INSTDIR\${ICO_EXE}",-101' - WriteRegExpandStr HKCR "${PROG_ID}\shell\play\command" "" '"%SYSTEMROOT%\System32\javaw.exe" -Djava.library.path="$INSTDIR" -jar "$INSTDIR\${FAT_NAME}" "%1"' + DeleteRegKey HKCR "${PROG_ID_TELEM}" + DeleteRegKey HKCR "${PROG_ID_EEPROM}" + + DeleteRegKey HKCR ".eeprom\${PROG_ID_EEPROM}" + DeleteRegValue HKCR ".eeprom\OpenWithProgids" "${PROG_ID_EEPROM}" + DeleteRegKey HKCR ".telem\${PROG_ID_EEPROM}" + DeleteRegValue HKCR ".telem\OpenWithProgids" "${PROG_ID_EEPROM}" ; .eeprom elements - WriteRegStr HKCR ".eeprom" "" "${PROG_ALTOSUI}" + WriteRegStr HKCR "${PROG_ID_EEPROM}" "" "Altus Metrum Log File" + WriteRegStr HKCR "${PROG_ID_EEPROM}" "FriendlyTypeName" "Altus Metrum Log File" + WriteRegStr HKCR "${PROG_ID_EEPROM}\CurVer" "" "${PROG_ID_EEPROM}" + WriteRegStr HKCR "${PROG_ID_EEPROM}\DefaultIcon" "" '"$INSTDIR\${WIN_EEPROM_EXE}",-101' + WriteRegExpandStr HKCR "${PROG_ID_EEPROM}\shell\open\command" "" '"%SYSTEMROOT%\System32\javaw.exe" -Djava.library.path="$INSTDIR" -jar "$INSTDIR\${FAT_NAME}" "%1"' + + WriteRegStr HKCR ".eeprom" "" "${PROG_ID_EEPROM}" WriteRegStr HKCR ".eeprom" "PerceivedType" "Altus Metrum Log File" - WriteRegStr HKCR ".eeprom" "Content Type" "application/altosui" + WriteRegStr HKCR ".eeprom" "Content Type" "application/vnd.altusmetrum.eeprom" - WriteRegStr HKCR ".eeprom\OpenWithProgids" "${PROG_ID}" "" - WriteRegStr HKCR ".eeprom\${PROG_ID}" "" "${REG_NAME}" + WriteRegStr HKCR ".eeprom\OpenWithProgids" "${PROG_ID_EEPROM}" "" + WriteRegStr HKCR ".eeprom\${PROG_ID_EEPROM}" "" "${REG_NAME}" ; .telem elements - WriteRegStr HKCR ".telem" "" "${PROG_ALTOSUI}" + WriteRegStr HKCR "${PROG_ID_TELEM}" "" "Altus Metrum Telemetry File" + WriteRegStr HKCR "${PROG_ID_TELEM}" "FriendlyTypeName" "Altus Metrum Telemetry File" + WriteRegStr HKCR "${PROG_ID_TELEM}\CurVer" "" "${PROG_ID_TELEM}" + WriteRegStr HKCR "${PROG_ID_TELEM}\DefaultIcon" "" '"$INSTDIR\${WIN_TELEM_EXE}",-101' + WriteRegExpandStr HKCR "${PROG_ID_TELEM}\shell\open\command" "" '"%SYSTEMROOT%\System32\javaw.exe" -Djava.library.path="$INSTDIR" -jar "$INSTDIR\${FAT_NAME}" "%1"' + + WriteRegStr HKCR ".telem" "" "${PROG_ID_TELEM}" WriteRegStr HKCR ".telem" "PerceivedType" "Altus Metrum Telemetry File" - WriteRegStr HKCR ".telem" "Content Type" "application/altosui" + WriteRegStr HKCR ".telem" "Content Type" "application/vnd.altusmetrum.telemetry" - WriteRegStr HKCR ".telem\OpenWithProgids" "${PROG_ID}" "" - WriteRegStr HKCR ".telem\${PROG_ID}" "" "${REG_NAME}" + WriteRegStr HKCR ".telem\OpenWithProgids" "${PROG_ID_TELEM}" "" + WriteRegStr HKCR ".telem\${PROG_ID_TELEM}" "" "${REG_NAME}" Call RefreshShellIcons SectionEnd @@ -206,21 +224,22 @@ Section "Uninstall" DetailPrint "Delete uninstall reg entries" - DeleteRegKey HKCR "${PROG_ID}" + DeleteRegKey HKCR "${PROG_ID_EEPROM}" + DeleteRegKey HKCR "${PROG_ID_TELEM}" - DeleteRegKey HKCR ".eeprom\${PROG_ID}" - DeleteRegValue HKCR ".eeprom\OpenWithProgids" "${PROG_ID}" + DeleteRegKey HKCR ".eeprom\${PROG_ID_EEPROM}" + DeleteRegValue HKCR ".eeprom\OpenWithProgids" "${PROG_ID_EEPROM}" - DeleteRegKey HKCR ".telem\${PROG_ID}" - DeleteRegValue HKCR ".telem\OpenWithProgids" "${PROG_ID}" + DeleteRegKey HKCR ".telem\${PROG_ID_TELEM}" + DeleteRegValue HKCR ".telem\OpenWithProgids" "${PROG_ID_TELEM}" DetailPrint "Delete file association reg entries" Delete "$INSTDIR\${FAT_NAME}" Delete "$INSTDIR\uninstall-${REG_NAME}.exe" - Delete "$INSTDIR\${ICO_ICO}" - Delete "$INSTDIR\${ICO_EXE}" + Delete "$INSTDIR\${WIN_APP_ICON}" + Delete "$INSTDIR\${WIN_APP_EXE}" ; Remove shortcuts, if any Delete "$SMPROGRAMS\${REG_NAME}.lnk" diff --git a/altosui/altusmetrum-altosui.desktop.in b/altosui/altusmetrum-altosui.desktop.in index 716571ce..10fd9e9d 100644 --- a/altosui/altusmetrum-altosui.desktop.in +++ b/altosui/altusmetrum-altosui.desktop.in @@ -4,7 +4,7 @@ Version=1.0 Name=AltOS UI GenericName=Altus Metrum Ground Station Comment=View and log downlink data from Altus Metrum products -Icon=%icondir%/altusmetrum.svg +Icon=%icondir%/altusmetrum-altosui.svg Exec=%bindir%/altosui %f Terminal=false MimeType=application/vnd.altusmetrum.telemetry;application/vnd.altusmetrum.eeprom diff --git a/icon/.gitignore b/icon/.gitignore index 40cf2f3e..94c7c70c 100644 --- a/icon/.gitignore +++ b/icon/.gitignore @@ -1,6 +1,6 @@ -altus-metrum-*.png -micropeak-*.png -telegps-*.png +application-*.png +altusmetrum-*.png +*.rc *.ico *.icns *.build diff --git a/icon/Makefile.am b/icon/Makefile.am index 61a16914..516c547c 100644 --- a/icon/Makefile.am +++ b/icon/Makefile.am @@ -3,85 +3,137 @@ MAC_RES=16 32 128 256 512 WIN_RES=16 24 32 48 64 72 96 128 180 256 RES=$(shell echo $(JAVA_RES) $(MAC_RES) $(WIN_RES) | awk '{ for (i = 1; i <= NF; i++) printf("%s\n", $$i); }' | sort -n -u) -AM_FILES=$(shell for i in $(RES); do echo altus-metrum-$$i.png; done) -MP_FILES=$(shell for i in $(RES); do echo micropeak-$$i.png; done) -TG_FILES=$(shell for i in $(RES); do echo telegps-$$i.png; done) +# Application icon base names -MAC_TG_FILES=$(shell for i in $(MAC_RES); do echo telegps-$$i.png; done) -MAC_MP_FILES=$(shell for i in $(MAC_RES); do echo micropeak-$$i.png; done) -MAC_AM_FILES=$(shell for i in $(MAC_RES); do echo altus-metrum-$$i.png; done) +AM_NAME = altusmetrum-altosui +MP_NAME = altusmetrum-micropeak +TG_NAME = altusmetrum-telegps -WIN_TG_FILES=$(shell for i in $(WIN_RES); do echo telegps-$$i.png; done) -WIN_MP_FILES=$(shell for i in $(WIN_RES); do echo micropeak-$$i.png; done) -WIN_AM_FILES=$(shell for i in $(WIN_RES); do echo altus-metrum-$$i.png; done) +# File icon base names -ICO_FILES=altus-metrum.ico micro-peak.ico telegps.ico -ICNS_FILES=AltosUIIcon.icns TeleGPS.icns MicroPeak.icns +EEPROM_NAME = application-vnd.altusmetrum.eeprom +TELEM_NAME = application-vnd.altusmetrum.telemetry +MPD_NAME = application-vnd.altusmetrum.micropeak -icondir = $(datadir)/icons/hicolor/scalable/apps +# Application icons -AM_ICON = altusmetrum.svg -MP_ICON = micropeak.svg -TG_ICON = telegps.svg +AM_ICON = $(AM_NAME).svg +MP_ICON = $(MP_NAME).svg +TG_ICON = $(TG_NAME).svg -icon_DATA = $(AM_ICON) $(MP_ICON) $(TG_ICON) +# File icons (note that MicroPeak uses the application icon for files) -EXTRA_DIST = $(icon_DATA) $(AM_FILES) $(MP_FILES) $(TG_FILES) +EEPROM_ICON = $(EEPROM_NAME).svg +TELEM_ICON = $(TELEM_NAME).svg +MPD_ICON = $(MPD_NAME).svg -res: - echo $(RES) +# Files needed for Mac OSX icons -all-local: $(ICO_FILES) $(ICNS_FILES) +MAC_AM_FILES = $(shell for i in $(MAC_RES); do echo $(AM_NAME)-$$i.png; done) +MAC_MP_FILES = $(shell for i in $(MAC_RES); do echo $(MP_NAME)-$$i.png; done) +MAC_TG_FILES = $(shell for i in $(MAC_RES); do echo $(TG_NAME)-$$i.png; done) +MAC_EEPROM_FILES= $(shell for i in $(MAC_RES); do echo $(EEPROM_NAME)-$$i.png; done) +MAC_TELEM_FILES = $(shell for i in $(MAC_RES); do echo $(TELEM_NAME)-$$i.png; done) +MAC_MPD_FILES = $(shell for i in $(MAC_RES); do echo $(MPD_NAME)-$$i.png; done) -clean-local: - $(RM) altus-metrum-*.png telegps-*.png micropeak-*.png *.build *.ico *.icns *.o *.exe +ICNS_FILES = $(AM_NAME).icns $(MP_NAME).icns $(TG_NAME).icns \ + $(EEPROM_NAME).icns $(TELEM_NAME).icns $(MPD_NAME).icns -$(AM_FILES): altusmetrum.build +# Files needed for Windows icons -altusmetrum.build: altusmetrum.svg - for i in $(RES); do rsvg-convert -w $$i -h $$i -o altus-metrum-$$i.png altusmetrum.svg; done && touch $@ +WIN_AM_FILES = $(shell for i in $(WIN_RES); do echo $(AM_NAME)-$$i.png; done) +WIN_MP_FILES = $(shell for i in $(WIN_RES); do echo $(MP_NAME)-$$i.png; done) +WIN_TG_FILES = $(shell for i in $(WIN_RES); do echo $(TG_NAME)-$$i.png; done) +WIN_EEPROM_FILES= $(shell for i in $(WIN_RES); do echo $(EEPROM_NAME)-$$i.png; done) +WIN_TELEM_FILES = $(shell for i in $(WIN_RES); do echo $(TELEM_NAME)-$$i.png; done) +WIN_MPD_FILES = $(shell for i in $(WIN_RES); do echo $(MPD_NAME)-$$i.png; done) -$(TG_FILES): telegps.build +ICO_FILES = $(AM_NAME).ico $(MP_NAME).ico $(TG_NAME).ico \ + $(EEPROM_NAME).ico $(TELEM_NAME).ico $(MPD_NAME).ico -telegps.build: telegps.svg - for i in $(RES); do rsvg-convert -w $$i -h $$i -o telegps-$$i.png telegps.svg; done && touch $@ +EXE_FILES = $(AM_NAME).exe $(MP_NAME).exe $(TG_NAME).exe \ + $(EEPROM_NAME).exe $(TELEM_NAME).exe $(MPD_NAME).exe -$(MP_FILES): micropeak.build +# Files needed for Java internal icons -micropeak.build: micropeak.svg - for i in $(RES); do rsvg-convert -w $$i -h $$i -o micropeak-$$i.png micropeak.svg; done && touch $@ +JAVA_AM_FILES = $(shell for i in $(JAVA_RES); do echo $(AM_NAME)-$$i.png; done) +JAVA_MP_FILES = $(shell for i in $(JAVA_RES); do echo $(MP_NAME)-$$i.png; done) +JAVA_TG_FILES = $(shell for i in $(JAVA_RES); do echo $(TG_NAME)-$$i.png; done) -#clean-local: -# $(RM) -f $(ICO_FILES) +JAVA_FILES = $(JAVA_AM_FILES) $(JAVA_MP_FILES) $(JAVA_TG_FILES) -altus-metrum.ico: $(WIN_AM_FILES) - icotool -c -o $@ $(WIN_AM_FILES) +# PNG files needed by anyone -micro-peak.ico: $(WIN_MP_FILES) - icotool -c -o $@ $(WIN_MP_FILES) +AM_FILES = $(shell for i in $(RES); do echo $(AM_NAME)-$$i.png; done) +MP_FILES = $(shell for i in $(RES); do echo $(MP_NAME)-$$i.png; done) +TG_FILES = $(shell for i in $(RES); do echo $(TG_NAME)-$$i.png; done) +EEPROM_FILES = $(shell for i in $(RES); do echo $(EEPROM_NAME)-$$i.png; done) +TELEM_FILES = $(shell for i in $(RES); do echo $(TELEM_NAME)-$$i.png; done) +IN_MPD_FILES = $(shell for i in $(RES); do echo $(MPD_NAME)-$$i.png; done) -telegps.ico: $(WIN_TG_FILES) - icotool -c -o $@ $(WIN_TG_FILES) +ICON_THEME=$(datadir)/icons/hicolor -AltosUIIcon.icns: $(MAC_AM_FILES) - png2icns $@ $(MAC_AM_FILES) +appicondir = $(ICON_THEME)/scalable/apps +appicon_DATA = $(AM_ICON) $(MP_ICON) $(TG_ICON) -TeleGPS.icns: $(MAC_TG_FILES) - png2icns $@ $(MAC_TG_FILES) +MIME_ICONS = $(EEPROM_ICON) $(TELEM_ICON) $(MPD_ICON) -MicroPeak.icns: $(MAC_MP_FILES) - png2icns $@ $(MAC_MP_FILES) +mimeicondir = $(ICON_THEME)/scalable/mimetypes +mimeicon_DATA = $(MIME_ICONS) -MINGCC32=i686-w64-mingw32-gcc -MINGWINDRES=i686-w64-mingw32-windres +mimedir = $(datadir)/mime/packages +mime_DATA = org-altusmetrum-mimetypes.xml + +EXTRA_DIST = $(appicon_DATA) $(mimeicon_DATA) $(mime_DATA) windows-stub.c + +res: + echo $(RES) + +java-altosui: + @echo $(JAVA_AM_FILES) + +java-micropeak: + @echo $(JAVA_MP_FILES) + +java-telegps: + @echo $(JAVA_TG_FILES) -SUFFIXES=.rc .exe +fat: all $(ICO_FILES) $(ICNS_FILES) $(EXE_FILES) -fat: all micro-peak.exe altus-metrum.exe telegps.exe +all-local: $(JAVA_FILES) -altus-metrum.o: altus-metrum.ico -micro-peak.o: micro-peak.ico -telegps.o: telegps.ico +clean-local: + $(RM) $(AM_NAME)-*.png $(TG_NAME)-*.png $(MP_NAME)-*.png + $(RM) $(EEPROM_NAME)-*.png $(TELEM_NAME)-*.png $(MPD_NAME)-*.png + $(RM) *.build *.ico *.rc *.icns *.o *.exe $(MPD_ICON) + +install-data-hook: + update-mime-database $(datadir)/mime + update-icon-caches $(ICON_THEME) + +$(MPD_ICON): $(MP_ICON) + $(LN_S) $(MP_ICON) $@ + +$(AM_FILES): $(AM_NAME).build +$(MP_FILES): $(MP_NAME).build +$(TG_FILES): $(TG_NAME).build + +SUFFIXES=.svg .build .icns .ico .rc .o .exe + +.svg.build: + for i in $(RES); do rsvg-convert -w $$i -h $$i -o $*-$$i.png $*.svg; done && touch $@ + +.build.icns: + png2icns $@ $(shell for i in $(MAC_RES); do echo $*-$$i.png; done) + +.build.ico: + icotool -c -o $@ $(shell for i in $(WIN_RES); do echo $*-$$i.png; done) + +.ico.rc: + echo '101 ICON "$*.ico"' > $@ + +MINGCC32=i686-w64-mingw32-gcc +MINGWINDRES=i686-w64-mingw32-windres .rc.o: $(MINGWINDRES) $*.rc $@ diff --git a/icon/altus-metrum.rc b/icon/altus-metrum.rc deleted file mode 100644 index bbd03604..00000000 --- a/icon/altus-metrum.rc +++ /dev/null @@ -1 +0,0 @@ -101 ICON "altus-metrum.ico" diff --git a/icon/altusmetrum-altosui.svg b/icon/altusmetrum-altosui.svg new file mode 100644 index 00000000..e8935a65 --- /dev/null +++ b/icon/altusmetrum-altosui.svg @@ -0,0 +1,250 @@ + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/icon/altusmetrum-micropeak.svg b/icon/altusmetrum-micropeak.svg new file mode 100644 index 00000000..d37130f5 --- /dev/null +++ b/icon/altusmetrum-micropeak.svg @@ -0,0 +1,219 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + diff --git a/icon/altusmetrum-telegps.svg b/icon/altusmetrum-telegps.svg new file mode 100644 index 00000000..1e390f3b --- /dev/null +++ b/icon/altusmetrum-telegps.svg @@ -0,0 +1,324 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + diff --git a/icon/altusmetrum.svg b/icon/altusmetrum.svg deleted file mode 100644 index e8935a65..00000000 --- a/icon/altusmetrum.svg +++ /dev/null @@ -1,250 +0,0 @@ - - - - - - - - image/svg+xml - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/icon/application-vnd.altusmetrum.eeprom.svg b/icon/application-vnd.altusmetrum.eeprom.svg new file mode 100644 index 00000000..7b481cdc --- /dev/null +++ b/icon/application-vnd.altusmetrum.eeprom.svg @@ -0,0 +1,397 @@ + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/icon/application-vnd.altusmetrum.micropeak.svg b/icon/application-vnd.altusmetrum.micropeak.svg new file mode 120000 index 00000000..6efd3200 --- /dev/null +++ b/icon/application-vnd.altusmetrum.micropeak.svg @@ -0,0 +1 @@ +altusmetrum-micropeak.svg \ No newline at end of file diff --git a/icon/application-vnd.altusmetrum.telemetry.svg b/icon/application-vnd.altusmetrum.telemetry.svg new file mode 100644 index 00000000..4bcc0850 --- /dev/null +++ b/icon/application-vnd.altusmetrum.telemetry.svg @@ -0,0 +1,397 @@ + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/icon/creating-linux-icons b/icon/creating-linux-icons new file mode 100644 index 00000000..5b034c09 --- /dev/null +++ b/icon/creating-linux-icons @@ -0,0 +1,29 @@ +# To create linux icons and file associations + +1) Create mime type and install + + http://www.freedesktop.org/wiki/Specifications/AddingMIMETutor/ + + # xdg-mime install --mode system org-altusmetrum-mimetypes.xml + # update-mime-database /usr/local/share/mime + + On debian, + +2) Create icons and install + + For mime type application/vnd.altusmetrum.telemetry + icon name application-vnd.altusmetrum.telemetry.svg + + All mime icons go in + + /usr/share/icons/hicolor/scalable/mimetypes + + Update the icon database + + # update-icon-caches /usr/share/icons/hicolor + +3) Create .desktop file and install + + # xdg-desktop-menu install --mode system altusmetrum-altosui.desktop + + # update-desktop-database diff --git a/icon/micro-peak.rc b/icon/micro-peak.rc deleted file mode 100644 index 4efe777d..00000000 --- a/icon/micro-peak.rc +++ /dev/null @@ -1 +0,0 @@ -101 ICON "micro-peak.ico" diff --git a/icon/micropeak.svg b/icon/micropeak.svg deleted file mode 100644 index d37130f5..00000000 --- a/icon/micropeak.svg +++ /dev/null @@ -1,219 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - image/svg+xml - - - - - - - - - - - - - - - diff --git a/icon/org-altusmetrum-mimetypes.xml b/icon/org-altusmetrum-mimetypes.xml new file mode 100644 index 00000000..e8103c03 --- /dev/null +++ b/icon/org-altusmetrum-mimetypes.xml @@ -0,0 +1,16 @@ + + + + Altus Metrum Telemetry File + + + + Altus Metrum Eeprom Log File + + + + Altus Metrum MicroPeak Log File + + + diff --git a/icon/telegps.rc b/icon/telegps.rc deleted file mode 100644 index 7f5957f9..00000000 --- a/icon/telegps.rc +++ /dev/null @@ -1 +0,0 @@ -101 ICON "telegps.ico" diff --git a/icon/telegps.svg b/icon/telegps.svg deleted file mode 100644 index 1e390f3b..00000000 --- a/icon/telegps.svg +++ /dev/null @@ -1,324 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - image/svg+xml - - - - - - - - - diff --git a/micropeak/.gitignore b/micropeak/.gitignore index f9a61359..81dd0749 100644 --- a/micropeak/.gitignore +++ b/micropeak/.gitignore @@ -11,7 +11,7 @@ micropeak-windows.nsi MicroPeak-Linux-* MicroPeak-Mac-* MicroPeak-Windows-* -micropeak.desktop +altusmetrum-micropeak.desktop *.dll *.dylib *.so diff --git a/micropeak/Info.plist.in b/micropeak/Info.plist.in index 8f751079..b1dc6cea 100644 --- a/micropeak/Info.plist.in +++ b/micropeak/Info.plist.in @@ -23,14 +23,14 @@ CFBundleInfoDictionaryVersion 6.0 CFBundleIconFile - MicroPeak.icns + altusmetrum-micropeak.icns CFBundleDocumentTypes CFBundleTypeName MicroPeak data file CFBundleTypeIconFile - MicroPeak.icns + application-vnd.altusmetrum.micropeak.icns CFBundleTypeExtensions mpd diff --git a/micropeak/Makefile.am b/micropeak/Makefile.am index 37d5ca63..6270fd74 100644 --- a/micropeak/Makefile.am +++ b/micropeak/Makefile.am @@ -56,23 +56,31 @@ ALTOSUILIB_CLASS=\ ICONDIR=$(top_srcdir)/icon JAVA_ICONS=\ - $(ICONDIR)/micropeak-16.png \ - $(ICONDIR)/micropeak-32.png \ - $(ICONDIR)/micropeak-48.png \ - $(ICONDIR)/micropeak-64.png \ - $(ICONDIR)/micropeak-128.png \ - $(ICONDIR)/micropeak-256.png + $(ICONDIR)/altusmetrum-micropeak-16.png \ + $(ICONDIR)/altusmetrum-micropeak-32.png \ + $(ICONDIR)/altusmetrum-micropeak-48.png \ + $(ICONDIR)/altusmetrum-micropeak-64.png \ + $(ICONDIR)/altusmetrum-micropeak-128.png\ + $(ICONDIR)/altusmetrum-micropeak-256.png # icon base names for jar -ICONJAR= -C $(ICONDIR) micropeak-16.png \ - -C $(ICONDIR) micropeak-32.png \ - -C $(ICONDIR) micropeak-48.png \ - -C $(ICONDIR) micropeak-64.png \ - -C $(ICONDIR) micropeak-128.png \ - -C $(ICONDIR) micropeak-256.png - -WINDOWS_ICON=$(ICONDIR)/micro-peak.ico $(ICONDIR)/micro-peak.exe -MACOSX_ICON=$(ICONDIR)/MicroPeak.icns +ICONJAR= \ + -C $(ICONDIR) altusmetrum-micropeak-16.png \ + -C $(ICONDIR) altusmetrum-micropeak-32.png \ + -C $(ICONDIR) altusmetrum-micropeak-48.png \ + -C $(ICONDIR) altusmetrum-micropeak-64.png \ + -C $(ICONDIR) altusmetrum-micropeak-128.png\ + -C $(ICONDIR) altusmetrum-micropeak-256.png + +WINDOWS_ICONS =\ + ../icon/altusmetrum-micropeak.ico \ + ../icon/altusmetrum-micropeak.exe + ../icon/application-vnd.altusmetrum.micropeak.ico \ + ../icon/application-vnd.altusmetrum.micropeak.ico + +MACOSX_ICONS =\ + ../icon/altusmetrum-micropeak.icns \ + ../icon/application-vnd.altusmetrum.micropeak.icns desktopdir = $(datadir)/applications desktop_file = altusmetrum-micropeak.desktop @@ -106,14 +114,14 @@ DOC=$(MICROPEAK_DOC) FAT_FILES=$(FATJAR) $(ALTOSLIB_CLASS) $(ALTOSUILIB_CLASS) $(FREETTS_CLASS) $(JFREECHART_CLASS) $(JCOMMON_CLASS) -LINUX_FILES=$(FAT_FILES) libaltos.so $(FIRMWARE) $(DOC) micropeak.desktop.in ../icon/micropeak.svg -LINUX_EXTRA=micropeak-fat micropeak.desktop.in +LINUX_FILES=$(FAT_FILES) libaltos.so $(FIRMWARE) $(DOC) $(desktop_file).in ../icon/altusmetrum-micropeak.svg +LINUX_EXTRA=micropeak-fat $(desktop_file).in MACOSX_DRIVER_URL=http://www.ftdichip.com/Drivers/VCP/MacOSX/FTDIUSBSerialDriver_v2_2_18.dmg MACOSX_DRIVER=FTDIUSBSerialDriver_v2_2_18.dmg MACOSX_INFO_PLIST=Info.plist MACOSX_README=ReadMe-Mac.rtf -MACOSX_FILES=$(FAT_FILES) libaltos.dylib $(MACOSX_INFO_PLIST) $(MACOSX_DRIVER) $(MACOSX_README) $(DOC) $(MACOSX_ICON) +MACOSX_FILES=$(FAT_FILES) libaltos.dylib $(MACOSX_INFO_PLIST) $(MACOSX_DRIVER) $(MACOSX_README) $(DOC) $(MACOSX_ICONS) $(MACOSX_DRIVER): wget $(MACOSX_DRIVER_URL) @@ -124,7 +132,7 @@ WINDOWS_DRIVER=CDM20824_Setup.exe $(WINDOWS_DRIVER): wget $(WINDOWS_DRIVER_URL) -WINDOWS_FILES=$(FAT_FILES) altos.dll altos64.dll $(DOC) $(WINDOWS_ICON) $(WINDOWS_DRIVER) +WINDOWS_FILES=$(FAT_FILES) altos.dll altos64.dll $(DOC) $(WINDOWS_ICONS) $(WINDOWS_DRIVER) if FATINSTALL @@ -261,7 +269,7 @@ $(MACOSX_DIST): $(MACOSX_FILES) cp -p Info.plist macosx/MicroPeak.app/Contents cp -p $(MACOSX_DRIVER) macosx mkdir -p macosx/MicroPeak.app/Contents/Resources/Java - cp -p $(MACOSX_ICON) macosx/MicroPeak.app/Contents/Resources + cp -p $(MACOSX_ICONS) macosx/MicroPeak.app/Contents/Resources cp -p $(FATJAR) macosx/MicroPeak.app/Contents/Resources/Java/micropeak.jar cp -p libaltos.dylib macosx/MicroPeak.app/Contents/Resources/Java cp -p $(ALTOSLIB_CLASS) macosx/MicroPeak.app/Contents/Resources/Java diff --git a/micropeak/MicroPeak.app/Contents/Resources/MicroPeak.icns b/micropeak/MicroPeak.app/Contents/Resources/MicroPeak.icns deleted file mode 100644 index 9ba83bf5..00000000 Binary files a/micropeak/MicroPeak.app/Contents/Resources/MicroPeak.icns and /dev/null differ diff --git a/micropeak/altusmetrum-micropeak.desktop.in b/micropeak/altusmetrum-micropeak.desktop.in index f7d258ec..782b4704 100644 --- a/micropeak/altusmetrum-micropeak.desktop.in +++ b/micropeak/altusmetrum-micropeak.desktop.in @@ -3,7 +3,7 @@ Type=Application Name=MicroPeak GenericName=MicroPeak Download and Analysis Comment=View and log data from MicroPeak altimeters -Icon=%icondir%/micropeak.svg +Icon=%icondir%/altusmetrum-micropeak.svg Exec=%bindir%/micropeak %f Terminal=false MimeType=application/vnd.altusmetrum.micropeak diff --git a/micropeak/micropeak-windows.nsi.in b/micropeak/micropeak-windows.nsi.in index d8e47505..848523b0 100644 --- a/micropeak/micropeak-windows.nsi.in +++ b/micropeak/micropeak-windows.nsi.in @@ -4,11 +4,13 @@ !include java.nsh !include refresh-sh.nsh -!define REG_NAME "MicroPeak" -!define PROG_ID "org.altusmetrum.micropeak.1" -!define FAT_NAME "micropeak-fat.jar" -!define ICO_ICO "micro-peak.ico" -!define ICO_EXE "micro-peak.exe" +!define REG_NAME "MicroPeak" +!define PROG_ID "org.altusmetrum.micropeak.1" +!define PROG_ID_MPD "org.altusmetrum.micropeak.mpd.1" +!define FAT_NAME "micropeak-fat.jar" +!define WIN_APP_ICON "altusmetrum-micropeak.ico" +!define WIN_APP_EXE "altusmetrum-micropeak.exe" +!define WIN_MPD_EXE "application-vnd.altusmetrum.micropeak.exe" Name "${REG_NAME} Installer" @@ -82,13 +84,13 @@ Section "${REG_NAME} Application" File "*.dll" - File "../icon/${ICO_ICO}" + File "../icon/${WIN_APP_ICON}" - CreateShortCut "$SMPROGRAMS\${REG_NAME}.lnk" "$SYSDIR\javaw.exe" "-jar ${FAT_NAME}" "$INSTDIR\${ICO_ICO}" + CreateShortCut "$SMPROGRAMS\${REG_NAME}.lnk" "$SYSDIR\javaw.exe" "-jar ${FAT_NAME}" "$INSTDIR\${WIN_APP_ICON}" SectionEnd Section "${REG_NAME} Desktop Shortcut" - CreateShortCut "$DESKTOP\${REG_NAME}.lnk" "$INSTDIR\${FAT_NAME}" "" "$INSTDIR\${ICO_ICO}" + CreateShortCut "$DESKTOP\${REG_NAME}.lnk" "$INSTDIR\${FAT_NAME}" "" "$INSTDIR\${WIN_APP_ICON}" SectionEnd Section "Documentation" @@ -102,24 +104,28 @@ Section "File Associations" SetOutPath $INSTDIR - File "../icon/${ICO_EXE}" + File "../icon/${WIN_APP_EXE}" + File "../icon/${WIN_MPD_EXE}" ; application elements - WriteRegStr HKCR "${PROG_ID}" "" "MicroPeak Data File" - WriteRegStr HKCR "${PROG_ID}" "FriendlyTypeName" "MicroPeak Data File" - WriteRegStr HKCR "${PROG_ID}\CurVer" "" "${PROG_ID}" - WriteRegStr HKCR "${PROG_ID}\DefaultIcon" "" '"$INSTDIR\${ICO_EXE}",-101' - WriteRegExpandStr HKCR "${PROG_ID}\shell\play\command" "" '"%SYSTEMROOT%\System32\javaw.exe" -Djava.library.path="$INSTDIR" -jar "$INSTDIR\${FAT_NAME}" "%1"' + DeleteRegKey HKCR "${PROG_ID}" + DeleteRegKey HKCR "${PROG_ID_MPD}" + + WriteRegStr HKCR "${PROG_ID_MPD}" "" "MicroPeak Data File" + WriteRegStr HKCR "${PROG_ID_MPD}" "FriendlyTypeName" "MicroPeak Data File" + WriteRegStr HKCR "${PROG_ID_MPD}\CurVer" "" "${PROG_ID_MPD}" + WriteRegStr HKCR "${PROG_ID_MPD}\DefaultIcon" "" '"$INSTDIR\${WIN_MPD_EXE}",-101' + WriteRegExpandStr HKCR "${PROG_ID_MPD}\shell\play\command" "" '"%SYSTEMROOT%\System32\javaw.exe" -Djava.library.path="$INSTDIR" -jar "$INSTDIR\${FAT_NAME}" "%1"' ; .mpd elements - WriteRegStr HKCR ".mpd" "" "${PROG_ID}" + WriteRegStr HKCR ".mpd" "" "${PROG_ID_MPD}" WriteRegStr HKCR ".mpd" "PerceivedType" "MicroPeak Data File" - WriteRegStr HKCR ".mpd" "Content Type" "application/micropeak" + WriteRegStr HKCR ".mpd" "Content Type" "application/vnd.altusmetrum.micropeak" - WriteRegStr HKCR ".mpd\OpenWithProgids" "${PROG_ID}" "" - WriteRegStr HKCR ".mpd\${PROG_ID}" "" "${REG_NAME}" + WriteRegStr HKCR ".mpd\OpenWithProgids" "${PROG_ID_MPD}" "" + WriteRegStr HKCR ".mpd\${PROG_ID_MPD}" "" "${REG_NAME}" Call RefreshShellIcons SectionEnd @@ -153,15 +159,16 @@ Section "Uninstall" DetailPrint "Delete uninstall reg entries" DeleteRegKey HKCR "${PROG_ID}" + DeleteRegKey HKCR "${PROG_ID_MPD}" - DeleteRegKey HKCR ".mpd\${PROG_ID}" - DeleteRegValue HKCR ".mpd\OpenWithProgids" "${PROG_ID}" + DeleteRegKey HKCR ".mpd\${PROG_ID_MPD}" + DeleteRegValue HKCR ".mpd\OpenWithProgids" "${PROG_ID_MPD}" Delete "$INSTDIR\${FAT_NAME}" Delete "$INSTDIR\uninstall-${REG_NAME}.exe" - Delete "$INSTDIR\${ICO_ICO}" - Delete "$INSTDIR\${ICO_EXE}" + Delete "$INSTDIR\${WIN_APP_ICON}" + Delete "$INSTDIR\${WIN_APP_EXE}" ; Remove shortcuts, if any Delete "$SMPROGRAMS\${REG_NAME}.lnk" diff --git a/telegps/.gitignore b/telegps/.gitignore index edb509f2..37e46ad1 100644 --- a/telegps/.gitignore +++ b/telegps/.gitignore @@ -17,7 +17,7 @@ TeleGPS-Linux-*.tar.bz2 TeleGPS-Linux-*.sh TeleGPS-Mac-*.zip TeleGPS-Windows-*.exe -telegps.desktop +altusmetrum-telegps.desktop telegps-windows.log *.dll *.dylib diff --git a/telegps/Info.plist.in b/telegps/Info.plist.in index 7dbb77d1..89870a8c 100644 --- a/telegps/Info.plist.in +++ b/telegps/Info.plist.in @@ -23,14 +23,14 @@ CFBundleInfoDictionaryVersion 6.0 CFBundleIconFile - TeleGPS.icns + altusmetrum-telegps.icns CFBundleDocumentTypes CFBundleTypeName Telemetry CFBundleTypeIconFile - TeleGPS.icns + application-vnd.altusmetrum.telemetry.icns CFBundleTypeExtensions telem @@ -42,7 +42,7 @@ CFBundleTypeName Eeprom CFBundleTypeIconFile - TeleGPS.icns + application-vnd.altusmetrum.eeprom.icns CFBundleTypeExtensions eeprom diff --git a/telegps/Makefile.am b/telegps/Makefile.am index c4f6a58b..a7defb8a 100644 --- a/telegps/Makefile.am +++ b/telegps/Makefile.am @@ -58,23 +58,34 @@ ALTOSUILIB_CLASS=\ ICONDIR=$(top_srcdir)/icon JAVA_ICONS=\ - $(ICONDIR)/telegps-16.png \ - $(ICONDIR)/telegps-32.png \ - $(ICONDIR)/telegps-48.png \ - $(ICONDIR)/telegps-64.png \ - $(ICONDIR)/telegps-128.png \ - $(ICONDIR)/telegps-256.png + $(ICONDIR)/altusmetrum-telegps-16.png \ + $(ICONDIR)/altusmetrum-telegps-32.png \ + $(ICONDIR)/altusmetrum-telegps-48.png \ + $(ICONDIR)/altusmetrum-telegps-64.png \ + $(ICONDIR)/altusmetrum-telegps-128.png\ + $(ICONDIR)/altusmetrum-telegps-256.png # icon base names for jar -ICONJAR= -C $(ICONDIR) telegps-16.png \ - -C $(ICONDIR) telegps-32.png \ - -C $(ICONDIR) telegps-48.png \ - -C $(ICONDIR) telegps-64.png \ - -C $(ICONDIR) telegps-128.png \ - -C $(ICONDIR) telegps-256.png - -WINDOWS_ICON=$(ICONDIR)/telegps.ico $(ICONDIR)/telegps.exe -MACOSX_ICON=$(ICONDIR)/TeleGPS.icns +ICONJAR= \ + -C $(ICONDIR) altusmetrum-telegps-16.png \ + -C $(ICONDIR) altusmetrum-telegps-32.png \ + -C $(ICONDIR) altusmetrum-telegps-48.png \ + -C $(ICONDIR) altusmetrum-telegps-64.png \ + -C $(ICONDIR) altusmetrum-telegps-128.png\ + -C $(ICONDIR) altusmetrum-telegps-256.png + +WINDOWS_ICONS =\ + ../icon/altusmetrum-telegps.ico \ + ../icon/altusmetrum-telegps.exe + ../icon/application-vnd.altusmetrum.eeprom.ico \ + ../icon/application-vnd.altusmetrum.eeprom.exe \ + ../icon/application-vnd.altusmetrum.telemetry.ico \ + ../icon/application-vnd.altusmetrum.telemetry.exe + +MACOSX_ICONS =\ + ../icon/altusmetrum-telegps.icns \ + ../icon/application-vnd.altusmetrum.eeprom.icns \ + ../icon/application-vnd.altusmetrum.telemetry.icns # Firmware FIRMWARE_TD_0_2=$(top_srcdir)/src/teledongle-v0.2/teledongle-v0.2-$(VERSION).ihx @@ -120,15 +131,15 @@ DOC=$(TELEGPS_DOC) FAT_FILES=$(FATJAR) $(ALTOSLIB_CLASS) $(ALTOSUILIB_CLASS) $(FREETTS_CLASS) $(JFREECHART_CLASS) $(JCOMMON_CLASS) -LINUX_FILES=$(FAT_FILES) libaltos.so $(FIRMWARE) $(DOC) $(desktop_file).in ../icon/telegps.svg +LINUX_FILES=$(FAT_FILES) libaltos.so $(FIRMWARE) $(DOC) $(desktop_file).in ../icon/altusmetrum-telegps.svg LINUX_EXTRA=telegps-fat $(desktop_file).in MACOSX_INFO_PLIST=Info.plist MACOSX_README=ReadMe-Mac.rtf -MACOSX_FILES=$(FAT_FILES) libaltos.dylib $(MACOSX_INFO_PLIST) $(MACOSX_README) $(DOC) $(MACOSX_ICON) +MACOSX_FILES=$(FAT_FILES) libaltos.dylib $(MACOSX_INFO_PLIST) $(MACOSX_README) $(DOC) $(MACOSX_ICONS) MACOSX_EXTRA=$(FIRMWARE) -WINDOWS_FILES=$(FAT_FILES) altos.dll altos64.dll $(top_srcdir)/altusmetrum.inf $(top_srcdir)/altusmetrum.cat $(DOC) $(WINDOWS_ICON) +WINDOWS_FILES=$(FAT_FILES) altos.dll altos64.dll $(top_srcdir)/altusmetrum.inf $(top_srcdir)/altusmetrum.cat $(DOC) $(WINDOWS_ICONS) if FATINSTALL @@ -194,7 +205,7 @@ $(FATJAR): classtelegps.stamp Manifest-fat.txt $(ALTOSLIB_CLASS) $(ALTOSUILIB_CL -C classes org \ -C ../libaltos libaltosJNI -classaltosui.stamp: $(ALTOSLIB_CLASS) $(ALTOSUILIB_CLASS) +classtelegps.stamp: $(ALTOSLIB_CLASS) $(ALTOSUILIB_CLASS) libaltos.so: build-libaltos -rm -f "$@" @@ -269,7 +280,7 @@ $(MACOSX_DIST): $(MACOSX_FILES) $(MACOSX_EXTRA) Makefile cp -a $(DOC) macosx/Doc cp -p Info.plist macosx/TeleGPS.app/Contents mkdir -p macosx/AltOS-$(VERSION) macosx/TeleGPS.app/Contents/Resources/Java - cp -p $(MACOSX_ICON) macosx/TeleGPS.app/Contents/Resources + cp -p $(MACOSX_ICONS) macosx/TeleGPS.app/Contents/Resources cp -p $(FATJAR) macosx/TeleGPS.app/Contents/Resources/Java/telegps.jar cp -p libaltos.dylib macosx/TeleGPS.app/Contents/Resources/Java cp -p $(ALTOSLIB_CLASS) macosx/TeleGPS.app/Contents/Resources/Java diff --git a/telegps/altusmetrum-telegps.desktop.in b/telegps/altusmetrum-telegps.desktop.in index 76c1eb42..7a1b3536 100644 --- a/telegps/altusmetrum-telegps.desktop.in +++ b/telegps/altusmetrum-telegps.desktop.in @@ -3,7 +3,7 @@ Type=Application Name=TeleGPS GenericName=TeleGPS monitor, download and analysis Comment=View and log data from TeleGPS tracking devices -Icon=%icondir%/telegps.svg +Icon=%icondir%/altusmetrum-telegps.svg Exec=%bindir%/telegps %f Terminal=false MimeType=application/vnd.altusmetrum.telemetry;application/vnd.altusmetrum.eeprom diff --git a/telegps/telegps-windows.nsi.in b/telegps/telegps-windows.nsi.in index 3f9648f9..603d4971 100644 --- a/telegps/telegps-windows.nsi.in +++ b/telegps/telegps-windows.nsi.in @@ -4,12 +4,14 @@ !include java.nsh !include refresh-sh.nsh -!define REG_NAME "TeleGPS" -!define PROG_ID "org.altusmetrum.telegps.1" -!define PROG_ALTOSUI "org.altusmetrum.altosui.1" -!define FAT_NAME "telegps-fat.jar" -!define ICO_ICO "telegps.ico" -!define ICO_EXE "telegps.exe" +!define REG_NAME "TeleGPS" +!define PROG_ID_TELEM "altusmetrum.telegps.telem.1" +!define PROG_ID_EEPROM "altusmetrum.telegps.eeprom.1" +!define FAT_NAME "telegps-fat.jar" +!define WIN_APP_ICON "altusmetrum-telegps.ico" +!define WIN_APP_EXE "altusmetrum-telegps.exe" +!define WIN_TELEM_EXE "application-vnd.altusmetrum.telemetry.exe" +!define WIN_EEPROM_EXE "application-vnd.altusmetrum.eeprom.exe" Name "${REG_NAME} Installer" @@ -104,13 +106,13 @@ Section "${REG_NAME} Application" File "*.dll" - File "../icon/${ICO_ICO}" + File "../icon/${WIN_APP_ICON}" - CreateShortCut "$SMPROGRAMS\${REG_NAME}.lnk" "$SYSDIR\javaw.exe" "-jar ${FAT_NAME}" "$INSTDIR\${ICO_ICO}" + CreateShortCut "$SMPROGRAMS\${REG_NAME}.lnk" "$SYSDIR\javaw.exe" "-jar ${FAT_NAME}" "$INSTDIR\${WIN_APP_ICON}" SectionEnd Section "${REG_NAME} Desktop Shortcut" - CreateShortCut "$DESKTOP\${REG_NAME}.lnk" "$INSTDIR\${FAT_NAME}" "" "$INSTDIR\${ICO_ICO}" + CreateShortCut "$DESKTOP\${REG_NAME}.lnk" "$INSTDIR\${FAT_NAME}" "" "$INSTDIR\${WIN_APP_ICON}" SectionEnd Section "TeleGPS, TeleDongle and TeleBT Firmware" @@ -134,35 +136,51 @@ SectionEnd Section "File Associations" + ${DisableX64FSRedirection} + SetOutPath $INSTDIR - File "../icon/${ICO_EXE}" + File "../icon/${WIN_APP_EXE}" + File "../icon/${WIN_TELEM_EXE}" + File "../icon/${WIN_EEPROM_EXE}" - ; application elements - - WriteRegStr HKCR "${PROG_ID}" "" "Altus Metrum Data File" - WriteRegStr HKCR "${PROG_ID}" "FriendlyTypeName" "Altus Metrum Data File" - WriteRegStr HKCR "${PROG_ID}\CurVer" "" "${PROG_ID}" - WriteRegStr HKCR "${PROG_ID}\DefaultIcon" "" '"$INSTDIR\${ICO_EXE}",-101' - WriteRegExpandStr HKCR "${PROG_ID}\shell\play\command" "" '"%SYSTEMROOT%\System32\javaw.exe" -Djava.library.path="$INSTDIR" -jar "$INSTDIR\${FAT_NAME}" "%1"' + DeleteRegKey HKCR "${PROG_ID_TELEM}" + DeleteRegKey HKCR "${PROG_ID_EEPROM}" + + DeleteRegKey HKCR ".eeprom\${PROG_ID_EEPROM}" + DeleteRegValue HKCR ".eeprom\OpenWithProgids" "${PROG_ID_EEPROM}" + DeleteRegKey HKCR ".telem\${PROG_ID_EEPROM}" + DeleteRegValue HKCR ".telem\OpenWithProgids" "${PROG_ID_EEPROM}" ; .eeprom elements - WriteRegStr HKCR ".eeprom" "" "${PROG_ALTOSUI}" + WriteRegStr HKCR "${PROG_ID_EEPROM}" "" "Altus Metrum Log File" + WriteRegStr HKCR "${PROG_ID_EEPROM}" "FriendlyTypeName" "Altus Metrum Log File" + WriteRegStr HKCR "${PROG_ID_EEPROM}\CurVer" "" "${PROG_ID_EEPROM}" + WriteRegStr HKCR "${PROG_ID_EEPROM}\DefaultIcon" "" '"$INSTDIR\${WIN_EEPROM_EXE}",-101' + WriteRegExpandStr HKCR "${PROG_ID_EEPROM}\shell\open\command" "" '"%SYSTEMROOT%\System32\javaw.exe" -Djava.library.path="$INSTDIR" -jar "$INSTDIR\${FAT_NAME}" "%1"' + + WriteRegStr HKCR ".eeprom" "" "${PROG_ID_EEPROM}" WriteRegStr HKCR ".eeprom" "PerceivedType" "Altus Metrum Log File" - WriteRegStr HKCR ".eeprom" "Content Type" "application/altosui" + WriteRegStr HKCR ".eeprom" "Content Type" "application/vnd.altusmetrum.eeprom" - WriteRegStr HKCR ".eeprom\OpenWithProgids" "${PROG_ID}" "" - WriteRegStr HKCR ".eeprom\${PROG_ID}" "" "${REG_NAME}" + WriteRegStr HKCR ".eeprom\OpenWithProgids" "${PROG_ID_EEPROM}" "" + WriteRegStr HKCR ".eeprom\${PROG_ID_EEPROM}" "" "${REG_NAME}" ; .telem elements - WriteRegStr HKCR ".telem" "" "${PROG_ALTOSUI}" + WriteRegStr HKCR "${PROG_ID_TELEM}" "" "Altus Metrum Telemetry File" + WriteRegStr HKCR "${PROG_ID_TELEM}" "FriendlyTypeName" "Altus Metrum Telemetry File" + WriteRegStr HKCR "${PROG_ID_TELEM}\CurVer" "" "${PROG_ID_TELEM}" + WriteRegStr HKCR "${PROG_ID_TELEM}\DefaultIcon" "" '"$INSTDIR\${WIN_TELEM_EXE}",-101' + WriteRegExpandStr HKCR "${PROG_ID_TELEM}\shell\open\command" "" '"%SYSTEMROOT%\System32\javaw.exe" -Djava.library.path="$INSTDIR" -jar "$INSTDIR\${FAT_NAME}" "%1"' + + WriteRegStr HKCR ".telem" "" "${PROG_ID_TELEM}" WriteRegStr HKCR ".telem" "PerceivedType" "Altus Metrum Telemetry File" - WriteRegStr HKCR ".telem" "Content Type" "application/altosui" + WriteRegStr HKCR ".telem" "Content Type" "application/vnd.altusmetrum.telemetry" - WriteRegStr HKCR ".telem\OpenWithProgids" "${PROG_ID}" "" - WriteRegStr HKCR ".telem\${PROG_ID}" "" "${REG_NAME}" + WriteRegStr HKCR ".telem\OpenWithProgids" "${PROG_ID_TELEM}" "" + WriteRegStr HKCR ".telem\${PROG_ID_TELEM}" "" "${REG_NAME}" Call RefreshShellIcons SectionEnd @@ -195,21 +213,22 @@ Section "Uninstall" DetailPrint "Delete uninstall reg entries" - DeleteRegKey HKCR "${PROG_ID}" + DeleteRegKey HKCR "${PROG_ID_EEPROM}" + DeleteRegKey HKCR "${PROG_ID_TELEM}" - DeleteRegKey HKCR ".eeprom\${PROG_ID}" - DeleteRegValue HKCR ".eeprom\OpenWithProgids" "${PROG_ID}" + DeleteRegKey HKCR ".eeprom\${PROG_ID_EEPROM}" + DeleteRegValue HKCR ".eeprom\OpenWithProgids" "${PROG_ID_EEPROM}" - DeleteRegKey HKCR ".telem\${PROG_ID}" - DeleteRegValue HKCR ".telem\OpenWithProgids" "${PROG_ID}" + DeleteRegKey HKCR ".telem\${PROG_ID_TELEM}" + DeleteRegValue HKCR ".telem\OpenWithProgids" "${PROG_ID_TELEM}" DetailPrint "Delete file association reg entries" Delete "$INSTDIR\${FAT_NAME}" Delete "$INSTDIR\uninstall-${REG_NAME}.exe" - Delete "$INSTDIR\${ICO_ICO}" - Delete "$INSTDIR\${ICO_EXE}" + Delete "$INSTDIR\${WIN_APP_ICON}" + Delete "$INSTDIR\${WIN_APP_EXE}" ; Remove shortcuts, if any Delete "$SMPROGRAMS\${REG_NAME}.lnk" -- cgit v1.2.3