CVS: packaging mspgcc-full-install.nsi,1.4,1.5

Chris Liechti <[email protected]>
Newsgroups gmane.comp.hardware.texas-instruments.msp430.gcc.cvs
Message-ID <[email protected]>
Update of /cvsroot/mspgcc/packaging
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27348/packaging

Modified Files:
	mspgcc-full-install.nsi 
Log Message:
- set .elf and .a43 file associations with shell context menu/msp430-downloader
- add "full" and "w/o cygwin" install profiles
- section order/hierarchy changed a bit

Index: mspgcc-full-install.nsi
===================================================================
RCS file: /cvsroot/mspgcc/packaging/mspgcc-full-install.nsi,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -w -d -r1.4 -r1.5
--- mspgcc-full-install.nsi	28 Dec 2005 18:23:26 -0000	1.4
+++ mspgcc-full-install.nsi	28 Dec 2005 20:54:39 -0000	1.5
@@ -17,9 +17,13 @@
 Name ${PRODUCT}
 
 #----------------------------------------------------------------------------
+InstType "Full"
+InstType "without make and cygwin"
+
 
 SubSection "Make utilities & libs" SecMakeAndLibs
     Section "Make utilities" SecMake
+        SectionIn 1
         SetOutPath "$INSTDIR\bin"
         ;~ Call DoCygwinDll
         File c:\cygwin\bin\make.exe
@@ -32,6 +36,7 @@
     SectionEnd
     
     Section "Cygwin libs" SecCygwin
+        SectionIn 1
         SetOutPath "$INSTDIR\bin"
         File c:\cygwin\bin\cygwin1.dll
         File c:\cygwin\bin\cygintl-2.dll
@@ -42,7 +47,7 @@
 
 
 Section "Binutils" SecBinutils
-    SectionIn RO
+    SectionIn 1 2 RO
     
     !include "msp430-binutils-install.nsh"
     
@@ -67,19 +72,25 @@
     WriteUninstaller "${PRODUCT}-uninstall.exe"
 SectionEnd
 
+SubSection "C Compiler" SecCompiler
 Section "C compiler" SecGcc
+        SectionIn 1 2
     !include "msp430-gcc-install.nsh"
     SetOutPath $INSTDIR\docs
     File README-msp430-gcc.txt
 SectionEnd
 
 Section "Target C library" SecLibc
+        SectionIn 1 2
     !include "msp430-libc-install.nsh"
     SetOutPath $INSTDIR\docs
     File "README-msp430-libc.txt"
 SectionEnd
+SubSectionEnd
 
-Section "Documentation" SecDocs
+SubSection "Documentation" SecDoc
+    Section "Documentation" SecDocsSub
+        SectionIn 1 2
     !include "msp430-docs-install.nsh"
     SetOutPath $INSTDIR\docs
     File "${SRCDIR}\stamp.txt"
@@ -90,17 +101,16 @@
 SectionEnd
 
 Section "Examples" SecExamples
+        SectionIn 1 2
     !include "msp430-examples-install.nsh"
     CreateDirectory "$SMPROGRAMS\mspgcc"
     CreateShortCut "$SMPROGRAMS\mspgcc\examples.lnk"    "$INSTDIR\examples"    "" "$INSTDIR\examples" 0
 SectionEnd
-
-Section "Libraries" SecLibraries
-    !include "msp430-libraries-install.nsh"
-SectionEnd
+SubSectionEnd
 
 
 Section "Debugger" SecGdb
+    SectionIn 1 2
     !include "msp430-gdb-install.nsh"
     SetOutPath "$INSTDIR\docs"
     File "README-msp430-gdb.txt"
@@ -108,9 +118,9 @@
 
 
 Section "JTAG and BSL" SecDownloader
+    SectionIn 1 2
     SetOutPath "$INSTDIR\bin"
     File "${SRCDIR}\bin\msp430-gdbproxy.exe"
-    ;~ File "c:\mspgcc\bin\msp430-reset.exe"
     File "${SRCDIR}\bin\python24.dll"
     File "${SRCDIR}\bin\msp430-bsl.exe"
     File "${SRCDIR}\bin\msp430-jtag.exe"
