To V0.2.9

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@5696 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
gbamber
2017-01-25 08:46:02 +00:00
parent d262a25513
commit 7b7bf9aa54
10 changed files with 168 additions and 138 deletions

View File

@ -60,7 +60,7 @@ More information in the Wiki Home Page http://wiki.freepascal.org/LazAutoUpdater
along with this library; if not, write to the Free Software Foundation,
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
"/>
<Version Minor="2" Release="8"/>
<Version Minor="2" Release="9"/>
<Files Count="6">
<Item1>
<Filename Value="ulazautoupdate.pas"/>

View File

@ -4,7 +4,7 @@
<PathDelim Value="\"/>
<Version Value="10"/>
<BuildModes Active="Linux64"/>
<Units Count="19">
<Units Count="22">
<Unit0>
<Filename Value="testapp.lpr"/>
<IsPartOfProject Value="True"/>
@ -28,12 +28,11 @@
<Unit2>
<Filename Value="..\open_ssl.pas"/>
<IsPartOfProject Value="True"/>
<EditorIndex Value="2"/>
<EditorIndex Value="-1"/>
<WindowIndex Value="1"/>
<TopLine Value="3"/>
<CursorPos X="76" Y="8"/>
<TopLine Value="31"/>
<CursorPos X="48" Y="14"/>
<UsageCount Value="38"/>
<Loaded Value="True"/>
</Unit2>
<Unit3>
<Filename Value="..\lazautoupdate_httpclient.pas"/>
@ -164,6 +163,27 @@
<WindowIndex Value="1"/>
<UsageCount Value="10"/>
</Unit18>
<Unit19>
<Filename Value="..\..\..\mbColorLib\mbutils.pas"/>
<UnitName Value="mbUtils"/>
<EditorIndex Value="-1"/>
<WindowIndex Value="1"/>
<TopLine Value="4"/>
<UsageCount Value="10"/>
</Unit19>
<Unit20>
<Filename Value="..\..\..\mbColorLib\ScreenWin.pas"/>
<EditorIndex Value="-1"/>
<WindowIndex Value="1"/>
<UsageCount Value="10"/>
</Unit20>
<Unit21>
<Filename Value="..\..\..\mbColorLib\LVColorPicker.pas"/>
<EditorIndex Value="-1"/>
<WindowIndex Value="1"/>
<TopLine Value="290"/>
<UsageCount Value="10"/>
</Unit21>
</Units>
<OtherDefines Count="1">
<Define0 Value="DEBUGMODE"/>

View File

@ -60,7 +60,11 @@
</Options>
</Linking>
<Other>
<CustomOptions Value="-FcUTF8"/>
<CustomOptions Value="-FcUTF8
-dDEBUGMODE"/>
<OtherDefines Count="1">
<Define0 Value="DEBUGMODE"/>
</OtherDefines>
</Other>
</CompilerOptions>
</Item2>
@ -133,6 +137,9 @@
</Linking>
<Other>
<CustomOptions Value="-FcUTF8"/>
<OtherDefines Count="1">
<Define0 Value="DEBUGMODE"/>
</OtherDefines>
</Other>
</CompilerOptions>
</Item4>

View File

