You've already forked lazarus-ccr
V0.2.5.0: Cleanup code
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@5669 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@ -8,7 +8,7 @@
|
|||||||
<Unit0>
|
<Unit0>
|
||||||
<Filename Value="testapp.lpr"/>
|
<Filename Value="testapp.lpr"/>
|
||||||
<IsPartOfProject Value="True"/>
|
<IsPartOfProject Value="True"/>
|
||||||
<EditorIndex Value="6"/>
|
<EditorIndex Value="2"/>
|
||||||
<CursorPos X="33" Y="27"/>
|
<CursorPos X="33" Y="27"/>
|
||||||
<UsageCount Value="47"/>
|
<UsageCount Value="47"/>
|
||||||
<Loaded Value="True"/>
|
<Loaded Value="True"/>
|
||||||
@ -37,22 +37,21 @@
|
|||||||
</Unit2>
|
</Unit2>
|
||||||
<Unit3>
|
<Unit3>
|
||||||
<Filename Value="..\lazautoupdate_httpclient.pas"/>
|
<Filename Value="..\lazautoupdate_httpclient.pas"/>
|
||||||
<EditorIndex Value="3"/>
|
<EditorIndex Value="-1"/>
|
||||||
<CursorPos X="97" Y="12"/>
|
<CursorPos X="97" Y="12"/>
|
||||||
<UsageCount Value="22"/>
|
<UsageCount Value="23"/>
|
||||||
<Loaded Value="True"/>
|
|
||||||
</Unit3>
|
</Unit3>
|
||||||
<Unit4>
|
<Unit4>
|
||||||
<Filename Value="..\ulazautoupdate.pas"/>
|
<Filename Value="..\ulazautoupdate.pas"/>
|
||||||
<IsVisibleTab Value="True"/>
|
<IsVisibleTab Value="True"/>
|
||||||
<EditorIndex Value="4"/>
|
<EditorIndex Value="1"/>
|
||||||
<CursorPos X="70" Y="493"/>
|
<CursorPos X="40" Y="10"/>
|
||||||
<ExtraEditorCount Value="2"/>
|
<ExtraEditorCount Value="2"/>
|
||||||
<ExtraEditor1>
|
<ExtraEditor1>
|
||||||
<IsVisibleTab Value="True"/>
|
<IsVisibleTab Value="True"/>
|
||||||
<WindowIndex Value="1"/>
|
<WindowIndex Value="1"/>
|
||||||
<TopLine Value="555"/>
|
<TopLine Value="578"/>
|
||||||
<CursorPos Y="564"/>
|
<CursorPos Y="587"/>
|
||||||
</ExtraEditor1>
|
</ExtraEditor1>
|
||||||
<ExtraEditor2>
|
<ExtraEditor2>
|
||||||
<EditorIndex Value="-1"/>
|
<EditorIndex Value="-1"/>
|
||||||
@ -60,7 +59,7 @@
|
|||||||
<TopLine Value="-1"/>
|
<TopLine Value="-1"/>
|
||||||
<CursorPos X="-1" Y="-1"/>
|
<CursorPos X="-1" Y="-1"/>
|
||||||
</ExtraEditor2>
|
</ExtraEditor2>
|
||||||
<UsageCount Value="22"/>
|
<UsageCount Value="23"/>
|
||||||
<Loaded Value="True"/>
|
<Loaded Value="True"/>
|
||||||
</Unit4>
|
</Unit4>
|
||||||
<Unit5>
|
<Unit5>
|
||||||
@ -101,11 +100,10 @@
|
|||||||
</Unit9>
|
</Unit9>
|
||||||
<Unit10>
|
<Unit10>
|
||||||
<Filename Value="..\..\..\..\applications\foobot\monitor\umainform.pas"/>
|
<Filename Value="..\..\..\..\applications\foobot\monitor\umainform.pas"/>
|
||||||
<EditorIndex Value="2"/>
|
<EditorIndex Value="-1"/>
|
||||||
<TopLine Value="25"/>
|
<TopLine Value="25"/>
|
||||||
<CursorPos X="25" Y="55"/>
|
<CursorPos X="22" Y="36"/>
|
||||||
<UsageCount Value="20"/>
|
<UsageCount Value="21"/>
|
||||||
<Loaded Value="True"/>
|
|
||||||
</Unit10>
|
</Unit10>
|
||||||
<Unit11>
|
<Unit11>
|
||||||
<Filename Value="C:\trunklatest\fpc\rtl\objpas\sysutils\osutilsh.inc"/>
|
<Filename Value="C:\trunklatest\fpc\rtl\objpas\sysutils\osutilsh.inc"/>
|
||||||
@ -116,11 +114,10 @@
|
|||||||
<Unit12>
|
<Unit12>
|
||||||
<Filename Value="..\versionsupport.pas"/>
|
<Filename Value="..\versionsupport.pas"/>
|
||||||
<UnitName Value="VersionSupport"/>
|
<UnitName Value="VersionSupport"/>
|
||||||
<EditorIndex Value="5"/>
|
<EditorIndex Value="-1"/>
|
||||||
<TopLine Value="25"/>
|
<TopLine Value="4"/>
|
||||||
<CursorPos X="71" Y="44"/>
|
<CursorPos X="8" Y="31"/>
|
||||||
<UsageCount Value="17"/>
|
<UsageCount Value="18"/>
|
||||||
<Loaded Value="True"/>
|
|
||||||
</Unit12>
|
</Unit12>
|
||||||
<Unit13>
|
<Unit13>
|
||||||
<Filename Value="C:\laztrunk\fpc\examples\httpd22\minimain.pas"/>
|
<Filename Value="C:\laztrunk\fpc\examples\httpd22\minimain.pas"/>
|
||||||
@ -149,17 +146,16 @@
|
|||||||
<WindowIndex Value="1"/>
|
<WindowIndex Value="1"/>
|
||||||
<TopLine Value="35"/>
|
<TopLine Value="35"/>
|
||||||
<CursorPos X="40" Y="51"/>
|
<CursorPos X="40" Y="51"/>
|
||||||
<UsageCount Value="12"/>
|
<UsageCount Value="13"/>
|
||||||
<Loaded Value="True"/>
|
<Loaded Value="True"/>
|
||||||
</Unit16>
|
</Unit16>
|
||||||
<Unit17>
|
<Unit17>
|
||||||
<Filename Value="C:\NewPascal\projects\snippets\usefulunits\uuser.pas"/>
|
<Filename Value="C:\NewPascal\projects\snippets\usefulunits\uuser.pas"/>
|
||||||
<UnitName Value="uUser"/>
|
<UnitName Value="uUser"/>
|
||||||
<EditorIndex Value="1"/>
|
<EditorIndex Value="-1"/>
|
||||||
<TopLine Value="6"/>
|
<TopLine Value="24"/>
|
||||||
<CursorPos X="33" Y="16"/>
|
<CursorPos Y="33"/>
|
||||||
<UsageCount Value="11"/>
|
<UsageCount Value="12"/>
|
||||||
<Loaded Value="True"/>
|
|
||||||
</Unit17>
|
</Unit17>
|
||||||
</Units>
|
</Units>
|
||||||
<JumpHistory Count="30" HistoryIndex="29">
|
<JumpHistory Count="30" HistoryIndex="29">
|
||||||
|
@ -1,8 +1,11 @@
|
|||||||
unit ulazautoupdate;
|
unit ulazautoupdate;
|
||||||
|
|
||||||
{
|
{
|
||||||
|
LazAutoUpdate (c)2015 Gordon Bamber (minesadorada@charcodelvalle.com)
|
||||||
|
|
||||||
VersionSupport: Mike Thompson - mike.cornflake@gmail.com
|
VersionSupport: Mike Thompson - mike.cornflake@gmail.com
|
||||||
Added to and modified by minesadorada@charcodelvalle.com
|
Added to and modified by minesadorada@charcodelvalle.com
|
||||||
|
Windows admin function: Vincent at freepascal forum
|
||||||
|
|
||||||
This library is free software; you can redistribute it and/or modify it
|
This library is free software; you can redistribute it and/or modify it
|
||||||
under the terms of the GNU Library General Public License as published by
|
under the terms of the GNU Library General Public License as published by
|
||||||
@ -55,7 +58,7 @@ const
|
|||||||
C_GITHUBFILE_URL_UPDATES = 'https://raw.github.com/%s/%s/%s/%s/%s';
|
C_GITHUBFILE_URL_UPDATES = 'https://raw.github.com/%s/%s/%s/%s/%s';
|
||||||
// https://raw.github.com/<username>/<repo>/<branch>/some_directory/file
|
// https://raw.github.com/<username>/<repo>/<branch>/some_directory/file
|
||||||
|
|
||||||
C_TLazAutoUpdateComponentVersion = '0.2.3';
|
C_TLazAutoUpdateComponentVersion = '0.2.5';
|
||||||
C_LAUTRayINI = 'lauimport.ini';
|
C_LAUTRayINI = 'lauimport.ini';
|
||||||
|
|
||||||
{
|
{
|
||||||
@ -108,6 +111,8 @@ const
|
|||||||
V0.1.26:Updated uses clause for FileUtils.
|
V0.1.26:Updated uses clause for FileUtils.
|
||||||
V0.2.0: Rewritten for 2017
|
V0.2.0: Rewritten for 2017
|
||||||
V0.2.4: GitHub integration with branches
|
V0.2.4: GitHub integration with branches
|
||||||
|
V0.2.5: IsWindowsAdministrator check added and property to control it
|
||||||
|
V0.2.6:
|
||||||
}
|
}
|
||||||
C_TThreadedDownloadComponentVersion = '0.0.3';
|
C_TThreadedDownloadComponentVersion = '0.0.3';
|
||||||
{
|
{
|
||||||
@ -117,6 +122,8 @@ const
|
|||||||
}
|
}
|
||||||
C_OnlineVersionsININame = 'versions.ini'; // User can change
|
C_OnlineVersionsININame = 'versions.ini'; // User can change
|
||||||
C_UpdatesFolder = 'updates'; // User can change
|
C_UpdatesFolder = 'updates'; // User can change
|
||||||
|
|
||||||
|
// Don't change these without some thought..
|
||||||
C_WhatsNewFilename = 'whatsnew.txt';
|
C_WhatsNewFilename = 'whatsnew.txt';
|
||||||
C_INISection = 'versions';
|
C_INISection = 'versions';
|
||||||
C_GUIEntry = 'GUI';
|
C_GUIEntry = 'GUI';
|
||||||
@ -128,6 +135,8 @@ const
|
|||||||
{$IFDEF CPU64}C_UPDATER = 'updatehmwin64.exe';
|
{$IFDEF CPU64}C_UPDATER = 'updatehmwin64.exe';
|
||||||
C_LOCALUPDATER = 'lauupdatewin64.exe';{$ENDIF}
|
C_LOCALUPDATER = 'lauupdatewin64.exe';{$ENDIF}
|
||||||
// Windows Constants
|
// Windows Constants
|
||||||
|
C_RUNONCEKEY = 'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce';
|
||||||
|
C_RUNKEY = 'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run';
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
{$IFDEF LINUX}
|
{$IFDEF LINUX}
|
||||||
{$IFDEF CPU32}C_UPDATER = 'updatehmlinux32';
|
{$IFDEF CPU32}C_UPDATER = 'updatehmlinux32';
|
||||||
@ -493,6 +502,20 @@ begin
|
|||||||
MessageDlg(rsApplicationU, sMessage, mtInformation, [MBOK], 0);
|
MessageDlg(rsApplicationU, sMessage, mtInformation, [MBOK], 0);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
function IsXP: boolean;
|
||||||
|
var
|
||||||
|
osVinfo: TOSVERSIONINFO;
|
||||||
|
begin
|
||||||
|
ZeroMemory(@osVinfo, SizeOf(osVinfo));
|
||||||
|
OsVinfo.dwOSVersionInfoSize := SizeOf(TOSVERSIONINFO);
|
||||||
|
if ((GetVersionEx(osVInfo) = True) and (osVinfo.dwPlatformId =
|
||||||
|
VER_PLATFORM_WIN32_NT) and (osVinfo.dwMajorVersion = 5) and
|
||||||
|
(osVinfo.dwMinorVersion = 1)) then
|
||||||
|
Result := True
|
||||||
|
else
|
||||||
|
Result := False;
|
||||||
|
end;
|
||||||
|
|
||||||
function IsWindowsAdmin: Boolean;
|
function IsWindowsAdmin: Boolean;
|
||||||
const
|
const
|
||||||
SECURITY_NT_AUTHORITY: TSIDIdentifierAuthority =
|
SECURITY_NT_AUTHORITY: TSIDIdentifierAuthority =
|
||||||
|
Reference in New Issue
Block a user