@@ -150,10 +160,9 @@
     CreateShortCut "$SMPROGRAMS\mspgcc\msp430-gdbproxy-debug.lnk" "$INSTDIR\bin\msp430-gdbproxy.exe" "--port=3333 --debug --debug msp430" "$INSTDIR\gdbproxy.exe" 0
 SectionEnd
 
-
-
 SubSection "GiveIO (required for Windows NT, 2000 and XP only))" SecGiveio
     Section "Program"
+      SectionIn 1 2
       Call IsNT
       Pop $0
       StrCmp $0 1 need_giveio_1
@@ -174,6 +183,7 @@
     
     
     Section "Start Menu Shortcuts"
+      SectionIn 1 2
       Call IsNT
       Pop $0
       StrCmp $0 1 need_giveio_2
@@ -188,6 +198,7 @@
     SectionEnd
     
     Section "Start GIVEIO Service now"
+      SectionIn 1 2
       Call IsNT
       Pop $0
       StrCmp $0 1 need_giveio_3
@@ -199,10 +210,44 @@
     SectionEnd
 SubSectionEnd
 
+Section "Addon Libraries" SecLibraries
+    SectionIn 1 2
+    !include "msp430-libraries-install.nsh"
+SectionEnd
+
 Section "Set PATH" SecPath
+    SectionIn 1 2
     Call AddPath
 SectionEnd
 
+Section "Set file Associations" SecAssociations
+    SectionIn 1 2
+    ; Write the mspgcc.downloader Keys
+    WriteRegStr HKCR "mspgcc.ihexfile" "" "MSP430 ihex binary"
+    WriteRegStr HKCR "mspgcc.ihexfile\DefaultIcon" "" "$INSTDIR\bin\msp430-downloader.exe"
+    WriteRegStr HKCR "mspgcc.ihexfile\shell\open" "" "JTAG Download"
+    WriteRegStr HKCR "mspgcc.ihexfile\shell\open\command" "" "$INSTDIR\bin\msp430-downloader.exe $\"%1$\""
+    WriteRegStr HKCR "mspgcc.ihexfile\shell\totitext" "" "Convert to TI-Text"
+    WriteRegStr HKCR "mspgcc.ihexfile\shell\totitext\command" "" "$INSTDIR\bin\ihex2titext $\"%1$\""
+
+    WriteRegStr HKCR "mspgcc.elffile" "" "MSP430 elf binary"
+    WriteRegStr HKCR "mspgcc.elffile\DefaultIcon" "" "$INSTDIR\bin\msp430-downloader.exe"
+    WriteRegStr HKCR "mspgcc.elffile\shell\open" "" "JTAG Download"
+    WriteRegStr HKCR "mspgcc.elffile\shell\open\command" "" "$INSTDIR\bin\msp430-downloader.exe $\"%1$\""
+;     WriteRegStr HKCR "mspgcc.elffile\shell\listing" "" "Generate listing"
+;     WriteRegStr HKCR "mspgcc.elffile\shell\listing\command" "" "$INSTDIR\bin\msp430-objdump -dSt $\"%1$\" $\">%1.lst$\" " ;XXX redirection not working here
+    WriteRegStr HKCR "mspgcc.elffile\shell\ihex" "" "Convert to IHex"
+    WriteRegStr HKCR "mspgcc.elffile\shell\ihex\command" "" "$INSTDIR\bin\msp430-objcopy -O ihex $\"%1$\" $\"%1.a43$\" "
+    WriteRegStr HKCR "mspgcc.elffile\shell\totitext" "" "Convert to TI-Text"
+    WriteRegStr HKCR "mspgcc.elffile\shell\totitext\command" "" "$INSTDIR\bin\ihex2titext $\"%1$\""
+
+    ; Write File Associations
+    WriteRegStr HKCR ".a43" "" "mspgcc.ihexfile"
+    WriteRegStr HKCR ".a43" "Content Type" "application/octet-stream"
+    WriteRegStr HKCR ".elf" "" "mspgcc.elffile"
+    WriteRegStr HKCR ".elf" "Content Type" "application/octet-stream"
+SectionEnd
+
 
 #----------------------------------------------------------------------------
 
