OSDN Git Service

1つのSsParserインスタンスで複数の処理が出来るように変更。
[winbottle/winbottle.git] / bottleclient / SstpBottle.dpr
index f5b1b58..4bff0ad 100755 (executable)
@@ -2,22 +2,32 @@
 {                                                       }
 {       SSTP Bottle Client                              }
 {                                                       }
-{       Copyright (C) 2001-200\82È\82é(naruto)            }
+{       Copyright (C) 2001-2004 WinBottle Project       }
 {                                                       }
 {*******************************************************}
 
+
+(********************************)
+(* \82±\82ê\82Í\95s\8dK\82Ì\83\\81[\83X\82Å\82·\81B     *)
+(* \82±\82Ì\83\\81[\83X\82ð\8c©\82½\90l\82Í\81A       *)
+(* \88ê\8fT\8aÔ\88È\93à\82É\82U\82Â\82Ì\83o\83O\82ð     *)
+(* \8eæ\82ç\82È\82¢\82Æ\8e\80\82É\82Ü\82·\81B         *)
+(********************************)
+
+{ http://bottle.mikage.to/viewlog2.cgi?around=3eb34d9300000001 }
+
 program SstpBottle;
 
 {%ToDo 'SstpBottle.todo'}
 
 uses
   Forms,
+  Dialogs,
+  Windows,
   MainForm in 'MainForm.pas' {frmSender},
   BRegExp in 'BRegExp.pas',
   BottleDef in 'BottleDef.pas',
   ConstEditor in 'ConstEditor.pas' {frmConstEditor},
-  ConstList in 'ConstList.pas',
-  ConstText in 'ConstText.pas' {frmConstText},
   SendConfirm in 'SendConfirm.pas' {frmConfirmSend},
   SettingForm in 'SettingForm.pas' {frmSetting},
   LogForm in 'LogForm.pas' {frmLog},
@@ -25,24 +35,93 @@ uses
   ChannelListForm in 'ChannelListForm.pas' {frmChannelList},
   MessageBox in 'MessageBox.pas' {frmMessageBox},
   Logs in 'Logs.pas',
-  HttpThread in 'HttpThread.pas';
+  HttpThread in 'HttpThread.pas',
+  LogDownload in 'LogDownload.pas' {frmLogDownload},
+  ColorSettingFrame in 'ColorSettingFrame.pas' {frmColorSetting: TFrame},
+  ScriptConsts in 'ScriptConsts.pas',
+  BottleChainEvent in 'BottleChainEvent.pas',
+  BottleChainRule in 'BottleChainRule.pas',
+  BottleChainListFrame in 'BottleChainListFrame.pas' {frmBottleChainList: TFrame},
+  BottleChainRuleEditor in 'BottleChainRuleEditor.pas' {frmBottleChainRuleEditor},
+  MinMaxEditor in 'MinMaxEditor.pas' {frmMinMaxEditor},
+  StrListEditor in 'StrListEditor.pas' {frmStrListEditor},
+  MultipleChoiceEditor in 'MultipleChoiceEditor.pas' {frmMultipleChoiceEditor},
+  SakuraSeekerInstance in 'SakuraSeekerInstance.pas',
+  FMOExplorer in 'FMOExplorer.pas' {frmFMOExplorer},
+  OpenFileEditor in 'OpenFileEditor.pas' {frmOpenFileEditor},
+  BottleSstp in 'BottleSstp.pas',
+  SurfacePreview in 'SurfacePreview.pas' {frmSurfacePreview},
+  SppList in 'SppList.pas',
+  TalkShowFrame in 'TalkShowFrame.pas' {frmTalkShow: TFrame},
+  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
+{$J+}
 
 {$R *.RES}
-{$DEFINE Mani}
-{$IFDEF Manifest}
-{$R manifest.RES}
+
+// WindowsXP\82ÌLuna\91Î\89\9e\81B\82½\82¾\82µDelphi7\82Ì\82Ý\81B
+// Delphi6\82È\82ç\81A\82à\82µ\82©\82µ\82½\82ç$R\82µ\82Ä\82à\93®\82­\82©\82à\82µ\82ê\82Ü\82¹\82ñ\82ª\81A
+// 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}
+  {$IFEND}
 {$ENDIF}
 
+var
+  Mutex: THandle;
+
 begin
+  {$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(TfrmConstEditor, frmConstEditor);
-  Application.CreateForm(TfrmConstText, frmConstText);
   Application.CreateForm(TfrmLog, frmLog);
-  Application.CreateForm(TfrmChannelList, frmChannelList);
   Application.CreateForm(TfrmMessageBox, frmMessageBox);
+  Application.CreateForm(TfrmSurfacePreview, frmSurfacePreview);
   if not Application.Terminated then frmSender.Show;
   Application.Run;
+
+  {$IFDEF BOTTLEMUTEX}
+  if Mutex > 0 then
+    CloseHandle(Mutex);
+  {$ENDIF}
+
 end.