@ -3,16 +3,16 @@
<ProjectSession>
<PathDelim Value="\"/>
<Version Value="10"/>
<BuildModes Active="Linux64 Release"/>
<Units Count="28">
<BuildModes Active="Win64 Release"/>
<Units Count="30">
<Unit0>
<Filename Value="trayupdater.lpr"/>
<IsPartOfProject Value="True"/>
<EditorIndex Value="2"/>
<WindowIndex Value="1"/>
<TopLine Value="21"/>
<CursorPos X="78" Y="56"/>
<UsageCount Value="178"/>
<CursorPos X="58" Y="41"/>
<UsageCount Value="181"/>
<Loaded Value="True"/>
</Unit0>
<Unit1>
@ -21,13 +21,14 @@
<ComponentName Value="mainform"/>
<HasResources Value="True"/>
<ResourceBaseClass Value="Form"/>
<IsVisibleTab Value="True"/>
<WindowIndex Value="1"/>
<TopLine Value="109"/>
<CursorPos Y="137"/>
<TopLine Value="540"/>
<CursorPos X="50" Y="552"/>
<ComponentState Value="1"/>
<UsageCount Value="178"/>
<UsageCount Value="181"/>
<Bookmarks Count="1">
<Item0 X="3" Y="478" ID="2"/>
<Item0 X="3" Y="480" ID="2"/>
</Bookmarks>
<Loaded Value="True"/>
<LoadedDesigner Value="True"/>
@ -38,11 +39,11 @@
<ComponentName Value="configform"/>
<HasResources Value="True"/>
<ResourceBaseClass Value="Form"/>
<EditorIndex Value="4"/>
<EditorIndex Value="3"/>
<WindowIndex Value="1"/>
<TopLine Value="206"/>
<CursorPos X="67" Y="231"/>
<UsageCount Value="174"/>
<TopLine Value="150"/>
<CursorPos X="37" Y="224"/>
<UsageCount Value="177"/>
<Loaded Value="True"/>
<LoadedDesigner Value="True"/>
</Unit2>
@ -215,141 +216,162 @@
<Unit26>
<Filename Value="C:\laztrunk\config_lazarus\onlinepackagemanager\packages\longtimer\ulongtimer.pas"/>
<UnitName Value="uLongTimer"/>
<EditorIndex Value="3"/>
<EditorIndex Value="-1"/>
<WindowIndex Value="1"/>
<TopLine Value="299"/>
<CursorPos X="62" Y="316"/>
<UsageCount Value="11"/>
<Loaded Value="True"/>
<UsageCount Value="12"/>
</Unit26>
<Unit27>
<Filename Value="..\ulazautoupdate.pas"/>
<IsVisibleTab Value="True"/>
<EditorIndex Value="1"/>
<WindowIndex Value="1"/>
<TopLine Value="25"/>
<CursorPos X="13" Y="16"/>
<UsageCount Value="11"/>
<TopLine Value="143"/>
<CursorPos X="91" Y="180"/>
<UsageCount Value="12"/>
<Loaded Value="True"/>
</Unit27>
<Unit28>
<Filename Value="X:\deleteme\ATFileNotif-Lazarus-master\ATFileNotif-Lazarus-master\src\atfilenotif.pas"/>
<UnitName Value="ATFileNotif"/>
<EditorIndex Value="-1"/>
<WindowIndex Value="1"/>
<TopLine Value="67"/>
<UsageCount Value="10"/>
</Unit28>
<Unit29>
<Filename Value="D:\lazarustrunk\common_components\ATFileNotif-Lazarus-master\src\atfilenotif_reg.pas"/>
<UnitName Value="ATFileNotif_Reg"/>
<EditorIndex Value="-1"/>
<WindowIndex Value="1"/>
<CursorPos X="63" Y="5"/>
<UsageCount Value="10"/>
</Unit29>
</Units>
<JumpHistory Count="29" HistoryIndex="28">
<OtherDefines Count="1">
<Define0 Value="DEBUGMODE"/>
</OtherDefines>
<JumpHistory Count="30" HistoryIndex="29">
<Position1>
<Filename Value="uconfigform.pas"/>
<Caret Line="285" Column="3" TopLine="238"/>
<Filename Value="trayupdater.lpr"/>
<Caret Line="63" TopLine="14"/>
</Position1>
<Position2>
<Filename Value="umainform.pas"/>
<Caret Line="124" Column="15" TopLine="118"/>
<Filename Value="trayupdater.lpr"/>
<Caret Line="57" Column="30" TopLine="19"/>
</Position2>
<Position3>
<Filename Value="umainform.pas"/>
<Caret Line="672" Column="52" TopLine="660"/>
<Caret Line="593" Column="31" TopLine="587"/>
</Position3>
<Position4>
<Filename Value="trayupdater.lpr"/>
<Caret Line="63" TopLine="14"/>
<Filename Value="..\ulazautoupdate.pas"/>
<Caret Line="1482" Column="40" TopLine="1460"/>
</Position4>
<Position5>
<Filename Value="trayupdater.lpr"/>
<Caret Line="53" Column="3" TopLine="14"/>
<Filename Value="umainform.pas"/>
<Caret Line="137" TopLine="109"/>
</Position5>
<Position6>
<Filename Value="uconfigform.pas"/>
<Caret Line="231" Column="67" TopLine="206"/>
<Filename Value="..\ulazautoupdate.pas"/>
<Caret Line="2296" Column="87" TopLine="2285"/>
</Position6>
<Position7>
<Filename Value="trayupdater.lpr"/>
<Caret Line="63" TopLine="14"/>
<Filename Value="..\ulazautoupdate.pas"/>
<Caret Column="17"/>
</Position7>
<Position8>
<Filename Value="trayupdater.lpr"/>
<Caret Line="57" Column="30" TopLine="19"/>
<Filename Value="..\ulazautoupdate.pas"/>
<Caret Line="852" Column="20" TopLine="814"/>
</Position8>
<Position9>
<Filename Value="umainform.pas"/>
<Caret Line="593" Column="31" TopLine="587"/>
<Filename Value="..\ulazautoupdate.pas"/>
<Caret Line="932" Column="16" TopLine="894"/>
</Position9>
<Position10>
<Filename Value="..\ulazautoupdate.pas"/>
<Caret Line="1482" Column="40" TopLine="1460"/>
<Caret Line="1120" Column="18" TopLine="1083"/>
</Position10>
<Position11>
<Filename Value="umainform.pas"/>
<Caret Line="137" TopLine="109"/>
<Filename Value="..\ulazautoupdate.pas"/>
<Caret Line="1327" Column="18" TopLine="1290"/>
</Position11>
<Position12>
<Filename Value="..\ulazautoupdate.pas"/>
<Caret Line="2296" Column="87" TopLine="2285"/>
<Caret Line="1460" Column="16" TopLine="1422"/>
</Position12>
<Position13>
<Filename Value="..\ulazautoupdate.pas"/>
<Caret Column="17"/>
<Caret Line="1528" Column="16" TopLine="1490"/>
</Position13>
<Position14>
<Filename Value="..\ulazautoupdate.pas"/>
<Caret Line="852" Column="20" TopLine="814"/>
<Caret Line="1572" Column="20" TopLine="1535"/>
</Position14>
<Position15>
<Filename Value="..\ulazautoupdate.pas"/>
<Caret Line="932" Column="16" TopLine="894"/>
<Caret Line="1611" Column="20" TopLine="1573"/>
</Position15>
<Position16>
<Filename Value="..\ulazautoupdate.pas"/>
<Caret Line="1120" Column="18" TopLine="1083"/>
<Caret Line="1696" Column="16" TopLine="1659"/>
</Position16>
<Position17>
<Filename Value="..\ulazautoupdate.pas"/>
<Caret Line="1327" Column="18" TopLine="1290"/>
<Caret Line="1729" Column="20" TopLine="1692"/>
</Position17>
<Position18>
<Filename Value="..\ulazautoupdate.pas"/>
<Caret Line="1460" Column="16" TopLine="1422"/>
<Caret Line="1820" Column="22" TopLine="1783"/>
</Position18>
<Position19>
<Filename Value="..\ulazautoupdate.pas"/>
<Caret Line="1528" Column="16" TopLine="1490"/>
<Caret Line="1857" Column="25" TopLine="1820"/>
</Position19>
<Position20>
<Filename Value="..\ulazautoupdate.pas"/>
<Caret Line="1572" Column="20" TopLine="1535"/>
<Caret Line="1892" Column="27" TopLine="1855"/>
</Position20>
<Position21>
<Filename Value="..\ulazautoupdate.pas"/>
<Caret Line="1611" Column="20" TopLine="1573"/>
<Caret Line="1976" Column="22" TopLine="1939"/>
</Position21>
<Position22>
<Filename Value="..\ulazautoupdate.pas"/>
<Caret Line="1696" Column="16" TopLine="1659"/>
<Caret Line="2030" Column="25" TopLine="1993"/>
</Position22>
<Position23>
<Filename Value="..\ulazautoupdate.pas"/>
<Caret Line="1729" Column="20" TopLine="1692"/>
<Caret Line="2071" Column="27" TopLine="2034"/>
</Position23>
<Position24>
<Filename Value="..\ulazautoupdate.pas"/>
<Caret Line="1820" Column="22" TopLine="1783"/>
<Filename Value="umainform.pas"/>
<Caret Line="407" Column="36" TopLine="386"/>
</Position24>
<Position25>
<Filename Value="..\ulazautoupdate.pas"/>
<Caret Line="1857" Column="25" TopLine="1820"/>
<Filename Value="umainform.pas"/>
<Caret Line="496" Column="46" TopLine="468"/>
</Position25>
<Position26>
<Filename Value="..\ulazautoupdate.pas"/>
<Caret Line="1892" Column="27" TopLine="1855"/>
<Filename Value="umainform.pas"/>
<Caret Line="497" Column="37" TopLine="468"/>
</Position26>
<Position27>
<Filename Value="..\ulazautoupdate.pas"/>
<Caret Line="1976" Column="22" TopLine="1939"/>
<Filename Value="umainform.pas"/>
<Caret Line="502" Column="46" TopLine="468"/>
</Position27>
<Position28>
<Filename Value="..\ulazautoupdate.pas"/>
<Caret Line="2030" Column="25" TopLine="1993"/>
<Filename Value="umainform.pas"/>
<Caret Line="73" Column="12" TopLine="50"/>
</Position28>
<Position29>
<Filename Value="..\ulazautoupdate.pas"/>
<Caret Line="2071" Column="27" TopLine="2034"/>
<Filename Value="umainform.pas"/>
<Caret Line="563" Column="9" TopLine="540"/>
</Position29>
<Position30>
<Filename Value="umainform.pas"/>
<Caret Line="572" Column="15" TopLine="540"/>
</Position30>
</JumpHistory>
</ProjectSession>
</CONFIG>

