You've already forked lazarus-ccr
To V0.3.8
Improvements to MakeShortCut (Windows) Test installer now self-updates git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@5730 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@ -66,7 +66,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="7" Build="2"/>
|
<Version Minor="3" Release="8"/>
|
||||||
<Files Count="7">
|
<Files Count="7">
|
||||||
<Item1>
|
<Item1>
|
||||||
<Filename Value="ulazautoupdate.pas"/>
|
<Filename Value="ulazautoupdate.pas"/>
|
||||||
|
@ -20,9 +20,8 @@
|
|||||||
</i18n>
|
</i18n>
|
||||||
<VersionInfo>
|
<VersionInfo>
|
||||||
<UseVersionInfo Value="True"/>
|
<UseVersionInfo Value="True"/>
|
||||||
<RevisionNr Value="1"/>
|
<RevisionNr Value="2"/>
|
||||||
<Attributes pvaPreRelease="True"/>
|
<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="Installet/Updater using LazAutoUpdate" ProductVersion="0.0.0.0"/>
|
|
||||||
</VersionInfo>
|
</VersionInfo>
|
||||||
<BuildModes Count="5">
|
<BuildModes Count="5">
|
||||||
<Item1 Name="Win32debug" Default="True"/>
|
<Item1 Name="Win32debug" Default="True"/>
|
||||||
|
@ -39,8 +39,7 @@ uses
|
|||||||
cthreads,
|
cthreads,
|
||||||
{$ENDIF}{$ENDIF}
|
{$ENDIF}{$ENDIF}
|
||||||
Interfaces, // this includes the LCL widgetset
|
Interfaces, // this includes the LCL widgetset
|
||||||
Forms, umainform
|
Forms, umainform;
|
||||||
{ you can add units after this };
|
|
||||||
|
|
||||||
{$R *.res}
|
{$R *.res}
|
||||||
|
|
||||||
|
@ -4,14 +4,13 @@
|
|||||||
<PathDelim Value="\"/>
|
<PathDelim Value="\"/>
|
||||||
<Version Value="10"/>
|
<Version Value="10"/>
|
||||||
<BuildModes Active="Linux64"/>
|
<BuildModes Active="Linux64"/>
|
||||||
<Units Count="7">
|
<Units Count="17">
|
||||||
<Unit0>
|
<Unit0>
|
||||||
<Filename Value="lauinstaller.lpr"/>
|
<Filename Value="lauinstaller.lpr"/>
|
||||||
<IsPartOfProject Value="True"/>
|
<IsPartOfProject Value="True"/>
|
||||||
<IsVisibleTab Value="True"/>
|
<EditorIndex Value="2"/>
|
||||||
<EditorIndex Value="1"/>
|
|
||||||
<CursorPos X="25" Y="5"/>
|
<CursorPos X="25" Y="5"/>
|
||||||
<UsageCount Value="27"/>
|
<UsageCount Value="31"/>
|
||||||
<Loaded Value="True"/>
|
<Loaded Value="True"/>
|
||||||
</Unit0>
|
</Unit0>
|
||||||
<Unit1>
|
<Unit1>
|
||||||
@ -20,9 +19,9 @@
|
|||||||
<ComponentName Value="mainform"/>
|
<ComponentName Value="mainform"/>
|
||||||
<HasResources Value="True"/>
|
<HasResources Value="True"/>
|
||||||
<ResourceBaseClass Value="Form"/>
|
<ResourceBaseClass Value="Form"/>
|
||||||
<TopLine Value="179"/>
|
<TopLine Value="194"/>
|
||||||
<CursorPos X="39" Y="202"/>
|
<CursorPos X="65" Y="215"/>
|
||||||
<UsageCount Value="27"/>
|
<UsageCount Value="31"/>
|
||||||
<Loaded Value="True"/>
|
<Loaded Value="True"/>
|
||||||
<LoadedDesigner Value="True"/>
|
<LoadedDesigner Value="True"/>
|
||||||
</Unit1>
|
</Unit1>
|
||||||
@ -35,17 +34,19 @@
|
|||||||
</Unit2>
|
</Unit2>
|
||||||
<Unit3>
|
<Unit3>
|
||||||
<Filename Value="..\ulazautoupdate.pas"/>
|
<Filename Value="..\ulazautoupdate.pas"/>
|
||||||
<EditorIndex Value="3"/>
|
<IsVisibleTab Value="True"/>
|
||||||
<TopLine Value="2462"/>
|
<EditorIndex Value="10"/>
|
||||||
<CursorPos Y="2415"/>
|
<TopLine Value="111"/>
|
||||||
<UsageCount Value="12"/>
|
<CursorPos X="18" Y="134"/>
|
||||||
|
<UsageCount Value="14"/>
|
||||||
<Loaded Value="True"/>
|
<Loaded Value="True"/>
|
||||||
</Unit3>
|
</Unit3>
|
||||||
<Unit4>
|
<Unit4>
|
||||||
<Filename Value="..\ushortcut.pas"/>
|
<Filename Value="..\ushortcut.pas"/>
|
||||||
<EditorIndex Value="2"/>
|
<EditorIndex Value="3"/>
|
||||||
<CursorPos Y="6"/>
|
<TopLine Value="403"/>
|
||||||
<UsageCount Value="12"/>
|
<CursorPos X="93" Y="449"/>
|
||||||
|
<UsageCount Value="14"/>
|
||||||
<Loaded Value="True"/>
|
<Loaded Value="True"/>
|
||||||
</Unit4>
|
</Unit4>
|
||||||
<Unit5>
|
<Unit5>
|
||||||
@ -61,127 +62,203 @@
|
|||||||
<CursorPos X="68" Y="324"/>
|
<CursorPos X="68" Y="324"/>
|
||||||
<UsageCount Value="10"/>
|
<UsageCount Value="10"/>
|
||||||
</Unit6>
|
</Unit6>
|
||||||
|
<Unit7>
|
||||||
|
<Filename Value="X:\deleteme\issrc-master\issrc-master\Components\BidiUtils.pas"/>
|
||||||
|
<EditorIndex Value="-1"/>
|
||||||
|
<TopLine Value="34"/>
|
||||||
|
<UsageCount Value="10"/>
|
||||||
|
</Unit7>
|
||||||
|
<Unit8>
|
||||||
|
<Filename Value="X:\deleteme\issrc-master\issrc-master\Components\ScintStylerInnoSetup.pas"/>
|
||||||
|
<EditorIndex Value="-1"/>
|
||||||
|
<TopLine Value="624"/>
|
||||||
|
<UsageCount Value="10"/>
|
||||||
|
</Unit8>
|
||||||
|
<Unit9>
|
||||||
|
<Filename Value="X:\deleteme\issrc-master\issrc-master\Projects\Install.pas"/>
|
||||||
|
<EditorIndex Value="8"/>
|
||||||
|
<TopLine Value="85"/>
|
||||||
|
<CursorPos X="50" Y="24"/>
|
||||||
|
<UsageCount Value="12"/>
|
||||||
|
<Loaded Value="True"/>
|
||||||
|
</Unit9>
|
||||||
|
<Unit10>
|
||||||
|
<Filename Value="umakeshortcut.pas"/>
|
||||||
|
<EditorIndex Value="9"/>
|
||||||
|
<TopLine Value="150"/>
|
||||||
|
<CursorPos Y="166"/>
|
||||||
|
<UsageCount Value="22"/>
|
||||||
|
<Loaded Value="True"/>
|
||||||
|
</Unit10>
|
||||||
|
<Unit11>
|
||||||
|
<Filename Value="C:\laztrunk\fpc\packages\winunits-base\src\shlobj.pp"/>
|
||||||
|
<EditorIndex Value="7"/>
|
||||||
|
<TopLine Value="2332"/>
|
||||||
|
<CursorPos X="6" Y="2362"/>
|
||||||
|
<UsageCount Value="11"/>
|
||||||
|
<Loaded Value="True"/>
|
||||||
|
</Unit11>
|
||||||
|
<Unit12>
|
||||||
|
<Filename Value="C:\laztrunk\fpc\packages\winunits-base\src\shellapi.pp"/>
|
||||||
|
<UnitName Value="ShellApi"/>
|
||||||
|
<EditorIndex Value="6"/>
|
||||||
|
<TopLine Value="225"/>
|
||||||
|
<CursorPos X="19" Y="233"/>
|
||||||
|
<UsageCount Value="11"/>
|
||||||
|
<Loaded Value="True"/>
|
||||||
|
</Unit12>
|
||||||
|
<Unit13>
|
||||||
|
<Filename Value="C:\laztrunk\fpc\rtl\win\wininc\ascdef.inc"/>
|
||||||
|
<EditorIndex Value="-1"/>
|
||||||
|
<TopLine Value="85"/>
|
||||||
|
<CursorPos X="10" Y="113"/>
|
||||||
|
<UsageCount Value="10"/>
|
||||||
|
</Unit13>
|
||||||
|
<Unit14>
|
||||||
|
<Filename Value="C:\laztrunk\fpc\rtl\objpas\sysutils\finah.inc"/>
|
||||||
|
<EditorIndex Value="5"/>
|
||||||
|
<CursorPos X="10" Y="33"/>
|
||||||
|
<UsageCount Value="10"/>
|
||||||
|
<Loaded Value="True"/>
|
||||||
|
</Unit14>
|
||||||
|
<Unit15>
|
||||||
|
<Filename Value="C:\laztrunk\lazarus\components\lazutils\lazfileutils.pas"/>
|
||||||
|
<UnitName Value="LazFileUtils"/>
|
||||||
|
<EditorIndex Value="4"/>
|
||||||
|
<TopLine Value="58"/>
|
||||||
|
<CursorPos X="23" Y="102"/>
|
||||||
|
<UsageCount Value="10"/>
|
||||||
|
<Loaded Value="True"/>
|
||||||
|
</Unit15>
|
||||||
|
<Unit16>
|
||||||
|
<Filename Value="..\testapp\umainform.pas"/>
|
||||||
|
<EditorIndex Value="1"/>
|
||||||
|
<TopLine Value="139"/>
|
||||||
|
<CursorPos Y="168"/>
|
||||||
|
<UsageCount Value="10"/>
|
||||||
|
<Loaded Value="True"/>
|
||||||
|
</Unit16>
|
||||||
</Units>
|
</Units>
|
||||||
<JumpHistory Count="30" HistoryIndex="29">
|
<JumpHistory Count="30" HistoryIndex="29">
|
||||||
<Position1>
|
<Position1>
|
||||||
<Filename Value="umainform.pas"/>
|
<Filename Value="umakeshortcut.pas"/>
|
||||||
<Caret Line="42" Column="8" TopLine="29"/>
|
<Caret Line="136" Column="43" TopLine="118"/>
|
||||||
</Position1>
|
</Position1>
|
||||||
<Position2>
|
<Position2>
|
||||||
<Filename Value="umainform.pas"/>
|
<Filename Value="..\ushortcut.pas"/>
|
||||||
<Caret Line="73" Column="58" TopLine="30"/>
|
<Caret Line="199" TopLine="167"/>
|
||||||
</Position2>
|
</Position2>
|
||||||
<Position3>
|
<Position3>
|
||||||
<Filename Value="umainform.pas"/>
|
<Filename Value="..\ushortcut.pas"/>
|
||||||
<Caret Line="82" TopLine="30"/>
|
<Caret Line="193" Column="21" TopLine="166"/>
|
||||||
</Position3>
|
</Position3>
|
||||||
<Position4>
|
<Position4>
|
||||||
<Filename Value="umainform.pas"/>
|
<Filename Value="X:\deleteme\issrc-master\issrc-master\Projects\Install.pas"/>
|
||||||
<Caret Line="54" Column="27" TopLine="13"/>
|
<Caret Line="1974" TopLine="1933"/>
|
||||||
</Position4>
|
</Position4>
|
||||||
<Position5>
|
<Position5>
|
||||||
<Filename Value="umainform.pas"/>
|
<Filename Value="X:\deleteme\issrc-master\issrc-master\Projects\Install.pas"/>
|
||||||
<Caret Line="62" Column="34" TopLine="53"/>
|
<Caret Line="1856" Column="45" TopLine="1831"/>
|
||||||
</Position5>
|
</Position5>
|
||||||
<Position6>
|
<Position6>
|
||||||
<Filename Value="umainform.pas"/>
|
<Filename Value="..\ushortcut.pas"/>
|
||||||
<Caret Line="89" Column="49" TopLine="65"/>
|
<Caret Line="154" Column="21" TopLine="132"/>
|
||||||
</Position6>
|
</Position6>
|
||||||
<Position7>
|
<Position7>
|
||||||
<Filename Value="umainform.pas"/>
|
<Filename Value="..\ushortcut.pas"/>
|
||||||
<Caret Line="36" TopLine="9"/>
|
<Caret Line="180" Column="59" TopLine="160"/>
|
||||||
</Position7>
|
</Position7>
|
||||||
<Position8>
|
<Position8>
|
||||||
<Filename Value="umainform.pas"/>
|
<Filename Value="..\ushortcut.pas"/>
|
||||||
<Caret Line="60" Column="32" TopLine="33"/>
|
<Caret Line="205" TopLine="163"/>
|
||||||
</Position8>
|
</Position8>
|
||||||
<Position9>
|
<Position9>
|
||||||
<Filename Value="..\ulazautoupdate.pas"/>
|
<Filename Value="..\ushortcut.pas"/>
|
||||||
<Caret Line="1836" Column="7" TopLine="1813"/>
|
<Caret Line="198" Column="23" TopLine="171"/>
|
||||||
</Position9>
|
</Position9>
|
||||||
<Position10>
|
<Position10>
|
||||||
<Filename Value="umainform.pas"/>
|
<Filename Value="umainform.pas"/>
|
||||||
<Caret Line="110" Column="7" TopLine="65"/>
|
<Caret Line="130" Column="24" TopLine="116"/>
|
||||||
</Position10>
|
</Position10>
|
||||||
<Position11>
|
<Position11>
|
||||||
<Filename Value="umainform.pas"/>
|
<Filename Value="umainform.pas"/>
|
||||||
<Caret Line="60" Column="34" TopLine="50"/>
|
<Caret Line="131" Column="24" TopLine="117"/>
|
||||||
</Position11>
|
</Position11>
|
||||||
<Position12>
|
<Position12>
|
||||||
<Filename Value="umainform.pas"/>
|
<Filename Value="umainform.pas"/>
|
||||||
<Caret Line="9" Column="51" TopLine="2"/>
|
<Caret Line="132" TopLine="123"/>
|
||||||
</Position12>
|
</Position12>
|
||||||
<Position13>
|
<Position13>
|
||||||
<Filename Value="umainform.pas"/>
|
<Filename Value="..\ushortcut.pas"/>
|
||||||
<Caret Line="8" Column="35"/>
|
<Caret Line="442" TopLine="398"/>
|
||||||
</Position13>
|
</Position13>
|
||||||
<Position14>
|
<Position14>
|
||||||
<Filename Value="umainform.pas"/>
|
<Filename Value="..\ushortcut.pas"/>
|
||||||
<Caret Line="108" Column="90" TopLine="65"/>
|
<Caret Line="436" Column="11" TopLine="404"/>
|
||||||
</Position14>
|
</Position14>
|
||||||
<Position15>
|
<Position15>
|
||||||
<Filename Value="umainform.pas"/>
|
<Filename Value="..\ushortcut.pas"/>
|
||||||
<Caret Line="8" Column="22"/>
|
<Caret Line="438" Column="25" TopLine="404"/>
|
||||||
</Position15>
|
</Position15>
|
||||||
<Position16>
|
<Position16>
|
||||||
<Filename Value="umainform.pas"/>
|
<Filename Value="..\ushortcut.pas"/>
|
||||||
<Caret Line="67" Column="69" TopLine="47"/>
|
<Caret Line="428" Column="45" TopLine="404"/>
|
||||||
</Position16>
|
</Position16>
|
||||||
<Position17>
|
<Position17>
|
||||||
<Filename Value="umainform.pas"/>
|
<Filename Value="..\ushortcut.pas"/>
|
||||||
<Caret Line="13" Column="32"/>
|
<Caret Line="390" Column="27" TopLine="369"/>
|
||||||
</Position17>
|
</Position17>
|
||||||
<Position18>
|
<Position18>
|
||||||
<Filename Value="umainform.pas"/>
|
<Filename Value="..\ushortcut.pas"/>
|
||||||
<Caret Line="78" Column="82" TopLine="52"/>
|
<Caret Line="438" Column="23" TopLine="401"/>
|
||||||
</Position18>
|
</Position18>
|
||||||
<Position19>
|
<Position19>
|
||||||
<Filename Value="umainform.pas"/>
|
<Filename Value="..\ushortcut.pas"/>
|
||||||
<Caret Line="83" Column="36" TopLine="58"/>
|
<Caret Line="440" Column="79" TopLine="404"/>
|
||||||
</Position19>
|
</Position19>
|
||||||
<Position20>
|
<Position20>
|
||||||
<Filename Value="..\ulazautoupdate.pas"/>
|
<Filename Value="umainform.pas"/>
|
||||||
<Caret Line="1923" TopLine="1888"/>
|
<Caret Line="119" Column="50" TopLine="118"/>
|
||||||
</Position20>
|
</Position20>
|
||||||
<Position21>
|
<Position21>
|
||||||
<Filename Value="..\ulazautoupdate.pas"/>
|
<Filename Value="umainform.pas"/>
|
||||||
<Caret Line="1933" Column="60" TopLine="1897"/>
|
<Caret Line="120" Column="50" TopLine="119"/>
|
||||||
</Position21>
|
</Position21>
|
||||||
<Position22>
|
<Position22>
|
||||||
<Filename Value="..\ulazautoupdate.pas"/>
|
<Filename Value="umainform.pas"/>
|
||||||
<Caret Line="1938" Column="83" TopLine="1903"/>
|
<Caret Line="122" Column="50" TopLine="121"/>
|
||||||
</Position22>
|
</Position22>
|
||||||
<Position23>
|
<Position23>
|
||||||
<Filename Value="..\ulazautoupdate.pas"/>
|
<Filename Value="umainform.pas"/>
|
||||||
<Caret Line="1934" Column="41" TopLine="1902"/>
|
<Caret Line="220" Column="30" TopLine="206"/>
|
||||||
</Position23>
|
</Position23>
|
||||||
<Position24>
|
<Position24>
|
||||||
<Filename Value="..\ulazautoupdate.pas"/>
|
<Filename Value="umainform.pas"/>
|
||||||
<Caret Line="881" Column="38" TopLine="871"/>
|
<Caret Line="105" Column="3" TopLine="103"/>
|
||||||
</Position24>
|
</Position24>
|
||||||
<Position25>
|
<Position25>
|
||||||
<Filename Value="umainform.pas"/>
|
<Filename Value="umainform.pas"/>
|
||||||
<Caret Line="177" Column="46" TopLine="148"/>
|
<Caret Line="230" Column="27" TopLine="209"/>
|
||||||
</Position25>
|
</Position25>
|
||||||
<Position26>
|
<Position26>
|
||||||
<Filename Value="umainform.pas"/>
|
<Filename Value="umainform.pas"/>
|
||||||
<Caret Line="117" Column="3" TopLine="115"/>
|
<Caret Line="215" Column="45" TopLine="193"/>
|
||||||
</Position26>
|
</Position26>
|
||||||
<Position27>
|
<Position27>
|
||||||
<Filename Value="umainform.pas"/>
|
<Filename Value="umainform.pas"/>
|
||||||
<Caret Line="128" Column="38" TopLine="124"/>
|
<Caret Line="226" Column="56" TopLine="191"/>
|
||||||
</Position27>
|
</Position27>
|
||||||
<Position28>
|
<Position28>
|
||||||
<Filename Value="umainform.pas"/>
|
<Filename Value="..\ulazautoupdate.pas"/>
|
||||||
<Caret Line="166" Column="7" TopLine="139"/>
|
<Caret Line="355" Column="24" TopLine="326"/>
|
||||||
</Position28>
|
</Position28>
|
||||||
<Position29>
|
<Position29>
|
||||||
<Filename Value="..\ulazautoupdate.pas"/>
|
<Filename Value="..\ulazautoupdate.pas"/>
|
||||||
<Caret Line="139" Column="27" TopLine="126"/>
|
<Caret Line="1192" Column="17" TopLine="1182"/>
|
||||||
</Position29>
|
</Position29>
|
||||||
<Position30>
|
<Position30>
|
||||||
<Filename Value="..\ulazautoupdate.pas"/>
|
<Filename Value="umainform.pas"/>
|
||||||
<Caret Line="1833" Column="17" TopLine="1806"/>
|
<Caret Line="231" Column="20" TopLine="204"/>
|
||||||
</Position30>
|
</Position30>
|
||||||
</JumpHistory>
|
</JumpHistory>
|
||||||
</ProjectSession>
|
</ProjectSession>
|
||||||
|
Binary file not shown.
@ -5,10 +5,18 @@ msgstr "Content-Type: text/plain; charset=UTF-8"
|
|||||||
msgid "mainform"
|
msgid "mainform"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
#: tmainform.cmd_deleteshortcuticon.caption
|
||||||
|
msgid "Delete Shortcut"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: tmainform.cmd_install.caption
|
#: tmainform.cmd_install.caption
|
||||||
msgid "Install"
|
msgid "Install"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
#: tmainform.cmd_makeshortcuticon.caption
|
||||||
|
msgid "Make Shortcut"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: tmainform.cmd_run.caption
|
#: tmainform.cmd_run.caption
|
||||||
msgid "Run"
|
msgid "Run"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
@ -29,3 +37,11 @@ msgstr ""
|
|||||||
msgid "E&xit"
|
msgid "E&xit"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
#: tmainform.mnu_help.caption
|
||||||
|
msgid "&Help"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: tmainform.mnu_helpcheckforupdates.caption
|
||||||
|
msgid "Check for updates..."
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
@ -1,24 +1,26 @@
|
|||||||
object mainform: Tmainform
|
object mainform: Tmainform
|
||||||
Left = 737
|
Left = 728
|
||||||
Height = 241
|
Height = 241
|
||||||
Top = 222
|
Top = 209
|
||||||
Width = 320
|
Width = 408
|
||||||
BorderIcons = [biSystemMenu, biMinimize]
|
BorderIcons = [biSystemMenu, biMinimize]
|
||||||
BorderStyle = bsSingle
|
BorderStyle = bsSingle
|
||||||
Caption = 'mainform'
|
Caption = 'mainform'
|
||||||
ClientHeight = 221
|
ClientHeight = 221
|
||||||
ClientWidth = 320
|
ClientWidth = 408
|
||||||
Menu = MainMenu1
|
Menu = MainMenu1
|
||||||
|
OnActivate = FormActivate
|
||||||
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
|
||||||
object cmd_close: TBitBtn
|
object cmd_close: TBitBtn
|
||||||
Left = 125
|
Left = 167
|
||||||
Height = 30
|
Height = 30
|
||||||
Top = 179
|
Top = 176
|
||||||
Width = 75
|
Width = 75
|
||||||
Anchors = [akRight, akBottom]
|
Anchors = [akRight, akBottom]
|
||||||
DefaultCaption = True
|
DefaultCaption = True
|
||||||
@ -31,7 +33,7 @@ object mainform: Tmainform
|
|||||||
Left = 0
|
Left = 0
|
||||||
Height = 113
|
Height = 113
|
||||||
Top = 0
|
Top = 0
|
||||||
Width = 320
|
Width = 408
|
||||||
Align = alTop
|
Align = alTop
|
||||||
AutoFill = True
|
AutoFill = True
|
||||||
Caption = 'Application'
|
Caption = 'Application'
|
||||||
@ -43,7 +45,7 @@ object mainform: Tmainform
|
|||||||
ChildSizing.Layout = cclLeftToRightThenTopToBottom
|
ChildSizing.Layout = cclLeftToRightThenTopToBottom
|
||||||
ChildSizing.ControlsPerLine = 1
|
ChildSizing.ControlsPerLine = 1
|
||||||
ClientHeight = 93
|
ClientHeight = 93
|
||||||
ClientWidth = 316
|
ClientWidth = 404
|
||||||
ItemIndex = 2
|
ItemIndex = 2
|
||||||
Items.Strings = (
|
Items.Strings = (
|
||||||
'LazAutoUpdate Update Pack'
|
'LazAutoUpdate Update Pack'
|
||||||
@ -58,11 +60,11 @@ object mainform: Tmainform
|
|||||||
Left = 0
|
Left = 0
|
||||||
Height = 57
|
Height = 57
|
||||||
Top = 113
|
Top = 113
|
||||||
Width = 320
|
Width = 408
|
||||||
Align = alTop
|
Align = alTop
|
||||||
Caption = 'Action'
|
Caption = 'Action'
|
||||||
ClientHeight = 37
|
ClientHeight = 37
|
||||||
ClientWidth = 316
|
ClientWidth = 404
|
||||||
TabOrder = 2
|
TabOrder = 2
|
||||||
object cmd_Install: TButton
|
object cmd_Install: TButton
|
||||||
Left = 8
|
Left = 8
|
||||||
@ -82,6 +84,26 @@ object mainform: Tmainform
|
|||||||
OnClick = cmd_RunClick
|
OnClick = cmd_RunClick
|
||||||
TabOrder = 1
|
TabOrder = 1
|
||||||
end
|
end
|
||||||
|
object cmd_MakeShortcutIcon: TButton
|
||||||
|
Left = 176
|
||||||
|
Height = 25
|
||||||
|
Top = 0
|
||||||
|
Width = 103
|
||||||
|
AutoSize = True
|
||||||
|
Caption = 'Make Shortcut'
|
||||||
|
OnClick = cmd_MakeShortcutIconClick
|
||||||
|
TabOrder = 2
|
||||||
|
end
|
||||||
|
object cmd_DeleteShortcutIcon: TButton
|
||||||
|
Left = 288
|
||||||
|
Height = 25
|
||||||
|
Top = 0
|
||||||
|
Width = 107
|
||||||
|
AutoSize = True
|
||||||
|
Caption = 'Delete Shortcut'
|
||||||
|
OnClick = cmd_DeleteShortcutIconClick
|
||||||
|
TabOrder = 3
|
||||||
|
end
|
||||||
end
|
end
|
||||||
object LazAutoUpdate1: TLazAutoUpdate
|
object LazAutoUpdate1: TLazAutoUpdate
|
||||||
About.Description.Strings = (
|
About.Description.Strings = (
|
||||||
@ -127,5 +149,12 @@ object mainform: Tmainform
|
|||||||
OnClick = mnu_fileExitClick
|
OnClick = mnu_fileExitClick
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
object mnu_help: TMenuItem
|
||||||
|
Caption = '&Help'
|
||||||
|
object mnu_helpCheckForUpdates: TMenuItem
|
||||||
|
Caption = 'Check for updates...'
|
||||||
|
OnClick = mnu_helpCheckForUpdatesClick
|
||||||
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -4,6 +4,10 @@
|
|||||||
{"hash":75149406,"name":"tmainform.grp_action.caption","sourcebytes":[65,99,116,105,111,110],"value":"Action"},
|
{"hash":75149406,"name":"tmainform.grp_action.caption","sourcebytes":[65,99,116,105,111,110],"value":"Action"},
|
||||||
{"hash":5941372,"name":"tmainform.cmd_install.caption","sourcebytes":[73,110,115,116,97,108,108],"value":"Install"},
|
{"hash":5941372,"name":"tmainform.cmd_install.caption","sourcebytes":[73,110,115,116,97,108,108],"value":"Install"},
|
||||||
{"hash":22974,"name":"tmainform.cmd_run.caption","sourcebytes":[82,117,110],"value":"Run"},
|
{"hash":22974,"name":"tmainform.cmd_run.caption","sourcebytes":[82,117,110],"value":"Run"},
|
||||||
|
{"hash":250142468,"name":"tmainform.cmd_makeshortcuticon.caption","sourcebytes":[77,97,107,101,32,83,104,111,114,116,99,117,116],"value":"Make Shortcut"},
|
||||||
|
{"hash":228824468,"name":"tmainform.cmd_deleteshortcuticon.caption","sourcebytes":[68,101,108,101,116,101,32,83,104,111,114,116,99,117,116],"value":"Delete Shortcut"},
|
||||||
{"hash":2805797,"name":"tmainform.mnu_file.caption","sourcebytes":[38,70,105,108,101],"value":"&File"},
|
{"hash":2805797,"name":"tmainform.mnu_file.caption","sourcebytes":[38,70,105,108,101],"value":"&File"},
|
||||||
{"hash":4710148,"name":"tmainform.mnu_fileexit.caption","sourcebytes":[69,38,120,105,116],"value":"E&xit"}
|
{"hash":4710148,"name":"tmainform.mnu_fileexit.caption","sourcebytes":[69,38,120,105,116],"value":"E&xit"},
|
||||||
|
{"hash":2812976,"name":"tmainform.mnu_help.caption","sourcebytes":[38,72,101,108,112],"value":"&Help"},
|
||||||
|
{"hash":5395918,"name":"tmainform.mnu_helpcheckforupdates.caption","sourcebytes":[67,104,101,99,107,32,102,111,114,32,117,112,100,97,116,101,115,46,46,46],"value":"Check for updates..."}
|
||||||
]}
|
]}
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
unit umainform;
|
unit umainform;
|
||||||
|
|
||||||
{
|
{
|
||||||
License (MIT)
|
License (MIT)
|
||||||
=============
|
=============
|
||||||
@ -40,24 +41,33 @@ type
|
|||||||
{ Tmainform }
|
{ Tmainform }
|
||||||
|
|
||||||
Tmainform = class(TForm)
|
Tmainform = class(TForm)
|
||||||
|
cmd_DeleteShortcutIcon: TButton;
|
||||||
|
cmd_MakeShortcutIcon: TButton;
|
||||||
cmd_Run: TButton;
|
cmd_Run: TButton;
|
||||||
cmd_Install: TButton;
|
cmd_Install: TButton;
|
||||||
cmd_close: TBitBtn;
|
cmd_close: TBitBtn;
|
||||||
grp_Action: TGroupBox;
|
grp_Action: TGroupBox;
|
||||||
LazAutoUpdate1: TLazAutoUpdate;
|
LazAutoUpdate1: TLazAutoUpdate;
|
||||||
MainMenu1: TMainMenu;
|
MainMenu1: TMainMenu;
|
||||||
|
mnu_helpCheckForUpdates: TMenuItem;
|
||||||
|
mnu_help: TMenuItem;
|
||||||
mnu_fileExit: TMenuItem;
|
mnu_fileExit: TMenuItem;
|
||||||
mnu_file: TMenuItem;
|
mnu_file: TMenuItem;
|
||||||
grp_Application: TRadioGroup;
|
grp_Application: TRadioGroup;
|
||||||
|
procedure cmd_DeleteShortcutIconClick(Sender: TObject);
|
||||||
procedure cmd_InstallClick(Sender: TObject);
|
procedure cmd_InstallClick(Sender: TObject);
|
||||||
|
procedure cmd_MakeShortcutIconClick(Sender: TObject);
|
||||||
procedure cmd_RunClick(Sender: TObject);
|
procedure cmd_RunClick(Sender: TObject);
|
||||||
|
procedure FormActivate(Sender: TObject);
|
||||||
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 mnu_fileExitClick(Sender: TObject);
|
procedure mnu_fileExitClick(Sender: TObject);
|
||||||
|
procedure mnu_helpCheckForUpdatesClick(Sender: TObject);
|
||||||
private
|
private
|
||||||
Logger: TEventLog;
|
Logger: TEventLog;
|
||||||
procedure ConfigureLazAutoUpdate(const AItemIndex: integer);
|
procedure ConfigureLazAutoUpdate(const AItemIndex: integer);
|
||||||
@ -72,8 +82,8 @@ var
|
|||||||
implementation
|
implementation
|
||||||
|
|
||||||
{$R *.lfm}
|
{$R *.lfm}
|
||||||
Var
|
var
|
||||||
sDirectoryToInstallTo:String;
|
sDirectoryToInstallTo: string;
|
||||||
|
|
||||||
{ Tmainform }
|
{ Tmainform }
|
||||||
|
|
||||||
@ -81,9 +91,9 @@ procedure Tmainform.FormCreate(Sender: TObject);
|
|||||||
begin
|
begin
|
||||||
Caption := Application.Title;
|
Caption := Application.Title;
|
||||||
Icon := Application.Icon;
|
Icon := Application.Icon;
|
||||||
sDirectoryToInstallTo:=ProgramDirectory + 'installed';
|
sDirectoryToInstallTo := ProgramDirectory + 'installed';
|
||||||
LazAutoUpdate1.DebugMode:=TRUE;
|
LazAutoUpdate1.DebugMode := True;
|
||||||
LazAutoUpdate1.ShowUpdateInCaption:=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;
|
||||||
@ -91,6 +101,11 @@ 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;
|
||||||
@ -111,11 +126,40 @@ begin
|
|||||||
LazAutoUpdate1.WorkingMode := lauUpdate;
|
LazAutoUpdate1.WorkingMode := lauUpdate;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure Tmainform.cmd_DeleteShortcutIconClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if not FileExistsUTF8(LazAutoUpdate1.AppFileWithPath) then
|
||||||
|
begin
|
||||||
|
ShowMessageFmt('%s does not exist! Install it first.',
|
||||||
|
[LazAutoUpdate1.AppFileWithPath]);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
if LazAutoUpdate1.DeleteShortCut then
|
||||||
|
ShowMessage('Desktop shortcut and menu item are toast');
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure Tmainform.cmd_MakeShortcutIconClick(Sender: TObject);
|
||||||
|
begin
|
||||||
|
if not FileExistsUTF8(LazAutoUpdate1.AppFileWithPath) then
|
||||||
|
begin
|
||||||
|
ShowMessageFmt('%s does not exist! Install it first.',
|
||||||
|
[LazAutoUpdate1.AppFileWithPath]);
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
if LazAutoUpdate1.MakeShortCut then
|
||||||
|
ShowMessage('Desktop shortcut and menu item created');
|
||||||
|
end;
|
||||||
|
|
||||||
procedure Tmainform.cmd_RunClick(Sender: TObject);
|
procedure Tmainform.cmd_RunClick(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
RunInstalledApp;
|
RunInstalledApp;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure Tmainform.FormActivate(Sender: TObject);
|
||||||
|
begin
|
||||||
|
LazAutoUpdate1.ShowWhatsNewIfAvailable;
|
||||||
|
end;
|
||||||
|
|
||||||
procedure Tmainform.RunInstalledApp;
|
procedure Tmainform.RunInstalledApp;
|
||||||
var
|
var
|
||||||
AProcess: TAsyncProcess;
|
AProcess: TAsyncProcess;
|
||||||
@ -146,11 +190,11 @@ end;
|
|||||||
|
|
||||||
procedure Tmainform.FormCloseQuery(Sender: TObject; var CanClose: boolean);
|
procedure Tmainform.FormCloseQuery(Sender: TObject; var CanClose: boolean);
|
||||||
begin
|
begin
|
||||||
If LazAutoUpdate1.DownloadInProgress Then
|
if LazAutoUpdate1.DownloadInProgress then
|
||||||
Begin
|
begin
|
||||||
CanClose := False;
|
CanClose := False;
|
||||||
ShowMessage('Please wait. Download is still in progress.');
|
ShowMessage('Please wait. Download is still in progress.');
|
||||||
End;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure Tmainform.grp_ApplicationSelectionChanged(Sender: TObject);
|
procedure Tmainform.grp_ApplicationSelectionChanged(Sender: TObject);
|
||||||
@ -169,6 +213,22 @@ begin
|
|||||||
Close;
|
Close;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure Tmainform.mnu_helpCheckForUpdatesClick(Sender: TObject);
|
||||||
|
var
|
||||||
|
OldItemIndex: integer;
|
||||||
|
begin
|
||||||
|
OldItemIndex := grp_Application.ItemIndex;
|
||||||
|
LazAutoUpdate1.ProjectType := auSourceForge; // can be auGitHubReleaseZip or auOther
|
||||||
|
LazAutoUpdate1.SFProjectname := 'lazautoupdate'; // Or GitHub properties
|
||||||
|
LazAutoUpdate1.UpdatesFolder := 'updates'; // Subfolder in repository
|
||||||
|
LazAutoUpdate1.VersionsININame := 'lauinstaller' + C_PFX + '.ini'; // as specified
|
||||||
|
LazAutoUpdate1.ZipfileName := 'lauinstaller' + C_PFX + '.zip'; // as specified
|
||||||
|
LazAutoUpdate1.AppFileWithPath := Application.Exename;
|
||||||
|
If NOT LazAutoUpdate1.AutoUpdate then
|
||||||
|
ConfigureLazAutoUpdate(OldItemIndex); // Restore properties
|
||||||
|
|
||||||
|
end;
|
||||||
|
|
||||||
procedure Tmainform.ConfigureLazAutoUpdate(const AItemIndex: integer);
|
procedure Tmainform.ConfigureLazAutoUpdate(const AItemIndex: integer);
|
||||||
begin
|
begin
|
||||||
// Note: This routine relies on a consistent naming convention for your
|
// Note: This routine relies on a consistent naming convention for your
|
||||||
@ -176,7 +236,8 @@ begin
|
|||||||
case AItemIndex of
|
case AItemIndex of
|
||||||
0: //Update Pack
|
0: //Update Pack
|
||||||
begin
|
begin
|
||||||
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
|
||||||
LazAutoUpdate1.VersionsININame := 'updatepack' + C_PFX + '.ini'; // as specified
|
LazAutoUpdate1.VersionsININame := 'updatepack' + C_PFX + '.ini'; // as specified
|
||||||
@ -186,33 +247,39 @@ begin
|
|||||||
LazAutoUpdate1.AppFileWithPath := sDirectoryToInstallTo +
|
LazAutoUpdate1.AppFileWithPath := sDirectoryToInstallTo +
|
||||||
DirectorySeparator + 'updatepack.exe';
|
DirectorySeparator + 'updatepack.exe';
|
||||||
{$ELSE}
|
{$ELSE}
|
||||||
LazAutoUpdate1.AppFileWithPath := sDirectoryToInstallTo +
|
LazAutoUpdate1.AppFileWithPath :=
|
||||||
DirectorySeparator + 'updatepack';
|
sDirectoryToInstallTo + DirectorySeparator + 'updatepack';
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
// Our responsibility to make the folder
|
// Our responsibility to make the folder
|
||||||
if not DirectoryExistsUTF8(sDirectoryToInstallTo) then
|
if not DirectoryExistsUTF8(sDirectoryToInstallTo) then
|
||||||
ForceDirectoriesUTF8(sDirectoryToInstallTo);
|
ForceDirectoriesUTF8(sDirectoryToInstallTo);
|
||||||
LazAutoUpdate1.Appversion := '0.0.0.0';
|
LazAutoUpdate1.Appversion := '0.0.0.0';
|
||||||
|
LazAutoUpdate1.ShortCut.Category := scUtility;
|
||||||
|
LazAutoUpdate1.ShortCut.Target := LazAutoUpdate1.AppFileWithPath;
|
||||||
|
LazAutoUpdate1.ShortCut.ShortcutName := 'LazAutoUpdate Update Pack';
|
||||||
end;
|
end;
|
||||||
1: // Test Application (GitHub)
|
1: // Test Application (GitHub)
|
||||||
begin
|
begin
|
||||||
LazAutoUpdate1.ProjectType := auGitHubReleaseZip;
|
LazAutoUpdate1.ProjectType := auGitHubReleaseZip;
|
||||||
LazAutoUpdate1.GitHubProjectname := 'lazarusccr';
|
LazAutoUpdate1.GitHubProjectname := 'lazarusccr';
|
||||||
LazAutoUpdate1.GitHubRepositoryName := 'TestApp';
|
LazAutoUpdate1.GitHubRepositoryName := 'TestApp';
|
||||||
LazAutoUpdate1.GitHubBranchOrTag:= 'updates';
|
LazAutoUpdate1.GitHubBranchOrTag := 'updates';
|
||||||
LazAutoUpdate1.UpdatesFolder := 'updates';
|
LazAutoUpdate1.UpdatesFolder := 'updates';
|
||||||
LazAutoUpdate1.VersionsININame := 'testapp' + C_PFX + '.ini';
|
LazAutoUpdate1.VersionsININame := 'testapp' + C_PFX + '.ini';
|
||||||
LazAutoUpdate1.ZipfileName := 'testapp' + C_PFX + '.zip';
|
LazAutoUpdate1.ZipfileName := 'testapp' + C_PFX + '.zip';
|
||||||
{$IFDEF WINDOWS}
|
{$IFDEF WINDOWS}
|
||||||
LazAutoUpdate1.AppFileWithPath := sDirectoryToInstallTo +
|
LazAutoUpdate1.AppFileWithPath :=
|
||||||
DirectorySeparator + 'testapp' + C_PFX + '.exe';
|
sDirectoryToInstallTo + DirectorySeparator + 'testapp' + C_PFX + '.exe';
|
||||||
{$ELSE}
|
{$ELSE}
|
||||||
LazAutoUpdate1.AppFileWithPath := sDirectoryToInstallTo +
|
LazAutoUpdate1.AppFileWithPath :=
|
||||||
DirectorySeparator + 'testapp' + C_PFX;
|
sDirectoryToInstallTo + DirectorySeparator + 'testapp' + C_PFX;
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
if not DirectoryExistsUTF8(sDirectoryToInstallTo) then
|
if not DirectoryExistsUTF8(sDirectoryToInstallTo) then
|
||||||
ForceDirectoriesUTF8(sDirectoryToInstallTo);
|
ForceDirectoriesUTF8(sDirectoryToInstallTo);
|
||||||
LazAutoUpdate1.Appversion := '0.0.0.0';
|
LazAutoUpdate1.Appversion := '0.0.0.0';
|
||||||
|
LazAutoUpdate1.ShortCut.Category := scUtility;
|
||||||
|
LazAutoUpdate1.ShortCut.Target := LazAutoUpdate1.AppFileWithPath;
|
||||||
|
LazAutoUpdate1.ShortCut.ShortcutName := 'LazAutoUpdate Test App';
|
||||||
end;
|
end;
|
||||||
2: // Test Application (SourceForge)
|
2: // Test Application (SourceForge)
|
||||||
begin
|
begin
|
||||||
@ -222,15 +289,18 @@ begin
|
|||||||
LazAutoUpdate1.VersionsININame := 'testapp' + C_PFX + '.ini';
|
LazAutoUpdate1.VersionsININame := 'testapp' + C_PFX + '.ini';
|
||||||
LazAutoUpdate1.ZipfileName := 'testapp' + C_PFX + '.zip';
|
LazAutoUpdate1.ZipfileName := 'testapp' + C_PFX + '.zip';
|
||||||
{$IFDEF WINDOWS}
|
{$IFDEF WINDOWS}
|
||||||
LazAutoUpdate1.AppFileWithPath := sDirectoryToInstallTo +
|
LazAutoUpdate1.AppFileWithPath :=
|
||||||
DirectorySeparator + 'testapp' + C_PFX + '.exe';
|
sDirectoryToInstallTo + DirectorySeparator + 'testapp' + C_PFX + '.exe';
|
||||||
{$ELSE}
|
{$ELSE}
|
||||||
LazAutoUpdate1.AppFileWithPath := sDirectoryToInstallTo +
|
LazAutoUpdate1.AppFileWithPath :=
|
||||||
DirectorySeparator + 'testapp' + C_PFX;
|
sDirectoryToInstallTo + DirectorySeparator + 'testapp' + C_PFX;
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
if not DirectoryExistsUTF8(sDirectoryToInstallTo) then
|
if not DirectoryExistsUTF8(sDirectoryToInstallTo) then
|
||||||
ForceDirectoriesUTF8(sDirectoryToInstallTo);
|
ForceDirectoriesUTF8(sDirectoryToInstallTo);
|
||||||
LazAutoUpdate1.Appversion := '0.0.0.0';
|
LazAutoUpdate1.Appversion := '0.0.0.0';
|
||||||
|
LazAutoUpdate1.ShortCut.Category := scUtility;
|
||||||
|
LazAutoUpdate1.ShortCut.Target := LazAutoUpdate1.AppFileWithPath;
|
||||||
|
LazAutoUpdate1.ShortCut.ShortcutName := 'LazAutoUpdate Test App';
|
||||||
end;
|
end;
|
||||||
3: // Retro Ski Run
|
3: // Retro Ski Run
|
||||||
begin
|
begin
|
||||||
@ -240,15 +310,18 @@ begin
|
|||||||
LazAutoUpdate1.VersionsININame := 'ski' + C_PFX + '.ini';
|
LazAutoUpdate1.VersionsININame := 'ski' + C_PFX + '.ini';
|
||||||
LazAutoUpdate1.ZipfileName := 'ski' + C_PFX + '.zip';
|
LazAutoUpdate1.ZipfileName := 'ski' + C_PFX + '.zip';
|
||||||
{$IFDEF WINDOWS}
|
{$IFDEF WINDOWS}
|
||||||
LazAutoUpdate1.AppFileWithPath := sDirectoryToInstallTo +
|
LazAutoUpdate1.AppFileWithPath :=
|
||||||
DirectorySeparator + 'ski' + C_PFX + '.exe';
|
sDirectoryToInstallTo + DirectorySeparator + 'ski' + C_PFX + '.exe';
|
||||||
{$ELSE}
|
{$ELSE}
|
||||||
LazAutoUpdate1.AppFileWithPath := sDirectoryToInstallTo +
|
LazAutoUpdate1.AppFileWithPath :=
|
||||||
DirectorySeparator + 'ski' + C_PFX;
|
sDirectoryToInstallTo + DirectorySeparator + 'ski' + C_PFX;
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
if not DirectoryExistsUTF8(sDirectoryToInstallTo) then
|
if not DirectoryExistsUTF8(sDirectoryToInstallTo) then
|
||||||
ForceDirectoriesUTF8(sDirectoryToInstallTo);
|
ForceDirectoriesUTF8(sDirectoryToInstallTo);
|
||||||
LazAutoUpdate1.Appversion := '0.0.0.0';
|
LazAutoUpdate1.Appversion := '0.0.0.0';
|
||||||
|
LazAutoUpdate1.ShortCut.Category := scGame;
|
||||||
|
LazAutoUpdate1.ShortCut.Target := LazAutoUpdate1.AppFileWithPath;
|
||||||
|
LazAutoUpdate1.ShortCut.ShortcutName := 'Retro Ski Run';
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
@ -145,9 +145,9 @@ const
|
|||||||
V0.3.7: Added public property Mode=(lauUpdate|lauInstall)
|
V0.3.7: Added public property Mode=(lauUpdate|lauInstall)
|
||||||
V0.3.7.1: Added (DoSilentUpdate) copy C_UPDATEHMNAME to installed folder
|
V0.3.7.1: Added (DoSilentUpdate) copy C_UPDATEHMNAME to installed folder
|
||||||
V0.3.7.2: Unix: SetExecutePermissions on installed app
|
V0.3.7.2: Unix: SetExecutePermissions on installed app
|
||||||
V0.3.8: ??
|
V0.3.8: Shortcut Menu items now created/deleted
|
||||||
}
|
}
|
||||||
C_TLazAutoUpdateComponentVersion = '0.3.7.2';
|
C_TLazAutoUpdateComponentVersion = '0.3.8';
|
||||||
C_TThreadedDownloadComponentVersion = '0.0.3.0';
|
C_TThreadedDownloadComponentVersion = '0.0.3.0';
|
||||||
{
|
{
|
||||||
V0.0.1: Initial alpha
|
V0.0.1: Initial alpha
|
||||||
@ -352,7 +352,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
|
||||||
procedure AutoUpdate;
|
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)
|
||||||
@ -1184,12 +1184,12 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TLazAutoUpdate.AutoUpdate;
|
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;
|
||||||
if fFireDebugEvent then
|
if fFireDebugEvent then
|
||||||
fOndebugEvent(Self, 'AutoUpdate', 'Calling NewVersionAvailable');
|
fOndebugEvent(Self, 'AutoUpdate', 'Calling NewVersionAvailable');
|
||||||
if NewVersionAvailable then
|
if NewVersionAvailable then
|
||||||
@ -1231,9 +1231,12 @@ begin
|
|||||||
mtInformation, [mbOK], 0);
|
mtInformation, [mbOK], 0);
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
|
begin
|
||||||
MessageDlg(fParentApplication.Title,
|
MessageDlg(fParentApplication.Title,
|
||||||
rsThisApplicat,
|
rsThisApplicat,
|
||||||
mtInformation, [mbOK], 0);
|
mtInformation, [mbOK], 0);
|
||||||
|
Result:=TRUE;
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TLazAutoUpdate.IsOnlineVersionNewer(const sznewINIPath: string): boolean;
|
function TLazAutoUpdate.IsOnlineVersionNewer(const sznewINIPath: string): boolean;
|
||||||
|
Binary file not shown.
@ -9,7 +9,7 @@
|
|||||||
"ForceNotify" : false,
|
"ForceNotify" : false,
|
||||||
"InternalVersion" : 1,
|
"InternalVersion" : 1,
|
||||||
"Name" : "lazupdate.lpk",
|
"Name" : "lazupdate.lpk",
|
||||||
"Version" : "0.3.7.2"
|
"Version" : "0.3.8.0"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
@ -176,21 +176,35 @@ begin
|
|||||||
ISLink.SetPath(PChar(Target));
|
ISLink.SetPath(PChar(Target));
|
||||||
ISLink.SetArguments(PChar(TargetArguments));
|
ISLink.SetArguments(PChar(TargetArguments));
|
||||||
ISLink.SetWorkingDirectory(PChar(ExtractFilePath(Target)));
|
ISLink.SetWorkingDirectory(PChar(ExtractFilePath(Target)));
|
||||||
{
|
|
||||||
Not needed
|
|
||||||
ISLink.SetIconLocation(Pchar(ExtractFilePath(Target) + IconFileName),0);
|
|
||||||
}
|
|
||||||
{ Get the desktop location }
|
{ Get the desktop location }
|
||||||
SHGetSpecialFolderLocation(0, CSIDL_DESKTOPDIRECTORY, PIDL);
|
SHGetSpecialFolderLocation(0, CSIDL_DESKTOPDIRECTORY, PIDL);
|
||||||
SHGetPathFromIDList(PIDL, InFolder);
|
SHGetPathFromIDList(PIDL, InFolder);
|
||||||
|
|
||||||
LinkName := IncludeTrailingPathDelimiter(InFolder) + ShortcutName + '.lnk';
|
LinkName := IncludeTrailingPathDelimiter(InFolder) + ShortcutName + '.lnk';
|
||||||
|
|
||||||
{ Get rid of any existing shortcut first }
|
{ Get rid of any existing shortcut first }
|
||||||
|
|
||||||
if not SysUtils.DeleteFile(LinkName) then
|
if not SysUtils.DeleteFile(LinkName) then
|
||||||
AddToDebugString('Could not delete existing link ' + LinkName);
|
AddToDebugString('Could not delete existing link ' + LinkName);
|
||||||
{ Create the link }
|
{Create the link }
|
||||||
IPFile.Save(PWChar(LinkName), False);
|
IPFile.Save(PWChar(LinkName), False);
|
||||||
|
{Notify the shell}
|
||||||
|
SHChangeNotify(SHCNE_CREATE, SHCNF_PATH, PChar(LinkName), nil);
|
||||||
|
SHChangeNotify(SHCNE_UPDATEDIR, SHCNF_PATH or SHCNF_FLUSH,
|
||||||
|
PChar(ExtractFileDir(LinkName)), nil);
|
||||||
|
|
||||||
|
{Menu Entry}
|
||||||
|
SHGetSpecialFolderLocation(0, CSIDL_PROGRAMS, PIDL);
|
||||||
|
SHGetPathFromIDList(PIDL, InFolder);
|
||||||
|
If Not DirectoryExistsUTF8(IncludeTrailingPathDelimiter(InFolder) + ShortcutName) then
|
||||||
|
ForceDirectoriesUTF8(IncludeTrailingPathDelimiter(InFolder) + ShortcutName);
|
||||||
|
LinkName := IncludeTrailingPathDelimiter(InFolder) + ShortcutName + DirectorySeparator + ShortcutName + '.lnk';
|
||||||
|
{ Get rid of any existing shortcut first }
|
||||||
|
if not SysUtils.DeleteFile(LinkName) then
|
||||||
|
AddToDebugString('Could not delete existing link ' + LinkName);
|
||||||
|
{Create the menu entry link }
|
||||||
|
IPFile.Save(PWChar(LinkName), False);
|
||||||
|
{Notify the shell}
|
||||||
|
SHChangeNotify(SHCNE_MKDIR, SHCNF_PATH, PChar(LinkName), nil)
|
||||||
|
|
||||||
finally
|
finally
|
||||||
// Not needed: FreeAndNil(IPFile);
|
// Not needed: FreeAndNil(IPFile);
|
||||||
end;
|
end;
|
||||||
@ -408,6 +422,23 @@ begin
|
|||||||
end
|
end
|
||||||
else
|
else
|
||||||
AddToDebugString('DeleteDesktopShortcut Failure: Unable to delete ' + LinkName);
|
AddToDebugString('DeleteDesktopShortcut Failure: Unable to delete ' + LinkName);
|
||||||
|
{ Get the menu location}
|
||||||
|
SHGetSpecialFolderLocation(0, CSIDL_PROGRAMS, PIDL);
|
||||||
|
SHGetPathFromIDList(PIDL, InFolder);
|
||||||
|
LinkName := IncludeTrailingPathDelimiter(InFolder) + ShortcutName + DirectorySeparator + ShortcutName + '.lnk';
|
||||||
|
{ Get rid of any existing shortcut first }
|
||||||
|
if SysUtils.DeleteFile(LinkName) then
|
||||||
|
begin
|
||||||
|
AddToDebugString('DeleteDesktopShortcut Success: Deleted ' + LinkName);
|
||||||
|
Result := True;
|
||||||
|
end
|
||||||
|
else
|
||||||
|
AddToDebugString('DeleteDesktopShortcut Failure: Unable to delete ' + LinkName);
|
||||||
|
If DirectoryExistsUTF8(IncludeTrailingPathDelimiter(InFolder) + ShortcutName) then
|
||||||
|
If RemoveDirUTF8(IncludeTrailingPathDelimiter(InFolder) + ShortcutName) then
|
||||||
|
AddToDebugString('DeleteDesktopShortcut Success: Deleted menu entry')
|
||||||
|
else
|
||||||
|
AddToDebugString('DeleteDesktopShortcut Failure: Unable to delete menu entry');
|
||||||
except
|
except
|
||||||
AddToDebugString('Exception deleting ' + LinkName);
|
AddToDebugString('Exception deleting ' + LinkName);
|
||||||
// Eat the exception
|
// Eat the exception
|
||||||
|
Reference in New Issue
Block a user