Author: remi
Date: 2009-07-30 10:05:24 +0200 (Thu, 30 Jul 2009)
New Revision: 5234

Added:
   
software_suite_v3/software/tool/tux_droid_browser_launcher/trunk/tux_droid_browser_launcher/start.dfm
   
software_suite_v3/software/tool/tux_droid_browser_launcher/trunk/tux_droid_browser_launcher/start.pas
   
software_suite_v3/software/tool/tux_droid_browser_launcher/trunk/tux_droid_browser_launcher/tuxbox_launcher.dpr
   
software_suite_v3/software/tool/tux_droid_browser_launcher/trunk/tux_droid_browser_launcher/tuxbox_launcher.res
   
software_suite_v3/software/tool/tux_droid_browser_launcher/trunk/tux_droid_browser_launcher/tuxsys.ico
Removed:
   
software_suite_v3/software/tool/tux_droid_browser_launcher/trunk/tux_droid_browser_launcher/launcher.cfg
   
software_suite_v3/software/tool/tux_droid_browser_launcher/trunk/tux_droid_browser_launcher/launcher.dof
   
software_suite_v3/software/tool/tux_droid_browser_launcher/trunk/tux_droid_browser_launcher/launcher.dpr
Log:
* Refactored the project.

Deleted: 
software_suite_v3/software/tool/tux_droid_browser_launcher/trunk/tux_droid_browser_launcher/launcher.cfg
===================================================================
--- 
software_suite_v3/software/tool/tux_droid_browser_launcher/trunk/tux_droid_browser_launcher/launcher.cfg
    2009-07-30 08:02:55 UTC (rev 5233)
+++ 
software_suite_v3/software/tool/tux_droid_browser_launcher/trunk/tux_droid_browser_launcher/launcher.cfg
    2009-07-30 08:05:24 UTC (rev 5234)
@@ -1,35 +0,0 @@
--$A8
--$B-
--$C+
--$D+
--$E-
--$F-
--$G+
--$H+
--$I+
--$J-
--$K-
--$L+
--$M-
--$N+
--$O+
--$P+
--$Q-
--$R-
--$S-
--$T-
--$U-
--$V+
--$W-
--$X+
--$YD
--$Z1
--cg
--AWinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
--H+
--W+
--M
--$M16384,1048576
--K$00400000
--LE"c:\program files\borland\delphi6\Projects\Bpl"
--LN"c:\program files\borland\delphi6\Projects\Bpl"

Deleted: 
software_suite_v3/software/tool/tux_droid_browser_launcher/trunk/tux_droid_browser_launcher/launcher.dof
===================================================================
--- 
software_suite_v3/software/tool/tux_droid_browser_launcher/trunk/tux_droid_browser_launcher/launcher.dof
    2009-07-30 08:02:55 UTC (rev 5233)
+++ 
software_suite_v3/software/tool/tux_droid_browser_launcher/trunk/tux_droid_browser_launcher/launcher.dof
    2009-07-30 08:05:24 UTC (rev 5234)
@@ -1,83 +0,0 @@
-[FileVersion]
-Version=6.0
-[Compiler]
-A=8
-B=0
-C=1
-D=1
-E=0
-F=0
-G=1
-H=1
-I=1
-J=0
-K=0
-L=1
-M=0
-N=1
-O=1
-P=1
-Q=0
-R=0
-S=0
-T=0
-U=0
-V=1
-W=0
-X=1
-Y=1
-Z=1
-ShowHints=1
-ShowWarnings=1
-UnitAliases=WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
-[Linker]
-MapFile=0
-OutputObjs=0
-ConsoleApp=1
-DebugInfo=0
-RemoteSymbols=0
-MinStackSize=16384
-MaxStackSize=1048576
-ImageBase=4194304
-ExeDescription=
-[Directories]
-OutputDir=
-UnitOutputDir=
-PackageDLLOutputDir=
-PackageDCPOutputDir=
-SearchPath=
-Packages=
-Conditionals=
-DebugSourceDirs=
-UsePackages=0
-[Parameters]
-RunParams=
-HostApplication=
-Launcher=
-UseLauncher=0
-DebugCWD=
-[Version Info]
-IncludeVerInfo=0
-AutoIncBuild=0
-MajorVer=1
-MinorVer=0
-Release=0
-Build=0
-Debug=0
-PreRelease=0
-Special=0
-Private=0
-DLL=0
-Locale=1033
-CodePage=1252
-[Version Info Keys]
-CompanyName=
-FileDescription=
-FileVersion=1.0.0.0
-InternalName=
-LegalCopyright=
-LegalTrademarks=
-OriginalFilename=
-ProductName=
-ProductVersion=1.0.0.0
-Comments=

Deleted: 
software_suite_v3/software/tool/tux_droid_browser_launcher/trunk/tux_droid_browser_launcher/launcher.dpr
===================================================================
--- 
software_suite_v3/software/tool/tux_droid_browser_launcher/trunk/tux_droid_browser_launcher/launcher.dpr
    2009-07-30 08:02:55 UTC (rev 5233)
