OSDN Git Service

1つのSsParserインスタンスで複数の処理が出来るように変更。
[winbottle/winbottle.git] / bottleclient / SstpBottle.dpr
index 3d882e3..4bff0ad 100755 (executable)
@@ -2,7 +2,7 @@
 {                                                       }
 {       SSTP Bottle Client                              }
 {                                                       }
-{       Copyright (C) 2001-2003 naru/Mikage Sawatari    }
+{       Copyright (C) 2001-2004 WinBottle Project       }
 {                                                       }
 {*******************************************************}
 
@@ -22,6 +22,8 @@ program SstpBottle;
 
 uses
   Forms,
+  Dialogs,
+  Windows,
   MainForm in 'MainForm.pas' {frmSender},
   BRegExp in 'BRegExp.pas',
   BottleDef in 'BottleDef.pas',
@@ -50,9 +52,20 @@ uses
   BottleSstp in 'BottleSstp.pas',
   SurfacePreview in 'SurfacePreview.pas' {frmSurfacePreview},
   SppList in 'SppList.pas',
-  SppTypes in 'SppTypes.pas',
   TalkShowFrame in 'TalkShowFrame.pas' {frmTalkShow: TFrame},
-  EditorTalkShow in 'EditorTalkShow.pas' {frmEditorTalkShow};
+  EditorTalkShow in 'EditorTalkShow.pas' {frmEditorTalkShow},
+  ProgressWindow in 'ProgressWindow.pas' {frmProgressWindow},
+  Plugins in 'Plugins.pas',
+  SpecialCharEditor in 'SpecialCharEditor.pas' {frmSpecialCharEditor},
+  HtmlOutputConfig in 'HtmlOutputConfig.pas' {frmHTMLOutputConfig},
+  HtmlOutputProgress in 'HtmlOutputProgress.pas' {frmHTMLOutputProgress},
+  SearchLog in 'SearchLog.pas' {frmSearchLog},
+  StrReplace in 'StrReplace.pas',
+  RegexUtils in 'RegexUtils.pas',
+  StrReplaceFrame in 'StrReplaceFrame.pas' {frmStrReplaceFrame: TFrame},
+  StrReplaceDialog in 'StrReplaceDialog.pas' {frmStrReplaceDialog},
+  ReplacePresetEditor in 'ReplacePresetEditor.pas' {frmReplacePresetEditor: TFrame},
+  ReplacePresetListFrame in 'ReplacePresetListFrame.pas' {frmReplacePresetList: TFrame};
 
 // \8c^\95t\82«\92è\90\94\82ð\95Ï\8dX\82Å\82«\82é\82æ\82¤\82É\82·\82é\83R\83\93\83p\83C\83\89\83I\83v\83V\83\87\83\93
 // \88ê\95\94\82Ì\83R\83\93\83|\81[\83l\83\93\83g\82É\82±\82ê\82ª\95K\97v
@@ -65,23 +78,50 @@ uses
 // Delphi5Pro\82¾\82Æ ListView \82Ì\83J\83\89\83\80\83N\83\8a\83b\83N\82È\82Ç\82Å\95s\8bï\8d\87\82ª\8fo\82Ü\82·\82Ì\82Å\83_\83\81\82Å\82·\81B
 {$IFDEF CONDITIONALEXPRESSIONS}
   {$IF Declared(CompilerVersion)}
-      {$IF CompilerVersion >= 15.0} // Delphi7\88È\8fã\82È\82ç
-        {$R WindowsXP.RES}
-      {$IFEND}
+    {$IF CompilerVersion >= 15.0} // Delphi7\88È\8fã\82È\82ç
+      {$R WindowsXP.RES}
+    {$IFEND}
   {$IFEND}
 {$ENDIF}
 
+var
+  Mutex: THandle;
+
 begin
-  // MemChk;
+  {$IFDEF NOMUTEX}
+  ShowMessage('\93ñ\8fd\8bN\93®\8b\96\89Â\83o\81[\83W\83\87\83\93\82Å\82·\81B'#13#10 + VersionString);
+  {$ELSE}
+  Mutex := CreateMutex(nil, true, 'SSTPBottleClient2');
+  if GetLastError = ERROR_ALREADY_EXISTS then begin
+    ShowMessage('SSTP Bottle Client\82Í\93ñ\8fd\8bN\93®\82Å\82«\82Ü\82¹\82ñ');
+    CloseHandle(Mutex);
+    Exit;
+  end;
+  {$ENDIF}
+
+  if Pref.AskUseHttpProxy then begin
+    if Application.MessageBox('Proxy\82ð\97\98\97p\82µ\82Ü\82·\82©\81H','BottleClient',MB_YESNO) = IDYES then begin
+      if Length(Pref.ProxyAddress) > 0 then begin
+        Pref.UseHttpProxy := true;
+      end;
+    end else begin
+      Pref.UseHttpProxy := false;
+    end;
+  end;
+
   Application.Initialize;
   Application.Title := 'SSTP Bottle Client';
   Application.ShowMainForm := true;
   Application.CreateForm(TfrmSender, frmSender);
   Application.CreateForm(TfrmLog, frmLog);
-  Application.CreateForm(TfrmChannelList, frmChannelList);
   Application.CreateForm(TfrmMessageBox, frmMessageBox);
-  Application.CreateForm(TfrmFMOExplorer, frmFMOExplorer);
   Application.CreateForm(TfrmSurfacePreview, frmSurfacePreview);
   if not Application.Terminated then frmSender.Show;
   Application.Run;
+
+  {$IFDEF BOTTLEMUTEX}
+  if Mutex > 0 then
+    CloseHandle(Mutex);
+  {$ENDIF}
+
 end.