Author: jerome
Date: 2009-07-29 16:50:21 +0200 (Wed, 29 Jul 2009)
New Revision: 5225

Added:
   
software_suite_v3/software/tool/tux_droid_browser_launcher/trunk/tux_droid_browser_launcher/
   
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:
* Added launcher for TuxBox 2.0  ( I still have some troubles with 'start all' 
functionality.

Added: 
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
                            (rev 0)
+++ 
software_suite_v3/software/tool/tux_droid_browser_launcher/trunk/tux_droid_browser_launcher/launcher.cfg
    2009-07-29 14:50:21 UTC (rev 5225)
@@ -0,0 +1,35 @@
+-$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"

Added: 
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
                            (rev 0)
+++ 
software_suite_v3/software/tool/tux_droid_browser_launcher/trunk/tux_droid_browser_launcher/launcher.dof
    2009-07-29 14:50:21 UTC (rev 5225)
@@ -0,0 +1,83 @@
+[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=

Added: 
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
                            (rev 0)
+++ 
software_suite_v3/software/tool/tux_droid_browser_launcher/trunk/tux_droid_browser_launcher/launcher.dpr
    2009-07-29 14:50:21 UTC (rev 5225)
@@ -0,0 +1,87 @@
+program launcher;
+
+{$APPTYPE CONSOLE}
+
+uses
+  SysUtils,
+  Registry,
+  Variants,
+  TlHelp32,
+  ShellAPI,
+  Classes,
+  StdCtrls,
+  OleCtrls,
+  Controls,
+  Windows,
+  dialogs,
+  Messages;
+
+
+
+{#### Return true if TuxBox 2.0 is running ####}
+function isTuxBoxRunning() : 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('TuxBox.exe')) or (UpperCase(FProcessEntry32.szExeFile) =
+           UpperCase('TuxBox.exe'))) then
+        begin
+          Result := True;
+        end;
+
+    ContinueLoop := Process32Next(FSnapshotHandle, FProcessEntry32);
+
+  end;
+
+  CloseHandle(FSnapshotHandle);
+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), nil, nil, SW_HIDE);
+  setForeground(1, 'WindowForegroundStart');
+end;
+
+
+{#### Main entry point ####}
+begin
+  if isTuxBoxRunning() then
+    begin
+      try
+        setForeground(0, 'WindowForegroundRequest');
+      except
+      end;
+    end
+  else
+    begin
+      startAll();
+    end;
+end.
+


------------------------------------------------------------------------------
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