Debian Codegraph @

builds/nsi/dia2code.nsi

raw
1 ; dia2code
2 ; Win32 Installer Source Code for NSIS 2.0
3
4 ; (c) 2001,2007 Steffen Macke <[email protected]>
5
6 ; ***************************************************************************
7 ; * *
8 ; * This program is free software; you can redistribute it and/or modify *
9 ; * it under the terms of the GNU General Public License as published by *
10 ; * the Free Software Foundation; either version 2 of the License, or *
11 ; * (at your option) any later version. *
12 ; * *
13 ; ***************************************************************************
14
15
16 Name "dia2code 0.8.7"
17 LicenseText "Please read and agree to this license before continuiung."
18 LicenseData COPYING
19 ComponentText "This will install dia2code 0.8.7 on your system. Select which options you want set up."
20 DirText "Select a directory to install the program in."
21 UninstallText "This will uninstall dia2code 0.8.7. Hit Next to uninstall, or Cancel to cancel."
22 OutFile dia2code-0.8.7-setup.exe
23 InstallDir $PROGRAMFILES\dia2code
24 #Icon dia.ico
25
26 InstType Typical
27
28 InstallDirRegKey HKEY_LOCAL_MACHINE "Software\dia2code" "instpath"
29 SetOverwrite on
30
31 Section "dia2code 0.8.7"
32 SectionIn 1
33 SetOutPath $INSTDIR
34 File COPYING
35 File README
36 File README.win32
37 SetOutPath $INSTDIR\bin
38 File dia2code\dia2code.exe
39 File dia2code\libxml2.dll
40
41 WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\dia2code" "DisplayName" "dia2code 0.8.7 (remove only)"
42 WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\dia2code" "UninstallString" '"$INSTDIR\uninstall-dia2code-0.8.7.exe"'
43
44 WriteRegStr HKEY_CLASSES_ROOT "diaFile\Shell\DefaultIcon" "" "$INSTDIR\bin\dia.exe"
45 WriteRegStr HKEY_LOCAL_MACHINE "Software\dia2code" "instpath" $INSTDIR
46 SectionEnd
47
48 Section "Context Menu Entries"
49 SectionIn 1
50 WriteRegStr HKEY_CLASSES_ROOT ".dia" "" "diaFile"
51
52 WriteRegStr HKEY_CLASSES_ROOT ".dia" "Content Type" "application/dia"
53
54 WriteRegStr HKEY_CLASSES_ROOT "diaFile" "" "diaFile"
55
56 WriteRegBin HKEY_CLASSES_ROOT "diaFile" "EditFlags" 00000100
57
58 WriteRegStr HKEY_CLASSES_ROOT "diaFile\Shell\createada" "" "Create ADA code"
59 WriteRegStr HKEY_CLASSES_ROOT "diaFile\Shell\createada\command" "" '"$INSTDIR\bin\dia2code.exe" -t ada "%1"'
60
61 WriteRegStr HKEY_CLASSES_ROOT "diaFile\Shell\createc" "" "Create C code"
62 WriteRegStr HKEY_CLASSES_ROOT "diaFile\Shell\createc\command" "" '"$INSTDIR\bin\dia2code.exe" -t c "%1"'
63
64 WriteRegStr HKEY_CLASSES_ROOT "diaFile\Shell\createcpp" "" "Create C++ code"
65 WriteRegStr HKEY_CLASSES_ROOT "diaFile\Shell\createcpp\command" "" '"$INSTDIR\bin\dia2code.exe" -t cpp "%1"'
66
67 WriteRegStr HKEY_CLASSES_ROOT "diaFile\Shell\createcsharp" "" "Create C# code"
68 WriteRegStr HKEY_CLASSES_ROOT "diaFile\Shell\createcsharp\command" "" '"$INSTDIR\bin\dia2code.exe" -t csharp "%1"'
69
70 WriteRegStr HKEY_CLASSES_ROOT "diaFile\Shell\createidl" "" "Create IDL code"
71 WriteRegStr HKEY_CLASSES_ROOT "diaFile\Shell\createidl\command" "" '"$INSTDIR\bin\dia2code.exe" -t idl "%1"'
72
73 WriteRegStr HKEY_CLASSES_ROOT "diaFile\Shell\createjava" "" "Create Java code"
74 WriteRegStr HKEY_CLASSES_ROOT "diaFile\Shell\createjava\command" "" '"$INSTDIR\bin\dia2code.exe" -t java "%1"'
75
76 WriteRegStr HKEY_CLASSES_ROOT "diaFile\Shell\createphp" "" "Create PHP code"
77 WriteRegStr HKEY_CLASSES_ROOT "diaFile\Shell\createphp\command" "" '"$INSTDIR\bin\dia2code.exe" -t php "%1"'
78
79 WriteRegStr HKEY_CLASSES_ROOT "diaFile\Shell\createphp5" "" "Create PHP 5 code"
80 WriteRegStr HKEY_CLASSES_ROOT "diaFile\Shell\createphp5\command" "" '"$INSTDIR\bin\dia2code.exe" -t php5 "%1"'
81
82 WriteRegStr HKEY_CLASSES_ROOT "diaFile\Shell\createpython" "" "Create Python code"
83 WriteRegStr HKEY_CLASSES_ROOT "diaFile\Shell\createpython\command" "" '"$INSTDIR\bin\dia2code.exe" -t python "%1"'
84
85 WriteRegStr HKEY_CLASSES_ROOT "diaFile\Shell\createruby" "" "Create Ruby code"
86 WriteRegStr HKEY_CLASSES_ROOT "diaFile\Shell\createruby\command" "" '"$INSTDIR\bin\dia2code.exe" -t ruby "%1"'
87
88 WriteRegStr HKEY_CLASSES_ROOT "diaFile\Shell\createshp" "" "Create Shapefiles"
89 WriteRegStr HKEY_CLASSES_ROOT "diaFile\Shell\createshp\command" "" '"$INSTDIR\bin\dia2code.exe" -t shp "%1"'
90
91 WriteRegStr HKEY_CLASSES_ROOT "diaFile\Shell\createsql" "" "Create SQL definition"
92 WriteRegStr HKEY_CLASSES_ROOT "diaFile\Shell\createsql\command" "" '"$INSTDIR\bin\dia2code.exe" -t sql "%1"'
93
94 WriteUninstaller uninstall-dia2code-0.8.7.exe
95
96 SectionEnd
97
98 Section "Start Menu Entries"
99 SectionIn 1
100 SetOutPath "$SMPROGRAMS\dia2code"
101 File "dia2code_Homepage.url"
102 File "Report_a_Bug.url"
103 File /oname=README.txt README
104 File /oname=README.win32.txt README.win32
105 SetOutPath $INSTDIR\bin
106 CreateShortCut "$SMPROGRAMS\dia2code\Uninstall dia2code 0.8.7.lnk" "$INSTDIR\uninstall-dia2code-0.8.7.exe" "" "" 0
107
108 SectionEnd
109
110 Section Uninstall
111 Delete $INSTDIR\bin\dia2code.exe
112 Delete $INSTDIR\bin\libxml2.dll
113 RMDir $INSTDIR\bin
114 Delete $INSTDIR\COPYING
115 Delete $INSTDIR\README
116 Delete $INSTDIR\README.win32
117 Delete $INSTDIR\uninstall-dia2code-0.8.7.exe
118 RMDir $INSTDIR
119 Delete "$SMPROGRAMS\dia2code\*.*"
120 RMDir "$SMPROGRAMS\dia2code"
121
122 DeleteRegValue HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\dia2code" "UninstallString"
123 DeleteRegValue HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\dia2code" "DisplayName"
124 DeleteRegKey HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\dia2code"
125 SectionEnd