+++ 
software_suite_v3/software/tool/tux_droid_browser_launcher/trunk/tux_droid_browser_launcher/launcher.dpr
    2009-07-30 08:05:24 UTC (rev 5234)
@@ -1,114 +0,0 @@
-program launcher;
-
-{$APPTYPE CONSOLE}
-
-uses
-  SysUtils,
-  Registry,
-  Variants,
-  TlHelp32,
-  ShellAPI,
-  Classes,
-  StdCtrls,
-  OleCtrls,
-  Controls,
-  Windows,
-  dialogs,
-  Messages;
-
-
-{#### Return true if the targeted process is running ####}
-function isProcessRunning(process : string) : boolean;
-var
-  ContinueLoop: BOOL;
-  FSnapshotHandle: THandle;
-  FProcessEntry32: TProcessEntry32;
-begin
-  FSnapshotHandle := CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, 0);
-  FProcessEntry32.dwSize := SizeOf(FProcessEntry32);
-  ContinueLoop := Process32First(FSnapshotHandle, FProcessEntry32);
-
-  Result := False;
-
-  while Integer(ContinueLoop) <> 0 do
-    begin
-      if ((UpperCase(ExtractFileName(FProcessEntry32.szExeFile)) =
-           UpperCase(process)) or (UpperCase(FProcessEntry32.szExeFile) =
-           UpperCase(process))) then
-        begin
-          Result := True;
-        end;
-
-    ContinueLoop := Process32Next(FSnapshotHandle, FProcessEntry32);
-
-  end;
-
-  CloseHandle(FSnapshotHandle);
-end;
-
-
-function isSmartCoreRunning() : boolean;
-begin
-  result := isProcessRunning('pythonForTuxdroid.exe');
-end;
-
-
-{#### Return true if TuxBox 2.0 is running ####}
-function isTuxBoxRunning() : boolean;
-begin
-   result := isProcessRunning('TuxBox.exe');
-end;
-
-
-{#### Set TuxBox 2.0 Foreground ####}
-procedure setForeground(wParam : Integer; mess : string);
-var
-  MessageSys : UInt;
-begin
-  MessageSys := RegisterWindowMessage(PChar(mess));
-  SendMessage(HWND_BROADCAST, MessageSys, wParam, 0);
-end;
-
-
-
-{#### Start smart-core and TuxBox ####}
-procedure startAll();
-var
-  APPLICATION : string;
-  timeout : byte;
-begin
-  //Stop Tuxdroid server if it is started. ( Start all function starts the 
server too ).
-  if isSmartCoreRunning() then
-    begin
-       timeout := 30;
-       ShellExecute(HWND(nil), 'open', 'smart_server_stop', 'show', nil, 
SW_HIDE);
-
-       repeat
-         sleep(1000);
-         dec(timeout, 1);
-       until ( ( not isSmartCoreRunning() ) or ( timeout = 0 ) );
-
-    end;
-
-  //Starting Application.
-  APPLICATION := '"' + GetEnvironmentVariable('PROGRAMFILES') + '\Kysoh\Tux 
Droid\softwares\TuxBox 2.0\TuxBox.exe"';
-  ShellExecute(HWND(nil), 'open', PChar(APPLICATION), 'show', nil, SW_HIDE);
-
-end;
-
-
-{#### Main entry point ####}
-begin
-  if isTuxBoxRunning() then
-    begin
-      try
-        setForeground(0, 'WindowForegroundRequest');
-      except
-      end;
-    end
-  else
-    begin
-      startAll();
-    end;
-end.
-

Added: 
software_suite_v3/software/tool/tux_droid_browser_launcher/trunk/tux_droid_browser_launcher/start.dfm
===================================================================
--- 
software_suite_v3/software/tool/tux_droid_browser_launcher/trunk/tux_droid_browser_launcher/start.dfm
                               (rev 0)
+++ 
software_suite_v3/software/tool/tux_droid_browser_launcher/trunk/tux_droid_browser_launcher/start.dfm
       2009-07-30 08:05:24 UTC (rev 5234)
@@ -0,0 +1,20 @@
+object Form1: TForm1
+  Left = 263
+  Top = 161
+  AutoSize = True
+  BorderStyle = bsNone
+  Caption = 'Form1'
+  ClientHeight = 231
+  ClientWidth = 232
+  Color = clBlack
+  TransparentColor = True
+  Font.Charset = DEFAULT_CHARSET
+  Font.Color = clWindowText
+  Font.Height = -11
+  Font.Name = 'MS Sans Serif'
+  Font.Style = []
+  OldCreateOrder = False
+  Scaled = False
+  PixelsPerInch = 96
+  TextHeight = 13
+end

Added: 
software_suite_v3/software/tool/tux_droid_browser_launcher/trunk/tux_droid_browser_launcher/start.pas
===================================================================
--- 
software_suite_v3/software/tool/tux_droid_browser_launcher/trunk/tux_droid_browser_launcher/start.pas
                               (rev 0)
+++ 
software_suite_v3/software/tool/tux_droid_browser_launcher/trunk/tux_droid_browser_launcher/start.pas
       2009-07-30 08:05:24 UTC (rev 5234)
@@ -0,0 +1,121 @@
+{*
+ * TuxBox Launcher.
+ *
+ * Copyright Kysoh sa 2009
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+ * 02111-1307, USA.
+ *}
+
+unit start;
+
+interface
+
+uses
+  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
+  Dialogs,
+  TlHelp32,
+  shellApi;
+
+type
+  TForm1 = class(TForm)
+  private
+    { D�clarations priv�es }
+  public
+    { D�clarations publiques }
+  end;
+
+var
+  Form1: TForm1;
+
+implementation
+
+{$R *.dfm}
+
+{#### Return true if the targeted process is running ####}
+function isProcessRunning(process : string) : boolean;
+var
+  ContinueLoop: BOOL;
+  FSnapshotHandle: THandle;
+  FProcessEntry32: TProcessEntry32;
+begin
+  FSnapshotHandle := CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, 0);
+  FProcessEntry32.dwSize := SizeOf(FProcessEntry32);
+  ContinueLoop := Process32First(FSnapshotHandle, FProcessEntry32);
+
+  Result := False;
+
+  while Integer(ContinueLoop) <> 0 do
+    begin
+      if ((UpperCase(ExtractFileName(FProcessEntry32.szExeFile)) =
+           UpperCase(process)) or (UpperCase(FProcessEntry32.szExeFile) =
+           UpperCase(process))) then
+        begin
+          Result := True;
+        end;
+
+    ContinueLoop := Process32Next(FSnapshotHandle, FProcessEntry32);
+
+  end;
+
+  CloseHandle(FSnapshotHandle);
+end;
+
+
+{#### Return true if TuxBox 2.0 is running ####}
+function isTuxBoxRunning() : boolean;
+begin
+   result := isProcessRunning('TuxBox.exe');
+end;
+
+
+{#### Set TuxBox 2.0 Foreground ####}
+procedure setForeground(wParam : Integer; mess : string);
+var
+  MessageSys : UInt;
+begin
+  MessageSys := RegisterWindowMessage(PChar(mess));
+  SendMessage(HWND_BROADCAST, MessageSys, wParam, 0);
+end;
+
+
+
+{#### Start smart-core and TuxBox ####}
+procedure startAll();
+var
+  APPLICATION : string;
+begin
+  //Starting Application.
+  APPLICATION := '"' + GetEnvironmentVariable('PROGRAMFILES') + '\Kysoh\Tux 
Droid\softwares\TuxBox 2.0\TuxBox.exe"';
+  ShellExecute(HWND(nil), 'open', PChar(APPLICATION), 'show', nil, SW_HIDE);
+end;
+
+
+{#### Main entry point ####}
+begin
+  if isTuxBoxRunning() then
+    begin
+      try
+        setForeground(0, 'WindowForegroundRequest');
+      except
+      end;
+    end
+  else
+    begin
+      startAll();
+    end;
+  Application.Terminate;
+end.
+ 
\ No newline at end of file

Added: 
software_suite_v3/software/tool/tux_droid_browser_launcher/trunk/tux_droid_browser_launcher/tuxbox_launcher.dpr
===================================================================
--- 
software_suite_v3/software/tool/tux_droid_browser_launcher/trunk/tux_droid_browser_launcher/tuxbox_launcher.dpr
                             (rev 0)
+++ 
software_suite_v3/software/tool/tux_droid_browser_launcher/trunk/tux_droid_browser_launcher/tuxbox_launcher.dpr
     2009-07-30 08:05:24 UTC (rev 5234)
@@ -0,0 +1,14 @@
+program tuxbox_launcher;
+
+uses
+  Forms,
+  start in 'start.pas' {Form1};
+
+{$R *.res}
+
+begin
+  Application.Initialize;
+  Application.Title := 'TuxBox 2.0';
+  Application.CreateForm(TForm1, Form1);
+  Application.Run;
+end.

Added: 
software_suite_v3/software/tool/tux_droid_browser_launcher/trunk/tux_droid_browser_launcher/tuxbox_launcher.res
===================================================================
(Binary files differ)


Property changes on: 
software_suite_v3/software/tool/tux_droid_browser_launcher/trunk/tux_droid_browser_launcher/tuxbox_launcher.res
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: 
software_suite_v3/software/tool/tux_droid_browser_launcher/trunk/tux_droid_browser_launcher/tuxsys.ico
===================================================================
(Binary files differ)


Property changes on: 
software_suite_v3/software/tool/tux_droid_browser_launcher/trunk/tux_droid_browser_launcher/tuxsys.ico
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream


------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Tux-droid-svn mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tux-droid-svn

Reply via email to