[tuxdroid-svn] r5412 - software_suite_v3/software/tool/tool-second-installer/trunk/tool-second-inst
Status: Beta
Brought to you by:
ks156
|
From: jerome <c2m...@c2...> - 2009-09-16 13:22:19
|
Author: jerome
Date: 2009-09-16 15:22:04 +0200 (Wed, 16 Sep 2009)
New Revision: 5412
Modified:
software_suite_v3/software/tool/tool-second-installer/trunk/tool-second-installer/TuxUtils.pas
software_suite_v3/software/tool/tool-second-installer/trunk/tool-second-installer/Unit1.dfm
software_suite_v3/software/tool/tool-second-installer/trunk/tool-second-installer/Unit1.pas
Log:
* Starting application at 'run' instead of 'run once' for win xp.
Modified: software_suite_v3/software/tool/tool-second-installer/trunk/tool-second-installer/TuxUtils.pas
===================================================================
--- software_suite_v3/software/tool/tool-second-installer/trunk/tool-second-installer/TuxUtils.pas 2009-09-16 09:47:42 UTC (rev 5411)
+++ software_suite_v3/software/tool/tool-second-installer/trunk/tool-second-installer/TuxUtils.pas 2009-09-16 13:22:04 UTC (rev 5412)
@@ -26,7 +26,7 @@
uses
ShellAPI, Registry, SysUtils, Variants, Classes, TlHelp32,
ComCtrls, StdCtrls, OleCtrls, Controls, Windows, IdBaseComponent, IdComponent, IdTCPConnection, IdTCPClient,
- IdHTTP, dialogs, Forms;
+ IdHTTP, dialogs, Forms, ComputerInfos;
function DownloadHTTP(const AUrl : string): string;
function getStates(var values : TStringList): boolean;
@@ -53,6 +53,7 @@
function GetTuxDroidDataBaseDirectory() : string;
function GetTuxDroidBinariesDirectory() : string;
function getRegisteryLanguage(): string;
+ procedure deleteRun();
var
@@ -534,4 +535,28 @@
Result := Result[1] + Result[2];
end;
+
+procedure deleteRun();
+const
+ REGISTRY_PATH = 'SOFTWARE\Microsoft\Windows\CurrentVersion\Run';
+begin
+
+ if ComputerInfos.GetWinVersion() = ComputerInfos.wvWinVista then
+ exit;
+
+ with TRegistry.Create do
+ try
+ RootKey := HKEY_LOCAL_MACHINE;
+
+ // From Tuxdroid setup
+ if OpenKey(REGISTRY_PATH, True) then
+ begin
+ DeleteValue('SecondInstallerTux');
+ CloseKey;
+ end;
+ finally
+ Free;
+ end;
+end;
+
end.
Modified: software_suite_v3/software/tool/tool-second-installer/trunk/tool-second-installer/Unit1.dfm
===================================================================
--- software_suite_v3/software/tool/tool-second-installer/trunk/tool-second-installer/Unit1.dfm 2009-09-16 09:47:42 UTC (rev 5411)
+++ software_suite_v3/software/tool/tool-second-installer/trunk/tool-second-installer/Unit1.dfm 2009-09-16 13:22:04 UTC (rev 5412)
@@ -1,6 +1,6 @@
object Form1: TForm1
- Left = 427
- Top = 221
+ Left = 635
+ Top = 269
BorderIcons = [biSystemMenu, biMinimize]
BorderStyle = bsNone
Caption = 'TuxBox 2.0'
@@ -20,6 +20,7 @@
PrintScale = poNone
Scaled = False
Visible = True
+ OnActivate = FormActivate
OnClose = FormClose
OnCreate = FormCreate
PixelsPerInch = 96
@@ -6782,4 +6783,11 @@
Left = 184
Top = 336
end
+ object Timer1: TTimer
+ Enabled = False
+ Interval = 60000
+ OnTimer = Timer1Timer
+ Left = 256
+ Top = 352
+ end
end
Modified: software_suite_v3/software/tool/tool-second-installer/trunk/tool-second-installer/Unit1.pas
===================================================================
--- software_suite_v3/software/tool/tool-second-installer/trunk/tool-second-installer/Unit1.pas 2009-09-16 09:47:42 UTC (rev 5411)
+++ software_suite_v3/software/tool/tool-second-installer/trunk/tool-second-installer/Unit1.pas 2009-09-16 13:22:04 UTC (rev 5412)
@@ -149,6 +149,7 @@
LabelLaunch: TLabel;
LabelSendReport: TLabel;
IdSSLIOHandlerSocket1: TIdSSLIOHandlerSocket;
+ Timer1: TTimer;
procedure FormCreate(Sender: TObject);
procedure FormClose(Sender: TObject; var Action: TCloseAction);
procedure ExitButtonClick(down : boolean);
@@ -183,6 +184,8 @@
procedure AskAndSend();
procedure validateButtons();
procedure invalidateButtons();
+ procedure Timer1Timer(Sender: TObject);
+ procedure FormActivate(Sender: TObject);
@@ -225,6 +228,12 @@
//Creating gnugettext object.
try
+ TuxUtils.deleteRun();
+ except
+
+ end;
+
+ try
gnugettext.UseLanguage(TuxUtils.getRegisteryLanguage());
except
gnugettext.UseLanguage('en');
@@ -258,6 +267,8 @@
CheckSendReport.Checked := False;
CheckSendReport.Visible := False;
LabelSendReport.Visible := False;
+
+ Timer1.Enabled := true;
end;
@@ -896,4 +907,24 @@
//
+procedure TForm1.Timer1Timer(Sender: TObject);
+begin
+ if Form1.Tag = 1 then
+ begin
+ Timer1.Enabled := False;
+
+ Form1.BorderStyle := bsNone;
+ Application.ProcessMessages;
+ sleep(2000);
+ Form1.Refresh;
+ Form1.Repaint;
+ Application.ProcessMessages;
+ end;
+end;
+
+procedure TForm1.FormActivate(Sender: TObject);
+begin
+ Form1.Tag := 1;
+end;
+
end.
|