To V0.3.1.0 Linux function added to set permissions
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@5705 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
parent
36f10fdc76
commit
b9665d9b0e
@ -31,7 +31,9 @@
|
||||
<Description Value="Laz AutoUpdater
|
||||
A component for SourceForge and GitHub Project Developers and end-users to update their apps easily.
|
||||
Drop onto a form, set a few properties and call the Method 'AutoUpdate' - as easy as pie!
|
||||
Fully configurable.
|
||||
Fully configurable.
|
||||
Included in the source tree is Update Pack - an app that makes update maintenance simple and efficient. Also TrayUpdater - a systray app that scedules updates automatically.
|
||||
Compiles and runs in Windows and Linux.
|
||||
More information in the Wiki Home Page http://wiki.freepascal.org/LazAutoUpdater"/>
|
||||
<License Value=" Modified GPL
|
||||
Copyright (C)2014 minesadorada@charcodelvalle.com
|
||||
@ -60,7 +62,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="3"/>
|
||||
<Version Minor="3" Release="1"/>
|
||||
<Files Count="6">
|
||||
<Item1>
|
||||
<Filename Value="ulazautoupdate.pas"/>
|
||||
|
@ -3,14 +3,14 @@
|
||||
<ProjectSession>
|
||||
<PathDelim Value="\"/>
|
||||
<Version Value="10"/>
|
||||
<BuildModes Active="Linux64"/>
|
||||
<BuildModes Active="Win64"/>
|
||||
<Units Count="22">
|
||||
<Unit0>
|
||||
<Filename Value="testapp.lpr"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
<EditorIndex Value="2"/>
|
||||
<CursorPos X="25" Y="28"/>
|
||||
<UsageCount Value="56"/>
|
||||
<UsageCount Value="57"/>
|
||||
<Loaded Value="True"/>
|
||||
</Unit0>
|
||||
<Unit1>
|
||||
@ -19,10 +19,9 @@
|
||||
<ComponentName Value="mainform"/>
|
||||
<HasResources Value="True"/>
|
||||
<ResourceBaseClass Value="Form"/>
|
||||
<IsVisibleTab Value="True"/>
|
||||
<TopLine Value="8"/>
|
||||
<CursorPos X="55" Y="40"/>
|
||||
<UsageCount Value="56"/>
|
||||
<UsageCount Value="57"/>
|
||||
<Loaded Value="True"/>
|
||||
<LoadedDesigner Value="True"/>
|
||||
</Unit1>
|
||||
@ -33,7 +32,7 @@
|
||||
<WindowIndex Value="1"/>
|
||||
<TopLine Value="31"/>
|
||||
<CursorPos X="48" Y="14"/>
|
||||
<UsageCount Value="39"/>
|
||||
<UsageCount Value="40"/>
|
||||
</Unit2>
|
||||
<Unit3>
|
||||
<Filename Value="..\lazautoupdate_httpclient.pas"/>
|
||||
@ -44,14 +43,15 @@
|
||||
<Unit4>
|
||||
<Filename Value="..\ulazautoupdate.pas"/>
|
||||
<IsVisibleTab Value="True"/>
|
||||
<WindowIndex Value="1"/>
|
||||
<TopLine Value="221"/>
|
||||
<CursorPos X="50" Y="241"/>
|
||||
<EditorIndex Value="1"/>
|
||||
<TopLine Value="117"/>
|
||||
<CursorPos X="12" Y="140"/>
|
||||
<ExtraEditorCount Value="2"/>
|
||||
<ExtraEditor1>
|
||||
<EditorIndex Value="1"/>
|
||||
<TopLine Value="2024"/>
|
||||
<CursorPos X="66" Y="2039"/>
|
||||
<IsVisibleTab Value="True"/>
|
||||
<WindowIndex Value="1"/>
|
||||
<TopLine Value="222"/>
|
||||
<CursorPos X="50" Y="242"/>
|
||||
</ExtraEditor1>
|
||||
<ExtraEditor2>
|
||||
<EditorIndex Value="-1"/>
|
||||
@ -191,123 +191,123 @@
|
||||
<JumpHistory Count="30" HistoryIndex="29">
|
||||
<Position1>
|
||||
<Filename Value="..\ulazautoupdate.pas"/>
|
||||
<Caret Line="592" Column="3" TopLine="567"/>
|
||||
<Caret Line="2267" TopLine="2247"/>
|
||||
</Position1>
|
||||
<Position2>
|
||||
<Filename Value="..\ulazautoupdate.pas"/>
|
||||
<Caret Line="982" TopLine="966"/>
|
||||
<Caret Line="2286" Column="17" TopLine="2247"/>
|
||||
</Position2>
|
||||
<Position3>
|
||||
<Filename Value="..\ulazautoupdate.pas"/>
|
||||
<Caret Line="1745" Column="17" TopLine="1720"/>
|
||||
<Caret Line="2270" TopLine="2246"/>
|
||||
</Position3>
|
||||
<Position4>
|
||||
<Filename Value="..\ulazautoupdate.pas"/>
|
||||
<Caret Line="1898" Column="17" TopLine="1873"/>
|
||||
<Caret Line="2273" Column="17" TopLine="2246"/>
|
||||
</Position4>
|
||||
<Position5>
|
||||
<Filename Value="..\ulazautoupdate.pas"/>
|
||||
<Caret Line="2267" TopLine="2247"/>
|
||||
<Caret Line="2269" TopLine="2244"/>
|
||||
</Position5>
|
||||
<Position6>
|
||||
<Filename Value="..\ulazautoupdate.pas"/>
|
||||
<Caret Line="2286" Column="17" TopLine="2247"/>
|
||||
<Caret Line="592" Column="3" TopLine="567"/>
|
||||
</Position6>
|
||||
<Position7>
|
||||
<Filename Value="..\ulazautoupdate.pas"/>
|
||||
<Caret Line="2270" TopLine="2246"/>
|
||||
<Filename Value="umainform.pas"/>
|
||||
<Caret Line="99" Column="38" TopLine="64"/>
|
||||
</Position7>
|
||||
<Position8>
|
||||
<Filename Value="..\ulazautoupdate.pas"/>
|
||||
<Caret Line="2273" Column="17" TopLine="2246"/>
|
||||
<Filename Value="umainform.pas"/>
|
||||
<Caret Line="127" Column="28" TopLine="123"/>
|
||||
</Position8>
|
||||
<Position9>
|
||||
<Filename Value="..\ulazautoupdate.pas"/>
|
||||
<Caret Line="2269" TopLine="2244"/>
|
||||
<Caret Line="472" Column="22" TopLine="446"/>
|
||||
</Position9>
|
||||
<Position10>
|
||||
<Filename Value="..\ulazautoupdate.pas"/>
|
||||
<Caret Line="592" Column="3" TopLine="567"/>
|
||||
<Caret Line="1094" Column="27" TopLine="1082"/>
|
||||
</Position10>
|
||||
<Position11>
|
||||
<Filename Value="umainform.pas"/>
|
||||
<Caret Line="99" Column="38" TopLine="64"/>
|
||||
<Filename Value="..\ulazautoupdate.pas"/>
|
||||
<Caret Line="1117" Column="23" TopLine="1082"/>
|
||||
</Position11>
|
||||
<Position12>
|
||||
<Filename Value="umainform.pas"/>
|
||||
<Caret Line="127" Column="28" TopLine="123"/>
|
||||
<Filename Value="..\ulazautoupdate.pas"/>
|
||||
<Caret Line="1120" Column="35" TopLine="1082"/>
|
||||
</Position12>
|
||||
<Position13>
|
||||
<Filename Value="..\ulazautoupdate.pas"/>
|
||||
<Caret Line="472" Column="22" TopLine="446"/>
|
||||
<Caret Line="1123" Column="35" TopLine="1082"/>
|
||||
</Position13>
|
||||
<Position14>
|
||||
<Filename Value="..\ulazautoupdate.pas"/>
|
||||
<Caret Line="1094" Column="27" TopLine="1082"/>
|
||||
<Caret Line="1316" Column="25" TopLine="1298"/>
|
||||
</Position14>
|
||||
<Position15>
|
||||
<Filename Value="..\ulazautoupdate.pas"/>
|
||||
<Caret Line="1117" Column="23" TopLine="1082"/>
|
||||
<Caret Line="1324" Column="23" TopLine="1298"/>
|
||||
</Position15>
|
||||
<Position16>
|
||||
<Filename Value="..\ulazautoupdate.pas"/>
|
||||
<Caret Line="1120" Column="35" TopLine="1082"/>
|
||||
<Caret Line="1358" Column="73" TopLine="1264"/>
|
||||
</Position16>
|
||||
<Position17>
|
||||
<Filename Value="..\ulazautoupdate.pas"/>
|
||||
<Caret Line="1123" Column="35" TopLine="1082"/>
|
||||
<Caret Line="2187" Column="58" TopLine="2140"/>
|
||||
</Position17>
|
||||
<Position18>
|
||||
<Filename Value="..\ulazautoupdate.pas"/>
|
||||
<Caret Line="1316" Column="25" TopLine="1298"/>
|
||||
<Caret Line="2216" Column="15" TopLine="2169"/>
|
||||
</Position18>
|
||||
<Position19>
|
||||
<Filename Value="..\ulazautoupdate.pas"/>
|
||||
<Caret Line="1324" Column="23" TopLine="1298"/>
|
||||
<Caret Line="2231" Column="46" TopLine="2205"/>
|
||||
</Position19>
|
||||
<Position20>
|
||||
<Filename Value="..\ulazautoupdate.pas"/>
|
||||
<Caret Line="1358" Column="73" TopLine="1264"/>
|
||||
</Position20>
|
||||
<Position21>
|
||||
<Filename Value="..\ulazautoupdate.pas"/>
|
||||
<Caret Line="2187" Column="58" TopLine="2140"/>
|
||||
</Position21>
|
||||
<Position22>
|
||||
<Filename Value="..\ulazautoupdate.pas"/>
|
||||
<Caret Line="2216" Column="15" TopLine="2169"/>
|
||||
</Position22>
|
||||
<Position23>
|
||||
<Filename Value="..\ulazautoupdate.pas"/>
|
||||
<Caret Line="2231" Column="46" TopLine="2205"/>
|
||||
</Position23>
|
||||
<Position24>
|
||||
<Filename Value="umainform.pas"/>
|
||||
<Caret Line="133" TopLine="113"/>
|
||||
</Position24>
|
||||
<Position25>
|
||||
</Position20>
|
||||
<Position21>
|
||||
<Filename Value="umainform.pas"/>
|
||||
<Caret Line="19" Column="43" TopLine="7"/>
|
||||
</Position25>
|
||||
<Position26>
|
||||
</Position21>
|
||||
<Position22>
|
||||
<Filename Value="umainform.pas"/>
|
||||
<Caret Line="153" TopLine="123"/>
|
||||
</Position26>
|
||||
<Position27>
|
||||
</Position22>
|
||||
<Position23>
|
||||
<Filename Value="umainform.pas"/>
|
||||
<Caret Line="165" TopLine="124"/>
|
||||
</Position23>
|
||||
<Position24>
|
||||
<Filename Value="..\ulazautoupdate.pas"/>
|
||||
<Caret Line="209" Column="24" TopLine="184"/>
|
||||
</Position24>
|
||||
<Position25>
|
||||
<Filename Value="..\ulazautoupdate.pas"/>
|
||||
<Caret Line="193" Column="17" TopLine="184"/>
|
||||
</Position25>
|
||||
<Position26>
|
||||
<Filename Value="..\ulazautoupdate.pas"/>
|
||||
<Caret Line="1929" Column="33" TopLine="1904"/>
|
||||
</Position26>
|
||||
<Position27>
|
||||
<Filename Value="..\ulazautoupdate.pas"/>
|
||||
<Caret Line="2016" Column="108" TopLine="1984"/>
|
||||
</Position27>
|
||||
<Position28>
|
||||
<Filename Value="..\ulazautoupdate.pas"/>
|
||||
<Caret Line="209" Column="24" TopLine="184"/>
|
||||
<Caret Line="63" Column="65" TopLine="48"/>
|
||||
</Position28>
|
||||
<Position29>
|
||||
<Filename Value="..\ulazautoupdate.pas"/>
|
||||
<Caret Line="193" Column="17" TopLine="184"/>
|
||||
<Caret Line="2019" Column="6" TopLine="1987"/>
|
||||
</Position29>
|
||||
<Position30>
|
||||
<Filename Value="..\ulazautoupdate.pas"/>
|
||||
<Caret Line="1929" Column="33" TopLine="1904"/>
|
||||
<Caret Line="1998" Column="5" TopLine="1987"/>
|
||||
</Position30>
|
||||
</JumpHistory>
|
||||
</ProjectSession>
|
||||
|
@ -1,7 +1,7 @@
|
||||
object mainform: Tmainform
|
||||
Left = 771
|
||||
Left = 509
|
||||
Height = 209
|
||||
Top = 224
|
||||
Top = 326
|
||||
Width = 335
|
||||
BorderIcons = [biSystemMenu]
|
||||
Caption = 'mainform'
|
||||
|
@ -3,7 +3,7 @@
|
||||
<ProjectSession>
|
||||
<PathDelim Value="\"/>
|
||||
<Version Value="10"/>
|
||||
<BuildModes Active="Win64 Release"/>
|
||||
<BuildModes Active="Linux64 Release"/>
|
||||
<Units Count="30">
|
||||
<Unit0>
|
||||
<Filename Value="trayupdater.lpr"/>
|
||||
@ -12,7 +12,7 @@
|
||||
<WindowIndex Value="1"/>
|
||||
<TopLine Value="21"/>
|
||||
<CursorPos X="54" Y="44"/>
|
||||
<UsageCount Value="182"/>
|
||||
<UsageCount Value="183"/>
|
||||
<Loaded Value="True"/>
|
||||
</Unit0>
|
||||
<Unit1>
|
||||
@ -21,17 +21,16 @@
|
||||
<ComponentName Value="mainform"/>
|
||||
<HasResources Value="True"/>
|
||||
<ResourceBaseClass Value="Form"/>
|
||||
<IsVisibleTab Value="True"/>
|
||||
<WindowIndex Value="1"/>
|
||||
<CursorPos Y="23"/>
|
||||
<ExtraEditorCount Value="1"/>
|
||||
<ExtraEditor1>
|
||||
<IsVisibleTab Value="True"/>
|
||||
<TopLine Value="92"/>
|
||||
<CursorPos X="52" Y="119"/>
|
||||
<CursorPos X="46" Y="100"/>
|
||||
</ExtraEditor1>
|
||||
<ComponentState Value="1"/>
|
||||
<UsageCount Value="182"/>
|
||||
<UsageCount Value="183"/>
|
||||
<Bookmarks Count="1">
|
||||
<Item0 X="3" Y="481" ID="2"/>
|
||||
</Bookmarks>
|
||||
@ -44,10 +43,12 @@
|
||||
<ComponentName Value="configform"/>
|
||||
<HasResources Value="True"/>
|
||||
<ResourceBaseClass Value="Form"/>
|
||||
<IsVisibleTab Value="True"/>
|
||||
<EditorIndex Value="3"/>
|
||||
<WindowIndex Value="1"/>
|
||||
<CursorPos X="2" Y="22"/>
|
||||
<UsageCount Value="178"/>
|
||||
<TopLine Value="203"/>
|
||||
<CursorPos X="3" Y="212"/>
|
||||
<UsageCount Value="179"/>
|
||||
<Loaded Value="True"/>
|
||||
<LoadedDesigner Value="True"/>
|
||||
</Unit2>
|
||||
@ -232,7 +233,7 @@
|
||||
<WindowIndex Value="1"/>
|
||||
<TopLine Value="143"/>
|
||||
<CursorPos X="91" Y="180"/>
|
||||
<UsageCount Value="12"/>
|
||||
<UsageCount Value="13"/>
|
||||
<Loaded Value="True"/>
|
||||
</Unit27>
|
||||
<Unit28>
|
||||
@ -261,123 +262,123 @@
|
||||
<JumpHistory Count="30" HistoryIndex="29">
|
||||
<Position1>
|
||||
<Filename Value="..\ulazautoupdate.pas"/>
|
||||
<Caret Column="17"/>
|
||||
<Caret Line="852" Column="20" TopLine="814"/>
|
||||
</Position1>
|
||||
<Position2>
|
||||
<Filename Value="..\ulazautoupdate.pas"/>
|
||||
<Caret Line="852" Column="20" TopLine="814"/>
|
||||
<Caret Line="932" Column="16" TopLine="894"/>
|
||||
</Position2>
|
||||
<Position3>
|
||||
<Filename Value="..\ulazautoupdate.pas"/>
|
||||
<Caret Line="932" Column="16" TopLine="894"/>
|
||||
<Caret Line="1120" Column="18" TopLine="1083"/>
|
||||
</Position3>
|
||||
<Position4>
|
||||
<Filename Value="..\ulazautoupdate.pas"/>
|
||||
<Caret Line="1120" Column="18" TopLine="1083"/>
|
||||
<Caret Line="1327" Column="18" TopLine="1290"/>
|
||||
</Position4>
|
||||
<Position5>
|
||||
<Filename Value="..\ulazautoupdate.pas"/>
|
||||
<Caret Line="1327" Column="18" TopLine="1290"/>
|
||||
<Caret Line="1460" Column="16" TopLine="1422"/>
|
||||
</Position5>
|
||||
<Position6>
|
||||
<Filename Value="..\ulazautoupdate.pas"/>
|
||||
<Caret Line="1460" Column="16" TopLine="1422"/>
|
||||
<Caret Line="1528" Column="16" TopLine="1490"/>
|
||||
</Position6>
|
||||
<Position7>
|
||||
<Filename Value="..\ulazautoupdate.pas"/>
|
||||
<Caret Line="1528" Column="16" TopLine="1490"/>
|
||||
<Caret Line="1572" Column="20" TopLine="1535"/>
|
||||
</Position7>
|
||||
<Position8>
|
||||
<Filename Value="..\ulazautoupdate.pas"/>
|
||||
<Caret Line="1572" Column="20" TopLine="1535"/>
|
||||
<Caret Line="1611" Column="20" TopLine="1573"/>
|
||||
</Position8>
|
||||
<Position9>
|
||||
<Filename Value="..\ulazautoupdate.pas"/>
|
||||
<Caret Line="1611" Column="20" TopLine="1573"/>
|
||||
<Caret Line="1696" Column="16" TopLine="1659"/>
|
||||
</Position9>
|
||||
<Position10>
|
||||
<Filename Value="..\ulazautoupdate.pas"/>
|
||||
<Caret Line="1696" Column="16" TopLine="1659"/>
|
||||
<Caret Line="1729" Column="20" TopLine="1692"/>
|
||||
</Position10>
|
||||
<Position11>
|
||||
<Filename Value="..\ulazautoupdate.pas"/>
|
||||
<Caret Line="1729" Column="20" TopLine="1692"/>
|
||||
<Caret Line="1820" Column="22" TopLine="1783"/>
|
||||
</Position11>
|
||||
<Position12>
|
||||
<Filename Value="..\ulazautoupdate.pas"/>
|
||||
<Caret Line="1820" Column="22" TopLine="1783"/>
|
||||
<Caret Line="1857" Column="25" TopLine="1820"/>
|
||||
</Position12>
|
||||
<Position13>
|
||||
<Filename Value="..\ulazautoupdate.pas"/>
|
||||
<Caret Line="1857" Column="25" TopLine="1820"/>
|
||||
<Caret Line="1892" Column="27" TopLine="1855"/>
|
||||
</Position13>
|
||||
<Position14>
|
||||
<Filename Value="..\ulazautoupdate.pas"/>
|
||||
<Caret Line="1892" Column="27" TopLine="1855"/>
|
||||
<Caret Line="1976" Column="22" TopLine="1939"/>
|
||||
</Position14>
|
||||
<Position15>
|
||||
<Filename Value="..\ulazautoupdate.pas"/>
|
||||
<Caret Line="1976" Column="22" TopLine="1939"/>
|
||||
<Caret Line="2030" Column="25" TopLine="1993"/>
|
||||
</Position15>
|
||||
<Position16>
|
||||
<Filename Value="..\ulazautoupdate.pas"/>
|
||||
<Caret Line="2030" Column="25" TopLine="1993"/>
|
||||
<Caret Line="2071" Column="27" TopLine="2034"/>
|
||||
</Position16>
|
||||
<Position17>
|
||||
<Filename Value="..\ulazautoupdate.pas"/>
|
||||
<Caret Line="2071" Column="27" TopLine="2034"/>
|
||||
<Filename Value="umainform.pas"/>
|
||||
<Caret Line="407" Column="36" TopLine="386"/>
|
||||
</Position17>
|
||||
<Position18>
|
||||
<Filename Value="umainform.pas"/>
|
||||
<Caret Line="407" Column="36" TopLine="386"/>
|
||||
<Caret Line="496" Column="46" TopLine="468"/>
|
||||
</Position18>
|
||||
<Position19>
|
||||
<Filename Value="umainform.pas"/>
|
||||
<Caret Line="496" Column="46" TopLine="468"/>
|
||||
<Caret Line="497" Column="37" TopLine="468"/>
|
||||
</Position19>
|
||||
<Position20>
|
||||
<Filename Value="umainform.pas"/>
|
||||
<Caret Line="497" Column="37" TopLine="468"/>
|
||||
<Caret Line="502" Column="46" TopLine="468"/>
|
||||
</Position20>
|
||||
<Position21>
|
||||
<Filename Value="umainform.pas"/>
|
||||
<Caret Line="502" Column="46" TopLine="468"/>
|
||||
<Caret Line="73" Column="12" TopLine="50"/>
|
||||
</Position21>
|
||||
<Position22>
|
||||
<Filename Value="umainform.pas"/>
|
||||
<Caret Line="73" Column="12" TopLine="50"/>
|
||||
<Caret Line="563" Column="9" TopLine="540"/>
|
||||
</Position22>
|
||||
<Position23>
|
||||
<Filename Value="umainform.pas"/>
|
||||
<Caret Line="563" Column="9" TopLine="540"/>
|
||||
<Caret Line="572" Column="15" TopLine="540"/>
|
||||
</Position23>
|
||||
<Position24>
|
||||
<Filename Value="umainform.pas"/>
|
||||
<Caret Line="572" Column="15" TopLine="540"/>
|
||||
<Caret Line="735" Column="27" TopLine="715"/>
|
||||
</Position24>
|
||||
<Position25>
|
||||
<Filename Value="umainform.pas"/>
|
||||
<Caret Line="735" Column="27" TopLine="715"/>
|
||||
<Caret Line="77" Column="73" TopLine="50"/>
|
||||
</Position25>
|
||||
<Position26>
|
||||
<Filename Value="umainform.pas"/>
|
||||
<Caret Line="77" Column="73" TopLine="50"/>
|
||||
<Caret Line="746" Column="26" TopLine="715"/>
|
||||
</Position26>
|
||||
<Position27>
|
||||
<Filename Value="umainform.pas"/>
|
||||
<Caret Line="746" Column="26" TopLine="715"/>
|
||||
</Position27>
|
||||
<Position28>
|
||||
<Filename Value="trayupdater.lpr"/>
|
||||
<Caret Line="36" Column="30" TopLine="21"/>
|
||||
</Position28>
|
||||
<Position29>
|
||||
</Position27>
|
||||
<Position28>
|
||||
<Filename Value="umainform.pas"/>
|
||||
<Caret Line="743" Column="48" TopLine="719"/>
|
||||
</Position29>
|
||||
<Position30>
|
||||
</Position28>
|
||||
<Position29>
|
||||
<Filename Value="trayupdater.lpr"/>
|
||||
<Caret Line="10" Column="19" TopLine="3"/>
|
||||
</Position29>
|
||||
<Position30>
|
||||
<Filename Value="uconfigform.pas"/>
|
||||
<Caret Line="11" Column="33"/>
|
||||
</Position30>
|
||||
</JumpHistory>
|
||||
</ProjectSession>
|
||||
|
@ -60,7 +60,7 @@ interface
|
||||
uses
|
||||
Forms, Classes, SysUtils, lazautoupdate_httpclient, strutils,
|
||||
LazUTF8, FileUtil, LazFileUtils, Dialogs, StdCtrls,
|
||||
Buttons, DateUtils, asyncprocess, zipper, LResources,
|
||||
Buttons, DateUtils,{$IFDEF LINUX}process, asyncprocess,{$ENDIF}zipper, LResources,
|
||||
VersionSupport, inifiles, aboutlazautoupdateunit, uappisrunning, LCLProc,
|
||||
fileinfo, open_ssl, winpeimagereader {need this for reading exe info}
|
||||
, elfreader {needed for reading ELF executables}
|
||||
@ -136,7 +136,8 @@ const
|
||||
V0.2.7: Updates Tray Updater routines
|
||||
V0.2.8: Changed constants C_UPDATEHMNAME and C_LAUUPDATENAME
|
||||
V0.2.9: Added CreateLocalLauImportFile in UpdateToNewVersion
|
||||
V0.3.0: ??
|
||||
V0.3.1: Added SetExecutePermission (LINUX only)
|
||||
V0.3.2: ??
|
||||
}
|
||||
C_TLazAutoUpdateComponentVersion = '0.3.0';
|
||||
C_TThreadedDownloadComponentVersion = '0.0.3';
|
||||
@ -169,11 +170,11 @@ const
|
||||
{$ENDIF}
|
||||
C_PFX = C_OS + C_BITNESS; // Used in file naming
|
||||
{$IFDEF WINDOWS}
|
||||
C_UPDATEHMNAME = 'updatehm' + C_PFX + '.exe';
|
||||
C_LAUUPDATENAME = 'lauupdate' + C_PFX + '.exe';
|
||||
C_UPDATEHMNAME = 'updatehm' + C_PFX + '.exe';
|
||||
C_LAUUPDATENAME = 'lauupdate' + C_PFX + '.exe';
|
||||
{$ELSE}
|
||||
C_UPDATEHMNAME = 'updatehm' + C_PFX;
|
||||
C_LAUUPDATENAME = 'lauupdate' + C_PFX;
|
||||
C_UPDATEHMNAME = 'updatehm' + C_PFX;
|
||||
C_LAUUPDATENAME = 'lauupdate' + C_PFX;
|
||||
{$ENDIF}
|
||||
// Windows Constants (unused)
|
||||
C_RUNONCEKEY = 'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce';
|
||||
@ -382,6 +383,10 @@ type
|
||||
property LastCompiled: string read fLastCompiled;
|
||||
property TargetOS: string read fTargetOS;
|
||||
property WindowsAdminCheck: boolean read fWindowsAdminCheck write fWindowsAdminCheck;
|
||||
{$IFDEF LINUX}
|
||||
// Used in UpdateToNewVersion
|
||||
function SetExecutePermission(const AFileName: string; var AErrMsg: string): boolean;
|
||||
{$ENDIF}
|
||||
published
|
||||
// Events
|
||||
property OnNewVersionAvailable: TOnNewVersionAvailable
|
||||
@ -1560,8 +1565,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
|
||||
@ -1902,7 +1907,46 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
{$IFDEF LINUX}
|
||||
function TLazAutoUpdate.SetExecutePermission(const AFileName: string;
|
||||
var AErrMsg: string): boolean;
|
||||
var
|
||||
SL: TStringList;
|
||||
Process: TProcess;
|
||||
begin
|
||||
Result := False;
|
||||
Process := TProcess.Create(nil);
|
||||
try
|
||||
Process.Executable := '/bin/chmod';
|
||||
Process.Parameters.Add('+X');
|
||||
Process.Parameters.Add(AFileName);
|
||||
Process.Options := Process.Options + [poWaitOnExit, poUsePipes];
|
||||
Process.Execute;
|
||||
SL := TStringList.Create;
|
||||
try
|
||||
SL.LoadFromStream(Process.Stderr);
|
||||
AErrMsg := Trim(SL.Text);
|
||||
Result := Trim(AErrMsg) = '';
|
||||
finally
|
||||
SL.Free;
|
||||
end;
|
||||
finally
|
||||
Process.Free;
|
||||
end;
|
||||
end;
|
||||
|
||||
{$ENDIF}
|
||||
{
|
||||
procedure CheckPermissions;
|
||||
var
|
||||
ErrMsg: String;
|
||||
begin
|
||||
if SetExecutePermission('/minesadorada/developer/updates/consoleupdater', ErrMsg) then
|
||||
MessageDlg('Permission successfully set.', mtInformation, [mbOk], 0)
|
||||
else
|
||||
MessageDlg('Cannot set permission. Error message: ' + ErrMsg, mtError, [mbOk], 0);
|
||||
end;
|
||||
}
|
||||
function TLazAutoUpdate.UpdateToNewVersion: boolean;
|
||||
// Shells to updater console
|
||||
// Requires admin user in Win 10
|
||||
@ -1927,6 +1971,9 @@ var
|
||||
cCount: cardinal;
|
||||
szAppDir: string;
|
||||
szParams: string;
|
||||
{$IFDEF LINUX}
|
||||
ErrMsg: string;
|
||||
{$ENDIF}
|
||||
begin
|
||||
Result := False;
|
||||
{$IFDEF WINDOWS}
|
||||
@ -1955,6 +2002,7 @@ begin
|
||||
end
|
||||
else
|
||||
begin
|
||||
// Start Regular update
|
||||
cCount := 0;
|
||||
if not FileExistsUTF8(szAppDir + C_UPDATEHMNAME) then
|
||||
begin
|
||||
@ -1965,6 +2013,20 @@ begin
|
||||
Format(C_UpdaterMissing, [szAppDir + C_UPDATEHMNAME]));
|
||||
Exit;
|
||||
end;
|
||||
{$IFDEF LINUX}
|
||||
if not SetExecutePermission(szAppDir + C_UPDATEHMNAME, ErrMsg) then
|
||||
begin
|
||||
if fFireDebugEvent then
|
||||
fOndebugEvent(Self, 'UpdateToNewVersion',
|
||||
Format('Unable to set permissions for %s because of %s',
|
||||
[szAppDir + fUpdatesFolder, ErrMsg]));
|
||||
if fShowDialogs then
|
||||
ShowMessageFmt('Unable to set permissions for %s because of %s',
|
||||
[szAppDir + fUpdatesFolder, ErrMsg]);
|
||||
Result := False;
|
||||
Exit;
|
||||
end;
|
||||
{$ENDIF}
|
||||
|
||||
if not DirectoryExistsUTF8(szAppDir + fUpdatesFolder) then
|
||||
begin
|
||||
|
Binary file not shown.
@ -9,7 +9,7 @@
|
||||
"ForceNotify" : false,
|
||||
"InternalVersion" : 1,
|
||||
"Name" : "lazupdate.lpk",
|
||||
"Version" : "0.3.0.0"
|
||||
"Version" : "0.3.1.0"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user