View File

@ -1,7 +1,7 @@
object configform: Tconfigform
Left = 1101
Left = 1144
Height = 495
Top = 511
Top = 189
Width = 604
BorderIcons = [biSystemMenu]
BorderStyle = bsSingle

View File

@ -29,7 +29,7 @@ and optionally auto-updates any apps for which it has a profile
It uses an array of custom component LongTimers in order to
update a number of different apps on different schedules
It uses a config file LAUTray.ini to keep track. This file
is automatically generated by UpdatePack and impoted by this app when first run.
is automatically generated by UpdatePack and imported by this app when first run.
VERSION HISTORY
@ -37,6 +37,8 @@ VERSION HISTORY
0.1.12: Updated to Laz 1.7 fpc 3.1.1
0.1.12: Updated lpr to correctly hide the mainform on startup
0.1.12: Commit to svn
0.1.13: Updated January 2017
Ini filename uses C_PFX
}
{$mode objfpc}{$H+}
@ -68,7 +70,7 @@ end;
{ Tmainform }
Tmainform = class(TForm)
EventLog1: TEventLog;
Logger: TEventLog;
idleReminder: TIdleTimer;
LazAutoUpdate1: TLazAutoUpdate;
mnu_About: TMenuItem;
@ -135,7 +137,7 @@ Const
C_BITNESS = '64';
{$ENDIF}
C_PFX = C_OS + C_BITNESS;
C_LAUTRayINI = 'lauimport' + C_PFX + '.ini';
C_LAUTRayINI = 'lauimport.ini';
C_INIFilename = 'trayupdater' + C_PFX + '.ini';
implementation
@ -181,7 +183,7 @@ begin
INI.UpdateFile;
except
if DebugMode then
EventLog1.Error('Failed to write AppRecArray to %s', [INI.Filename])
Logger.Error('Failed to write AppRecArray to %s', [INI.Filename])
end;
end;
end;
@ -199,7 +201,7 @@ begin
iTag := TLongTimer(Sender).Tag;
end;
if DebugMode then
EventLog1.Log('Timer for %s fired', [AppRecArray[iTag].AppPrettyName]);
Logger.Log('Timer for %s fired', [AppRecArray[iTag].AppPrettyName]);
TrayIcon1.BalloonHint :=
Format('Checking %s for updates', [AppRecArray[iTag].AppPrettyName]);
TrayIcon1.ShowBalloonHint;
@ -341,7 +343,7 @@ begin
end;
except
if DebugMode then
EventLog1.Error('Failed to read AppRecArray from %s', [INI.Filename])
Logger.Error('Failed to read AppRecArray from %s', [INI.Filename])
end;
finally
FreeAndNil(SectionStringList);
@ -443,7 +445,7 @@ begin
if (Result = True) then
begin
if DebugMode then
EventLog1.Log('%s: Imported %s into %s',
Logger.Log('%s: Imported %s into %s',
[Application.Title, szImportINIPath, INI.Filename]);
DoReadINIIntoAppRecArray;
end;
@ -467,9 +469,9 @@ begin
mainform.ShowInTaskBar := stNever;
// Log a successful startup
if DebugMode then
EventLog1.Active := True;
Logger.Active := True;
if DebugMode then
EventLog1.Log('%s version %s started OK',
Logger.Log('%s version %s started OK',
[Application.Title, LazAutoUpdate1.AppVersion]);
end;
end;
@ -487,26 +489,26 @@ begin
if FileExists(szImportINIPath) then
begin
if DebugMode then
EventLog1.Log('%s: Import file %s discovered',
Logger.Log('%s: Import file %s discovered',
[Application.Title, szImportINIPath]);
if ImportINIFile then
begin
if DebugMode then
EventLog1.Log('%s: Import file %s successfully imported',
Logger.Log('%s: Import file %s successfully imported',
[Application.Title, szImportINIPath]);
DeleteFileUTF8(szImportINIPath);
end
else
if DebugMode then
EventLog1.Error('%s: Failed to import file %s',
Logger.Error('%s: Failed to import file %s',
[Application.Title, szImportINIPath]);
end;
end;
procedure Tmainform.LazAutoUpdate1DebugEvent(Sender: TObject; WhereAt, Message: string);
begin
if ((EventLog1.Active) and (DebugMode = True)) then
EventLog1.Log('LazAutoUpdate:%s Message:%s', [WhereAt, Message]);
if ((Logger.Active) and (DebugMode = True)) then
Logger.Log('LazAutoUpdate:%s Message:%s', [WhereAt, Message]);
end;
procedure Tmainform.mnu_AboutClick(Sender: TObject);
@ -558,7 +560,7 @@ begin
Reg.WriteString(Application.Title, ParamStr(0));
INI.WriteBool('ProgramInfo', 'RunAtStartUp', True);
if DebugMode then
EventLog1.Log('Run at OS startup Activated');
Logger.Log('Run at OS startup Activated');
MessageDlg(Application.Title,
'Run at OS startup activated OK', mtInformation, [mbOK], 0);
end
@ -567,7 +569,7 @@ begin
Reg.DeleteValue(Application.Title);
INI.WriteBool('ProgramInfo', 'RunAtStartUp', False);
if DebugMode then
EventLog1.Log('Run at OS startup Deactivated');
Logger.Log('Run at OS startup Deactivated');
MessageDlg(Application.Title,
'Run at OS startup deactivated OK', mtInformation, [mbOK], 0);
end;
@ -589,7 +591,7 @@ begin
if LazAutoUpdate1.DownloadInprogress then
begin
if DebugMode then
EventLog1.Error(
Logger.Error(
'Tried to update whilst download in progress. Exiting CheckAndUpdate routine');
Exit;
end;
@ -642,7 +644,7 @@ begin
//Debugging line
if DebugMode then
EventLog1.Active := True;
Logger.Active := True;
ShowMessageFmt('Update %s', [AppRecArray[iCurrentRecIndex].AppPrettyName]);
CheckAndUpdate(iCurrentRecIndex);
@ -663,6 +665,7 @@ begin
DebugMode := True
else
DebugMode := False;
{$IFDEF DEBUGMODE}DebugMode := True;{$ENDIF}
// Initialise the App's main INI file
Try
INI := TIniFile.Create(GetAppConfigDirUTF8(False) + C_INIFilename);
@ -683,24 +686,26 @@ begin
PopulateOwnProfile;
// Start up a system Event Log
if DebugMode then
EventLog1.LogType := ltFile;
Logger.LogType := ltFile;
if DebugMode then
EventLog1.Filename := ExtractFileNameWithoutExt(ParamStr(0)) + '.log';
Logger.Filename := ExtractFileNameWithoutExt(ParamStr(0)) + '.log';
// New logfile every time
if DebugMode then
if FileExistsUTF8(EventLog1.Filename) then
DeleteFile(EventLog1.Filename);
if FileExistsUTF8(Logger.Filename) then
DeleteFile(Logger.Filename);
if DebugMode then
EventLog1.AppendContent := True;
Logger.AppendContent := True;
if DebugMode then
EventLog1.DefaultEventType := etInfo;
Logger.DefaultEventType := etInfo;
if DebugMode then
EventLog1.RaiseExceptionOnError := False;
// EventLog1.Identification := Application.Title;
Logger.RaiseExceptionOnError := False;
// Logger.Identification := Application.Title;
// Fetch the location of any trayicon INI on the users system
szImportINIPath := GetAppConfigDirUTF8(False, True);
szImportINIPath := AnsiReplaceText(szImportINIPath, Application.Title, 'updatehm');
szImportINIPath := AnsiReplaceText(szImportINIPath, Application.Title, 'updatehm' + C_PFX);
szImportINIPath := AppendPathDelim(szImportINIPath) + C_LAUTRayINI;
if DebugMode then
Logger.Debug('szImportINIPath=' + szImportINIPath);
// Initialise the AppRecArray
DoReadINIIntoAppRecArray;
// Use last saved Profile at startup
@ -735,9 +740,9 @@ begin
else
begin
if DebugMode then
EventLog1.Log('User closed application');
Logger.Log('User closed application');
if DebugMode then
EventLog1.Active := False;
Logger.Active := False;
CanClose := True;
end;
if CanClose then

View File

@ -135,9 +135,10 @@ const
V0.2.6: Enabled GitHub tags (GitHubBranchOrTag property)
V0.2.7: Updates Tray Updater routines
V0.2.8: Changed constants C_UPDATEHMNAME and C_LAUUPDATENAME
V0.2.9: ??
V0.2.9: Added CreateLocalLauImportFile in UpdateToNewVersion
V0.3.0: ??
}
C_TLazAutoUpdateComponentVersion = '0.2.8';
C_TLazAutoUpdateComponentVersion = '0.2.9';
C_TThreadedDownloadComponentVersion = '0.0.3';
{
V0.0.1: Initial alpha
@ -148,7 +149,7 @@ const
C_UpdatesFolder = 'updates'; // User can change
// Don't change these without some thought..
C_LAUTRayINI = 'lauimport.ini';
C_LAUTRayINI = 'lauimport.ini'; // Name syncronises with TrayUpdater App
C_WhatsNewFilename = 'whatsnew.txt';
C_INISection = 'versions';
C_GUIEntry = 'GUI';
@ -308,8 +309,6 @@ type
procedure SetDebugMode(AValue: boolean);
function GetThreadDownloadReturnCode: integer;
function IsOnlineVersionNewer(const sznewINIPath: string): boolean;
// No longer needed
// function VersionStringToNumber(AVersionString: string): integer;
function DoSilentUpdate: boolean;
protected
@ -323,7 +322,7 @@ type
function NewVersionAvailable: boolean;
// Returns TRUE if successful
function DownloadNewVersion: boolean;
// Returns TRUE if successful
// Returns TRUE if successful. Also creates a C_LAUTRayINI file in the GetAppConfig folder for TrayUpdater
function UpdateToNewVersion: boolean;
// Put in form.activate. Shows <whatsnew.txt> only if in ProgramDirectory then deletes it. Exits otherwise
procedure ShowWhatsNewIfAvailable;
@ -338,7 +337,7 @@ type
// Resets AppVersion property to the ownling application version
procedure ResetAppVersion;
// Create a new lauimport.ini in the App folder
// Create a new lauimport.ini in GetAppConfigDirUTF8 folder
function CreateLocalLauImportFile: boolean;
// If lauimport.ini is found in the app folder, move it to the AppData folder
procedure RelocateLauImportFile;
@ -767,30 +766,6 @@ begin
Result := AppIsRunning(ExeName);
end;
{
// Obselete. fileinfo functions used instead
function TLazAutoUpdate.VersionStringToNumber(AVersionString: string): integer;
// Converts 'n.n.n.n' into an integer
var
s: string;
i: integer;
begin
Result := 0;
// Fetch the 4 (or less) version elements and make into an Integer
s := ExtractDelimited(1, AVersionString, ['.']);
if TryStrToInt(s, i) then
Result := Result + (i * 10000);
s := ExtractDelimited(2, AVersionString, ['.']);
if TryStrToInt(s, i) then
Result := Result + (i * 1000);
s := ExtractDelimited(3, AVersionString, ['.']);
if TryStrToInt(s, i) then
Result := Result + (i * 100);
s := ExtractDelimited(4, AVersionString, ['.']);
if TryStrToInt(s, i) then
Result := Result + i;
end;
}
procedure TLazAutoUpdate.ResetAppVersion;
begin
fApplicationVersionString := GetFileVersion;
@ -1461,6 +1436,7 @@ begin
fOndebugEvent(Self, 'CreateLocalLauImportFile', 'CreateLocalLauImportFile called');
if FileExistsUTF8(ProgramDirectory + C_LAUTRayINI) then
begin
RelocateLauImportFile;
Result := True;
Exit;
end;
@ -2024,7 +2000,7 @@ begin
if fFireDebugEvent then
fOndebugEvent(Self, 'UpdateToNewVersion', 'RunAsAdmin failed');
end;
CreateLocalLauImportFile; // Creates a new import file in GetAppConfigDirUTF8
// Check for C_WhatsNewFilename in the app directory in a LOOP
if fFireDebugEvent then
fOndebugEvent(Self, 'UpdateToNewVersion',
@ -2065,7 +2041,7 @@ begin
'Error %d: Run this application in Administrator mode or turn off UAC',
[GetLastOSError]);
end;
CreateLocalLauImportFile; // Creates a new import file in GetAppConfigDirUTF8
// Check for C_WhatsNewFilename in the app directory in a LOOP
if fFireDebugEvent then
fOndebugEvent(Self, 'UpdateToNewVersion',

View File

@ -1,7 +1,7 @@
object mainform: Tmainform
Left = 715
Left = 1335
Height = 481
Top = 197
Top = 384
Width = 587
AllowDropFiles = True
BorderIcons = [biSystemMenu, biMinimize]

View File

@ -9,7 +9,7 @@
"ForceNotify" : false,
"InternalVersion" : 1,
"Name" : "lazupdate.lpk",
"Version" : "0.2.8.0"
"Version" : "0.2.9.0"
}
]
}