You've already forked lazarus-ccr
To 0.2.8.0
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@5691 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@ -9,7 +9,6 @@
|
||||
<Version Value="11"/>
|
||||
<PathDelim Value="\"/>
|
||||
<SearchPaths>
|
||||
<IncludeFiles Value="synapse\source\lib"/>
|
||||
<UnitOutputDirectory Value="lib\$(TargetCPU)-$(TargetOS)"/>
|
||||
</SearchPaths>
|
||||
<Parsing>
|
||||
@ -61,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="6"/>
|
||||
<Version Minor="2" Release="8"/>
|
||||
<Files Count="6">
|
||||
<Item1>
|
||||
<Filename Value="ulazautoupdate.pas"/>
|
||||
|
@ -3,7 +3,7 @@
|
||||
<ProjectSession>
|
||||
<PathDelim Value="\"/>
|
||||
<Version Value="10"/>
|
||||
<BuildModes Active="Win32"/>
|
||||
<BuildModes Active="Linux64"/>
|
||||
<Units Count="19">
|
||||
<Unit0>
|
||||
<Filename Value="testapp.lpr"/>
|
||||
|
@ -23,8 +23,7 @@
|
||||
<VersionInfo>
|
||||
<UseVersionInfo Value="True"/>
|
||||
<MinorVersionNr Value="1"/>
|
||||
<RevisionNr Value="12"/>
|
||||
<BuildNr Value="2"/>
|
||||
<RevisionNr Value="13"/>
|
||||
<StringTable CompanyName="minesadorada" FileDescription="Tray app that works with LazAutoUpdate apps" InternalName="lazautoupdater" LegalCopyright="LGPLv2" LegalTrademarks="(c)2014 Gordon Bamber" OriginalFilename="trayupdater" ProductName="Lazarus 1.x FPC 2.6.x" ProductVersion="0.1.11.2"/>
|
||||
</VersionInfo>
|
||||
<BuildModes Count="4">
|
||||
@ -60,6 +59,9 @@
|
||||
</Win32>
|
||||
</Options>
|
||||
</Linking>
|
||||
<Other>
|
||||
<CustomOptions Value="-FcUTF8"/>
|
||||
</Other>
|
||||
</CompilerOptions>
|
||||
</Item2>
|
||||
<Item3 Name="Linux32 Release">
|
||||
@ -93,6 +95,9 @@
|
||||
</Win32>
|
||||
</Options>
|
||||
</Linking>
|
||||
<Other>
|
||||
<CustomOptions Value="-FcUTF8"/>
|
||||
</Other>
|
||||
</CompilerOptions>
|
||||
</Item3>
|
||||
<Item4 Name="Linux64 Release">
|
||||
@ -126,6 +131,9 @@
|
||||
</Win32>
|
||||
</Options>
|
||||
</Linking>
|
||||
<Other>
|
||||
<CustomOptions Value="-FcUTF8"/>
|
||||
</Other>
|
||||
</CompilerOptions>
|
||||
</Item4>
|
||||
</BuildModes>
|
||||
@ -203,6 +211,9 @@
|
||||
</Win32>
|
||||
</Options>
|
||||
</Linking>
|
||||
<Other>
|
||||
<CustomOptions Value="-FcUTF8"/>
|
||||
</Other>
|
||||
</CompilerOptions>
|
||||
<Debugging>
|
||||
<Exceptions Count="3">
|
||||
|
@ -54,7 +54,7 @@ Const
|
||||
C_PFX = C_OS + C_BITNESS;
|
||||
}
|
||||
begin
|
||||
Application.Title:='LazTrayUpdater';
|
||||
Application.Title:='LazAutoUpdater';
|
||||
// Application.Title:=Application.Title + ' (' + C_PFX + ' edition)';
|
||||
RequireDerivedFormResource := True;
|
||||
Application.Initialize;
|
||||
|
@ -4,15 +4,15 @@
|
||||
<PathDelim Value="\"/>
|
||||
<Version Value="10"/>
|
||||
<BuildModes Active="Linux64 Release"/>
|
||||
<Units Count="27">
|
||||
<Units Count="28">
|
||||
<Unit0>
|
||||
<Filename Value="trayupdater.lpr"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
<EditorIndex Value="1"/>
|
||||
<EditorIndex Value="2"/>
|
||||
<WindowIndex Value="1"/>
|
||||
<TopLine Value="19"/>
|
||||
<CursorPos X="30" Y="57"/>
|
||||
<UsageCount Value="176"/>
|
||||
<TopLine Value="21"/>
|
||||
<CursorPos X="78" Y="56"/>
|
||||
<UsageCount Value="178"/>
|
||||
<Loaded Value="True"/>
|
||||
</Unit0>
|
||||
<Unit1>
|
||||
@ -22,10 +22,10 @@
|
||||
<HasResources Value="True"/>
|
||||
<ResourceBaseClass Value="Form"/>
|
||||
<WindowIndex Value="1"/>
|
||||
<TopLine Value="660"/>
|
||||
<CursorPos X="52" Y="672"/>
|
||||
<TopLine Value="109"/>
|
||||
<CursorPos Y="137"/>
|
||||
<ComponentState Value="1"/>
|
||||
<UsageCount Value="176"/>
|
||||
<UsageCount Value="178"/>
|
||||
<Bookmarks Count="1">
|
||||
<Item0 X="3" Y="478" ID="2"/>
|
||||
</Bookmarks>
|
||||
@ -38,11 +38,11 @@
|
||||
<ComponentName Value="configform"/>
|
||||
<HasResources Value="True"/>
|
||||
<ResourceBaseClass Value="Form"/>
|
||||
<EditorIndex Value="3"/>
|
||||
<EditorIndex Value="4"/>
|
||||
<WindowIndex Value="1"/>
|
||||
<TopLine Value="206"/>
|
||||
<CursorPos X="67" Y="231"/>
|
||||
<UsageCount Value="172"/>
|
||||
<UsageCount Value="174"/>
|
||||
<Loaded Value="True"/>
|
||||
<LoadedDesigner Value="True"/>
|
||||
</Unit2>
|
||||
@ -215,136 +215,141 @@
|
||||
<Unit26>
|
||||
<Filename Value="C:\laztrunk\config_lazarus\onlinepackagemanager\packages\longtimer\ulongtimer.pas"/>
|
||||
<UnitName Value="uLongTimer"/>
|
||||
<IsVisibleTab Value="True"/>
|
||||
<EditorIndex Value="2"/>
|
||||
<EditorIndex Value="3"/>
|
||||
<WindowIndex Value="1"/>
|
||||
<TopLine Value="299"/>
|
||||
<CursorPos X="14" Y="323"/>
|
||||
<UsageCount Value="10"/>
|
||||
<CursorPos X="62" Y="316"/>
|
||||
<UsageCount Value="11"/>
|
||||
<Loaded Value="True"/>
|
||||
</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"/>
|
||||
<Loaded Value="True"/>
|
||||
</Unit27>
|
||||
</Units>
|
||||
<JumpHistory Count="30" HistoryIndex="29">
|
||||
<JumpHistory Count="29" HistoryIndex="28">
|
||||
<Position1>
|
||||
<Filename Value="umainform.pas"/>
|
||||
<Caret Line="151" Column="52" TopLine="117"/>
|
||||
<Filename Value="uconfigform.pas"/>
|
||||
<Caret Line="285" Column="3" TopLine="238"/>
|
||||
</Position1>
|
||||
<Position2>
|
||||
<Filename Value="umainform.pas"/>
|
||||
<Caret Line="152" Column="58" TopLine="118"/>
|
||||
<Caret Line="124" Column="15" TopLine="118"/>
|
||||
</Position2>
|
||||
<Position3>
|
||||
<Filename Value="umainform.pas"/>
|
||||
<Caret Line="498" Column="41" TopLine="489"/>
|
||||
<Caret Line="672" Column="52" TopLine="660"/>
|
||||
</Position3>
|
||||
<Position4>
|
||||
<Filename Value="umainform.pas"/>
|
||||
<Caret Line="50" Column="20" TopLine="16"/>
|
||||
<Filename Value="trayupdater.lpr"/>
|
||||
<Caret Line="63" TopLine="14"/>
|
||||
</Position4>
|
||||
<Position5>
|
||||
<Filename Value="umainform.pas"/>
|
||||
<Caret Line="151" Column="52" TopLine="117"/>
|
||||
<Filename Value="trayupdater.lpr"/>
|
||||
<Caret Line="53" Column="3" TopLine="14"/>
|
||||
</Position5>
|
||||
<Position6>
|
||||
<Filename Value="umainform.pas"/>
|
||||
<Caret Line="152" Column="58" TopLine="118"/>
|
||||
<Filename Value="uconfigform.pas"/>
|
||||
<Caret Line="231" Column="67" TopLine="206"/>
|
||||
</Position6>
|
||||
<Position7>
|
||||
<Filename Value="umainform.pas"/>
|
||||
<Caret Line="179" Column="41" TopLine="145"/>
|
||||
<Filename Value="trayupdater.lpr"/>
|
||||
<Caret Line="63" TopLine="14"/>
|
||||
</Position7>
|
||||
<Position8>
|
||||
<Filename Value="umainform.pas"/>
|
||||
<Caret Line="309" Column="57" TopLine="276"/>
|
||||
<Filename Value="trayupdater.lpr"/>
|
||||
<Caret Line="57" Column="30" TopLine="19"/>
|
||||
</Position8>
|
||||
<Position9>
|
||||
<Filename Value="umainform.pas"/>
|
||||
<Caret Line="310" Column="72" TopLine="277"/>
|
||||
<Caret Line="593" Column="31" TopLine="587"/>
|
||||
</Position9>
|
||||
<Position10>
|
||||
<Filename Value="umainform.pas"/>
|
||||
<Caret Line="349" Column="46" TopLine="315"/>
|
||||
<Filename Value="..\ulazautoupdate.pas"/>
|
||||
<Caret Line="1482" Column="40" TopLine="1460"/>
|
||||
</Position10>
|
||||
<Position11>
|
||||
<Filename Value="umainform.pas"/>
|
||||
<Caret Line="405" Column="52" TopLine="369"/>
|
||||
<Caret Line="137" TopLine="109"/>
|
||||
</Position11>
|
||||
<Position12>
|
||||
<Filename Value="trayupdater.lpr"/>
|
||||
<Caret Column="38"/>
|
||||
<Filename Value="..\ulazautoupdate.pas"/>
|
||||
<Caret Line="2296" Column="87" TopLine="2285"/>
|
||||
</Position12>
|
||||
<Position13>
|
||||
<Filename Value="uconfigform.pas"/>
|
||||
<Caret Line="107" Column="73"/>
|
||||
<Filename Value="..\ulazautoupdate.pas"/>
|
||||
<Caret Column="17"/>
|
||||
</Position13>
|
||||
<Position14>
|
||||
<Filename Value="umainform.pas"/>
|
||||
<Caret Line="30" Column="43" TopLine="28"/>
|
||||
<Filename Value="..\ulazautoupdate.pas"/>
|
||||
<Caret Line="852" Column="20" TopLine="814"/>
|
||||
</Position14>
|
||||
<Position15>
|
||||
<Filename Value="umainform.pas"/>
|
||||
<Caret Line="83" Column="41" TopLine="77"/>
|
||||
<Filename Value="..\ulazautoupdate.pas"/>
|
||||
<Caret Line="932" Column="16" TopLine="894"/>
|
||||
</Position15>
|
||||
<Position16>
|
||||
<Filename Value="umainform.pas"/>
|
||||
<Caret Line="691" TopLine="677"/>
|
||||
<Filename Value="..\ulazautoupdate.pas"/>
|
||||
<Caret Line="1120" Column="18" TopLine="1083"/>
|
||||
</Position16>
|
||||
<Position17>
|
||||
<Filename Value="umainform.pas"/>
|
||||
<Caret Line="695" Column="8" TopLine="693"/>
|
||||
<Filename Value="..\ulazautoupdate.pas"/>
|
||||
<Caret Line="1327" Column="18" TopLine="1290"/>
|
||||
</Position17>
|
||||
<Position18>
|
||||
<Filename Value="umainform.pas"/>
|
||||
<Caret Line="434" Column="3" TopLine="432"/>
|
||||
<Filename Value="..\ulazautoupdate.pas"/>
|
||||
<Caret Line="1460" Column="16" TopLine="1422"/>
|
||||
</Position18>
|
||||
<Position19>
|
||||
<Filename Value="umainform.pas"/>
|
||||
<Caret Line="697" Column="19" TopLine="693"/>
|
||||
<Filename Value="..\ulazautoupdate.pas"/>
|
||||
<Caret Line="1528" Column="16" TopLine="1490"/>
|
||||
</Position19>
|
||||
<Position20>
|
||||
<Filename Value="umainform.pas"/>
|
||||
<Caret Line="438" Column="23" TopLine="432"/>
|
||||
<Filename Value="..\ulazautoupdate.pas"/>
|
||||
<Caret Line="1572" Column="20" TopLine="1535"/>
|
||||
</Position20>
|
||||
<Position21>
|
||||
<Filename Value="uconfigform.pas"/>
|
||||
<Caret Line="8" Column="16"/>
|
||||
<Filename Value="..\ulazautoupdate.pas"/>
|
||||
<Caret Line="1611" Column="20" TopLine="1573"/>
|
||||
</Position21>
|
||||
<Position22>
|
||||
<Filename Value="uconfigform.pas"/>
|
||||
<Caret Line="82" Column="3" TopLine="80"/>
|
||||
<Filename Value="..\ulazautoupdate.pas"/>
|
||||
<Caret Line="1696" Column="16" TopLine="1659"/>
|
||||
</Position22>
|
||||
<Position23>
|
||||
<Filename Value="uconfigform.pas"/>
|
||||
<Caret Line="285" Column="3" TopLine="238"/>
|
||||
<Filename Value="..\ulazautoupdate.pas"/>
|
||||
<Caret Line="1729" Column="20" TopLine="1692"/>
|
||||
</Position23>
|
||||
<Position24>
|
||||
<Filename Value="umainform.pas"/>
|
||||
<Caret Line="124" Column="15" TopLine="118"/>
|
||||
<Filename Value="..\ulazautoupdate.pas"/>
|
||||
<Caret Line="1820" Column="22" TopLine="1783"/>
|
||||
</Position24>
|
||||
<Position25>
|
||||
<Filename Value="umainform.pas"/>
|
||||
<Caret Line="672" Column="52" TopLine="660"/>
|
||||
<Filename Value="..\ulazautoupdate.pas"/>
|
||||
<Caret Line="1857" Column="25" TopLine="1820"/>
|
||||
</Position25>
|
||||
<Position26>
|
||||
<Filename Value="trayupdater.lpr"/>
|
||||
<Caret Line="63" TopLine="14"/>
|
||||
<Filename Value="..\ulazautoupdate.pas"/>
|
||||
<Caret Line="1892" Column="27" TopLine="1855"/>
|
||||
</Position26>
|
||||
<Position27>
|
||||
<Filename Value="trayupdater.lpr"/>
|
||||
<Caret Line="53" Column="3" TopLine="14"/>
|
||||
<Filename Value="..\ulazautoupdate.pas"/>
|
||||
<Caret Line="1976" Column="22" TopLine="1939"/>
|
||||
</Position27>
|
||||
<Position28>
|
||||
<Filename Value="uconfigform.pas"/>
|
||||
<Caret Line="231" Column="67" TopLine="206"/>
|
||||
<Filename Value="..\ulazautoupdate.pas"/>
|
||||
<Caret Line="2030" Column="25" TopLine="1993"/>
|
||||
</Position28>
|
||||
<Position29>
|
||||
<Filename Value="trayupdater.lpr"/>
|
||||
<Caret Line="63" TopLine="14"/>
|
||||
<Filename Value="..\ulazautoupdate.pas"/>
|
||||
<Caret Line="2071" Column="27" TopLine="2034"/>
|
||||
</Position29>
|
||||
<Position30>
|
||||
<Filename Value="trayupdater.lpr"/>
|
||||
<Caret Line="57" Column="30" TopLine="19"/>
|
||||
</Position30>
|
||||
</JumpHistory>
|
||||
</ProjectSession>
|
||||
</CONFIG>
|
||||
|
Binary file not shown.
@ -12,6 +12,7 @@ object configform: Tconfigform
|
||||
OnShow = FormShow
|
||||
Position = poScreenCenter
|
||||
LCLVersion = '1.7'
|
||||
Scaled = True
|
||||
object grp_configapp: TGroupBox
|
||||
Left = 0
|
||||
Height = 252
|
||||
|
@ -665,11 +665,11 @@ begin
|
||||
DebugMode := False;
|
||||
// Initialise the App's main INI file
|
||||
Try
|
||||
INI := TIniFile.Create(GetAppConfigDir(False) + C_INIFilename);
|
||||
INI := TIniFile.Create(GetAppConfigDirUTF8(False) + C_INIFilename);
|
||||
Except
|
||||
sleep(4000);
|
||||
If (INI = Nil) then
|
||||
INI := TIniFile.Create(GetAppConfigDir(False) + C_INIFilename);
|
||||
INI := TIniFile.Create(GetAppConfigDirUTF8(False) + C_INIFilename);
|
||||
end;
|
||||
INI.CacheUpdates := False;
|
||||
INI.WriteString('ProgramInfo', 'AppName', Application.Title);
|
||||
|
@ -78,8 +78,6 @@ const
|
||||
// https://raw.github.com/<username>/<repo>/<branchname>/some_directory/file
|
||||
// https://raw.github.com/<username>/<repo>/<tagname>/some_directory/file
|
||||
|
||||
C_TLazAutoUpdateComponentVersion = '0.2.6';
|
||||
C_LAUTRayINI = 'lauimport.ini';
|
||||
|
||||
{
|
||||
Version History
|
||||
@ -135,8 +133,11 @@ const
|
||||
V0.2.4: GitHub integration with branches
|
||||
V0.2.5: IsWindowsAdministrator check added and property to control it
|
||||
V0.2.6: Enabled GitHub tags (GitHubBranchOrTag property)
|
||||
V0.2.7:
|
||||
V0.2.7: Updates Tray Updater routines
|
||||
V0.2.8: Changed constants C_UPDATEHMNAME and C_LAUUPDATENAME
|
||||
V0.2.9: ??
|
||||
}
|
||||
C_TLazAutoUpdateComponentVersion = '0.2.8';
|
||||
C_TThreadedDownloadComponentVersion = '0.0.3';
|
||||
{
|
||||
V0.0.1: Initial alpha
|
||||
@ -147,6 +148,7 @@ const
|
||||
C_UpdatesFolder = 'updates'; // User can change
|
||||
|
||||
// Don't change these without some thought..
|
||||
C_LAUTRayINI = 'lauimport.ini';
|
||||
C_WhatsNewFilename = 'whatsnew.txt';
|
||||
C_INISection = 'versions';
|
||||
C_GUIEntry = 'GUI';
|
||||
@ -155,25 +157,18 @@ const
|
||||
// Compiler mode directives
|
||||
// (note: nothing for Mac/Darwin)
|
||||
{$IFDEF WINDOWS}
|
||||
C_OS = 'win';
|
||||
{$ELSE}
|
||||
C_OS = 'linux';
|
||||
{$ENDIF}
|
||||
{$IFDEF CPU32}
|
||||
C_UPDATER = 'updatehmwin32.exe';
|
||||
C_LOCALUPDATER = 'lauupdatewin32.exe';
|
||||
{$ENDIF}
|
||||
{$IFDEF CPU64}
|
||||
C_UPDATER = 'updatehmwin64.exe';
|
||||
C_LOCALUPDATER = 'lauupdatewin64.exe';
|
||||
{$ENDIF}
|
||||
{$ENDIF}
|
||||
{$IFDEF LINUX}
|
||||
{$IFDEF CPU32}
|
||||
C_UPDATER = 'updatehmlinux32';
|
||||
C_LOCALUPDATER = 'lauupdatelinux32';
|
||||
{$ENDIF}
|
||||
{$IFDEF CPU64}
|
||||
C_UPDATER = 'updatehmlinux64';
|
||||
C_LOCALUPDATER = 'lauupdatelinux64';
|
||||
{$ENDIF}
|
||||
C_BITNESS = '32';
|
||||
{$ELSE}
|
||||
C_BITNESS = '64';
|
||||
{$ENDIF}
|
||||
C_PFX = C_OS + C_BITNESS; // Used in file naming
|
||||
C_UPDATEHMNAME = 'updatehm' + C_PFX;
|
||||
C_LAUUPDATENAME = 'lauupdate' + C_PFX;
|
||||
// Windows Constants (unused)
|
||||
C_RUNONCEKEY = 'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce';
|
||||
C_RUNKEY = 'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run';
|
||||
@ -217,11 +212,11 @@ resourcestring
|
||||
rsDownloadFail = 'Download failed. (HTTP Errorcode %d) Try again later';
|
||||
rsCancelledYou2 = 'Cancelled. You can download the new version later.';
|
||||
rsThisApplicat = 'This application is up-to-date';
|
||||
rsOnlyWindowsU = 'Only Windows users whith Administrator status can update '
|
||||
+ 'this application.%sPlease log off, then log on as an administrator (or '
|
||||
+ 'switch users to an administrator account),%sthen try again. This '
|
||||
+ 'restriction is for the safety and security of your Windows system.%'
|
||||
+ 'sClick OK to continue';
|
||||
rsOnlyWindowsU = 'Only Windows users whith Administrator status can update ' +
|
||||
'this application.%sPlease log off, then log on as an administrator (or ' +
|
||||
'switch users to an administrator account),%sthen try again. This ' +
|
||||
'restriction is for the safety and security of your Windows system.%' +
|
||||
'sClick OK to continue';
|
||||
rsApplicationU = 'Application update';
|
||||
|
||||
type
|
||||
@ -637,6 +632,7 @@ begin
|
||||
Result := False;
|
||||
CloseServiceHandle(hSC);
|
||||
end;
|
||||
|
||||
{$ENDIF}
|
||||
// === END WINDOWS PROCS =======================================================
|
||||
|
||||
@ -720,8 +716,8 @@ begin
|
||||
fZipfileName := ''; // assign later
|
||||
|
||||
// BE SURE TO CHANGE THE CONSTANTS IF YOU CHANGE THE UPDATE EXE NAME
|
||||
fUpdateExe := C_UPDATER;
|
||||
fUpdateSilentExe := C_LOCALUPDATER;
|
||||
fUpdateExe := C_UPDATEHMNAME;
|
||||
fUpdateSilentExe := C_LAUUPDATENAME;
|
||||
|
||||
|
||||
// Assorted versioninfo properties
|
||||
@ -770,6 +766,7 @@ function TLazAutoUpdate.AppIsActive(const ExeName: string): boolean;
|
||||
begin
|
||||
Result := AppIsRunning(ExeName);
|
||||
end;
|
||||
|
||||
{
|
||||
// Obselete. fileinfo functions used instead
|
||||
function TLazAutoUpdate.VersionStringToNumber(AVersionString: string): integer;
|
||||
@ -920,7 +917,7 @@ begin
|
||||
end;
|
||||
|
||||
function TLazAutoUpdate.SilentUpdate: boolean;
|
||||
// Part of the tray update system
|
||||
// Part of the tray update system
|
||||
begin
|
||||
// read the VMT once
|
||||
if Assigned(fOndebugEvent) then
|
||||
@ -934,7 +931,7 @@ begin
|
||||
fOndebugEvent(Self, 'SilentUpdate', 'Calling UpdateToNewVersion');
|
||||
|
||||
// Use the local lauupdate if available
|
||||
if FileExistsUTF8(ProgramDirectory + C_LOCALUPDATER) then
|
||||
if FileExistsUTF8(ProgramDirectory + C_LAUUPDATENAME) then
|
||||
begin
|
||||
if RemoteUpdateToNewVersion then
|
||||
// If IsAppRunning=FALSE, then calls DoSilentUpdate
|
||||
@ -1094,8 +1091,8 @@ begin
|
||||
Exit;
|
||||
end;
|
||||
if ((fUpdatesFolder = C_NotApplicable) or (fUpdatesFolder = '')) then
|
||||
szURL := Format(C_GITHUBFILE_URL,
|
||||
[fGitHubProjectName, fGitHubRepositoryName, fGitHubBranchOrTag, fVersionsININame])
|
||||
szURL := Format(C_GITHUBFILE_URL, [fGitHubProjectName,
|
||||
fGitHubRepositoryName, fGitHubBranchOrTag, fVersionsININame])
|
||||
else
|
||||
szURL := Format(C_GITHUBFILE_URL_UPDATES,
|
||||
[fGitHubProjectName, fGitHubRepositoryName, fGitHubBranchOrTag,
|
||||
@ -1146,7 +1143,7 @@ begin
|
||||
ReturnCode := 0;
|
||||
DownloadSize := 0;
|
||||
fDownloadInprogress := True;
|
||||
DebugMode:=fDebugMode;
|
||||
DebugMode := fDebugMode;
|
||||
if not fSilentMode then
|
||||
fParentForm.Caption := C_Checking;
|
||||
CheckForOpenSSL;
|
||||
@ -1255,8 +1252,8 @@ begin
|
||||
fUpdatesFolder, ExtractFileName(szTargetPath)]);
|
||||
if fProjectType = auGitHubReleaseZip then
|
||||
if ((fUpdatesFolder = C_NotApplicable) or (fUpdatesFolder = '')) then
|
||||
szURL := Format(C_GITHUBFILE_URL,
|
||||
[fGitHubProjectName, fGitHubRepositoryName, fGitHubBranchOrTag, fZipfileName])
|
||||
szURL := Format(C_GITHUBFILE_URL, [fGitHubProjectName,
|
||||
fGitHubRepositoryName, fGitHubBranchOrTag, fZipfileName])
|
||||
else
|
||||
szURL := Format(C_GITHUBFILE_URL_UPDATES,
|
||||
[fGitHubProjectName, fGitHubRepositoryName, fGitHubBranchOrTag,
|
||||
@ -1352,7 +1349,7 @@ begin
|
||||
ReturnCode := 0;
|
||||
DownloadSize := 0;
|
||||
fUnzipAfter := True;
|
||||
DebugMode:=fDebugMode;
|
||||
DebugMode := fDebugMode;
|
||||
if not fSilentMode then
|
||||
szOldCaption := fParentForm.Caption;
|
||||
if not fSilentMode then
|
||||
@ -1451,7 +1448,7 @@ begin
|
||||
end;
|
||||
|
||||
function TLazAutoUpdate.CreateLocalLauImportFile: boolean;
|
||||
// Used in SysTray app
|
||||
// Used in SysTray app
|
||||
var
|
||||
LAUTRayINI: TIniFile;
|
||||
szSection: string;
|
||||
@ -1479,7 +1476,7 @@ begin
|
||||
szSuffix += '32';
|
||||
{$ENDIF}
|
||||
Result := False;
|
||||
LAUTRayINI := TIniFile.Create(ProgramDirectory + C_LAUTRayINI);
|
||||
LAUTRayINI := TIniFile.Create(GetAppConfigDirUTF8(False, True) + C_LAUTRayINI);
|
||||
try
|
||||
with LAUTRayINI do
|
||||
begin
|
||||
@ -1539,10 +1536,10 @@ begin
|
||||
szDestLAUTrayPath := GetAppConfigDirUTF8(False, False); // Don't create it yet
|
||||
{$IFDEF WINDOWS}
|
||||
szDestLAUTrayPath := StringReplace(szDestLAUTrayPath, Application.Title,
|
||||
'updatehm', [rfReplaceAll]);
|
||||
'updatehm' + C_PFX, [rfReplaceAll]);
|
||||
{$ELSE}
|
||||
szDestLAUTrayPath := UTF8StringReplace(szDestLAUTrayPath,
|
||||
Application.Title, 'updatehm', [rfReplaceAll]);
|
||||
Application.Title, 'updatehm' + C_PFX, [rfReplaceAll]);
|
||||
{$ENDIF}
|
||||
end
|
||||
else
|
||||
@ -1582,8 +1579,8 @@ begin
|
||||
begin
|
||||
if fFireDebugEvent then
|
||||
fOndebugEvent(Self, 'RelocateLauImportFile',
|
||||
Format('Relocated %s from %s to %s',
|
||||
[C_LAUTRayINI, szSourceLAUTrayPath, szDestLAUTrayPath]));
|
||||
Format('Relocated %s from %s to %s', [C_LAUTRayINI,
|
||||
szSourceLAUTrayPath, szDestLAUTrayPath]));
|
||||
SysUtils.DeleteFile(szSourceLAUTrayPath);
|
||||
end
|
||||
else
|
||||
@ -1595,9 +1592,9 @@ begin
|
||||
end;
|
||||
|
||||
function TLazAutoUpdate.DoSilentUpdate: boolean;
|
||||
// Used in Systray app
|
||||
// Called from UpdateToNewVersion when the app is not running
|
||||
// Updates the app, and also copies over and updates C_LAUTRayINI
|
||||
// Used in Systray app
|
||||
// Called from UpdateToNewVersion when the app is not running
|
||||
// Updates the app, and also copies over and updates C_LAUTRayINI
|
||||
var
|
||||
szAppFolder: string;
|
||||
szLAUTrayAppPath: string;
|
||||
@ -1773,8 +1770,8 @@ begin
|
||||
end;
|
||||
|
||||
function TLazAutoUpdate.RemoteUpdateToNewVersion: boolean;
|
||||
// Used in Systray app
|
||||
// Shells to 'lauupdate' console app in ProgramDirectory to remotely update an app
|
||||
// Used in Systray app
|
||||
// Shells to 'lauupdate' console app in ProgramDirectory to remotely update an app
|
||||
{$IFDEF WINDOWS}
|
||||
function RunAsAdmin(const Handle: THandle; const Path, Params: string): boolean;
|
||||
var
|
||||
@ -1822,13 +1819,13 @@ begin
|
||||
else
|
||||
begin
|
||||
cCount := 0;
|
||||
if not FileExistsUTF8(ProgramDirectory + C_LOCALUPDATER) then
|
||||
if not FileExistsUTF8(ProgramDirectory + C_LAUUPDATENAME) then
|
||||
begin
|
||||
if fShowDialogs then
|
||||
ShowMessageFmt(C_UpdaterMissing, [ProgramDirectory + C_LOCALUPDATER]);
|
||||
ShowMessageFmt(C_UpdaterMissing, [ProgramDirectory + C_LAUUPDATENAME]);
|
||||
if fFireDebugEvent then
|
||||
fOndebugEvent(Self, 'RemoteUpdateToNewVersion',
|
||||
Format(C_UpdaterMissing, [ProgramDirectory + C_LOCALUPDATER]));
|
||||
Format(C_UpdaterMissing, [ProgramDirectory + C_LAUUPDATENAME]));
|
||||
Exit;
|
||||
end;
|
||||
|
||||
@ -1852,8 +1849,8 @@ begin
|
||||
szParams := szParams + ' copytree';
|
||||
if fFireDebugEvent then
|
||||
fOndebugEvent(Self, 'RemoteUpdateToNewVersion',
|
||||
Format('Executing %s', [ProgramDirectory + C_LOCALUPDATER]));
|
||||
RunAsAdmin(fParentForm.Handle, ProgramDirectory + C_LOCALUPDATER, szParams);
|
||||
Format('Executing %s', [ProgramDirectory + C_LAUUPDATENAME]));
|
||||
RunAsAdmin(fParentForm.Handle, ProgramDirectory + C_LAUUPDATENAME, szParams);
|
||||
|
||||
// Check for C_WhatsNewFilename in the app directory in a LOOP
|
||||
if fFireDebugEvent then
|
||||
@ -1870,7 +1867,7 @@ begin
|
||||
|
||||
// Update and re-start the app
|
||||
FUpdateHMProcess := TAsyncProcess.Create(nil);
|
||||
FUpdateHMProcess.Executable := ProgramDirectory + C_LOCALUPDATER;
|
||||
FUpdateHMProcess.Executable := ProgramDirectory + C_LAUUPDATENAME;
|
||||
FUpdateHMProcess.CurrentDirectory := ProgramDirectory;
|
||||
if not fSilentMode then
|
||||
FUpdateHMProcess.ConsoleTitle :=
|
||||
@ -1885,7 +1882,7 @@ begin
|
||||
// Param 5 = Copy the whole of /updates to the App Folder
|
||||
if fFireDebugEvent then
|
||||
fOndebugEvent(Self, 'RemoteUpdateToNewVersion',
|
||||
Format('Executing %s', [ProgramDirectory + C_LOCALUPDATER]));
|
||||
Format('Executing %s', [ProgramDirectory + C_LAUUPDATENAME]));
|
||||
|
||||
try
|
||||
FUpdateHMProcess.Execute;
|
||||
@ -1926,8 +1923,8 @@ end;
|
||||
|
||||
|
||||
function TLazAutoUpdate.UpdateToNewVersion: boolean;
|
||||
// Shells to updater console
|
||||
// Requires admin user in Win 10
|
||||
// Shells to updater console
|
||||
// Requires admin user in Win 10
|
||||
{$IFDEF WINDOWS}
|
||||
function RunAsAdmin(const Handle: THandle; const Path, Params: string): boolean;
|
||||
var
|
||||
@ -1972,19 +1969,19 @@ begin
|
||||
if not AppIsRunning(ExtractFileName(fAppFilename)) then
|
||||
begin
|
||||
if fFireDebugEvent then
|
||||
fOndebugEvent(Self, 'UpdateToNewVersion','Doing SilentUpdate');
|
||||
fOndebugEvent(Self, 'UpdateToNewVersion', 'Doing SilentUpdate');
|
||||
Result := DoSilentUpdate;
|
||||
end
|
||||
else
|
||||
begin
|
||||
cCount := 0;
|
||||
if not FileExistsUTF8(szAppDir + C_UPDATER) then
|
||||
if not FileExistsUTF8(szAppDir + C_UPDATEHMNAME) then
|
||||
begin
|
||||
if fShowDialogs then
|
||||
ShowMessageFmt(C_UpdaterMissing, [szAppDir + C_UPDATER]);
|
||||
ShowMessageFmt(C_UpdaterMissing, [szAppDir + C_UPDATEHMNAME]);
|
||||
if fFireDebugEvent then
|
||||
fOndebugEvent(Self, 'UpdateToNewVersion',
|
||||
Format(C_UpdaterMissing, [szAppDir + C_UPDATER]));
|
||||
Format(C_UpdaterMissing, [szAppDir + C_UPDATEHMNAME]));
|
||||
Exit;
|
||||
end;
|
||||
|
||||
@ -2016,16 +2013,16 @@ begin
|
||||
if (fCopyTree = True) then
|
||||
szParams := szParams + ' copytree';
|
||||
fOndebugEvent(Self, 'UpdateToNewVersion',
|
||||
Format('Executing %s', [szAppDir + C_UPDATER]));
|
||||
if RunAsAdmin(fParentForm.Handle, szAppDir + C_UPDATER, szParams) then
|
||||
Format('Executing %s', [szAppDir + C_UPDATEHMNAME]));
|
||||
if RunAsAdmin(fParentForm.Handle, szAppDir + C_UPDATEHMNAME, szParams) then
|
||||
begin
|
||||
if fFireDebugEvent then
|
||||
fOndebugEvent(Self, 'UpdateToNewVersion','RunAsAdmin succeeded');
|
||||
fOndebugEvent(Self, 'UpdateToNewVersion', 'RunAsAdmin succeeded');
|
||||
end
|
||||
else
|
||||
begin
|
||||
if fFireDebugEvent then
|
||||
fOndebugEvent(Self, 'UpdateToNewVersion','RunAsAdmin failed');
|
||||
fOndebugEvent(Self, 'UpdateToNewVersion', 'RunAsAdmin failed');
|
||||
end;
|
||||
|
||||
// Check for C_WhatsNewFilename in the app directory in a LOOP
|
||||
@ -2043,8 +2040,8 @@ begin
|
||||
// Update and re-start the app
|
||||
FUpdateHMProcess := TAsyncProcess.Create(nil);
|
||||
try
|
||||
// FUpdateHMProcess.Executable := AppendPathDelim(GetAppConfigDir(false)) + C_Updater;
|
||||
FUpdateHMProcess.Executable := szAppDir + C_UPDATER;
|
||||
// FUpdateHMProcess.Executable := AppendPathDelim(GetAppConfigDir(false)) + C_UPDATEHMNAME;
|
||||
FUpdateHMProcess.Executable := szAppDir + C_UPDATEHMNAME;
|
||||
// FUpdateHMProcess.CurrentDirectory := AppendPathDelim(GetAppConfigDir(false));
|
||||
FUpdateHMProcess.CurrentDirectory := szAppDir;
|
||||
if not fSilentMode then
|
||||
@ -2060,7 +2057,7 @@ begin
|
||||
// Param 5 = Copy the whole of /updates to the App Folder
|
||||
if fFireDebugEvent then
|
||||
fOndebugEvent(Self, 'UpdateToNewVersion',
|
||||
Format('Executing %s', [szAppDir + C_UPDATER]));
|
||||
Format('Executing %s', [szAppDir + C_UPDATEHMNAME]));
|
||||
try
|
||||
FUpdateHMProcess.Execute;
|
||||
except
|
||||
@ -2102,7 +2099,7 @@ end;
|
||||
|
||||
function TLazAutoUpdate.AddToUpdateList(APrettyName, APath, AVersionString: string;
|
||||
AVersionNumber: cardinal): integer;
|
||||
// Unused
|
||||
// Unused
|
||||
var
|
||||
iLast: integer;
|
||||
TheRec: UpdateListRecord;
|
||||
@ -2331,7 +2328,7 @@ begin
|
||||
HTTPClient.Get(URL, TargetFile);
|
||||
ReturnCode := HTTPClient.ResponseStatusCode;
|
||||
DownloadSize := Filesize(TargetFile);
|
||||
Result:=True;
|
||||
Result := True;
|
||||
except
|
||||
// We don't care for the reason for this error; the download failed.
|
||||
Result := False;
|
||||
|
Binary file not shown.
@ -6,10 +6,10 @@
|
||||
},
|
||||
"UpdatePackageFiles" : [
|
||||
{
|
||||
"ForceNotify" : true,
|
||||
"ForceNotify" : false,
|
||||
"InternalVersion" : 1,
|
||||
"Name" : "lazupdate.lpk",
|
||||
"Version" : "0.2.6.0"
|
||||
"Version" : "0.2.8.0"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
Reference in New Issue
Block a user