You've already forked lazarus-ccr
LazAutoUpdate to 0.3.9
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@6801 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@ -29,6 +29,7 @@
|
|||||||
</Linking>
|
</Linking>
|
||||||
<Other>
|
<Other>
|
||||||
<CustomOptions Value="$(IDEBuildOptions)
|
<CustomOptions Value="$(IDEBuildOptions)
|
||||||
|
-dUseCThreads
|
||||||
-FcUTF8"/>
|
-FcUTF8"/>
|
||||||
</Other>
|
</Other>
|
||||||
</CompilerOptions>
|
</CompilerOptions>
|
||||||
@ -66,7 +67,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,
|
along with this library; if not, write to the Free Software Foundation,
|
||||||
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
"/>
|
"/>
|
||||||
<Version Minor="3" Release="8"/>
|
<Version Minor="3" Release="9"/>
|
||||||
<Files Count="7">
|
<Files Count="7">
|
||||||
<Item1>
|
<Item1>
|
||||||
<Filename Value="ulazautoupdate.pas"/>
|
<Filename Value="ulazautoupdate.pas"/>
|
||||||
|
@ -40,7 +40,9 @@ msgid "Download failed with error code "
|
|||||||
msgstr "Download failed with error code "
|
msgstr "Download failed with error code "
|
||||||
|
|
||||||
#: ulazautoupdate.c_downloading
|
#: ulazautoupdate.c_downloading
|
||||||
msgid "Please wait. Downloading new version... "
|
#, fuzzy
|
||||||
|
#| msgid "Please wait. Contacting server.. "
|
||||||
|
msgid "Please wait. Downloading.. "
|
||||||
msgstr "Please wait. Downloading new version... "
|
msgstr "Please wait. Downloading new version... "
|
||||||
|
|
||||||
#: ulazautoupdate.c_downloadisempty
|
#: ulazautoupdate.c_downloadisempty
|
||||||
|
@ -40,7 +40,9 @@ msgid "Download failed with error code "
|
|||||||
msgstr "Descargar con el código de error"
|
msgstr "Descargar con el código de error"
|
||||||
|
|
||||||
#: ulazautoupdate.c_downloading
|
#: ulazautoupdate.c_downloading
|
||||||
msgid "Please wait. Downloading new version... "
|
#, fuzzy
|
||||||
|
#| msgid "Please wait. Contacting server.. "
|
||||||
|
msgid "Please wait. Downloading.. "
|
||||||
msgstr "Espera. Descarga la nueva versión..."
|
msgstr "Espera. Descarga la nueva versión..."
|
||||||
|
|
||||||
#: ulazautoupdate.c_downloadisempty
|
#: ulazautoupdate.c_downloadisempty
|
||||||
|
@ -30,7 +30,7 @@ msgid "Download failed with error code "
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: ulazautoupdate.c_downloading
|
#: ulazautoupdate.c_downloading
|
||||||
msgid "Please wait. Downloading new version... "
|
msgid "Please wait. Downloading.. "
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: ulazautoupdate.c_downloadisempty
|
#: ulazautoupdate.c_downloadisempty
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
<ProjectSession>
|
<ProjectSession>
|
||||||
<PathDelim Value="\"/>
|
<PathDelim Value="\"/>
|
||||||
<Version Value="10"/>
|
<Version Value="10"/>
|
||||||
<BuildModes Active="Linux64"/>
|
<BuildModes Active="Win64"/>
|
||||||
<Units Count="36">
|
<Units Count="36">
|
||||||
<Unit0>
|
<Unit0>
|
||||||
<Filename Value="testapp.lpr"/>
|
<Filename Value="testapp.lpr"/>
|
||||||
@ -42,11 +42,13 @@
|
|||||||
</Unit3>
|
</Unit3>
|
||||||
<Unit4>
|
<Unit4>
|
||||||
<Filename Value="..\ulazautoupdate.pas"/>
|
<Filename Value="..\ulazautoupdate.pas"/>
|
||||||
|
<IsVisibleTab Value="True"/>
|
||||||
<EditorIndex Value="1"/>
|
<EditorIndex Value="1"/>
|
||||||
<TopLine Value="987"/>
|
<TopLine Value="1624"/>
|
||||||
<CursorPos X="70" Y="1026"/>
|
<CursorPos X="13" Y="1651"/>
|
||||||
<ExtraEditorCount Value="2"/>
|
<ExtraEditorCount Value="2"/>
|
||||||
<ExtraEditor1>
|
<ExtraEditor1>
|
||||||
|
<IsVisibleTab Value="True"/>
|
||||||
<WindowIndex Value="1"/>
|
<WindowIndex Value="1"/>
|
||||||
<TopLine Value="948"/>
|
<TopLine Value="948"/>
|
||||||
<CursorPos Y="971"/>
|
<CursorPos Y="971"/>
|
||||||
@ -184,9 +186,8 @@
|
|||||||
</Unit21>
|
</Unit21>
|
||||||
<Unit22>
|
<Unit22>
|
||||||
<Filename Value="..\ushortcut.pas"/>
|
<Filename Value="..\ushortcut.pas"/>
|
||||||
<IsVisibleTab Value="True"/>
|
|
||||||
<EditorIndex Value="6"/>
|
<EditorIndex Value="6"/>
|
||||||
<TopLine Value="350"/>
|
<TopLine Value="349"/>
|
||||||
<CursorPos X="16" Y="338"/>
|
<CursorPos X="16" Y="338"/>
|
||||||
<UsageCount Value="37"/>
|
<UsageCount Value="37"/>
|
||||||
<Loaded Value="True"/>
|
<Loaded Value="True"/>
|
||||||
@ -287,21 +288,21 @@
|
|||||||
</Unit34>
|
</Unit34>
|
||||||
<Unit35>
|
<Unit35>
|
||||||
<Filename Value="..\testinstaller\umainform.pas"/>
|
<Filename Value="..\testinstaller\umainform.pas"/>
|
||||||
<IsVisibleTab Value="True"/>
|
<ComponentName Value="mainform"/>
|
||||||
|
<HasResources Value="True"/>
|
||||||
|
<ResourceBaseClass Value="Form"/>
|
||||||
<EditorIndex Value="2"/>
|
<EditorIndex Value="2"/>
|
||||||
<WindowIndex Value="1"/>
|
<WindowIndex Value="1"/>
|
||||||
<TopLine Value="182"/>
|
<TopLine Value="182"/>
|
||||||
<CursorPos X="30" Y="202"/>
|
<CursorPos X="30" Y="202"/>
|
||||||
<UsageCount Value="10"/>
|
<UsageCount Value="10"/>
|
||||||
<Loaded Value="True"/>
|
<Loaded Value="True"/>
|
||||||
|
<LoadedDesigner Value="True"/>
|
||||||
</Unit35>
|
</Unit35>
|
||||||
</Units>
|
</Units>
|
||||||
<OtherDefines Count="1">
|
<OtherDefines Count="1">
|
||||||
<Define0 Value="DEBUGMODE"/>
|
<Define0 Value="DEBUGMODE"/>
|
||||||
</OtherDefines>
|
</OtherDefines>
|
||||||
<General>
|
|
||||||
<ActiveWindowIndexAtStart Value="1"/>
|
|
||||||
</General>
|
|
||||||
<JumpHistory Count="30" HistoryIndex="29">
|
<JumpHistory Count="30" HistoryIndex="29">
|
||||||
<Position1>
|
<Position1>
|
||||||
<Filename Value="..\ushortcut.pas"/>
|
<Filename Value="..\ushortcut.pas"/>
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
</i18n>
|
</i18n>
|
||||||
<VersionInfo>
|
<VersionInfo>
|
||||||
<UseVersionInfo Value="True"/>
|
<UseVersionInfo Value="True"/>
|
||||||
<RevisionNr Value="2"/>
|
<RevisionNr Value="3"/>
|
||||||
<StringTable Comments="Installer/Updater using LazAutoUpdate" CompanyName="minesadorada" FileDescription="Universal Installer and Updater using component LazAutoUpdate" InternalName="lauinstaller" LegalCopyright="(c)2017 minesadorada@charcodelvalle.com" ProductVersion="0.0.0.0"/>
|
<StringTable Comments="Installer/Updater using LazAutoUpdate" CompanyName="minesadorada" FileDescription="Universal Installer and Updater using component LazAutoUpdate" InternalName="lauinstaller" LegalCopyright="(c)2017 minesadorada@charcodelvalle.com" ProductVersion="0.0.0.0"/>
|
||||||
</VersionInfo>
|
</VersionInfo>
|
||||||
<BuildModes Count="5">
|
<BuildModes Count="5">
|
||||||
|
@ -3,14 +3,14 @@
|
|||||||
<ProjectSession>
|
<ProjectSession>
|
||||||
<PathDelim Value="\"/>
|
<PathDelim Value="\"/>
|
||||||
<Version Value="10"/>
|
<Version Value="10"/>
|
||||||
<BuildModes Active="Linux64"/>
|
<BuildModes Active="Win32debug"/>
|
||||||
<Units Count="18">
|
<Units Count="26">
|
||||||
<Unit0>
|
<Unit0>
|
||||||
<Filename Value="lauinstaller.lpr"/>
|
<Filename Value="lauinstaller.lpr"/>
|
||||||
<IsPartOfProject Value="True"/>
|
<IsPartOfProject Value="True"/>
|
||||||
<EditorIndex Value="1"/>
|
<EditorIndex Value="1"/>
|
||||||
<CursorPos X="25" Y="5"/>
|
<CursorPos X="25" Y="5"/>
|
||||||
<UsageCount Value="34"/>
|
<UsageCount Value="82"/>
|
||||||
<Loaded Value="True"/>
|
<Loaded Value="True"/>
|
||||||
</Unit0>
|
</Unit0>
|
||||||
<Unit1>
|
<Unit1>
|
||||||
@ -19,10 +19,9 @@
|
|||||||
<ComponentName Value="mainform"/>
|
<ComponentName Value="mainform"/>
|
||||||
<HasResources Value="True"/>
|
<HasResources Value="True"/>
|
||||||
<ResourceBaseClass Value="Form"/>
|
<ResourceBaseClass Value="Form"/>
|
||||||
<IsVisibleTab Value="True"/>
|
<TopLine Value="92"/>
|
||||||
<TopLine Value="152"/>
|
<CursorPos X="61" Y="109"/>
|
||||||
<CursorPos Y="180"/>
|
<UsageCount Value="82"/>
|
||||||
<UsageCount Value="34"/>
|
|
||||||
<Loaded Value="True"/>
|
<Loaded Value="True"/>
|
||||||
<LoadedDesigner Value="True"/>
|
<LoadedDesigner Value="True"/>
|
||||||
</Unit1>
|
</Unit1>
|
||||||
@ -31,14 +30,28 @@
|
|||||||
<EditorIndex Value="-1"/>
|
<EditorIndex Value="-1"/>
|
||||||
<TopLine Value="3760"/>
|
<TopLine Value="3760"/>
|
||||||
<CursorPos X="46" Y="3778"/>
|
<CursorPos X="46" Y="3778"/>
|
||||||
<UsageCount Value="10"/>
|
<UsageCount Value="6"/>
|
||||||
</Unit2>
|
</Unit2>
|
||||||
<Unit3>
|
<Unit3>
|
||||||
<Filename Value="..\ulazautoupdate.pas"/>
|
<Filename Value="..\ulazautoupdate.pas"/>
|
||||||
<EditorIndex Value="9"/>
|
<IsVisibleTab Value="True"/>
|
||||||
<TopLine Value="111"/>
|
<WindowIndex Value="2"/>
|
||||||
<CursorPos X="18" Y="134"/>
|
<TopLine Value="48"/>
|
||||||
<UsageCount Value="15"/>
|
<CursorPos X="74" Y="64"/>
|
||||||
|
<ExtraEditorCount Value="2"/>
|
||||||
|
<ExtraEditor1>
|
||||||
|
<IsVisibleTab Value="True"/>
|
||||||
|
<EditorIndex Value="9"/>
|
||||||
|
<TopLine Value="1496"/>
|
||||||
|
<CursorPos Y="1507"/>
|
||||||
|
</ExtraEditor1>
|
||||||
|
<ExtraEditor2>
|
||||||
|
<IsVisibleTab Value="True"/>
|
||||||
|
<WindowIndex Value="1"/>
|
||||||
|
<TopLine Value="578"/>
|
||||||
|
<CursorPos X="56" Y="623"/>
|
||||||
|
</ExtraEditor2>
|
||||||
|
<UsageCount Value="40"/>
|
||||||
<Loaded Value="True"/>
|
<Loaded Value="True"/>
|
||||||
</Unit3>
|
</Unit3>
|
||||||
<Unit4>
|
<Unit4>
|
||||||
@ -46,40 +59,40 @@
|
|||||||
<EditorIndex Value="2"/>
|
<EditorIndex Value="2"/>
|
||||||
<TopLine Value="403"/>
|
<TopLine Value="403"/>
|
||||||
<CursorPos X="93" Y="449"/>
|
<CursorPos X="93" Y="449"/>
|
||||||
<UsageCount Value="15"/>
|
<UsageCount Value="40"/>
|
||||||
<Loaded Value="True"/>
|
<Loaded Value="True"/>
|
||||||
</Unit4>
|
</Unit4>
|
||||||
<Unit5>
|
<Unit5>
|
||||||
<Filename Value="..\testapp\testapp.lpr"/>
|
<Filename Value="..\testapp\testapp.lpr"/>
|
||||||
<EditorIndex Value="-1"/>
|
<EditorIndex Value="-1"/>
|
||||||
<CursorPos Y="30"/>
|
<CursorPos Y="30"/>
|
||||||
<UsageCount Value="10"/>
|
<UsageCount Value="6"/>
|
||||||
</Unit5>
|
</Unit5>
|
||||||
<Unit6>
|
<Unit6>
|
||||||
<Filename Value="..\aboutlazautoupdateunit.pas"/>
|
<Filename Value="..\aboutlazautoupdateunit.pas"/>
|
||||||
<EditorIndex Value="-1"/>
|
<EditorIndex Value="-1"/>
|
||||||
<TopLine Value="299"/>
|
<TopLine Value="299"/>
|
||||||
<CursorPos X="68" Y="324"/>
|
<CursorPos X="68" Y="324"/>
|
||||||
<UsageCount Value="10"/>
|
<UsageCount Value="6"/>
|
||||||
</Unit6>
|
</Unit6>
|
||||||
<Unit7>
|
<Unit7>
|
||||||
<Filename Value="X:\deleteme\issrc-master\issrc-master\Components\BidiUtils.pas"/>
|
<Filename Value="X:\deleteme\issrc-master\issrc-master\Components\BidiUtils.pas"/>
|
||||||
<EditorIndex Value="-1"/>
|
<EditorIndex Value="-1"/>
|
||||||
<TopLine Value="34"/>
|
<TopLine Value="34"/>
|
||||||
<UsageCount Value="10"/>
|
<UsageCount Value="6"/>
|
||||||
</Unit7>
|
</Unit7>
|
||||||
<Unit8>
|
<Unit8>
|
||||||
<Filename Value="X:\deleteme\issrc-master\issrc-master\Components\ScintStylerInnoSetup.pas"/>
|
<Filename Value="X:\deleteme\issrc-master\issrc-master\Components\ScintStylerInnoSetup.pas"/>
|
||||||
<EditorIndex Value="-1"/>
|
<EditorIndex Value="-1"/>
|
||||||
<TopLine Value="624"/>
|
<TopLine Value="624"/>
|
||||||
<UsageCount Value="10"/>
|
<UsageCount Value="6"/>
|
||||||
</Unit8>
|
</Unit8>
|
||||||
<Unit9>
|
<Unit9>
|
||||||
<Filename Value="X:\deleteme\issrc-master\issrc-master\Projects\Install.pas"/>
|
<Filename Value="X:\deleteme\issrc-master\issrc-master\Projects\Install.pas"/>
|
||||||
<EditorIndex Value="7"/>
|
<EditorIndex Value="7"/>
|
||||||
<TopLine Value="85"/>
|
<TopLine Value="85"/>
|
||||||
<CursorPos X="50" Y="24"/>
|
<CursorPos X="50" Y="24"/>
|
||||||
<UsageCount Value="13"/>
|
<UsageCount Value="38"/>
|
||||||
<Loaded Value="True"/>
|
<Loaded Value="True"/>
|
||||||
</Unit9>
|
</Unit9>
|
||||||
<Unit10>
|
<Unit10>
|
||||||
@ -87,7 +100,7 @@
|
|||||||
<EditorIndex Value="8"/>
|
<EditorIndex Value="8"/>
|
||||||
<TopLine Value="150"/>
|
<TopLine Value="150"/>
|
||||||
<CursorPos Y="166"/>
|
<CursorPos Y="166"/>
|
||||||
<UsageCount Value="23"/>
|
<UsageCount Value="48"/>
|
||||||
<Loaded Value="True"/>
|
<Loaded Value="True"/>
|
||||||
</Unit10>
|
</Unit10>
|
||||||
<Unit11>
|
<Unit11>
|
||||||
@ -95,7 +108,7 @@
|
|||||||
<EditorIndex Value="6"/>
|
<EditorIndex Value="6"/>
|
||||||
<TopLine Value="2332"/>
|
<TopLine Value="2332"/>
|
||||||
<CursorPos X="6" Y="2362"/>
|
<CursorPos X="6" Y="2362"/>
|
||||||
<UsageCount Value="12"/>
|
<UsageCount Value="37"/>
|
||||||
<Loaded Value="True"/>
|
<Loaded Value="True"/>
|
||||||
</Unit11>
|
</Unit11>
|
||||||
<Unit12>
|
<Unit12>
|
||||||
@ -104,7 +117,7 @@
|
|||||||
<EditorIndex Value="5"/>
|
<EditorIndex Value="5"/>
|
||||||
<TopLine Value="225"/>
|
<TopLine Value="225"/>
|
||||||
<CursorPos X="19" Y="233"/>
|
<CursorPos X="19" Y="233"/>
|
||||||
<UsageCount Value="12"/>
|
<UsageCount Value="37"/>
|
||||||
<Loaded Value="True"/>
|
<Loaded Value="True"/>
|
||||||
</Unit12>
|
</Unit12>
|
||||||
<Unit13>
|
<Unit13>
|
||||||
@ -112,13 +125,13 @@
|
|||||||
<EditorIndex Value="-1"/>
|
<EditorIndex Value="-1"/>
|
||||||
<TopLine Value="85"/>
|
<TopLine Value="85"/>
|
||||||
<CursorPos X="10" Y="113"/>
|
<CursorPos X="10" Y="113"/>
|
||||||
<UsageCount Value="10"/>
|
<UsageCount Value="6"/>
|
||||||
</Unit13>
|
</Unit13>
|
||||||
<Unit14>
|
<Unit14>
|
||||||
<Filename Value="C:\laztrunk\fpc\rtl\objpas\sysutils\finah.inc"/>
|
<Filename Value="C:\laztrunk\fpc\rtl\objpas\sysutils\finah.inc"/>
|
||||||
<EditorIndex Value="4"/>
|
<EditorIndex Value="4"/>
|
||||||
<CursorPos X="10" Y="33"/>
|
<CursorPos X="10" Y="33"/>
|
||||||
<UsageCount Value="11"/>
|
<UsageCount Value="36"/>
|
||||||
<Loaded Value="True"/>
|
<Loaded Value="True"/>
|
||||||
</Unit14>
|
</Unit14>
|
||||||
<Unit15>
|
<Unit15>
|
||||||
@ -127,7 +140,7 @@
|
|||||||
<EditorIndex Value="3"/>
|
<EditorIndex Value="3"/>
|
||||||
<TopLine Value="76"/>
|
<TopLine Value="76"/>
|
||||||
<CursorPos X="10" Y="103"/>
|
<CursorPos X="10" Y="103"/>
|
||||||
<UsageCount Value="11"/>
|
<UsageCount Value="36"/>
|
||||||
<Loaded Value="True"/>
|
<Loaded Value="True"/>
|
||||||
</Unit15>
|
</Unit15>
|
||||||
<Unit16>
|
<Unit16>
|
||||||
@ -138,137 +151,199 @@
|
|||||||
<EditorIndex Value="-1"/>
|
<EditorIndex Value="-1"/>
|
||||||
<TopLine Value="91"/>
|
<TopLine Value="91"/>
|
||||||
<CursorPos Y="168"/>
|
<CursorPos Y="168"/>
|
||||||
<UsageCount Value="11"/>
|
<UsageCount Value="7"/>
|
||||||
</Unit16>
|
</Unit16>
|
||||||
<Unit17>
|
<Unit17>
|
||||||
<Filename Value="C:\laztrunk\fpc\rtl\unix\sysunixh.inc"/>
|
<Filename Value="C:\laztrunk\fpc\rtl\unix\sysunixh.inc"/>
|
||||||
<EditorIndex Value="-1"/>
|
<EditorIndex Value="-1"/>
|
||||||
<TopLine Value="4"/>
|
<TopLine Value="4"/>
|
||||||
<CursorPos X="2" Y="31"/>
|
<CursorPos X="2" Y="31"/>
|
||||||
<UsageCount Value="10"/>
|
<UsageCount Value="6"/>
|
||||||
</Unit17>
|
</Unit17>
|
||||||
|
<Unit18>
|
||||||
|
<Filename Value="C:\laztrunk\fpc\rtl\win\wininc\defines.inc"/>
|
||||||
|
<EditorIndex Value="-1"/>
|
||||||
|
<CursorPos X="6" Y="1094"/>
|
||||||
|
<UsageCount Value="6"/>
|
||||||
|
</Unit18>
|
||||||
|
<Unit19>
|
||||||
|
<Filename Value="D:\lazarustrunk\common_components\onlinepackagemanager\onlinepackagemanager\opkman_downloader.pas"/>
|
||||||
|
<EditorIndex Value="13"/>
|
||||||
|
<TopLine Value="186"/>
|
||||||
|
<CursorPos X="9" Y="237"/>
|
||||||
|
<UsageCount Value="15"/>
|
||||||
|
<Loaded Value="True"/>
|
||||||
|
</Unit19>
|
||||||
|
<Unit20>
|
||||||
|
<Filename Value="..\lazautoupdate_httpclient.pas"/>
|
||||||
|
<EditorIndex Value="12"/>
|
||||||
|
<TopLine Value="1652"/>
|
||||||
|
<CursorPos X="27" Y="314"/>
|
||||||
|
<UsageCount Value="15"/>
|
||||||
|
<Loaded Value="True"/>
|
||||||
|
</Unit20>
|
||||||
|
<Unit21>
|
||||||
|
<Filename Value="umainform.lfm"/>
|
||||||
|
<EditorIndex Value="-1"/>
|
||||||
|
<TopLine Value="94"/>
|
||||||
|
<CursorPos X="42" Y="100"/>
|
||||||
|
<UsageCount Value="10"/>
|
||||||
|
<DefaultSyntaxHighlighter Value="LFM"/>
|
||||||
|
</Unit21>
|
||||||
|
<Unit22>
|
||||||
|
<Filename Value="C:\laztrunk\lazarus\lcl\lclproc.pas"/>
|
||||||
|
<UnitName Value="LCLProc"/>
|
||||||
|
<EditorIndex Value="11"/>
|
||||||
|
<TopLine Value="889"/>
|
||||||
|
<CursorPos X="17" Y="893"/>
|
||||||
|
<UsageCount Value="10"/>
|
||||||
|
<Loaded Value="True"/>
|
||||||
|
</Unit22>
|
||||||
|
<Unit23>
|
||||||
|
<Filename Value="C:\laztrunk\fpc\rtl\objpas\classes\classesh.inc"/>
|
||||||
|
<EditorIndex Value="-1"/>
|
||||||
|
<TopLine Value="2139"/>
|
||||||
|
<CursorPos X="10" Y="2073"/>
|
||||||
|
<UsageCount Value="10"/>
|
||||||
|
</Unit23>
|
||||||
|
<Unit24>
|
||||||
|
<Filename Value="C:\laztrunk\fpc\packages\fcl-base\src\contnrs.pp"/>
|
||||||
|
<EditorIndex Value="10"/>
|
||||||
|
<TopLine Value="146"/>
|
||||||
|
<CursorPos X="3" Y="167"/>
|
||||||
|
<UsageCount Value="10"/>
|
||||||
|
<Loaded Value="True"/>
|
||||||
|
</Unit24>
|
||||||
|
<Unit25>
|
||||||
|
<Filename Value="..\..\..\poweredby\latest_stable\upoweredby.pas"/>
|
||||||
|
<UnitName Value="uPoweredby"/>
|
||||||
|
<EditorIndex Value="-1"/>
|
||||||
|
<WindowIndex Value="2"/>
|
||||||
|
<TopLine Value="303"/>
|
||||||
|
<CursorPos X="12" Y="315"/>
|
||||||
|
<UsageCount Value="10"/>
|
||||||
|
</Unit25>
|
||||||
</Units>
|
</Units>
|
||||||
<JumpHistory Count="30" HistoryIndex="29">
|
<General>
|
||||||
|
<ActiveWindowIndexAtStart Value="2"/>
|
||||||
|
</General>
|
||||||
|
<JumpHistory Count="29" HistoryIndex="28">
|
||||||
<Position1>
|
<Position1>
|
||||||
<Filename Value="X:\deleteme\issrc-master\issrc-master\Projects\Install.pas"/>
|
<Filename Value="..\ulazautoupdate.pas"/>
|
||||||
<Caret Line="1974" TopLine="1933"/>
|
<Caret Line="1655" TopLine="1631"/>
|
||||||
</Position1>
|
</Position1>
|
||||||
<Position2>
|
<Position2>
|
||||||
<Filename Value="X:\deleteme\issrc-master\issrc-master\Projects\Install.pas"/>
|
<Filename Value="..\ulazautoupdate.pas"/>
|
||||||
<Caret Line="1856" Column="45" TopLine="1831"/>
|
<Caret Line="2815" Column="24" TopLine="2797"/>
|
||||||
</Position2>
|
</Position2>
|
||||||
<Position3>
|
<Position3>
|
||||||
<Filename Value="..\ushortcut.pas"/>
|
<Filename Value="..\ulazautoupdate.pas"/>
|
||||||
<Caret Line="154" Column="21" TopLine="132"/>
|
<Caret Line="2793" Column="20" TopLine="2783"/>
|
||||||
</Position3>
|
</Position3>
|
||||||
<Position4>
|
<Position4>
|
||||||
<Filename Value="..\ushortcut.pas"/>
|
<Filename Value="..\ulazautoupdate.pas"/>
|
||||||
<Caret Line="180" Column="59" TopLine="160"/>
|
<Caret Line="1647" Column="28" TopLine="1629"/>
|
||||||
</Position4>
|
</Position4>
|
||||||
<Position5>
|
<Position5>
|
||||||
<Filename Value="..\ushortcut.pas"/>
|
<Filename Value="..\ulazautoupdate.pas"/>
|
||||||
<Caret Line="205" TopLine="163"/>
|
<Caret Line="2682" Column="15" TopLine="2671"/>
|
||||||
</Position5>
|
</Position5>
|
||||||
<Position6>
|
<Position6>
|
||||||
<Filename Value="..\ushortcut.pas"/>
|
<Filename Value="..\ulazautoupdate.pas"/>
|
||||||
<Caret Line="198" Column="23" TopLine="171"/>
|
<Caret Line="1647" Column="56" TopLine="1625"/>
|
||||||
</Position6>
|
</Position6>
|
||||||
<Position7>
|
<Position7>
|
||||||
<Filename Value="umainform.pas"/>
|
<Filename Value="..\ulazautoupdate.pas"/>
|
||||||
<Caret Line="130" Column="24" TopLine="116"/>
|
<Caret Line="1634" Column="53" TopLine="1625"/>
|
||||||
</Position7>
|
</Position7>
|
||||||
<Position8>
|
<Position8>
|
||||||
<Filename Value="umainform.pas"/>
|
<Filename Value="..\ulazautoupdate.pas"/>
|
||||||
<Caret Line="131" Column="24" TopLine="117"/>
|
<Caret Line="2821" Column="25" TopLine="2804"/>
|
||||||
</Position8>
|
</Position8>
|
||||||
<Position9>
|
<Position9>
|
||||||
<Filename Value="umainform.pas"/>
|
<Filename Value="..\ulazautoupdate.pas"/>
|
||||||
<Caret Line="132" TopLine="123"/>
|
<Caret Line="2729" Column="13" TopLine="2711"/>
|
||||||
</Position9>
|
</Position9>
|
||||||
<Position10>
|
<Position10>
|
||||||
<Filename Value="..\ushortcut.pas"/>
|
<Filename Value="..\ulazautoupdate.pas"/>
|
||||||
<Caret Line="442" TopLine="398"/>
|
<Caret Line="1651" Column="56" TopLine="1629"/>
|
||||||
</Position10>
|
</Position10>
|
||||||
<Position11>
|
<Position11>
|
||||||
<Filename Value="..\ushortcut.pas"/>
|
<Filename Value="..\ulazautoupdate.pas"/>
|
||||||
<Caret Line="436" Column="11" TopLine="404"/>
|
<Caret Line="2763" Column="59" TopLine="2734"/>
|
||||||
</Position11>
|
</Position11>
|
||||||
<Position12>
|
<Position12>
|
||||||
<Filename Value="..\ushortcut.pas"/>
|
<Filename Value="..\ulazautoupdate.pas"/>
|
||||||
<Caret Line="438" Column="25" TopLine="404"/>
|
<Caret Line="2770" Column="20" TopLine="2734"/>
|
||||||
</Position12>
|
</Position12>
|
||||||
<Position13>
|
<Position13>
|
||||||
<Filename Value="..\ushortcut.pas"/>
|
<Filename Value="..\ulazautoupdate.pas"/>
|
||||||
<Caret Line="428" Column="45" TopLine="404"/>
|
<Caret Line="598" Column="59" TopLine="576"/>
|
||||||
</Position13>
|
</Position13>
|
||||||
<Position14>
|
<Position14>
|
||||||
<Filename Value="..\ushortcut.pas"/>
|
<Filename Value="..\ulazautoupdate.pas"/>
|
||||||
<Caret Line="390" Column="27" TopLine="369"/>
|
<Caret Line="595" Column="34" TopLine="568"/>
|
||||||
</Position14>
|
</Position14>
|
||||||
<Position15>
|
<Position15>
|
||||||
<Filename Value="..\ushortcut.pas"/>
|
<Filename Value="..\ulazautoupdate.pas"/>
|
||||||
<Caret Line="438" Column="23" TopLine="401"/>
|
<Caret Line="531" Column="34" TopLine="504"/>
|
||||||
</Position15>
|
</Position15>
|
||||||
<Position16>
|
<Position16>
|
||||||
<Filename Value="..\ushortcut.pas"/>
|
<Filename Value="..\ulazautoupdate.pas"/>
|
||||||
<Caret Line="440" Column="79" TopLine="404"/>
|
<Caret Line="603" Column="58" TopLine="576"/>
|
||||||
</Position16>
|
</Position16>
|
||||||
<Position17>
|
<Position17>
|
||||||
<Filename Value="umainform.pas"/>
|
<Filename Value="..\ulazautoupdate.pas"/>
|
||||||
<Caret Line="119" Column="50" TopLine="118"/>
|
<Caret Line="1652" Column="93" TopLine="1625"/>
|
||||||
</Position17>
|
</Position17>
|
||||||
<Position18>
|
<Position18>
|
||||||
<Filename Value="umainform.pas"/>
|
<Filename Value="..\ulazautoupdate.pas"/>
|
||||||
<Caret Line="120" Column="50" TopLine="119"/>
|
<Caret Line="2771" Column="2" TopLine="2751"/>
|
||||||
</Position18>
|
</Position18>
|
||||||
<Position19>
|
<Position19>
|
||||||
<Filename Value="umainform.pas"/>
|
<Filename Value="..\ulazautoupdate.pas"/>
|
||||||
<Caret Line="122" Column="50" TopLine="121"/>
|
<Caret Line="1650" Column="49" TopLine="1626"/>
|
||||||
</Position19>
|
</Position19>
|
||||||
<Position20>
|
<Position20>
|
||||||
<Filename Value="umainform.pas"/>
|
<Filename Value="..\ulazautoupdate.pas"/>
|
||||||
<Caret Line="220" Column="30" TopLine="206"/>
|
<Caret Line="2677" Column="36" TopLine="2672"/>
|
||||||
</Position20>
|
</Position20>
|
||||||
<Position21>
|
<Position21>
|
||||||
<Filename Value="umainform.pas"/>
|
<Filename Value="..\ulazautoupdate.pas"/>
|
||||||
<Caret Line="105" Column="3" TopLine="103"/>
|
<Caret Line="1648" Column="50" TopLine="1621"/>
|
||||||
</Position21>
|
</Position21>
|
||||||
<Position22>
|
<Position22>
|
||||||
<Filename Value="umainform.pas"/>
|
<Filename Value="..\ulazautoupdate.pas"/>
|
||||||
<Caret Line="230" Column="27" TopLine="209"/>
|
<Caret Line="2689" Column="22" TopLine="2671"/>
|
||||||
</Position22>
|
</Position22>
|
||||||
<Position23>
|
<Position23>
|
||||||
<Filename Value="umainform.pas"/>
|
<Filename Value="..\ulazautoupdate.pas"/>
|
||||||
<Caret Line="215" Column="45" TopLine="193"/>
|
<Caret Line="1650" Column="85" TopLine="1623"/>
|
||||||
</Position23>
|
</Position23>
|
||||||
<Position24>
|
<Position24>
|
||||||
<Filename Value="umainform.pas"/>
|
<Filename Value="..\ulazautoupdate.pas"/>
|
||||||
<Caret Line="226" Column="56" TopLine="191"/>
|
<Caret Line="1652" Column="27" TopLine="1623"/>
|
||||||
</Position24>
|
</Position24>
|
||||||
<Position25>
|
<Position25>
|
||||||
<Filename Value="..\ulazautoupdate.pas"/>
|
<Filename Value="..\ulazautoupdate.pas"/>
|
||||||
<Caret Line="355" Column="24" TopLine="326"/>
|
<Caret Line="1653" Column="30" TopLine="1626"/>
|
||||||
</Position25>
|
</Position25>
|
||||||
<Position26>
|
<Position26>
|
||||||
<Filename Value="..\ulazautoupdate.pas"/>
|
<Filename Value="..\ulazautoupdate.pas"/>
|
||||||
<Caret Line="1192" Column="17" TopLine="1182"/>
|
<Caret Line="1508" TopLine="1481"/>
|
||||||
</Position26>
|
</Position26>
|
||||||
<Position27>
|
<Position27>
|
||||||
<Filename Value="umainform.pas"/>
|
<Filename Value="..\ulazautoupdate.pas"/>
|
||||||
<Caret Line="231" Column="20" TopLine="204"/>
|
<Caret Line="64" Column="83" TopLine="52"/>
|
||||||
</Position27>
|
</Position27>
|
||||||
<Position28>
|
<Position28>
|
||||||
<Filename Value="umainform.pas"/>
|
<Filename Value="..\ulazautoupdate.pas"/>
|
||||||
<Caret Line="254" Column="33" TopLine="218"/>
|
<Caret Line="1646" Column="22" TopLine="1629"/>
|
||||||
</Position28>
|
</Position28>
|
||||||
<Position29>
|
<Position29>
|
||||||
<Filename Value="umainform.pas"/>
|
<Filename Value="..\ulazautoupdate.pas"/>
|
||||||
<Caret Line="255" Column="29" TopLine="218"/>
|
<Caret Line="1656" Column="22" TopLine="1629"/>
|
||||||
</Position29>
|
</Position29>
|
||||||
<Position30>
|
|
||||||
<Filename Value="umainform.pas"/>
|
|
||||||
<Caret Line="251" Column="51" TopLine="213"/>
|
|
||||||
</Position30>
|
|
||||||
</JumpHistory>
|
</JumpHistory>
|
||||||
</ProjectSession>
|
</ProjectSession>
|
||||||
</CONFIG>
|
</CONFIG>
|
||||||
|
Binary file not shown.
@ -13,7 +13,6 @@ object mainform: Tmainform
|
|||||||
OnClose = FormClose
|
OnClose = FormClose
|
||||||
OnCloseQuery = FormCloseQuery
|
OnCloseQuery = FormCloseQuery
|
||||||
OnCreate = FormCreate
|
OnCreate = FormCreate
|
||||||
OnShow = FormShow
|
|
||||||
Position = poWorkAreaCenter
|
Position = poWorkAreaCenter
|
||||||
LCLVersion = '1.7'
|
LCLVersion = '1.7'
|
||||||
Scaled = True
|
Scaled = True
|
||||||
@ -119,11 +118,14 @@ object mainform: Tmainform
|
|||||||
About.Authorname = 'Gordon Bamber'
|
About.Authorname = 'Gordon Bamber'
|
||||||
About.Organisation = 'Public Domain'
|
About.Organisation = 'Public Domain'
|
||||||
About.AuthorEmail = 'minesadorada@charcodelvalle.com'
|
About.AuthorEmail = 'minesadorada@charcodelvalle.com'
|
||||||
About.ComponentName = 'Laz Auto-update v0.3.4.0'
|
About.ComponentName = 'Laz Auto-update v0.3.9.0'
|
||||||
About.LicenseType = abModifiedGPL
|
About.LicenseType = abModifiedGPL
|
||||||
OnDebugEvent = LazAutoUpdate1DebugEvent
|
OnDebugEvent = LazAutoUpdate1DebugEvent
|
||||||
|
OnFileWriteProgress = LazAutoUpdate1FileWriteProgress
|
||||||
|
OnDownloadProgress = LazAutoUpdate1DownloadProgress
|
||||||
auOtherSourceURL = '<not applicable>/'
|
auOtherSourceURL = '<not applicable>/'
|
||||||
auOtherSourceFilename = '<not applicable>'
|
auOtherSourceFilename = '<not applicable>'
|
||||||
|
CopyTree = False
|
||||||
UpdatesFolder = 'updates'
|
UpdatesFolder = 'updates'
|
||||||
VersionsININame = 'versions.ini'
|
VersionsININame = 'versions.ini'
|
||||||
ShowUpdateInCaption = True
|
ShowUpdateInCaption = True
|
||||||
|
@ -62,10 +62,14 @@ type
|
|||||||
procedure FormClose(Sender: TObject; var CloseAction: TCloseAction);
|
procedure FormClose(Sender: TObject; var CloseAction: TCloseAction);
|
||||||
procedure FormCloseQuery(Sender: TObject; var CanClose: boolean);
|
procedure FormCloseQuery(Sender: TObject; var CanClose: boolean);
|
||||||
procedure FormCreate(Sender: TObject);
|
procedure FormCreate(Sender: TObject);
|
||||||
procedure FormShow(Sender: TObject);
|
|
||||||
procedure grp_ApplicationSelectionChanged(Sender: TObject);
|
procedure grp_ApplicationSelectionChanged(Sender: TObject);
|
||||||
procedure LazAutoUpdate1DebugEvent(Sender: TObject;
|
procedure LazAutoUpdate1DebugEvent(Sender: TObject;
|
||||||
lauMethodName, lauMessage: string);
|
lauMethodName, lauMessage: string);
|
||||||
|
procedure LazAutoUpdate1DownloadProgress(Sender: TObject; Percent: integer);
|
||||||
|
procedure LazAutoUpdate1DownloadWrapperDownloadWrapperFileWriteProgress(
|
||||||
|
Sender: TObject; Percent: integer);
|
||||||
|
procedure LazAutoUpdate1FileWriteProgress(Sender: TObject; Percent: integer
|
||||||
|
);
|
||||||
procedure mnu_fileExitClick(Sender: TObject);
|
procedure mnu_fileExitClick(Sender: TObject);
|
||||||
procedure mnu_helpCheckForUpdatesClick(Sender: TObject);
|
procedure mnu_helpCheckForUpdatesClick(Sender: TObject);
|
||||||
private
|
private
|
||||||
@ -93,7 +97,6 @@ begin
|
|||||||
Icon := Application.Icon;
|
Icon := Application.Icon;
|
||||||
sDirectoryToInstallTo := ProgramDirectory + 'installed';
|
sDirectoryToInstallTo := ProgramDirectory + 'installed';
|
||||||
LazAutoUpdate1.DebugMode := True;
|
LazAutoUpdate1.DebugMode := True;
|
||||||
LazAutoUpdate1.ShowUpdateInCaption := True;
|
|
||||||
ConfigureLazAutoUpdate(2); // Default is TestApp
|
ConfigureLazAutoUpdate(2); // Default is TestApp
|
||||||
Logger := TEventLog.Create(nil);
|
Logger := TEventLog.Create(nil);
|
||||||
Logger.LogType := ltFile;
|
Logger.LogType := ltFile;
|
||||||
@ -101,11 +104,6 @@ begin
|
|||||||
Logger.Active := True; // Logging uses OnDebugEvent of LazAutoUpdate
|
Logger.Active := True; // Logging uses OnDebugEvent of LazAutoUpdate
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure Tmainform.FormShow(Sender: TObject);
|
|
||||||
begin
|
|
||||||
|
|
||||||
end;
|
|
||||||
|
|
||||||
procedure Tmainform.cmd_InstallClick(Sender: TObject);
|
procedure Tmainform.cmd_InstallClick(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
LazAutoUpdate1.WorkingMode := lauInstall;
|
LazAutoUpdate1.WorkingMode := lauInstall;
|
||||||
@ -208,6 +206,23 @@ begin
|
|||||||
Logger.Log(lauMethodName + ' - ' + lauMessage);
|
Logger.Log(lauMethodName + ' - ' + lauMessage);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure Tmainform.LazAutoUpdate1DownloadProgress(Sender: TObject;
|
||||||
|
Percent: integer);
|
||||||
|
begin
|
||||||
|
Caption:=Format('Downloading file.. %d %',[Percent]);
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure Tmainform.LazAutoUpdate1DownloadWrapperDownloadWrapperFileWriteProgress
|
||||||
|
(Sender: TObject; Percent: integer);
|
||||||
|
begin
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure Tmainform.LazAutoUpdate1FileWriteProgress(Sender: TObject;
|
||||||
|
Percent: integer);
|
||||||
|
begin
|
||||||
|
Caption:=Format('Writing file.. %d %',[Percent]);
|
||||||
|
end;
|
||||||
|
|
||||||
procedure Tmainform.mnu_fileExitClick(Sender: TObject);
|
procedure Tmainform.mnu_fileExitClick(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
Close;
|
Close;
|
||||||
@ -218,6 +233,7 @@ var
|
|||||||
OldItemIndex: integer;
|
OldItemIndex: integer;
|
||||||
begin
|
begin
|
||||||
OldItemIndex := grp_Application.ItemIndex;
|
OldItemIndex := grp_Application.ItemIndex;
|
||||||
|
LazAutoUpdate1.ResetAppVersion;
|
||||||
LazAutoUpdate1.ProjectType := auSourceForge; // can be auGitHubReleaseZip or auOther
|
LazAutoUpdate1.ProjectType := auSourceForge; // can be auGitHubReleaseZip or auOther
|
||||||
LazAutoUpdate1.SFProjectname := 'lazautoupdate'; // Or GitHub properties
|
LazAutoUpdate1.SFProjectname := 'lazautoupdate'; // Or GitHub properties
|
||||||
LazAutoUpdate1.UpdatesFolder := 'updates'; // Subfolder in repository
|
LazAutoUpdate1.UpdatesFolder := 'updates'; // Subfolder in repository
|
||||||
@ -226,7 +242,6 @@ begin
|
|||||||
LazAutoUpdate1.AppFileWithPath := Application.Exename;
|
LazAutoUpdate1.AppFileWithPath := Application.Exename;
|
||||||
If NOT LazAutoUpdate1.AutoUpdate then
|
If NOT LazAutoUpdate1.AutoUpdate then
|
||||||
ConfigureLazAutoUpdate(OldItemIndex); // Restore properties
|
ConfigureLazAutoUpdate(OldItemIndex); // Restore properties
|
||||||
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure Tmainform.ConfigureLazAutoUpdate(const AItemIndex: integer);
|
procedure Tmainform.ConfigureLazAutoUpdate(const AItemIndex: integer);
|
||||||
|
@ -58,6 +58,10 @@ interface
|
|||||||
|
|
||||||
|
|
||||||
uses
|
uses
|
||||||
|
{$IFDEF UNIX}{$IFDEF UseCThreads}
|
||||||
|
cthreads,
|
||||||
|
cmem, // the c memory manager is on some systems much faster for multi-threading
|
||||||
|
{$ENDIF}{$ENDIF}
|
||||||
Forms, Classes, SysUtils, lazautoupdate_httpclient, strutils, PropEdits,
|
Forms, Classes, SysUtils, lazautoupdate_httpclient, strutils, PropEdits,
|
||||||
LazUTF8, FileUtil, LazFileUtils, Dialogs, StdCtrls,
|
LazUTF8, FileUtil, LazFileUtils, Dialogs, StdCtrls,
|
||||||
Buttons, DateUtils,{$IFDEF LINUX}process, asyncprocess,{$ENDIF}zipper, LResources,
|
Buttons, DateUtils,{$IFDEF LINUX}process, asyncprocess,{$ENDIF}zipper, LResources,
|
||||||
@ -147,7 +151,7 @@ const
|
|||||||
V0.3.7.2: Unix: SetExecutePermissions on installed app
|
V0.3.7.2: Unix: SetExecutePermissions on installed app
|
||||||
V0.3.8: Shortcut Menu items now created/deleted
|
V0.3.8: Shortcut Menu items now created/deleted
|
||||||
}
|
}
|
||||||
C_TLazAutoUpdateComponentVersion = '0.3.8';
|
C_TLazAutoUpdateComponentVersion = '0.3.9.0';
|
||||||
C_TThreadedDownloadComponentVersion = '0.0.3.0';
|
C_TThreadedDownloadComponentVersion = '0.0.3.0';
|
||||||
{
|
{
|
||||||
V0.0.1: Initial alpha
|
V0.0.1: Initial alpha
|
||||||
@ -193,7 +197,7 @@ resourcestring
|
|||||||
C_TempVersionsININame = 'new%s'; // [C_OnlineVersionsININame]
|
C_TempVersionsININame = 'new%s'; // [C_OnlineVersionsININame]
|
||||||
C_Checking = 'Checking for updates...';
|
C_Checking = 'Checking for updates...';
|
||||||
C_NoSFTypes = 'Sorry only ProjectType = auSourceForge is supported in this version';
|
C_NoSFTypes = 'Sorry only ProjectType = auSourceForge is supported in this version';
|
||||||
C_Downloading = 'Please wait. Downloading new version... ';
|
C_Downloading = 'Please wait. Downloading.. ';
|
||||||
C_ConsoleTitle = 'Updating %s'; //[fAppFileName]
|
C_ConsoleTitle = 'Updating %s'; //[fAppFileName]
|
||||||
C_TakingTooLong =
|
C_TakingTooLong =
|
||||||
'Check is taking too long (bad/slow internet connection?). Try again later?';
|
'Check is taking too long (bad/slow internet connection?). Try again later?';
|
||||||
@ -257,9 +261,13 @@ type
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
TWorkingMode = (lauUpdate, lauInstall);
|
TWorkingMode = (lauUpdate, lauInstall);
|
||||||
|
TOnPercent = procedure(Sender: TObject; Percent: integer) of object;
|
||||||
TThreadedDownload = class; // Forward declaration
|
TDownloadWrapper = class; // Forward declaration
|
||||||
TShortCutClass = class; // Forward declaration
|
TShortCutClass = class; // Forward declaration
|
||||||
|
TDownloadThreadClass = class; // Forward declaration
|
||||||
|
TDataEvent = procedure(Sender: TObject;
|
||||||
|
const ContentLength, CurrentPos: int64) of object;
|
||||||
|
|
||||||
{TLAZAUTOUPDATE}
|
{TLAZAUTOUPDATE}
|
||||||
// Event declarations
|
// Event declarations
|
||||||
TOnNewVersionAvailable = procedure(Sender: TObject; Newer: boolean;
|
TOnNewVersionAvailable = procedure(Sender: TObject; Newer: boolean;
|
||||||
@ -280,7 +288,7 @@ type
|
|||||||
fApplicationVersionQuad: TVersionQuad;
|
fApplicationVersionQuad: TVersionQuad;
|
||||||
fGuiQuad: TVersionQuad;
|
fGuiQuad: TVersionQuad;
|
||||||
fProjectType: TProjectType;
|
fProjectType: TProjectType;
|
||||||
fThreadDownload: TThreadedDownload;
|
fDownloadWrapper: TDownloadWrapper;
|
||||||
fAppFileName: string;
|
fAppFileName: string;
|
||||||
fComponentVersion: string;
|
fComponentVersion: string;
|
||||||
fShowUpdateInCaption: boolean;
|
fShowUpdateInCaption: boolean;
|
||||||
@ -320,6 +328,8 @@ type
|
|||||||
fProgVersion: TProgramVersion;
|
fProgVersion: TProgramVersion;
|
||||||
objFileVerInfo: TFileVersionInfo;
|
objFileVerInfo: TFileVersionInfo;
|
||||||
fUpdateExe, fUpdateSilentExe: string;
|
fUpdateExe, fUpdateSilentExe: string;
|
||||||
|
flauOnFileWrite: TOnPercent;
|
||||||
|
flauOnProgress: TOnPercent;
|
||||||
procedure SetProjectType(AValue: TProjectType);
|
procedure SetProjectType(AValue: TProjectType);
|
||||||
// projectype=auOther property Sets
|
// projectype=auOther property Sets
|
||||||
procedure SetauOtherSourceFilename(AValue: string);
|
procedure SetauOtherSourceFilename(AValue: string);
|
||||||
@ -352,7 +362,7 @@ type
|
|||||||
// Put in form.activate. Shows <whatsnew.txt> only if in ProgramDirectory then deletes it. Exits otherwise
|
// Put in form.activate. Shows <whatsnew.txt> only if in ProgramDirectory then deletes it. Exits otherwise
|
||||||
procedure ShowWhatsNewIfAvailable;
|
procedure ShowWhatsNewIfAvailable;
|
||||||
// Checks for new version then shows dialogs to update
|
// Checks for new version then shows dialogs to update
|
||||||
Function AutoUpdate:Boolean;
|
function AutoUpdate: boolean;
|
||||||
// No dialogs - what it says on the tin.
|
// No dialogs - what it says on the tin.
|
||||||
function SilentUpdate: boolean;
|
function SilentUpdate: boolean;
|
||||||
// Used in SilentUpdate. Shells to local lauupdate(.exe)
|
// Used in SilentUpdate. Shells to local lauupdate(.exe)
|
||||||
@ -417,10 +427,11 @@ type
|
|||||||
property OnDownloaded: TOnDownloaded read fOnDownloaded write fOnDownloaded;
|
property OnDownloaded: TOnDownloaded read fOnDownloaded write fOnDownloaded;
|
||||||
property OnDebugEvent: TOnDebugEvent read fOnDebugEvent write fOnDebugEvent;
|
property OnDebugEvent: TOnDebugEvent read fOnDebugEvent write fOnDebugEvent;
|
||||||
property OnUpdated: TOnUpdated read fOnUpdated write fOnUpdated;
|
property OnUpdated: TOnUpdated read fOnUpdated write fOnUpdated;
|
||||||
|
property OnFileWriteProgress: TOnPercent read flauOnFileWrite write flauOnFileWrite;
|
||||||
|
property OnDownloadProgress: TOnPercent read flauOnProgress write flauOnProgress;
|
||||||
// Embedded class
|
// Embedded class
|
||||||
property ThreadDownload: TThreadedDownload
|
property ThreadDownload: TDownloadWrapper
|
||||||
read fThreadDownload write fThreadDownload;
|
read fDownloadWrapper write fDownloadWrapper;
|
||||||
// Set this property before using methods
|
// Set this property before using methods
|
||||||
property SFProjectName: string read fSourceForgeProjectName
|
property SFProjectName: string read fSourceForgeProjectName
|
||||||
write SetSourceForgeProjectName;
|
write SetSourceForgeProjectName;
|
||||||
@ -500,8 +511,8 @@ type
|
|||||||
write SetShortCutCategoryString;
|
write SetShortCutCategoryString;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{TThreadedDownload }
|
{TDownloadWrapper }
|
||||||
TThreadedDownload = class(TPersistent)
|
TDownloadWrapper = class(TPersistent)
|
||||||
private
|
private
|
||||||
fURL: string;
|
fURL: string;
|
||||||
fFileName: string;
|
fFileName: string;
|
||||||
@ -511,12 +522,17 @@ type
|
|||||||
fUnzipAfter: boolean;
|
fUnzipAfter: boolean;
|
||||||
fComponentVersion: string;
|
fComponentVersion: string;
|
||||||
fApplicationVersionString: string;
|
fApplicationVersionString: string;
|
||||||
fIsSourceForge: boolean;
|
fIsCodeRepository: boolean;
|
||||||
public
|
public
|
||||||
|
fDownloadWrapperPercent: integer;
|
||||||
|
fWrapperOnFileWrite: TOnPercent;
|
||||||
|
fDownLoad: TDownloadThreadClass;
|
||||||
fDebugMode: boolean;
|
fDebugMode: boolean;
|
||||||
fShowDialogs: boolean;
|
fShowDialogs: boolean;
|
||||||
fLastError: string; // Propagated to TLazAutoUpdate
|
fLastError: string; // Propagated to TLazAutoUpdate
|
||||||
constructor Create;
|
constructor Create;
|
||||||
|
destructor Destroy; override;
|
||||||
|
//function GetDownloadWrapperPercent:Integer;
|
||||||
// Starts the thread
|
// Starts the thread
|
||||||
function ThreadDownloadHTTP: boolean;
|
function ThreadDownloadHTTP: boolean;
|
||||||
// Called when the thread is done
|
// Called when the thread is done
|
||||||
@ -537,31 +553,62 @@ type
|
|||||||
// From TLazAutoUpdate
|
// From TLazAutoUpdate
|
||||||
property UnzipAfter: boolean read fUnzipAfter;
|
property UnzipAfter: boolean read fUnzipAfter;
|
||||||
// From TLazAutoUpdate
|
// From TLazAutoUpdate
|
||||||
property IsSourceForge: boolean read fIsSourceForge;
|
property IsSourceForge: boolean read fIsCodeRepository;
|
||||||
|
property OnDownloadWrapperFileWriteProgress: TOnPercent
|
||||||
|
read fWrapperOnFileWrite write fWrapperOnFileWrite;
|
||||||
|
property DownloadWrapperPercent: integer
|
||||||
|
read fDownloadWrapperPercent write fDownloadWrapperPercent;
|
||||||
published
|
published
|
||||||
// Version of the underlying thread class
|
// Version of the underlying thread class
|
||||||
property ThreadDownloadVersion: string read fComponentVersion;
|
property ThreadDownloadVersion: string read fComponentVersion;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
{ TStreamAdapter }
|
||||||
|
TStreamAdapter = class(TStream)
|
||||||
|
strict private
|
||||||
|
fOnProgress: TOnPercent;
|
||||||
|
fPercent: integer;
|
||||||
|
fStream: TStream;
|
||||||
|
public
|
||||||
|
constructor Create(AStream: TStream; ASize: int64);
|
||||||
|
destructor Destroy; override;
|
||||||
|
function Read(var Buffer; Count: longint): longint; override;
|
||||||
|
function Write(const Buffer; Count: longint): longint; override;
|
||||||
|
function Seek(Offset: longint; Origin: word): longint; override;
|
||||||
|
procedure DoProgress(Writing: boolean); virtual;
|
||||||
|
published
|
||||||
|
property OnFileWriteProgress: TOnPercent read FOnProgress write FOnProgress;
|
||||||
|
end;
|
||||||
|
|
||||||
{TDownloadThreadClass }
|
{TDownloadThreadClass }
|
||||||
TDownloadThreadClass = class(TThread)
|
TDownloadThreadClass = class(TThread)
|
||||||
private
|
private
|
||||||
fURL: string;
|
fdtcOnFileWrite: TOnPercent;
|
||||||
fFileName: string;
|
fThreadDataEvent: TDataEvent;
|
||||||
|
fPercent: integer;
|
||||||
public
|
public
|
||||||
fIsSourceForge: boolean; // Propagated from TLazAutoUpdate
|
fHTTPClient: TFPHTTPClient;
|
||||||
|
fIsRepositoryURL: boolean; // Propagated from TLazAutoUpdate
|
||||||
fDebugMode: boolean; // propagated from TLazAutoUpdate
|
fDebugMode: boolean; // propagated from TLazAutoUpdate
|
||||||
fShowDialogs: boolean; // propagated from TLazAutoUpdate
|
fShowDialogs: boolean; // propagated from TLazAutoUpdate
|
||||||
fDownloadSize: integer; // propagated to TThreadedDownload
|
fDownloadSize: integer; // propagated to TDownloadWrapper
|
||||||
fReturnCode: integer; // Propagated to TThreadedDownload
|
fReturnCode: integer; // Propagated to TDownloadWrapper
|
||||||
fLastError: string; // Propagated to TThreadedDownload
|
fLastError: string; // Propagated to TDownloadWrapper
|
||||||
constructor Create(URL, FileName: string);
|
fURL: string;
|
||||||
|
fFileName: string;
|
||||||
|
constructor Create(CreateSuspended: boolean);
|
||||||
|
destructor Destroy; override;
|
||||||
procedure Execute; override; // Starts thread
|
procedure Execute; override; // Starts thread
|
||||||
// Todo:
|
function GetPercent: integer;
|
||||||
{
|
procedure SetPercent(AValue: integer);
|
||||||
procedure GetDownloadSize;
|
function DownloadHTTP(URL, TargetFile: string; var ReturnCode, DownloadSize: integer;
|
||||||
procedure ShowProgress;
|
bIsRepositoryURL, DebugMode: boolean): boolean;
|
||||||
}
|
procedure DoPercent(Sender: TObject; const ContentLength, CurrentPos: int64);
|
||||||
|
function GetDownloadFileSize(URL: string; bIsRepositoryURL: boolean): int64;
|
||||||
|
property Percent: integer read fPercent write fPercent;
|
||||||
|
property OnThreadFileWriteProgress: TOnPercent
|
||||||
|
read fdtcOnFileWrite write fdtcOnFileWrite;
|
||||||
|
property OnThreadDataEvent: TDataEvent read fThreadDataEvent write fThreadDataEvent;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
// For the TShortCutClass filename properties (needs propedits unit)
|
// For the TShortCutClass filename properties (needs propedits unit)
|
||||||
@ -575,8 +622,7 @@ type
|
|||||||
|
|
||||||
|
|
||||||
// Non-threaded function
|
// Non-threaded function
|
||||||
function DownloadHTTP(URL, TargetFile: string; var ReturnCode, DownloadSize: integer;
|
// Function GetDownloadFileSize(URL:String;bIsRepositoryURL:Boolean):Int64;
|
||||||
bIsSourceForge, fDebugMode: boolean): boolean;
|
|
||||||
|
|
||||||
procedure Register;
|
procedure Register;
|
||||||
|
|
||||||
@ -792,9 +838,10 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
// Freed in Destroy
|
// Freed in Destroy
|
||||||
fThreadDownload := TThreadedDownload.Create();
|
fDownloadWrapper := TDownloadWrapper.Create;
|
||||||
|
// Freed in Destroy
|
||||||
fShortCutClass := TShortCutClass.Create();
|
fShortCutClass := TShortCutClass.Create();
|
||||||
|
|
||||||
fShortCutClass.ShortcutName := 'MyShortcutName';
|
fShortCutClass.ShortcutName := 'MyShortcutName';
|
||||||
fShortCutClass.TargetArguments := '';
|
fShortCutClass.TargetArguments := '';
|
||||||
fShortCutClass.Category := scDevelopment;
|
fShortCutClass.Category := scDevelopment;
|
||||||
@ -824,7 +871,7 @@ begin
|
|||||||
sz := rsSImportantMe;
|
sz := rsSImportantMe;
|
||||||
raise Exception.Createfmt(sz, [LineEnding, LineEnding,
|
raise Exception.Createfmt(sz, [LineEnding, LineEnding,
|
||||||
LineEnding, LineEnding, LineEnding]);
|
LineEnding, LineEnding, LineEnding]);
|
||||||
FreeAndNil(fThreadDownload);
|
FreeAndNil(fDownloadWrapper);
|
||||||
FreeAndNil(fShortCutClass);
|
FreeAndNil(fShortCutClass);
|
||||||
Application.Terminate;
|
Application.Terminate;
|
||||||
// Eat other Exceptions?
|
// Eat other Exceptions?
|
||||||
@ -849,14 +896,13 @@ begin
|
|||||||
fSilentMode := False;
|
fSilentMode := False;
|
||||||
|
|
||||||
// Propagate down
|
// Propagate down
|
||||||
fThreadDownload.fDebugmode := fDebugMode;
|
fDownloadWrapper.fDebugmode := fDebugMode;
|
||||||
if ((fProjectType = auSourceForge) or (fProjectType = auGitHubReleaseZip)) then
|
if ((fProjectType = auSourceForge) or (fProjectType = auGitHubReleaseZip)) then
|
||||||
fThreadDownload.fIsSourceForge := True
|
fDownloadWrapper.fIsCodeRepository := True
|
||||||
else
|
else
|
||||||
fThreadDownload.fIsSourceForge := False;
|
fDownloadWrapper.fIsCodeRepository := False;
|
||||||
|
|
||||||
fApplicationVersionQuad := StrToVersionQuad(fApplicationVersionString);
|
fApplicationVersionQuad := StrToVersionQuad(fApplicationVersionString);
|
||||||
|
|
||||||
fLastError := C_OK;
|
fLastError := C_OK;
|
||||||
|
|
||||||
fVersionCountLimit := 1000000; // default
|
fVersionCountLimit := 1000000; // default
|
||||||
@ -907,7 +953,7 @@ end;
|
|||||||
|
|
||||||
destructor TLazAutoUpdate.Destroy;
|
destructor TLazAutoUpdate.Destroy;
|
||||||
begin
|
begin
|
||||||
FreeAndNil(fThreadDownload);
|
FreeAndNil(fDownloadWrapper);
|
||||||
FreeAndNil(fShortCutClass);
|
FreeAndNil(fShortCutClass);
|
||||||
inherited Destroy;
|
inherited Destroy;
|
||||||
end;
|
end;
|
||||||
@ -946,8 +992,8 @@ end;
|
|||||||
procedure TLazAutoUpdate.SetShowDialogs(AValue: boolean);
|
procedure TLazAutoUpdate.SetShowDialogs(AValue: boolean);
|
||||||
begin
|
begin
|
||||||
fShowDialogs := AValue;
|
fShowDialogs := AValue;
|
||||||
if fThreadDownload <> nil then
|
if fDownloadWrapper <> nil then
|
||||||
fThreadDownload.fShowDialogs := AValue;
|
fDownloadWrapper.fShowDialogs := AValue;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TLazAutoUpdate.SetDebugMode(AValue: boolean);
|
procedure TLazAutoUpdate.SetDebugMode(AValue: boolean);
|
||||||
@ -956,8 +1002,8 @@ begin
|
|||||||
// Fire the OnDebugEvent event handler?
|
// Fire the OnDebugEvent event handler?
|
||||||
if Assigned(fOndebugEvent) then
|
if Assigned(fOndebugEvent) then
|
||||||
fFireDebugEvent := fDebugMode;
|
fFireDebugEvent := fDebugMode;
|
||||||
if fThreadDownload <> nil then
|
if fDownloadWrapper <> nil then
|
||||||
fThreadDownload.fDebugMode := AValue;
|
fDownloadWrapper.fDebugMode := AValue;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TLazAutoUpdate.SetauOtherSourceURL(AValue: string);
|
procedure TLazAutoUpdate.SetauOtherSourceURL(AValue: string);
|
||||||
@ -1184,12 +1230,12 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
Function TLazAutoUpdate.AutoUpdate:Boolean;
|
function TLazAutoUpdate.AutoUpdate: boolean;
|
||||||
// Do-all proc that user can drop into a menu
|
// Do-all proc that user can drop into a menu
|
||||||
begin
|
begin
|
||||||
if Assigned(fOndebugEvent) then
|
if Assigned(fOndebugEvent) then
|
||||||
fFireDebugEvent := True;
|
fFireDebugEvent := True;
|
||||||
Result:=False;
|
Result := False;
|
||||||
if fFireDebugEvent then
|
if fFireDebugEvent then
|
||||||
fOndebugEvent(Self, 'AutoUpdate', 'Calling NewVersionAvailable');
|
fOndebugEvent(Self, 'AutoUpdate', 'Calling NewVersionAvailable');
|
||||||
if NewVersionAvailable then
|
if NewVersionAvailable then
|
||||||
@ -1231,12 +1277,12 @@ begin
|
|||||||
mtInformation, [mbOK], 0);
|
mtInformation, [mbOK], 0);
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
begin
|
begin
|
||||||
MessageDlg(fParentApplication.Title,
|
MessageDlg(fParentApplication.Title,
|
||||||
rsThisApplicat,
|
rsThisApplicat,
|
||||||
mtInformation, [mbOK], 0);
|
mtInformation, [mbOK], 0);
|
||||||
Result:=TRUE;
|
Result := True;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TLazAutoUpdate.IsOnlineVersionNewer(const sznewINIPath: string): boolean;
|
function TLazAutoUpdate.IsOnlineVersionNewer(const sznewINIPath: string): boolean;
|
||||||
@ -1363,7 +1409,7 @@ begin
|
|||||||
Format('Failed to delete old file %s', [szTargetPath]));
|
Format('Failed to delete old file %s', [szTargetPath]));
|
||||||
// No error if the delete can't be done
|
// No error if the delete can't be done
|
||||||
end;
|
end;
|
||||||
with fThreadDownload do
|
with fDownloadWrapper do
|
||||||
begin
|
begin
|
||||||
URL := szURL;
|
URL := szURL;
|
||||||
Filename := szTargetPath;
|
Filename := szTargetPath;
|
||||||
@ -1469,6 +1515,9 @@ begin
|
|||||||
// read the VMT once
|
// read the VMT once
|
||||||
if Assigned(fOndebugEvent) then
|
if Assigned(fOndebugEvent) then
|
||||||
fFireDebugEvent := True;
|
fFireDebugEvent := True;
|
||||||
|
|
||||||
|
// **************
|
||||||
|
// **************
|
||||||
iDownloadedSize := 0;
|
iDownloadedSize := 0;
|
||||||
if fZipFileName = '' then
|
if fZipFileName = '' then
|
||||||
begin
|
begin
|
||||||
@ -1570,8 +1619,16 @@ begin
|
|||||||
|
|
||||||
fDownloadInprogress := True;
|
fDownloadInprogress := True;
|
||||||
CheckForOpenSSL;
|
CheckForOpenSSL;
|
||||||
|
|
||||||
|
if Assigned(OnFileWriteProgress) then
|
||||||
|
begin
|
||||||
|
fDownloadWrapper.OnDownloadWrapperFileWriteProgress := OnFileWriteProgress;
|
||||||
|
if fFireDebugEvent then
|
||||||
|
fOndebugEvent(Self, 'DownloadNewVersion', 'OnProgess assigned OK');
|
||||||
|
end;
|
||||||
|
|
||||||
// Do the download
|
// Do the download
|
||||||
with fThreadDownload do
|
with fDownloadWrapper do
|
||||||
begin
|
begin
|
||||||
// Initialise fields
|
// Initialise fields
|
||||||
URL := szURL;
|
URL := szURL;
|
||||||
@ -1594,30 +1651,42 @@ begin
|
|||||||
try
|
try
|
||||||
while (ThreadFinished = False) do
|
while (ThreadFinished = False) do
|
||||||
begin
|
begin
|
||||||
Inc(cCount);
|
try
|
||||||
Sleep(1);
|
// fDownloadWrapper.fDownLoad.Synchronize(fDownloadWrapper.fDownLoad.GetPercent);
|
||||||
fParentApplication.ProcessMessages;
|
cCount := fDownloadWrapper.fDownLoad.Percent;
|
||||||
{$IFDEF WINDOWS}
|
//threadswitch;
|
||||||
if fShowUpdateInCaption then
|
//fParentApplication.QueueAsyncCall(@fDownloadWrapper.fDownLoad.GetPercent,0);
|
||||||
fParentForm.Caption := Format(C_Downloading + ' %d', [cCount])
|
// Inc(cCount);
|
||||||
else
|
//CheckSynchronize();
|
||||||
sleep(10);
|
Sleep(1);
|
||||||
fParentApplication.ProcessMessages; // Keep GUI responsive
|
fParentApplication.ProcessMessages;
|
||||||
|
{$IFDEF WINDOWS}
|
||||||
if (cCount > fDownloadCountLimit) then // Download taking too long?
|
if fShowUpdateInCaption then
|
||||||
begin
|
begin
|
||||||
fDownloadInprogress := False;
|
fParentForm.Caption := Format(C_Downloading + ' %d', [cCount]);
|
||||||
if not fSilentMode then
|
fParentApplication.ProcessMessages;
|
||||||
fParentForm.Caption := szOldCaption;
|
end
|
||||||
if fFireDebugEvent then
|
else
|
||||||
fOndebugEvent(Self, 'DownloadNewVersion', C_TakingTooLong);
|
sleep(10);
|
||||||
ThreadFinished := True;
|
fParentApplication.ProcessMessages; // Keep GUI responsive
|
||||||
fDownloadSize := 0;
|
if (cCount > fDownloadCountLimit) then // Download taking too long?
|
||||||
Exit;
|
begin
|
||||||
end;
|
fDownloadInprogress := False;
|
||||||
|
if not fSilentMode then
|
||||||
|
fParentForm.Caption := szOldCaption;
|
||||||
|
if fFireDebugEvent then
|
||||||
|
fOndebugEvent(Self, 'DownloadNewVersion', C_TakingTooLong);
|
||||||
|
ThreadFinished := True;
|
||||||
|
fDownloadSize := 0;
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
|
|
||||||
|
finally
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
iDownloadedSize := fDownloadSize;
|
iDownloadedSize := fDownloadSize;
|
||||||
|
|
||||||
except
|
except
|
||||||
if fFireDebugEvent then
|
if fFireDebugEvent then
|
||||||
fOndebugEvent(Self, 'DownloadNewVersion', C_ThreadDownloadHTTPCrash);
|
fOndebugEvent(Self, 'DownloadNewVersion', C_ThreadDownloadHTTPCrash);
|
||||||
@ -1690,7 +1759,8 @@ begin
|
|||||||
fFireDebugEvent := True;
|
fFireDebugEvent := True;
|
||||||
if fFireDebugEvent then
|
if fFireDebugEvent then
|
||||||
fOndebugEvent(Self, 'CreateLocalLauImportFile', 'CreateLocalLauImportFile called');
|
fOndebugEvent(Self, 'CreateLocalLauImportFile', 'CreateLocalLauImportFile called');
|
||||||
if FileExistsUTF8(ProgramDirectory + C_LAUTRayINI) then
|
//
|
||||||
|
if (ProgramDirectory + C_LAUTRayINI <> '') then
|
||||||
begin
|
begin
|
||||||
RelocateLauImportFile;
|
RelocateLauImportFile;
|
||||||
Result := True;
|
Result := True;
|
||||||
@ -1759,7 +1829,7 @@ begin
|
|||||||
fOndebugEvent(Self, 'RelocateLauImportFile',
|
fOndebugEvent(Self, 'RelocateLauImportFile',
|
||||||
Format('Looking for %s.', [szSourceLAUTrayPath]));
|
Format('Looking for %s.', [szSourceLAUTrayPath]));
|
||||||
|
|
||||||
if FileExistsUTF8(szSourceLAUTrayPath) then
|
if FileExists(szSourceLAUTrayPath) then
|
||||||
begin
|
begin
|
||||||
if fFireDebugEvent then
|
if fFireDebugEvent then
|
||||||
fOndebugEvent(Self, 'RelocateLauImportFile',
|
fOndebugEvent(Self, 'RelocateLauImportFile',
|
||||||
@ -1803,7 +1873,7 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
// Don't copy over an existing file
|
// Don't copy over an existing file
|
||||||
if not FileExistsUTF8(szDestLAUTrayPath + C_LAUTRayINI) then
|
if not FileExists(szDestLAUTrayPath + C_LAUTRayINI) then
|
||||||
begin
|
begin
|
||||||
// Move C_LAUTRayINI from app folder to local <AppData> folder
|
// Move C_LAUTRayINI from app folder to local <AppData> folder
|
||||||
if FileUtil.CopyFile(szSourceLAUTrayPath, szDestLAUTrayPath +
|
if FileUtil.CopyFile(szSourceLAUTrayPath, szDestLAUTrayPath +
|
||||||
@ -1811,8 +1881,8 @@ begin
|
|||||||
begin
|
begin
|
||||||
if fFireDebugEvent then
|
if fFireDebugEvent then
|
||||||
fOndebugEvent(Self, 'RelocateLauImportFile',
|
fOndebugEvent(Self, 'RelocateLauImportFile',
|
||||||
Format('Relocated %s from %s to %s',
|
Format('Relocated %s from %s to %s', [C_LAUTRayINI,
|
||||||
[C_LAUTRayINI, szSourceLAUTrayPath, szDestLAUTrayPath]));
|
szSourceLAUTrayPath, szDestLAUTrayPath]));
|
||||||
SysUtils.DeleteFile(szSourceLAUTrayPath);
|
SysUtils.DeleteFile(szSourceLAUTrayPath);
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
@ -1833,7 +1903,7 @@ var
|
|||||||
INI: TINIFile;
|
INI: TINIFile;
|
||||||
SectionStringList: TStrings;
|
SectionStringList: TStrings;
|
||||||
szTempUpdatesFolder: string;
|
szTempUpdatesFolder: string;
|
||||||
ErrMsg:String;
|
ErrMsg: string;
|
||||||
begin
|
begin
|
||||||
// fWorkingMode=lauInstall or lauUpdate
|
// fWorkingMode=lauInstall or lauUpdate
|
||||||
Result := False;
|
Result := False;
|
||||||
@ -1851,7 +1921,7 @@ begin
|
|||||||
|
|
||||||
if fWorkingMode = lauUpdate then
|
if fWorkingMode = lauUpdate then
|
||||||
begin
|
begin
|
||||||
if not FileExistsUTF8(fAppFilename) then
|
if not FileExists(fAppFilename) then
|
||||||
begin
|
begin
|
||||||
if fFireDebugEvent then
|
if fFireDebugEvent then
|
||||||
fOndebugEvent(Self, 'DoSilentUpdate',
|
fOndebugEvent(Self, 'DoSilentUpdate',
|
||||||
@ -1946,7 +2016,7 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
if (fWorkingMode = lauInstall) then
|
if (fWorkingMode = lauInstall) then
|
||||||
if FileExistsUTF8(C_UPDATEHMNAME) then
|
if FileExists(C_UPDATEHMNAME) then
|
||||||
begin
|
begin
|
||||||
if FileUtil.CopyFile(C_UPDATEHMNAME, szAppFolder + C_UPDATEHMNAME) then
|
if FileUtil.CopyFile(C_UPDATEHMNAME, szAppFolder + C_UPDATEHMNAME) then
|
||||||
begin
|
begin
|
||||||
@ -1986,7 +2056,7 @@ begin
|
|||||||
fOndebugEvent(Self, 'DoSilentUpdate', 'About to process ' +
|
fOndebugEvent(Self, 'DoSilentUpdate', 'About to process ' +
|
||||||
szTempUpdatesFolder + C_LAUTRayINI);
|
szTempUpdatesFolder + C_LAUTRayINI);
|
||||||
|
|
||||||
if FileExistsUTF8(szTempUpdatesFolder + C_LAUTRayINI) then
|
if FileExists(szTempUpdatesFolder + C_LAUTRayINI) then
|
||||||
begin
|
begin
|
||||||
szLAUTrayAppPath := GetAppConfigDirUTF8(False, True); // Create it if necessary
|
szLAUTrayAppPath := GetAppConfigDirUTF8(False, True); // Create it if necessary
|
||||||
if fFireDebugEvent then
|
if fFireDebugEvent then
|
||||||
@ -2020,7 +2090,7 @@ begin
|
|||||||
Format('Successfully copied %s to %s ',
|
Format('Successfully copied %s to %s ',
|
||||||
[C_LAUTRayINI, szLAUTrayAppPath]));
|
[C_LAUTRayINI, szLAUTrayAppPath]));
|
||||||
|
|
||||||
if FileExistsUTF8(szLAUTrayAppPath + C_LAUTRayINI) then
|
if FileExists(szLAUTrayAppPath + C_LAUTRayINI) then
|
||||||
begin
|
begin
|
||||||
INI := TINIFile.Create(szLAUTrayAppPath + C_LAUTRayINI);
|
INI := TINIFile.Create(szLAUTrayAppPath + C_LAUTRayINI);
|
||||||
SectionStringList := TStringList.Create;
|
SectionStringList := TStringList.Create;
|
||||||
@ -2112,7 +2182,7 @@ begin
|
|||||||
else
|
else
|
||||||
begin
|
begin
|
||||||
cCount := 0;
|
cCount := 0;
|
||||||
if not FileExistsUTF8(ProgramDirectory + C_LAUUPDATENAME) then
|
if not FileExists(ProgramDirectory + C_LAUUPDATENAME) then
|
||||||
begin
|
begin
|
||||||
if fShowDialogs then
|
if fShowDialogs then
|
||||||
ShowMessageFmt(C_UpdaterMissing, [ProgramDirectory + C_LAUUPDATENAME]);
|
ShowMessageFmt(C_UpdaterMissing, [ProgramDirectory + C_LAUUPDATENAME]);
|
||||||
@ -2184,7 +2254,7 @@ begin
|
|||||||
if fFireDebugEvent then
|
if fFireDebugEvent then
|
||||||
fOndebugEvent(Self, 'RemoteUpdateToNewVersion',
|
fOndebugEvent(Self, 'RemoteUpdateToNewVersion',
|
||||||
Format('Waiting for %s', [szAppDir + C_WhatsNewFilename]));
|
Format('Waiting for %s', [szAppDir + C_WhatsNewFilename]));
|
||||||
while not FileExistsUTF8(szAppDir + C_WhatsNewFilename) do
|
while not FileExists(szAppDir + C_WhatsNewFilename) do
|
||||||
begin
|
begin
|
||||||
fParentApplication.ProcessMessages;
|
fParentApplication.ProcessMessages;
|
||||||
Inc(CCount);
|
Inc(CCount);
|
||||||
@ -2311,7 +2381,7 @@ begin
|
|||||||
begin
|
begin
|
||||||
// Start Regular update
|
// Start Regular update
|
||||||
cCount := 0;
|
cCount := 0;
|
||||||
if not FileExistsUTF8(szAppDir + C_UPDATEHMNAME) then
|
if not FileExists(szAppDir + C_UPDATEHMNAME) then
|
||||||
begin
|
begin
|
||||||
if fShowDialogs then
|
if fShowDialogs then
|
||||||
ShowMessageFmt(C_UpdaterMissing, [szAppDir + C_UPDATEHMNAME]);
|
ShowMessageFmt(C_UpdaterMissing, [szAppDir + C_UPDATEHMNAME]);
|
||||||
@ -2418,7 +2488,7 @@ begin
|
|||||||
if fFireDebugEvent then
|
if fFireDebugEvent then
|
||||||
fOndebugEvent(Self, 'UpdateToNewVersion',
|
fOndebugEvent(Self, 'UpdateToNewVersion',
|
||||||
Format('Waiting for %s', [szAppDir + C_WhatsNewFilename]));
|
Format('Waiting for %s', [szAppDir + C_WhatsNewFilename]));
|
||||||
while not FileExistsUTF8(szAppDir + C_WhatsNewFilename) do
|
while not FileExists(szAppDir + C_WhatsNewFilename) do
|
||||||
begin
|
begin
|
||||||
fParentApplication.ProcessMessages;
|
fParentApplication.ProcessMessages;
|
||||||
Inc(CCount);
|
Inc(CCount);
|
||||||
@ -2508,7 +2578,7 @@ function TLazAutoUpdate.GetThreadDownloadReturnCode: integer;
|
|||||||
begin
|
begin
|
||||||
Result := 0;
|
Result := 0;
|
||||||
if ThreadDownload.ThreadFinished then
|
if ThreadDownload.ThreadFinished then
|
||||||
Result := fThreadDownload.fReturnCode;
|
Result := fDownloadWrapper.fReturnCode;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TLazAutoUpdate.SetProjectType(AValue: TProjectType);
|
procedure TLazAutoUpdate.SetProjectType(AValue: TProjectType);
|
||||||
@ -2564,7 +2634,7 @@ begin
|
|||||||
// Set a default value?
|
// Set a default value?
|
||||||
if (fDownloadZipName = '') then
|
if (fDownloadZipName = '') then
|
||||||
fDownloadZipName := ChangeFileExt(ExtractFilename(fAppFilename), '.zip');
|
fDownloadZipName := ChangeFileExt(ExtractFilename(fAppFilename), '.zip');
|
||||||
fThreadDownload.Filename := fUpdatesFolder + PathDelim + fDownloadZipName;
|
fDownloadWrapper.Filename := fUpdatesFolder + PathDelim + fDownloadZipName;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TLazAutoUpdate.SetApplicationVersionString(Avalue: string);
|
procedure TLazAutoUpdate.SetApplicationVersionString(Avalue: string);
|
||||||
@ -2578,9 +2648,9 @@ end;
|
|||||||
// Threaded version
|
// Threaded version
|
||||||
// ================
|
// ================
|
||||||
// Var bDownloadIsPresent:Boolean;
|
// Var bDownloadIsPresent:Boolean;
|
||||||
// MyTheadDownload:TThreadedDownload;
|
// MyTheadDownload:TDownloadWrapper;
|
||||||
// Begin
|
// Begin
|
||||||
// MyTheadDownload:=TThreadedDownload.Create(sourceforgedownloadURL,Localfilepath);
|
// MyTheadDownload:=TDownloadWrapper.Create(sourceforgedownloadURL,Localfilepath);
|
||||||
// {
|
// {
|
||||||
// Note the Localfilepath MUST be specified, and can be a different filename and path
|
// Note the Localfilepath MUST be specified, and can be a different filename and path
|
||||||
// than the filename specified in the sourceforgedownloadURL
|
// than the filename specified in the sourceforgedownloadURL
|
||||||
@ -2600,64 +2670,97 @@ end;
|
|||||||
|
|
||||||
{ TDownloadThreadClass }
|
{ TDownloadThreadClass }
|
||||||
|
|
||||||
constructor TDownloadThreadClass.Create(URL, FileName: string);
|
constructor TDownloadThreadClass.Create(CreateSuspended: boolean);
|
||||||
begin
|
begin
|
||||||
inherited Create(True);
|
inherited Create(CreateSuspended);
|
||||||
fURL := URL;
|
|
||||||
fFileName := FileName;
|
|
||||||
fReturnCode := 0; // Failure code
|
fReturnCode := 0; // Failure code
|
||||||
fDownloadSize := 0;
|
fDownloadSize := 0;
|
||||||
FreeOnTerminate := True;
|
FreeOnTerminate := True;
|
||||||
fLastError := C_OK;
|
fLastError := C_OK;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TDownloadThreadClass.Execute;
|
destructor TDownloadThreadClass.Destroy;
|
||||||
begin
|
begin
|
||||||
// Start the download procedure
|
FreeAndNil(fHTTPClient);
|
||||||
DownloadHTTP(fURL, fFileName, fReturnCode, fDownloadSize, fIsSourceForge, fDebugMode);
|
inherited Destroy;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
//constructor TThreadedDownload.Create(URL, FileName: string);
|
procedure TDownloadThreadClass.DoPercent(Sender: TObject;
|
||||||
constructor TThreadedDownload.Create();
|
const ContentLength, CurrentPos: int64);
|
||||||
|
begin
|
||||||
|
fPercent := integer((Trunc((CurrentPos / ContentLength) * 100)));
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TDownloadThreadClass.Execute;
|
||||||
|
begin
|
||||||
|
fHTTPClient := TFPHTTPClient.Create(nil);
|
||||||
|
// OnThreadDataEvent:=fHTTPClient.OnDataReceived;
|
||||||
|
// fHTTPClient.OnDataReceived:=@DoPercent;
|
||||||
|
// Start the download procedure
|
||||||
|
fDownloadSize := GetDownloadFileSize(fURL, fIsRepositoryURL);
|
||||||
|
if (fDownloadSize > 0) then
|
||||||
|
begin
|
||||||
|
fDownloadSize := 0;
|
||||||
|
DownloadHTTP(fURL, fFileName, fReturnCode, fDownloadSize,
|
||||||
|
fIsRepositoryURL, fDebugMode);
|
||||||
|
end
|
||||||
|
else
|
||||||
|
fLastError := 'Zero Size';
|
||||||
|
|
||||||
|
end;
|
||||||
|
|
||||||
|
constructor TDownloadWrapper.Create();
|
||||||
|
// Called from LazAutoUpdate.Create
|
||||||
begin
|
begin
|
||||||
inherited Create;
|
inherited Create;
|
||||||
fThreadFinished := False;
|
fThreadFinished := False;
|
||||||
fAppLicationVersionString := '0.0.1';
|
fAppLicationVersionString := '0.0.1';
|
||||||
fComponentVersion := C_TThreadedDownloadComponentVersion;
|
fComponentVersion := C_TThreadedDownloadComponentVersion;
|
||||||
fLastError := C_OK;
|
fLastError := C_OK;
|
||||||
|
// Create the thread (suspended)
|
||||||
|
fdownload := TDownloadThreadClass.Create(True);
|
||||||
|
fdownload.FreeOnTerminate := True;
|
||||||
|
fdownload.OnTerminate := @DownloadTerminiated;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{ TThreadedDownload }
|
destructor TDownloadWrapper.Destroy;
|
||||||
|
begin
|
||||||
|
inherited Destroy;
|
||||||
|
end;
|
||||||
|
|
||||||
function TThreadedDownload.ThreadDownloadHTTP: boolean;
|
{ TDownloadWrapper }
|
||||||
var
|
|
||||||
download: TDownloadThreadClass;
|
function TDownloadWrapper.ThreadDownloadHTTP: boolean;
|
||||||
begin
|
begin
|
||||||
if (CompareFileExt(ExtractFilename(fFileName), 'zip', False) = 0) then
|
if (CompareFileExt(ExtractFilename(fFileName), 'zip', False) = 0) then
|
||||||
fUnzipAfter := True
|
fUnzipAfter := True
|
||||||
else
|
else
|
||||||
fUnzipAfter := False;
|
fUnzipAfter := False;
|
||||||
|
if Assigned(OnDownloadWrapperFileWriteProgress) then
|
||||||
download := TDownloadThreadClass.Create(fURL, fFileName);
|
fdownload.OnThreadFileWriteProgress := OnDownloadWrapperFileWriteProgress;
|
||||||
download.OnTerminate := @DownloadTerminiated;
|
fdownload.fIsRepositoryURL := fIsCodeRepository;
|
||||||
download.fIsSourceForge := fIsSourceForge;
|
fdownload.fDebugMode := fDebugMode;
|
||||||
download.fDebugMode := fDebugMode;
|
fdownload.fLastError := fLastError;
|
||||||
download.fLastError := fLastError;
|
fdownload.fURL := URL;
|
||||||
download.FreeOnTerminate := True;
|
fdownload.fFileName := FileName;
|
||||||
download.start;
|
fdownload.fDownloadSize := 0;
|
||||||
|
fdownload.start;
|
||||||
Result := True;
|
Result := True;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TThreadedDownload.DownloadTerminiated(Sender: TObject);
|
procedure TDownloadWrapper.DownloadTerminiated(Sender: TObject);
|
||||||
// Unzips all files ready for updatehmxxx to copy them over
|
// Unzips all files ready for updatehmxxx to copy them over
|
||||||
var
|
var
|
||||||
UnZipper: TUnZipper;
|
UnZipper: TUnZipper;
|
||||||
begin
|
begin
|
||||||
fReturnCode := (Sender as TDownloadThreadClass).fReturnCode;
|
FreeAndNil(fDownload.fHTTPClient);
|
||||||
fDownloadSize := (Sender as TDownloadThreadClass).fDownloadSize;
|
fReturnCode := fdownload.fReturnCode;
|
||||||
fLastError := (Sender as TDownloadThreadClass).fLastError;
|
fDownloadSize := fdownload.fDownloadSize;
|
||||||
|
fLastError := fdownload.fLastError;
|
||||||
fThreadFinished := True;
|
fThreadFinished := True;
|
||||||
if (FileExistsUTF8(fFileName) = True) and
|
if fReturnCode = 401 then
|
||||||
|
Exit;
|
||||||
|
if (FileExists(fFileName) = True) and
|
||||||
(CompareFileExt(fFileName, '.zip', False) = 0) then
|
(CompareFileExt(fFileName, '.zip', False) = 0) then
|
||||||
if fUnzipAfter then
|
if fUnzipAfter then
|
||||||
begin
|
begin
|
||||||
@ -2667,7 +2770,8 @@ begin
|
|||||||
UnZipper.OutputPath := ExtractFileDir(fFileName);
|
UnZipper.OutputPath := ExtractFileDir(fFileName);
|
||||||
UnZipper.Examine;
|
UnZipper.Examine;
|
||||||
UnZipper.UnZipAllFiles;
|
UnZipper.UnZipAllFiles;
|
||||||
SysUtils.DeleteFile(fFileName);
|
if FileExists(fFileName) then
|
||||||
|
SysUtils.DeleteFile(fFileName);
|
||||||
finally
|
finally
|
||||||
UnZipper.Free;
|
UnZipper.Free;
|
||||||
end;
|
end;
|
||||||
@ -2675,36 +2779,132 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
{ End of class members}
|
{ End of class members}
|
||||||
function DownloadHTTP(URL, TargetFile: string; var ReturnCode, DownloadSize: integer;
|
|
||||||
bIsSourceForge, fDebugmode: boolean): boolean;
|
function TDownloadThreadClass.GetPercent: integer;
|
||||||
|
begin
|
||||||
|
Result := fPercent;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TDownloadThreadClass.SetPercent(AValue: integer);
|
||||||
|
begin
|
||||||
|
fPercent := AValue;
|
||||||
|
end;
|
||||||
|
|
||||||
|
function TDownloadThreadClass.GetDownloadFileSize(URL: string;
|
||||||
|
bIsRepositoryURL: boolean): int64;
|
||||||
|
var
|
||||||
|
VSize: int64 = 0;
|
||||||
|
I: integer;
|
||||||
|
S: string;
|
||||||
|
begin
|
||||||
|
try
|
||||||
|
if bIsRepositoryURL then
|
||||||
|
fHTTPClient.AllowRedirect := True;
|
||||||
|
try
|
||||||
|
fHTTPClient.HTTPMethod('HEAD', URL, nil, [200]);
|
||||||
|
except
|
||||||
|
Result := 0;
|
||||||
|
end;
|
||||||
|
for I := 0 to pred(fHTTPClient.ResponseHeaders.Count) do
|
||||||
|
begin
|
||||||
|
S := UpperCase(fHTTPClient.ResponseHeaders[I]);
|
||||||
|
if Pos('CONTENT-LENGTH:', S) > 0 then
|
||||||
|
begin
|
||||||
|
VSize := StrToIntDef(Copy(S, Pos(':', S) + 1, Length(S)), 0);
|
||||||
|
Result := VSize;
|
||||||
|
Break;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
except
|
||||||
|
Result := 0;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
function TDownloadThreadClass.DownloadHTTP(URL, TargetFile: string;
|
||||||
|
var ReturnCode, DownloadSize: integer; bIsRepositoryURL, Debugmode: boolean): boolean;
|
||||||
// Download file; retry if necessary.
|
// Download file; retry if necessary.
|
||||||
// Deals with https download links
|
// Deals with https download links
|
||||||
var
|
var
|
||||||
HTTPClient: TFPHTTPClient;
|
// HTTPClient: TFPHTTPClient;
|
||||||
|
vStream: TStreamAdapter;
|
||||||
|
vSize: int64;
|
||||||
begin
|
begin
|
||||||
Result := False;
|
Result := False;
|
||||||
HTTPClient := TFPHTTPClient.Create(nil);
|
vSize := GetDownloadFileSize(URL, bIsRepositoryURL);
|
||||||
if bIsSourceForge then
|
if (vSize = 0) then
|
||||||
|
Exit;
|
||||||
|
if bIsRepositoryURL then
|
||||||
begin
|
begin
|
||||||
HTTPClient.AllowRedirect := True;
|
fHTTPClient.AllowRedirect := True;
|
||||||
end;
|
end;
|
||||||
// ReturnCode may not be useful, but it's provided here
|
// ReturnCode may not be useful, but it's provided here
|
||||||
try
|
try
|
||||||
try
|
try
|
||||||
// Try to get the file
|
// Try to get the file
|
||||||
HTTPClient.Get(URL, TargetFile);
|
// HTTPClient.Get(URL, TargetFile);
|
||||||
ReturnCode := HTTPClient.ResponseStatusCode;
|
vStream := TStreamAdapter.Create(TFileStream.Create(TargetFile, fmCreate), VSize);
|
||||||
|
if Assigned(OnThreadFileWriteProgress) then
|
||||||
|
vStream.OnFileWriteProgress := OnThreadFileWriteProgress;
|
||||||
|
fHTTPClient.OnDataReceived := @DoPercent;
|
||||||
|
|
||||||
|
fHTTPClient.HTTPMethod('GET', Url, vStream, [200]);
|
||||||
|
ReturnCode := fHTTPClient.ResponseStatusCode;
|
||||||
DownloadSize := Filesize(TargetFile);
|
DownloadSize := Filesize(TargetFile);
|
||||||
Result := True;
|
Result := True;
|
||||||
except
|
except
|
||||||
// We don't care for the reason for this error; the download failed.
|
// We don't care for the reason for this error; the download failed.
|
||||||
|
if FileExists(TargetFile) then
|
||||||
|
SysUtils.DeleteFile(TargetFile);
|
||||||
|
ReturnCode := 401;
|
||||||
|
DownloadSize := 0;
|
||||||
Result := False;
|
Result := False;
|
||||||
end;
|
end;
|
||||||
finally
|
finally
|
||||||
HTTPClient.Free;
|
vStream.Free;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
constructor TStreamAdapter.Create(AStream: TStream; ASize: int64);
|
||||||
|
begin
|
||||||
|
inherited Create;
|
||||||
|
FStream := AStream;
|
||||||
|
fStream.Size := ASize;
|
||||||
|
fStream.Position := 0;
|
||||||
|
end;
|
||||||
|
|
||||||
|
destructor TStreamAdapter.Destroy;
|
||||||
|
begin
|
||||||
|
FStream.Free;
|
||||||
|
inherited Destroy;
|
||||||
|
end;
|
||||||
|
|
||||||
|
function TStreamAdapter.Read(var Buffer; Count: longint): longint;
|
||||||
|
begin
|
||||||
|
Result := FStream.Read(Buffer, Count);
|
||||||
|
DoProgress(False);
|
||||||
|
end;
|
||||||
|
|
||||||
|
function TStreamAdapter.Write(const Buffer; Count: longint): longint;
|
||||||
|
begin
|
||||||
|
Result := FStream.Write(Buffer, Count);
|
||||||
|
DoProgress(True);
|
||||||
|
end;
|
||||||
|
|
||||||
|
function TStreamAdapter.Seek(Offset: longint; Origin: word): longint;
|
||||||
|
begin
|
||||||
|
Result := FStream.Seek(Offset, Origin);
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TStreamAdapter.DoProgress(Writing: boolean);
|
||||||
|
begin
|
||||||
|
fPercent := Trunc((FStream.Position) / (FStream.Size) * 100);
|
||||||
|
//WriteLn(FStream.Size);
|
||||||
|
if Assigned(OnFileWriteProgress) then
|
||||||
|
begin
|
||||||
|
OnFileWriteProgress(self, FPercent);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
end.
|
end.
|
||||||
|
@ -6,10 +6,10 @@
|
|||||||
},
|
},
|
||||||
"UpdatePackageFiles" : [
|
"UpdatePackageFiles" : [
|
||||||
{
|
{
|
||||||
"ForceNotify" : false,
|
"ForceNotify" : true,
|
||||||
"InternalVersion" : 1,
|
"InternalVersion" : 1,
|
||||||
"Name" : "lazupdate.lpk",
|
"Name" : "lazupdate.lpk",
|
||||||
"Version" : "0.3.8.0"
|
"Version" : "0.3.9.0"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
@ -233,7 +233,7 @@ OUT:
|
|||||||
Use function GetShortCutDebugString to get errors as a string
|
Use function GetShortCutDebugString to get errors as a string
|
||||||
}
|
}
|
||||||
var
|
var
|
||||||
XdgDesktopStringList: TStringListUTF8;
|
XdgDesktopStringList: TStringList;
|
||||||
XdgDesktopFile: string;
|
XdgDesktopFile: string;
|
||||||
Aprocess: TProcess;
|
Aprocess: TProcess;
|
||||||
sPathToShare: string;
|
sPathToShare: string;
|
||||||
@ -293,7 +293,7 @@ begin
|
|||||||
AddToDebugString('Success: sPathToShare = ' + sPathToShare);
|
AddToDebugString('Success: sPathToShare = ' + sPathToShare);
|
||||||
|
|
||||||
// Make up the desktop file
|
// Make up the desktop file
|
||||||
XdgDesktopStringList := TStringListUTF8.Create;
|
XdgDesktopStringList := TStringList.Create;
|
||||||
try
|
try
|
||||||
XdgDesktopStringList.Add('[Desktop Entry]');
|
XdgDesktopStringList.Add('[Desktop Entry]');
|
||||||
XdgDesktopStringList.Add('Encoding=UTF-8');
|
XdgDesktopStringList.Add('Encoding=UTF-8');
|
||||||
|
@ -57,7 +57,7 @@ Implementation
|
|||||||
|
|
||||||
Uses
|
Uses
|
||||||
resource, versiontypes, versionresource, InterfaceBase
|
resource, versiontypes, versionresource, InterfaceBase
|
||||||
{$IF (lcl_major > 0) and (lcl_minor > 6)}, LCLPlatformDef {$ENDIF};
|
, LCLPlatformDef;
|
||||||
|
|
||||||
Type
|
Type
|
||||||
TVersionInfo = Class
|
TVersionInfo = Class
|
||||||
|
Reference in New Issue
Block a user