OSDN Git Service

2514041cb568346ba8b06380b64c5381e25b3a2f
[gikonavigoeson/gikonavi.git] / readme / gikoSetup.iss
1 [Setup]
2 AppName=\83M\83R\83i\83r
3 AppVerName=\83M\83R\83i\83r
4 AppId=gikoNavi
5 AppMutex=http://gikonavigoeson.sourceforge.jp/gikonavi/mutex
6 AppPublisherURL=http://gikonavigoeson.sourceforge.jp/
7 AppendDefaultDirName = no
8 ;DefaultDirName={pf}\gikonavi\r
9 DefaultDirName={code:GetBase}\gikonavi\r
10 VersionInfoDescription=\83M\83R\83i\83r(\94ð\93ï\8f\8a\94Å)\83Z\83b\83g\83A\83b\83v\83v\83\8d\83O\83\89\83\80
11 DefaultGroupName=\83M\83R\83i\83r
12\8e©\95ª\82Ì\8aÂ\8b«\82É\8d\87\82í\82¹\82Ä\82­\82¾\82³\82¢
13 SourceDir=C:\work\Setup\Release69-851
14 OutputDir=C:\work\Setup\Output
15 SetupIconFile=C:\work\Setup\GikoSetup.ico
16\83M\83R\83i\83r\82Ì\83o\81[\83W\83\87\83\93\82É\82 \82í\82¹\82Ä\82­\82¾\82³\82¢
17 VersionInfoVersion=1.69.1.851
18 OutputBaseFilename=gikoNavi_b69_setup
19
20
21
22 [Tasks]
23 Name: "startmenuicon"; Description: "\83X\83^\81[\83g\83\81\83j\83\85\81[\82É\93o\98^\82·\82é"; GroupDescription: "\83V\83\87\81[\83g\83J\83b\83g"; Flags:
24 Name: "desktopicon"; Description: "\83f\83X\83N\83g\83b\83v\82É\83V\83\87\81[\83g\83J\83b\83g\82ð\8dì\90¬"; GroupDescription: "\83V\83\87\81[\83g\83J\83b\83g"; Flags:
25
26 [Dirs]
27 Name: "{app}\Log"
28 Name: "{app}\Sound"
29 Name: "{app}\config\Board"
30 Name: "{app}\config\BoardPlugin"
31 Name: "{app}\config\NGwords"
32
33
34 [Files]
35 Source: * ; Destdir: {app} ;Excludes: "gikoNavi.exe" ;
36 Source: "gikoNavi.exe" ; Destdir: {app} ;Permissions: everyone-full; Flags: ignoreversion
37 Source: "Sound\*" ; Destdir: {app}\Sound ;Flags: createallsubdirs recursesubdirs ;
38 Source: "config\*" ; Destdir: {app}\config ;Excludes: "*.dll";Flags: createallsubdirs recursesubdirs ;
39 Source: "config\BoardPlugin\*.dll" ; Destdir: {app}\config\BoardPlugin ;Flags: ignoreversion;
40
41 [Icons]
42 Name: "{group}\Readme"; Filename: "{app}\readme.txt"; Tasks: startmenuicon
43 Name: "{group}\Readme_Goeson"; Filename: "{app}\readme_goeson.txt"; Tasks: startmenuicon\r
44 Name: "{group}\\83M\83R\83i\83r"; Filename: "{app}\gikoNavi.exe"; WorkingDir: "{app}"; Tasks: startmenuicon
45 Name: "{commondesktop}\\83M\83R\83i\83r"; Filename: "{app}\gikoNavi.exe"; WorkingDir: "{app}"; Tasks: desktopicon
46
47 [Run]
48 Filename: "{app}\readme_goeson.txt"; Description: "README\82ð\95\\8e¦\82·\82é"; Flags: postinstall shellexec skipifsilent unchecked
49 Filename: "{app}\gikoNavi.exe"; Description: "\83A\83v\83\8a\83P\81[\83V\83\87\83\93\82ð\8bN\93®\82·\82é"; Flags: postinstall shellexec skipifsilent
50
51 [UninstallDelete]
52 Type: files; Name: "{app}\sent.ini"
53 Type: files; Name: "{app}\url.ini"
54 Type: files; Name: "{app}\Samba.ini"
55 Type: files; Name: "{app}\gikoNavi.ini"
56
57 [Languages]
58 Name: japanese; MessagesFile: compiler:Languages\Japanese.isl
59
60 [Code]
61 procedure CurStepChanged(CurStep: TSetupStep);
62 var
63   path :String;
64   srcpath: String;
65 begin
66   case CurStep of
67     ssInstall:
68       begin
69         if (RegKeyExists(HKEY_LOCAL_MACHINE,
70             'SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\gikoNavi')) then
71           begin
72             if MsgBox('\88È\91O\82Ì\83o\81[\83W\83\87\83\93\82Ì\83A\83\93\83C\83\93\83X\83g\81[\83\8b\8fî\95ñ\82ð\8dí\8f\9c\82µ\82Ä\82æ\82ë\82µ\82¢\82Å\82µ\82å\82¤\82©\81H'
73               + #10#13 + '(\83o\83^56\88È\91O\82©\82ç\82Ì\83A\83b\83v\83f\81[\83g\82Ì\8fê\8d\87\81u\82Í\82¢\81v\90\84\8f§)',
74                mbConfirmation, MB_YESNO) = IDYES then
75               begin
76                   if not RegDeleteKeyIncludingSubkeys(HKEY_LOCAL_MACHINE,
77                     'SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\gikoNavi') then
78                     begin
79                       MsgBox('\83A\83\93\83C\83\93\83X\83g\81[\83\8b\8fî\95ñ\82Ì\8dí\8f\9c\82É\8e¸\94s\82µ\82Ü\82µ\82½\81B', mbError, MB_OK);
80                     end;
81               end;
82           end;
83       end;
84     ssPostInstall:
85       begin
86         path := ExpandConstant('{app}') + '\gikoNavi.ini';
87         srcpath := ExpandConstant('{srcexe}');
88         if (FileExists(path)) then
89         begin
90           SetIniString('Update', 'Remove0', srcpath, path);
91         end;
92       end;
93   end;
94
95 end;
96 procedure CurUninstallStepChanged(CurUninstallStep: TUninstallStep);
97 var
98   path :String;
99 begin
100   case CurUninstallStep of
101     usUninstall:
102       begin
103         path := ExpandConstant('{app}') + '\Log';
104         if MsgBox(path + '\83t\83H\83\8b\83_\88È\89º\82ð\8a®\91S\82É\8fÁ\8b\8e\82µ\82Ä\82æ\82ë\82µ\82¢\82Å\82µ\82å\82¤\82©\81H', mbConfirmation, MB_YESNO) = IDYES then
105         begin
106           DelTree(path, True, True, True);
107         end;
108
109         path := ExpandConstant('{app}') + '\config';
110         if MsgBox(path + '\83t\83H\83\8b\83_\88È\89º\82ð\8a®\91S\82É\8fÁ\8b\8e\82µ\82Ä\82æ\82ë\82µ\82¢\82Å\82µ\82å\82¤\82©\81H', mbConfirmation, MB_YESNO) = IDYES then
111         begin
112           DelTree(path, True, True, True);
113         end;
114
115       end;
116     usPostUninstall:
117       begin
118         path := ExpandConstant('{app}');
119
120         MsgBox(path + '\83t\83H\83\8b\83_\88È\89º\82É\81A\8dí\8f\9c\82µ\82«\82ê\82È\82¢\83t\83@\83C\83\8b\82ª\8ec\82Á\82Ä\82¢\82é\8fê\8d\87\82ª\82 \82è\82Ü\82·\81B' #10#13 '\8am\94F\82Ì\82¤\82¦\8eè\93®\82Å\8dí\8f\9c\82µ\82Ä\82­\82¾\82³\82¢\81B',
121           mbInformation, MB_OK);
122       end;
123   end;
124 end;
125 function GetBase(Param: String) : String;\r
126 begin\r
127   if (GetWindowsVersion shr 24) < 6 then\r    Result := ExpandConstant('{pf}')\r
128   else\r    Result := ExpandConstant('{sd}');\r
129 end;