@@ -246,7 +291,6 @@
 
     #jtag and bsl
     Delete "$INSTDIR\bin\msp430-gdbproxy.exe"
-    ;~ Delete "$INSTDIR\bin\msp430-reset.exe"
     Delete "$INSTDIR\bin\msp430-jtag.exe"
     Delete "$INSTDIR\bin\msp430-bsl.exe"
     Delete "$INSTDIR\bin\msp430-downloader.exe"
@@ -309,6 +353,23 @@
     Delete "$INSTDIR\bin\cygintl-3.dll"
     Delete "$INSTDIR\bin\cygiconv-2.dll"
 
+    ; Remove File Associations (if they are assigned to the downloader)
+    ReadRegStr $0 HKCR ".a43" ""
+    StrCmp $0 "mspgcc.ihexfile" Del_a43_Assoc Skip_Del_a43
+    Del_a43_Assoc:
+    DeleteRegKey HKCR ".a43"
+    Skip_Del_a43:
+    
+    ReadRegStr $0 HKCR ".elf" ""
+    StrCmp $0 "mspgcc.elffile" Del_elf_Assoc Skip_Del_elf
+    Del_elf_Assoc:
+    DeleteRegKey HKCR ".elf"
+    Skip_Del_elf:
+
+    ; remove the mspgcc.downloader Keys
+    DeleteRegKey HKCR "mspgcc.ihexfile"
+    DeleteRegKey HKCR "mspgcc.elffile"
+
     # MUST REMOVE UNINSTALLER, too
     Delete "$INSTDIR\${PRODUCT}-uninstall.exe"
     #finalize
@@ -326,13 +387,16 @@
 
 !insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
   !insertmacro MUI_DESCRIPTION_TEXT ${SecBinutils}      "The GNU binutils package, version 2.14, for the MSP430. This includes the assember, linker, and librarian."
+  !insertmacro MUI_DESCRIPTION_TEXT ${SecCompiler}      "The GNU C/C++ compiler (GCC) and C library for the MSP430."
   !insertmacro MUI_DESCRIPTION_TEXT ${SecGcc}           "The GNU C/C++ compiler (GCC), version 3.2.3, for the MSP430."
   !insertmacro MUI_DESCRIPTION_TEXT ${SecLibc}          "libc, for the MSP430."
   !insertmacro MUI_DESCRIPTION_TEXT ${SecDocs}          "Documentation for mspgcc"
+  !insertmacro MUI_DESCRIPTION_TEXT ${SecDocsSub}       "Documentation for mspgcc"
   !insertmacro MUI_DESCRIPTION_TEXT ${SecExamples}      "Several C and assembler examples for the MSP430."
-  !insertmacro MUI_DESCRIPTION_TEXT ${SecLibraries}     "Several add-on libraries for the MSP430."
+  !insertmacro MUI_DESCRIPTION_TEXT ${SecLibraries}     "Several add-on libraries for the MSP430. libmspgcc, libcommandline, libspi"
   !insertmacro MUI_DESCRIPTION_TEXT ${SecGdb}           "The GNU command line debugger (GDB) for the MSP430."
   !insertmacro MUI_DESCRIPTION_TEXT ${SecDownloader}    "gdbproxy, msp430-jtag, msp430-bsl. Interface to the MSP430 FET JTAG tool and BSL."
+  !insertmacro MUI_DESCRIPTION_TEXT ${SecAssociations}  "Assign file extensions to the msp430-downloader tool"
   !insertmacro MUI_DESCRIPTION_TEXT ${SecGiveio}        "A parallel port access driver for Windows NT, 2000 and XP (needed for the JTAG adaptor). Note: this is NOT needed for Windows 95, 98 or Me."
   !insertmacro MUI_DESCRIPTION_TEXT ${SecMakeAndLibs}   "The GNU make utilities - make, diff, patch, rm, mv, mkdir, cp and the cygwin libraries."
   !insertmacro MUI_DESCRIPTION_TEXT ${SecMake}          "The GNU make utilities - make, diff, patch, rm, mv, mkdir, cp."



-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.