オープンソース・ソフトウェアの開発とダウンロード

Subversion リポジトリの参照

Diff of /trunk/installer/teraterm.iss

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

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

Legend:
Removed from v.4353  
changed lines
  Added in v.4362

Back to OSDN">Back to OSDN
ViewVC Help
Powered by ViewVC 1.1.26