You've already forked lazarus-ccr
To 0.3.7.4
Tweaks for Linux Universal Installer included git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@5726 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,
|
||||
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
"/>
|
||||
<Version Minor="3" Release="7" Build="1"/>
|
||||
<Version Minor="3" Release="7" Build="2"/>
|
||||
<Files Count="7">
|
||||
<Item1>
|
||||
<Filename Value="ulazautoupdate.pas"/>
|
||||
|
@ -4,7 +4,7 @@
|
||||
<PathDelim Value="\"/>
|
||||
<Version Value="10"/>
|
||||
<BuildModes Active="Linux64"/>
|
||||
<Units Count="35">
|
||||
<Units Count="36">
|
||||
<Unit0>
|
||||
<Filename Value="testapp.lpr"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
@ -140,7 +140,7 @@
|
||||
</Unit15>
|
||||
<Unit16>
|
||||
<Filename Value="..\updatehmsource\updatehm.lpr"/>
|
||||
<EditorIndex Value="2"/>
|
||||
<EditorIndex Value="3"/>
|
||||
<WindowIndex Value="1"/>
|
||||
<TopLine Value="132"/>
|
||||
<CursorPos X="6" Y="338"/>
|
||||
@ -186,7 +186,7 @@
|
||||
<Filename Value="..\ushortcut.pas"/>
|
||||
<IsVisibleTab Value="True"/>
|
||||
<EditorIndex Value="6"/>
|
||||
<TopLine Value="351"/>
|
||||
<TopLine Value="350"/>
|
||||
<CursorPos X="16" Y="338"/>
|
||||
<UsageCount Value="37"/>
|
||||
<Loaded Value="True"/>
|
||||
@ -278,7 +278,6 @@
|
||||
</Unit33>
|
||||
<Unit34>
|
||||
<Filename Value="C:\laztrunk\fpc\rtl\inc\objpas.inc"/>
|
||||
<IsVisibleTab Value="True"/>
|
||||
<EditorIndex Value="1"/>
|
||||
<WindowIndex Value="1"/>
|
||||
<TopLine Value="308"/>
|
||||
@ -286,10 +285,23 @@
|
||||
<UsageCount Value="11"/>
|
||||
<Loaded Value="True"/>
|
||||
</Unit34>
|
||||
<Unit35>
|
||||
<Filename Value="..\testinstaller\umainform.pas"/>
|
||||
<IsVisibleTab Value="True"/>
|
||||
<EditorIndex Value="2"/>
|
||||
<WindowIndex Value="1"/>
|
||||
<TopLine Value="182"/>
|
||||
<CursorPos X="30" Y="202"/>
|
||||
<UsageCount Value="10"/>
|
||||
<Loaded Value="True"/>
|
||||
</Unit35>
|
||||
</Units>
|
||||
<OtherDefines Count="1">
|
||||
<Define0 Value="DEBUGMODE"/>
|
||||
</OtherDefines>
|
||||
<General>
|
||||
<ActiveWindowIndexAtStart Value="1"/>
|
||||
</General>
|
||||
<JumpHistory Count="30" HistoryIndex="29">
|
||||
<Position1>
|
||||
<Filename Value="..\ushortcut.pas"/>
|
||||
|
@ -25,7 +25,7 @@
|
||||
<StringTable Comments="Installet/Updater using LazAutoUpdate" ProductVersion="0.0.0.0"/>
|
||||
</VersionInfo>
|
||||
<BuildModes Count="5">
|
||||
<Item1 Name="Debug" Default="True"/>
|
||||
<Item1 Name="Win32debug" Default="True"/>
|
||||
<Item2 Name="Win32">
|
||||
<CompilerOptions>
|
||||
<Version Value="11"/>
|
||||
@ -221,6 +221,8 @@
|
||||
<StackChecks Value="True"/>
|
||||
</Checks>
|
||||
<VerifyObjMethodCallValidity Value="True"/>
|
||||
<TargetCPU Value="i386"/>
|
||||
<TargetOS Value="win32"/>
|
||||
</CodeGeneration>
|
||||
<Linking>
|
||||
<Debugging>
|
||||
|
@ -8,6 +8,7 @@
|
||||
<Unit0>
|
||||
<Filename Value="lauinstaller.lpr"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
<IsVisibleTab Value="True"/>
|
||||
<EditorIndex Value="1"/>
|
||||
<CursorPos X="25" Y="5"/>
|
||||
<UsageCount Value="27"/>
|
||||
@ -19,8 +20,8 @@
|
||||
<ComponentName Value="mainform"/>
|
||||
<HasResources Value="True"/>
|
||||
<ResourceBaseClass Value="Form"/>
|
||||
<IsVisibleTab Value="True"/>
|
||||
<CursorPos X="50" Y="7"/>
|
||||
<TopLine Value="179"/>
|
||||
<CursorPos X="39" Y="202"/>
|
||||
<UsageCount Value="27"/>
|
||||
<Loaded Value="True"/>
|
||||
<LoadedDesigner Value="True"/>
|
||||
@ -35,8 +36,8 @@
|
||||
<Unit3>
|
||||
<Filename Value="..\ulazautoupdate.pas"/>
|
||||
<EditorIndex Value="3"/>
|
||||
<TopLine Value="122"/>
|
||||
<CursorPos X="26" Y="148"/>
|
||||
<TopLine Value="2462"/>
|
||||
<CursorPos Y="2415"/>
|
||||
<UsageCount Value="12"/>
|
||||
<Loaded Value="True"/>
|
||||
</Unit3>
|
||||
@ -64,123 +65,123 @@
|
||||
<JumpHistory Count="30" HistoryIndex="29">
|
||||
<Position1>
|
||||
<Filename Value="umainform.pas"/>
|
||||
<Caret Line="59" TopLine="20"/>
|
||||
<Caret Line="42" Column="8" TopLine="29"/>
|
||||
</Position1>
|
||||
<Position2>
|
||||
<Filename Value="umainform.pas"/>
|
||||
<Caret Line="61" Column="18" TopLine="20"/>
|
||||
<Caret Line="73" Column="58" TopLine="30"/>
|
||||
</Position2>
|
||||
<Position3>
|
||||
<Filename Value="umainform.pas"/>
|
||||
<Caret Line="42" Column="8" TopLine="29"/>
|
||||
<Caret Line="82" TopLine="30"/>
|
||||
</Position3>
|
||||
<Position4>
|
||||
<Filename Value="umainform.pas"/>
|
||||
<Caret Line="73" Column="58" TopLine="30"/>
|
||||
<Caret Line="54" Column="27" TopLine="13"/>
|
||||
</Position4>
|
||||
<Position5>
|
||||
<Filename Value="umainform.pas"/>
|
||||
<Caret Line="82" TopLine="30"/>
|
||||
<Caret Line="62" Column="34" TopLine="53"/>
|
||||
</Position5>
|
||||
<Position6>
|
||||
<Filename Value="umainform.pas"/>
|
||||
<Caret Line="54" Column="27" TopLine="13"/>
|
||||
<Caret Line="89" Column="49" TopLine="65"/>
|
||||
</Position6>
|
||||
<Position7>
|
||||
<Filename Value="umainform.pas"/>
|
||||
<Caret Line="62" Column="34" TopLine="53"/>
|
||||
<Caret Line="36" TopLine="9"/>
|
||||
</Position7>
|
||||
<Position8>
|
||||
<Filename Value="umainform.pas"/>
|
||||
<Caret Line="89" Column="49" TopLine="65"/>
|
||||
<Caret Line="60" Column="32" TopLine="33"/>
|
||||
</Position8>
|
||||
<Position9>
|
||||
<Filename Value="umainform.pas"/>
|
||||
<Caret Line="36" TopLine="9"/>
|
||||
<Filename Value="..\ulazautoupdate.pas"/>
|
||||
<Caret Line="1836" Column="7" TopLine="1813"/>
|
||||
</Position9>
|
||||
<Position10>
|
||||
<Filename Value="umainform.pas"/>
|
||||
<Caret Line="60" Column="32" TopLine="33"/>
|
||||
<Caret Line="110" Column="7" TopLine="65"/>
|
||||
</Position10>
|
||||
<Position11>
|
||||
<Filename Value="..\ulazautoupdate.pas"/>
|
||||
<Caret Line="1836" Column="7" TopLine="1813"/>
|
||||
<Filename Value="umainform.pas"/>
|
||||
<Caret Line="60" Column="34" TopLine="50"/>
|
||||
</Position11>
|
||||
<Position12>
|
||||
<Filename Value="umainform.pas"/>
|
||||
<Caret Line="110" Column="7" TopLine="65"/>
|
||||
<Caret Line="9" Column="51" TopLine="2"/>
|
||||
</Position12>
|
||||
<Position13>
|
||||
<Filename Value="umainform.pas"/>
|
||||
<Caret Line="60" Column="34" TopLine="50"/>
|
||||
<Caret Line="8" Column="35"/>
|
||||
</Position13>
|
||||
<Position14>
|
||||
<Filename Value="umainform.pas"/>
|
||||
<Caret Line="9" Column="51" TopLine="2"/>
|
||||
<Caret Line="108" Column="90" TopLine="65"/>
|
||||
</Position14>
|
||||
<Position15>
|
||||
<Filename Value="umainform.pas"/>
|
||||
<Caret Line="8" Column="35"/>
|
||||
<Caret Line="8" Column="22"/>
|
||||
</Position15>
|
||||
<Position16>
|
||||
<Filename Value="umainform.pas"/>
|
||||
<Caret Line="108" Column="90" TopLine="65"/>
|
||||
<Caret Line="67" Column="69" TopLine="47"/>
|
||||
</Position16>
|
||||
<Position17>
|
||||
<Filename Value="umainform.pas"/>
|
||||
<Caret Line="8" Column="22"/>
|
||||
<Caret Line="13" Column="32"/>
|
||||
</Position17>
|
||||
<Position18>
|
||||
<Filename Value="umainform.pas"/>
|
||||
<Caret Line="67" Column="69" TopLine="47"/>
|
||||
<Caret Line="78" Column="82" TopLine="52"/>
|
||||
</Position18>
|
||||
<Position19>
|
||||
<Filename Value="umainform.pas"/>
|
||||
<Caret Line="13" Column="32"/>
|
||||
<Caret Line="83" Column="36" TopLine="58"/>
|
||||
</Position19>
|
||||
<Position20>
|
||||
<Filename Value="umainform.pas"/>
|
||||
<Caret Line="78" Column="82" TopLine="52"/>
|
||||
<Filename Value="..\ulazautoupdate.pas"/>
|
||||
<Caret Line="1923" TopLine="1888"/>
|
||||
</Position20>
|
||||
<Position21>
|
||||
<Filename Value="umainform.pas"/>
|
||||
<Caret Line="83" Column="36" TopLine="58"/>
|
||||
<Filename Value="..\ulazautoupdate.pas"/>
|
||||
<Caret Line="1933" Column="60" TopLine="1897"/>
|
||||
</Position21>
|
||||
<Position22>
|
||||
<Filename Value="..\ulazautoupdate.pas"/>
|
||||
<Caret Line="1923" TopLine="1888"/>
|
||||
<Caret Line="1938" Column="83" TopLine="1903"/>
|
||||
</Position22>
|
||||
<Position23>
|
||||
<Filename Value="..\ulazautoupdate.pas"/>
|
||||
<Caret Line="1933" Column="60" TopLine="1897"/>
|
||||
<Caret Line="1934" Column="41" TopLine="1902"/>
|
||||
</Position23>
|
||||
<Position24>
|
||||
<Filename Value="..\ulazautoupdate.pas"/>
|
||||
<Caret Line="1938" Column="83" TopLine="1903"/>
|
||||
<Caret Line="881" Column="38" TopLine="871"/>
|
||||
</Position24>
|
||||
<Position25>
|
||||
<Filename Value="..\ulazautoupdate.pas"/>
|
||||
<Caret Line="1934" Column="41" TopLine="1902"/>
|
||||
<Filename Value="umainform.pas"/>
|
||||
<Caret Line="177" Column="46" TopLine="148"/>
|
||||
</Position25>
|
||||
<Position26>
|
||||
<Filename Value="..\ulazautoupdate.pas"/>
|
||||
<Caret Line="881" Column="38" TopLine="871"/>
|
||||
<Filename Value="umainform.pas"/>
|
||||
<Caret Line="117" Column="3" TopLine="115"/>
|
||||
</Position26>
|
||||
<Position27>
|
||||
<Filename Value="umainform.pas"/>
|
||||
<Caret Line="177" Column="46" TopLine="148"/>
|
||||
<Caret Line="128" Column="38" TopLine="124"/>
|
||||
</Position27>
|
||||
<Position28>
|
||||
<Filename Value="umainform.pas"/>
|
||||
<Caret Line="117" Column="3" TopLine="115"/>
|
||||
<Caret Line="166" Column="7" TopLine="139"/>
|
||||
</Position28>
|
||||
<Position29>
|
||||
<Filename Value="umainform.pas"/>
|
||||
<Caret Line="128" Column="38" TopLine="124"/>
|
||||
<Filename Value="..\ulazautoupdate.pas"/>
|
||||
<Caret Line="139" Column="27" TopLine="126"/>
|
||||
</Position29>
|
||||
<Position30>
|
||||
<Filename Value="umainform.pas"/>
|
||||
<Caret Line="166" Column="7" TopLine="139"/>
|
||||
<Filename Value="..\ulazautoupdate.pas"/>
|
||||
<Caret Line="1833" Column="17" TopLine="1806"/>
|
||||
</Position30>
|
||||
</JumpHistory>
|
||||
</ProjectSession>
|
||||
|
@ -47,8 +47,8 @@ object mainform: Tmainform
|
||||
ItemIndex = 2
|
||||
Items.Strings = (
|
||||
'LazAutoUpdate Update Pack'
|
||||
'LazAutoUpdate Tray Updater'
|
||||
'LazAutoUpdate Test Application'
|
||||
'LazAutoUpdate Test Application (GitHub)'
|
||||
'LazAutoUpdate Test Application (SourceForge)'
|
||||
'Retro Ski Run'
|
||||
)
|
||||
OnSelectionChanged = grp_ApplicationSelectionChanged
|
||||
@ -100,7 +100,7 @@ object mainform: Tmainform
|
||||
About.ComponentName = 'Laz Auto-update v0.3.4.0'
|
||||
About.LicenseType = abModifiedGPL
|
||||
OnDebugEvent = LazAutoUpdate1DebugEvent
|
||||
auOtherSourceURL = '<not applicable>'
|
||||
auOtherSourceURL = '<not applicable>/'
|
||||
auOtherSourceFilename = '<not applicable>'
|
||||
UpdatesFolder = 'updates'
|
||||
VersionsININame = 'versions.ini'
|
||||
@ -114,11 +114,11 @@ object mainform: Tmainform
|
||||
WorkingMode = lauUpdate
|
||||
ShortCut.ShortcutName = 'MyShortcutName'
|
||||
ShortCut.Category = scAudioVideo
|
||||
Left = 80
|
||||
Top = 16
|
||||
Left = 232
|
||||
Top = 80
|
||||
end
|
||||
object MainMenu1: TMainMenu
|
||||
Left = 104
|
||||
Left = 256
|
||||
Top = 16
|
||||
object mnu_file: TMenuItem
|
||||
Caption = '&File'
|
||||
|
@ -194,9 +194,27 @@ begin
|
||||
ForceDirectoriesUTF8(sDirectoryToInstallTo);
|
||||
LazAutoUpdate1.Appversion := '0.0.0.0';
|
||||
end;
|
||||
1: // Tray Updater
|
||||
;
|
||||
2: // Test Application
|
||||
1: // Test Application (GitHub)
|
||||
begin
|
||||
LazAutoUpdate1.ProjectType := auGitHubReleaseZip;
|
||||
LazAutoUpdate1.GitHubProjectname := 'lazarusccr';
|
||||
LazAutoUpdate1.GitHubRepositoryName := 'TestApp';
|
||||
LazAutoUpdate1.GitHubBranchOrTag:= 'updates';
|
||||
LazAutoUpdate1.UpdatesFolder := 'updates';
|
||||
LazAutoUpdate1.VersionsININame := 'testapp' + C_PFX + '.ini';
|
||||
LazAutoUpdate1.ZipfileName := 'testapp' + C_PFX + '.zip';
|
||||
{$IFDEF WINDOWS}
|
||||
LazAutoUpdate1.AppFileWithPath := sDirectoryToInstallTo +
|
||||
DirectorySeparator + 'testapp' + C_PFX + '.exe';
|
||||
{$ELSE}
|
||||
LazAutoUpdate1.AppFileWithPath := sDirectoryToInstallTo +
|
||||
DirectorySeparator + 'testapp' + C_PFX;
|
||||
{$ENDIF}
|
||||
if not DirectoryExistsUTF8(sDirectoryToInstallTo) then
|
||||
ForceDirectoriesUTF8(sDirectoryToInstallTo);
|
||||
LazAutoUpdate1.Appversion := '0.0.0.0';
|
||||
end;
|
||||
2: // Test Application (SourceForge)
|
||||
begin
|
||||
LazAutoUpdate1.ProjectType := auSourceForge;
|
||||
LazAutoUpdate1.SFProjectname := 'lazautoupdate';
|
||||
|
@ -144,9 +144,10 @@ const
|
||||
V0.3.6: Bugfixed CreateShortCut code
|
||||
V0.3.7: Added public property Mode=(lauUpdate|lauInstall)
|
||||
V0.3.7.1: Added (DoSilentUpdate) copy C_UPDATEHMNAME to installed folder
|
||||
V0.3.7.2: Unix: SetExecutePermissions on installed app
|
||||
V0.3.8: ??
|
||||
}
|
||||
C_TLazAutoUpdateComponentVersion = '0.3.7.1';
|
||||
C_TLazAutoUpdateComponentVersion = '0.3.7.2';
|
||||
C_TThreadedDownloadComponentVersion = '0.0.3.0';
|
||||
{
|
||||
V0.0.1: Initial alpha
|
||||
@ -232,10 +233,10 @@ resourcestring
|
||||
'restriction is for the safety and security of your Windows system.%' +
|
||||
'sClick OK to continue';
|
||||
rsApplicationU = 'Application update';
|
||||
rsSImportantMe = '%sImportant message from LazAutoUpdate component:%sThere '
|
||||
+'is no version information in your project!%sClick [Continue], and/or ['
|
||||
+'Abort] to quit, and use%sIDE menu item Project/Project Options/Version '
|
||||
+'Info%sto add Version Info by clicking the checkbox.';
|
||||
rsSImportantMe = '%sImportant message from LazAutoUpdate component:%sThere ' +
|
||||
'is no version information in your project!%sClick [Continue], and/or [' +
|
||||
'Abort] to quit, and use%sIDE menu item Project/Project Options/Version ' +
|
||||
'Info%sto add Version Info by clicking the checkbox.';
|
||||
rsNoBuildInfor = 'No build information available';
|
||||
|
||||
|
||||
@ -255,7 +256,7 @@ type
|
||||
VersionNumber: cardinal;
|
||||
end;
|
||||
|
||||
TWorkingMode = (lauUpdate,lauInstall);
|
||||
TWorkingMode = (lauUpdate, lauInstall);
|
||||
|
||||
TThreadedDownload = class; // Forward declaration
|
||||
TShortCutClass = class; // Forward declaration
|
||||
@ -295,7 +296,7 @@ type
|
||||
fDownloadInprogress: boolean;
|
||||
fWindowsAdminCheck: boolean;
|
||||
fShortCutClass: TShortCutClass;
|
||||
fWorkingMode:TWorkingMode;
|
||||
fWorkingMode: TWorkingMode;
|
||||
{$IFDEF UNIX}
|
||||
FUpdateHMProcess: TAsyncProcess;
|
||||
{$ENDIF}
|
||||
@ -465,7 +466,7 @@ type
|
||||
// Default=master but any branchname or tagname is OK
|
||||
property GitHubBranchOrTag: string read fGitHubBranchOrTag write fGitHubBranchOrTag;
|
||||
// Install or Update (default=Update)
|
||||
property WorkingMode:TworkingMode read fWorkingMode write fWorkingMode;
|
||||
property WorkingMode: TworkingMode read fWorkingMode write fWorkingMode;
|
||||
// Subproperties available
|
||||
property ShortCut: TShortCutClass read fShortCutClass write fShortCutClass;
|
||||
end;
|
||||
@ -473,7 +474,7 @@ type
|
||||
TShortCutCategory = (scAudioVideo, scAudio, scDevelopment,
|
||||
scEducation, scGame, scGraphics, scNetwork, scOffice, scScience, scSettings,
|
||||
scSystem, scUtility);
|
||||
// TShortCutCategoryFlags = Set of TShortCutCategory;
|
||||
// TShortCutCategoryFlags = Set of TShortCutCategory;
|
||||
|
||||
TShortCutClass = class(TPersistent)
|
||||
private
|
||||
@ -820,8 +821,9 @@ begin
|
||||
fileinfo.GetProgramVersion(fProgVersion);
|
||||
except
|
||||
// EResNotFound raised if no versioninfo in project
|
||||
sz:=rsSImportantMe;
|
||||
raise Exception.Createfmt(sz,[LineEnding,LineEnding,LineEnding,LineEnding,LineEnding]);
|
||||
sz := rsSImportantMe;
|
||||
raise Exception.Createfmt(sz, [LineEnding, LineEnding,
|
||||
LineEnding, LineEnding, LineEnding]);
|
||||
FreeAndNil(fThreadDownload);
|
||||
FreeAndNil(fShortCutClass);
|
||||
Application.Terminate;
|
||||
@ -836,7 +838,7 @@ begin
|
||||
fCopyTree := True; // User can change
|
||||
// UpdateList: Redundant?
|
||||
AddToUpdateList('', LazUTF8.ParamStrUTF8(0), GetFileVersion, 0);
|
||||
fWorkingMode:=lauUpdate; // Default
|
||||
fWorkingMode := lauUpdate; // Default
|
||||
fProjectType := auSourceForge; // User can change
|
||||
fUpdatesFolder := C_UpdatesFolder; // User can change
|
||||
fVersionsININame := C_OnlineVersionsININame; // User can change
|
||||
@ -883,7 +885,8 @@ begin
|
||||
AboutBoxWidth := 400;
|
||||
AboutBoxHeight := 450;
|
||||
sz := 'A component for updating your application' + LineEnding;
|
||||
sz += 'Designed for projects hosted by SourceForge and GitHub' + LineEnding + LineEnding;
|
||||
sz += 'Designed for projects hosted by SourceForge and GitHub' +
|
||||
LineEnding + LineEnding;
|
||||
sz += 'Main methods:' + LineEnding;
|
||||
sz += 'Procedure AutoUpdate' + LineEnding;
|
||||
sz += 'Function NewVersionAvailable: Boolean' + LineEnding;
|
||||
@ -1005,15 +1008,17 @@ begin
|
||||
fOndebugEvent(Self, 'MakeShortCut', Format('Category=%s',
|
||||
[fShortCutClass.CategoryString]));
|
||||
{$ENDIF}
|
||||
Result := CreateDesktopShortCut(fShortCutClass.Target,
|
||||
Result := CreateDesktopShortCut(fShortCutClass.Target,
|
||||
fShortCutClass.TargetArguments, fShortCutClass.ShortcutName,
|
||||
fShortCutClass.IconFileName, fShortCutClass.CategoryString);
|
||||
fLastError:=GetShortCutDebugString;
|
||||
fLastError := GetShortCutDebugString;
|
||||
if fFireDebugEvent then
|
||||
if Result = True then
|
||||
fOndebugEvent(Self, 'MakeShortCut', 'MakeShortCut succeded.' + GetShortCutDebugString)
|
||||
fOndebugEvent(Self, 'MakeShortCut', 'MakeShortCut succeded.' +
|
||||
GetShortCutDebugString)
|
||||
else
|
||||
fOndebugEvent(Self, 'MakeShortCut', 'MakeShortCut failed. Error(s): ' + GetShortCutDebugString);
|
||||
fOndebugEvent(Self, 'MakeShortCut', 'MakeShortCut failed. Error(s): ' +
|
||||
GetShortCutDebugString);
|
||||
end;
|
||||
|
||||
function TLazAutoUpdate.DeleteShortCut: boolean;
|
||||
@ -1035,9 +1040,11 @@ begin
|
||||
|
||||
if fFireDebugEvent then
|
||||
if Result = True then
|
||||
fOndebugEvent(Self, 'MakeShortCut', 'DeleteShortCut succeded.' + GetShortCutDebugString)
|
||||
fOndebugEvent(Self, 'MakeShortCut', 'DeleteShortCut succeded.' +
|
||||
GetShortCutDebugString)
|
||||
else
|
||||
fOndebugEvent(Self, 'MakeShortCut', 'DeleteShortCut failed. Error: ' + GetShortCutDebugString);
|
||||
fOndebugEvent(Self, 'MakeShortCut', 'DeleteShortCut failed. Error: ' +
|
||||
GetShortCutDebugString);
|
||||
|
||||
end;
|
||||
|
||||
@ -1060,18 +1067,18 @@ begin
|
||||
Exit;
|
||||
end;
|
||||
// Linux fix
|
||||
If DirectoryExistsUTF8(C_WhatsNewFilename) then
|
||||
if DirectoryExistsUTF8(C_WhatsNewFilename) then
|
||||
begin
|
||||
if fFireDebugEvent then
|
||||
fOndebugEvent(Self, 'ShowWhatsNewIfAvailable', 'Found directory '+
|
||||
C_WhatsNewFilename);
|
||||
If RemoveDirUTF8(C_WhatsNewFilename) then
|
||||
begin
|
||||
if fFireDebugEvent then
|
||||
fOndebugEvent(Self, 'ShowWhatsNewIfAvailable', 'Deleted directory '+
|
||||
fOndebugEvent(Self, 'ShowWhatsNewIfAvailable', 'Found directory ' +
|
||||
C_WhatsNewFilename);
|
||||
if RemoveDirUTF8(C_WhatsNewFilename) then
|
||||
begin
|
||||
if fFireDebugEvent then
|
||||
fOndebugEvent(Self, 'ShowWhatsNewIfAvailable', 'Deleted directory ' +
|
||||
C_WhatsNewFilename);
|
||||
end;
|
||||
Exit;
|
||||
end;
|
||||
Exit;
|
||||
end;
|
||||
|
||||
// Create the form, memo and close button
|
||||
@ -1103,11 +1110,11 @@ begin
|
||||
ScrollBars := ssAutoBoth;
|
||||
WordWrap := True;
|
||||
Parent := WhatsNewForm;
|
||||
TRY
|
||||
Lines.LoadFromFile(ProgramDirectory + C_WhatsNewFilename);
|
||||
try
|
||||
Lines.LoadFromFile(ProgramDirectory + C_WhatsNewFilename);
|
||||
except
|
||||
Clear;
|
||||
Lines.Add('Unable to show whats new');
|
||||
Clear;
|
||||
Lines.Add('Unable to show whats new');
|
||||
end;
|
||||
end;
|
||||
with cmdClose do
|
||||
@ -1823,8 +1830,9 @@ var
|
||||
INI: TINIFile;
|
||||
SectionStringList: TStrings;
|
||||
szTempUpdatesFolder: string;
|
||||
ErrMsg:String;
|
||||
begin
|
||||
// fWorkingMode=lauInstall or lauUpdate
|
||||
// fWorkingMode=lauInstall or lauUpdate
|
||||
Result := False;
|
||||
// read the VMT once
|
||||
if Assigned(fOndebugEvent) then
|
||||
@ -1833,12 +1841,12 @@ begin
|
||||
fOndebugEvent(Self, 'DoSilentUpdate', 'Starting DoSilentUpdate');
|
||||
|
||||
if fFireDebugEvent then
|
||||
If fWorkingMode=lauUpdate then
|
||||
fOndebugEvent(Self, 'DoSilentUpdate','Update mode')
|
||||
if fWorkingMode = lauUpdate then
|
||||
fOndebugEvent(Self, 'DoSilentUpdate', 'Update mode')
|
||||
else
|
||||
fOndebugEvent(Self, 'DoSilentUpdate','Install mode');
|
||||
fOndebugEvent(Self, 'DoSilentUpdate', 'Install mode');
|
||||
|
||||
If fWorkingMode=lauUpdate then
|
||||
if fWorkingMode = lauUpdate then
|
||||
begin
|
||||
if not FileExistsUTF8(fAppFilename) then
|
||||
begin
|
||||
@ -1895,6 +1903,20 @@ begin
|
||||
fOndebugEvent(Self, 'DoSilentUpdate',
|
||||
Format('Copied app from %s to %s', [szTempUpdatesFolder +
|
||||
ExtractFileName(fAppFilename), szAppFolder + ExtractFileName(fAppFilename)]));
|
||||
|
||||
{$IFDEF LINUX}
|
||||
if not SetExecutePermission(szAppFolder + ExtractFileName(fAppFilename),
|
||||
ErrMsg) then
|
||||
begin
|
||||
if fFireDebugEvent then
|
||||
fOndebugEvent(Self, 'DoSilentUpdate',
|
||||
Format('Unable to set permissions for %s because of %s',
|
||||
[szAppFolder + ExtractFileName(fAppFilename), ErrMsg]));
|
||||
if fShowDialogs then
|
||||
ShowMessageFmt('Unable to set permissions for %s because of %s',
|
||||
[szAppFolder + ExtractFileName(fAppFilename), ErrMsg]);
|
||||
end;
|
||||
{$ENDIF}
|
||||
end
|
||||
else
|
||||
if fFireDebugEvent then
|
||||
@ -1920,23 +1942,39 @@ begin
|
||||
|
||||
end;
|
||||
|
||||
If (fWorkingMode=lauInstall) then
|
||||
If FileExistsUTF8(C_UPDATEHMNAME) then
|
||||
if (fWorkingMode = lauInstall) then
|
||||
if FileExistsUTF8(C_UPDATEHMNAME) then
|
||||
begin
|
||||
If FileUtil.CopyFile(C_UPDATEHMNAME,szAppFolder + C_UPDATEHMNAME) then
|
||||
if FileUtil.CopyFile(C_UPDATEHMNAME, szAppFolder + C_UPDATEHMNAME) then
|
||||
begin
|
||||
if fFireDebugEvent then
|
||||
fOndebugEvent(Self, 'DoSilentUpdate',
|
||||
Format('Sucessfully copied %s to %s',
|
||||
[C_UPDATEHMNAME, szAppFolder]))
|
||||
else
|
||||
if fFireDebugEvent then
|
||||
fOndebugEvent(Self, 'DoSilentUpdate',
|
||||
Format('Unabled to copy %s to %s',
|
||||
[C_UPDATEHMNAME, szAppFolder]));
|
||||
{$IFDEF LINUX}
|
||||
if not SetExecutePermission(szAppFolder + C_UPDATEHMNAME, ErrMsg) then
|
||||
begin
|
||||
if fFireDebugEvent then
|
||||
fOndebugEvent(Self, 'DoSilentUpdate',
|
||||
Format('Unable to set permissions for %s because of %s',
|
||||
[szAppFolder + C_UPDATEHMNAME, ErrMsg]));
|
||||
if fShowDialogs then
|
||||
ShowMessageFmt('Unable to set permissions for %s because of %s',
|
||||
[szAppFolder + C_UPDATEHMNAME, ErrMsg]);
|
||||
end;
|
||||
{$ENDIF}
|
||||
end
|
||||
else
|
||||
if fFireDebugEvent then
|
||||
fOndebugEvent(Self, 'DoSilentUpdate',
|
||||
Format('Unabled to copy %s to %s', [C_UPDATEHMNAME, szAppFolder]));
|
||||
|
||||
end
|
||||
else
|
||||
if fFireDebugEvent then
|
||||
fOndebugEvent(Self, 'DoSilentUpdate','Unable to locate ' + C_UPDATEHMNAME);
|
||||
if fFireDebugEvent then
|
||||
fOndebugEvent(Self, 'DoSilentUpdate', 'Unable to locate ' + C_UPDATEHMNAME);
|
||||
|
||||
|
||||
|
||||
// Deal with C_LAUTRayINI
|
||||
// Copied to the global application data folder
|
||||
|
Binary file not shown.
@ -9,7 +9,7 @@
|
||||
"ForceNotify" : false,
|
||||
"InternalVersion" : 1,
|
||||
"Name" : "lazupdate.lpk",
|
||||
"Version" : "0.3.7.1"
|
||||
"Version" : "0.3.7.2"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
Reference in New Issue
Block a user