1 |
#define AppName "Tera Term" |
#define AppName "Tera Term" |
2 |
#define AppVer "4.69-RC2" |
#define AppVer "4.69-RC3" |
3 |
;#define snapshot GetDateTimeString('yyyymmdd_hhnnss', '', ''); |
;#define snapshot GetDateTimeString('yyyymmdd_hhnnss', '', ''); |
4 |
|
|
5 |
[Setup] |
[Setup] |
16 |
ShowLanguageDialog=yes |
ShowLanguageDialog=yes |
17 |
AllowNoIcons=true |
AllowNoIcons=true |
18 |
UninstallDisplayIcon={app}\ttermpro.exe |
UninstallDisplayIcon={app}\ttermpro.exe |
19 |
AppMutex=TeraTermProAppMutex, TeraTermProMacroAppMutex, TeraTermProKeycodeAppMutex, TeraTermMenuAppMutex, CygTermAppMutex, Global\TeraTermProAppMutex, Global\TeraTermProMacroAppMutex, Global\TeraTermProKeycodeAppMutex, Global\TeraTermMenuAppMutex, Global\CygTermAppMutex |
;AppMutex=TeraTermProAppMutex, TeraTermProMacroAppMutex, TeraTermProKeycodeAppMutex, TeraTermMenuAppMutex, CygTermAppMutex, Global\TeraTermProAppMutex, Global\TeraTermProMacroAppMutex, Global\TeraTermProKeycodeAppMutex, Global\TeraTermMenuAppMutex, Global\CygTermAppMutex |
20 |
#ifndef snapshot |
#ifndef snapshot |
21 |
OutputBaseFilename=teraterm-{#AppVer} |
OutputBaseFilename=teraterm-{#AppVer} |
22 |
#else |
#else |
208 |
|
|
209 |
[Run] |
[Run] |
210 |
Filename: {app}\ttermpro.exe; Flags: nowait postinstall skipifsilent unchecked; Description: {cm:launch_teraterm}; Components: TeraTerm |
Filename: {app}\ttermpro.exe; Flags: nowait postinstall skipifsilent unchecked; Description: {cm:launch_teraterm}; Components: TeraTerm |
211 |
Filename: {tmp}\Setup_LogMeTT_2_9_7.exe; Components: LogMeTT |
Filename: {tmp}\Setup_LogMeTT_2_9_8_1.exe; Components: LogMeTT |
212 |
Filename: {tmp}\Setup_TTLEditor_1_2_1.exe; Components: TTLEdit |
Filename: {tmp}\Setup_TTLEditor_1_2_1.exe; Components: TTLEdit |
213 |
Filename: {app}\ttpmenu.exe; Flags: nowait postinstall skipifsilent unchecked; Description: {cm:launch_ttmenu}; Components: TeraTerm_Menu |
Filename: {app}\ttpmenu.exe; Flags: nowait postinstall skipifsilent unchecked; Description: {cm:launch_ttmenu}; Components: TeraTerm_Menu |
214 |
Filename: {app}\Collector\Collector.exe; Flags: nowait postinstall skipifsilent unchecked; Description: {cm:launch_collector}; Components: Collector |
Filename: {app}\Collector\Collector.exe; Flags: nowait postinstall skipifsilent unchecked; Description: {cm:launch_collector}; Components: Collector |
282 |
ja.comp_TTXAlwaysOnTop=常に最前面に表示できるようにする |
ja.comp_TTXAlwaysOnTop=常に最前面に表示できるようにする |
283 |
en.comp_TTXRecurringCommand=Recurring Command can be used |
en.comp_TTXRecurringCommand=Recurring Command can be used |
284 |
ja.comp_TTXRecurringCommand=定期的に文字列を送信する |
ja.comp_TTXRecurringCommand=定期的に文字列を送信する |
285 |
|
en.msg_AppRunningError=Setup has detected that %s is currently running.%n%nPlease close all instances of it now, then click Next to continue. |
286 |
|
ja.msg_AppRunningError=セットアップは実行中の %s を検出しました。%n%n開いているアプリケーションをすべて閉じてから「次へ」をクリックしてください。 |
287 |
|
|
288 |
[Code] |
[Code] |
289 |
const |
const |
359 |
end; |
end; |
360 |
} |
} |
361 |
|
|
362 |
|
function CheckFileUsing(Filename:String) : integer; |
363 |
|
var |
364 |
|
TmpFileName : String; |
365 |
|
begin |
366 |
|
if FileExists(FileName) then |
367 |
|
begin |
368 |
|
TmpFileName := FileName + '.' + GetDateTimeString('yyyymmddhhnnss', #0, #0); // Tmp file ends with timestamp |
369 |
|
if FileCopy(FileName, TmpFileName, True) then |
370 |
|
if DeleteFile(FileName) then |
371 |
|
if RenameFile(TmpFileName, FileName) then |
372 |
|
Result := 0 |
373 |
|
else |
374 |
|
Result := -1 // permission? |
375 |
|
else |
376 |
|
begin |
377 |
|
Result := 1; // failed to delete |
378 |
|
DeleteFile(TmpFileName); |
379 |
|
end |
380 |
|
else |
381 |
|
Result := -1 // permission? |
382 |
|
end |
383 |
|
else |
384 |
|
Result := 0; |
385 |
|
end; |
386 |
|
|
387 |
|
function CheckAppsUsing() : string; |
388 |
|
var |
389 |
|
FileDir : String; |
390 |
|
FileName : array[0..6] of String; |
391 |
|
FileDesc : array[0..6] of String; |
392 |
|
i : integer; |
393 |
|
ErrMsg : String; |
394 |
|
begin |
395 |
|
FileDir := ExpandConstant('{app}'); |
396 |
|
FileName[0] := FileDir + '\ttermpro.exe'; |
397 |
|
FileName[1] := FileDir + '\ttpmacro.exe'; |
398 |
|
FileName[2] := FileDir + '\keycode.exe'; |
399 |
|
FileName[3] := FileDir + '\ttpmenu.exe'; |
400 |
|
FileName[4] := FileDir + '\cygterm.exe'; |
401 |
|
FileName[5] := FileDir + '\Collector.exe'; |
402 |
|
FileName[6] := FileDir + '\Collector_org.exe'; |
403 |
|
FileDesc[0] := 'Tera Term'; |
404 |
|
FileDesc[1] := 'Tera Term Macro'; |
405 |
|
FileDesc[2] := 'Keycode'; |
406 |
|
FileDesc[3] := 'TeraTerm Menu'; |
407 |
|
FileDesc[4] := 'CygTerm+'; |
408 |
|
FileDesc[5] := 'Collector'; |
409 |
|
FileDesc[6] := 'Collector'; |
410 |
|
|
411 |
|
for i := 0 to 6 do |
412 |
|
begin |
413 |
|
case CheckFileUsing(FileName[i]) of |
414 |
|
1: |
415 |
|
// Failed to delete. In use. |
416 |
|
begin |
417 |
|
if Length(Result) > 0 then |
418 |
|
Result := Result + ', ' + FileDesc[i] |
419 |
|
else |
420 |
|
Result := FileDesc[i] |
421 |
|
end; |
422 |
|
else |
423 |
|
// -1: Failed to copy/rename |
424 |
|
// 0: OK |
425 |
|
// NOP |
426 |
|
end; |
427 |
|
end; |
428 |
|
|
429 |
|
end; |
430 |
|
|
431 |
function GetDefaultIniFilename : String; |
function GetDefaultIniFilename : String; |
432 |
begin |
begin |
433 |
Result := ExpandConstant('{app}') + '\TERATERM.INI'; |
Result := ExpandConstant('{app}') + '\TERATERM.INI'; |
605 |
var |
var |
606 |
uninstaller : String; |
uninstaller : String; |
607 |
uninstaller2 : String; |
uninstaller2 : String; |
608 |
ResultCode: Integer; |
ResultCode : Integer; |
609 |
iniFile : String; |
iniFile : String; |
610 |
|
ErrMsg : String; |
611 |
begin |
begin |
612 |
|
Result := True; |
613 |
|
|
614 |
case CurPageID of |
case CurPageID of |
615 |
|
|
616 |
wpWelcome: |
wpWelcome: |
644 |
|
|
645 |
end; |
end; |
646 |
|
|
647 |
|
wpSelectDir: |
648 |
|
begin |
649 |
|
|
650 |
|
ErrMsg := CheckAppsUsing(); |
651 |
|
if Length(ErrMsg) > 0 then |
652 |
|
begin |
653 |
|
MsgBox(Format(CustomMessage('msg_AppRunningError'), [ErrMsg]), mbError, MB_OK); |
654 |
|
Result := False; |
655 |
|
end |
656 |
|
else |
657 |
|
// -1: goto next. Turn over to Inno Setup. |
658 |
|
// 0: goto next. No problem. |
659 |
|
// NOP |
660 |
|
end; |
661 |
|
|
662 |
wpSelectComponents: |
wpSelectComponents: |
663 |
begin |
begin |
664 |
|
|
677 |
|
|
678 |
end; |
end; |
679 |
end; |
end; |
|
Result := True; |
|
680 |
end; |
end; |
681 |
|
|
682 |
procedure CurStepChanged(CurStep: TSetupStep); |
procedure CurStepChanged(CurStep: TSetupStep); |