You've already forked lazarus-ccr
To 0.2.5.0: BugFix: regression error: CreateUniqueINIFile
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@5497 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@ -28,7 +28,8 @@
|
||||
<UseVersionInfo Value="True"/>
|
||||
<AutoIncrementBuild Value="True"/>
|
||||
<MinorVersionNr Value="2"/>
|
||||
<RevisionNr Value="4"/>
|
||||
<RevisionNr Value="5"/>
|
||||
<BuildNr Value="1"/>
|
||||
<StringTable Comments="Buld configured for Win Linux and Darwin" FileDescription="An editor for OnlinePackageManager update JSON files" InternalName="jsoneditor" LegalCopyright="(c)2016 usernames lainz and minesadorada @ forum.lazarus.freepascal.org" LegalTrademarks="GPL code" OriginalFilename="jsoneditor" ProductName="Lazarus and Freepascal" ProductVersion="1.x and 3.x"/>
|
||||
</VersionInfo>
|
||||
<BuildModes Count="6">
|
||||
@ -55,7 +56,6 @@
|
||||
<Linking>
|
||||
<Debugging>
|
||||
<GenerateDebugInfo Value="False"/>
|
||||
<UseLineInfoUnit Value="False"/>
|
||||
</Debugging>
|
||||
<LinkSmart Value="True"/>
|
||||
<Options>
|
||||
@ -65,6 +65,7 @@
|
||||
</Options>
|
||||
</Linking>
|
||||
<Other>
|
||||
<CustomOptions Value="-dIGNOREPICTURE"/>
|
||||
<OtherDefines Count="1">
|
||||
<Define0 Value="IGNOREPICTURE"/>
|
||||
</OtherDefines>
|
||||
@ -102,7 +103,8 @@
|
||||
</Options>
|
||||
</Linking>
|
||||
<Other>
|
||||
<CustomOptions Value="-FcUTF8"/>
|
||||
<CustomOptions Value="-FcUTF8
|
||||
-dIGNOREPICTURE"/>
|
||||
<OtherDefines Count="1">
|
||||
<Define0 Value="IGNOREPICTURE"/>
|
||||
</OtherDefines>
|
||||
@ -140,7 +142,8 @@
|
||||
</Options>
|
||||
</Linking>
|
||||
<Other>
|
||||
<CustomOptions Value="-FcUTF8"/>
|
||||
<CustomOptions Value="-FcUTF8
|
||||
-dIGNOREPICTURE"/>
|
||||
<OtherDefines Count="1">
|
||||
<Define0 Value="IGNOREPICTURE"/>
|
||||
</OtherDefines>
|
||||
@ -178,7 +181,8 @@
|
||||
</Options>
|
||||
</Linking>
|
||||
<Other>
|
||||
<CustomOptions Value="-FcUTF8"/>
|
||||
<CustomOptions Value="-FcUTF8
|
||||
-dIGNOREPICTURE"/>
|
||||
</Other>
|
||||
</CompilerOptions>
|
||||
</Item5>
|
||||
@ -302,6 +306,7 @@
|
||||
</Options>
|
||||
</Linking>
|
||||
<Other>
|
||||
<CustomOptions Value="-dIGNOREPICTURE"/>
|
||||
<OtherDefines Count="1">
|
||||
<Define0 Value="IGNOREPICTURE"/>
|
||||
</OtherDefines>
|
||||
|
@ -3,14 +3,14 @@
|
||||
<ProjectSession>
|
||||
<PathDelim Value="\"/>
|
||||
<Version Value="10"/>
|
||||
<BuildModes Active="Linux64"/>
|
||||
<BuildModes Active="Win32"/>
|
||||
<Units Count="47">
|
||||
<Unit0>
|
||||
<Filename Value="jsonpackage.lpr"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
<EditorIndex Value="3"/>
|
||||
<CursorPos X="15" Y="19"/>
|
||||
<UsageCount Value="162"/>
|
||||
<UsageCount Value="164"/>
|
||||
<Loaded Value="True"/>
|
||||
</Unit0>
|
||||
<Unit1>
|
||||
@ -20,8 +20,8 @@
|
||||
<HasResources Value="True"/>
|
||||
<ResourceBaseClass Value="Form"/>
|
||||
<IsVisibleTab Value="True"/>
|
||||
<TopLine Value="38"/>
|
||||
<CursorPos X="23" Y="62"/>
|
||||
<TopLine Value="37"/>
|
||||
<CursorPos X="59" Y="57"/>
|
||||
<ExtraEditorCount Value="1"/>
|
||||
<ExtraEditor1>
|
||||
<EditorIndex Value="-1"/>
|
||||
@ -29,11 +29,11 @@
|
||||
<TopLine Value="311"/>
|
||||
<CursorPos Y="498"/>
|
||||
</ExtraEditor1>
|
||||
<UsageCount Value="162"/>
|
||||
<UsageCount Value="164"/>
|
||||
<Bookmarks Count="3">
|
||||
<Item0 Y="858" ID="1"/>
|
||||
<Item1 Y="804"/>
|
||||
<Item2 Y="660" ID="2"/>
|
||||
<Item0 Y="880" ID="1"/>
|
||||
<Item1 Y="818"/>
|
||||
<Item2 Y="661" ID="2"/>
|
||||
</Bookmarks>
|
||||
<Loaded Value="True"/>
|
||||
<LoadedDesigner Value="True"/>
|
||||
@ -41,7 +41,7 @@
|
||||
<Unit2>
|
||||
<Filename Value="ugenericcollection.pas"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
<UsageCount Value="162"/>
|
||||
<UsageCount Value="164"/>
|
||||
</Unit2>
|
||||
<Unit3>
|
||||
<Filename Value="C:\NewPascal\projects\MDSUM\CryptINI\lockini.pas"/>
|
||||
@ -49,7 +49,7 @@
|
||||
<UnitName Value="LockIni"/>
|
||||
<EditorIndex Value="-1"/>
|
||||
<CursorPos X="40" Y="9"/>
|
||||
<UsageCount Value="80"/>
|
||||
<UsageCount Value="82"/>
|
||||
</Unit3>
|
||||
<Unit4>
|
||||
<Filename Value="D:\Lazarusprojects\golfml\egacalculator\source\umainform.pas"/>
|
||||
@ -352,18 +352,18 @@
|
||||
</Unit44>
|
||||
<Unit45>
|
||||
<Filename Value="C:\trunklatest\lazarus\lcl\include\customform.inc"/>
|
||||
<EditorIndex Value="2"/>
|
||||
<TopLine Value="992"/>
|
||||
<CursorPos Y="1012"/>
|
||||
<UsageCount Value="29"/>
|
||||
<EditorIndex Value="1"/>
|
||||
<TopLine Value="910"/>
|
||||
<CursorPos Y="932"/>
|
||||
<UsageCount Value="30"/>
|
||||
<Loaded Value="True"/>
|
||||
</Unit45>
|
||||
<Unit46>
|
||||
<Filename Value="C:\trunklatest\fpc\packages\fcl-base\src\fileinfo.pp"/>
|
||||
<EditorIndex Value="1"/>
|
||||
<EditorIndex Value="2"/>
|
||||
<TopLine Value="88"/>
|
||||
<CursorPos X="26" Y="110"/>
|
||||
<UsageCount Value="28"/>
|
||||
<UsageCount Value="29"/>
|
||||
<Loaded Value="True"/>
|
||||
</Unit46>
|
||||
</Units>
|
||||
@ -373,123 +373,123 @@
|
||||
<JumpHistory Count="30" HistoryIndex="29">
|
||||
<Position1>
|
||||
<Filename Value="umain.pas"/>
|
||||
<Caret Line="900" Column="3" TopLine="898"/>
|
||||
<Caret Line="774" TopLine="753"/>
|
||||
</Position1>
|
||||
<Position2>
|
||||
<Filename Value="umain.pas"/>
|
||||
<Caret Line="1124" TopLine="1104"/>
|
||||
<Caret Line="775" Column="44" TopLine="753"/>
|
||||
</Position2>
|
||||
<Position3>
|
||||
<Filename Value="umain.pas"/>
|
||||
<Caret Line="839" Column="9" TopLine="831"/>
|
||||
<Caret Line="815" TopLine="778"/>
|
||||
</Position3>
|
||||
<Position4>
|
||||
<Filename Value="umain.pas"/>
|
||||
<Caret Line="580" Column="39" TopLine="566"/>
|
||||
<Caret Line="813" TopLine="781"/>
|
||||
</Position4>
|
||||
<Position5>
|
||||
<Filename Value="umain.pas"/>
|
||||
<Caret Line="255" Column="17" TopLine="254"/>
|
||||
<Caret Line="777" TopLine="755"/>
|
||||
</Position5>
|
||||
<Position6>
|
||||
<Filename Value="umain.pas"/>
|
||||
<Caret Line="480" Column="67" TopLine="471"/>
|
||||
<Caret Line="805" Column="17" TopLine="779"/>
|
||||
</Position6>
|
||||
<Position7>
|
||||
<Filename Value="umain.pas"/>
|
||||
<Caret Line="647" Column="23" TopLine="629"/>
|
||||
<Caret Line="777" Column="5" TopLine="755"/>
|
||||
</Position7>
|
||||
<Position8>
|
||||
<Filename Value="umain.pas"/>
|
||||
<Caret Line="1090" Column="18" TopLine="1065"/>
|
||||
<Caret Line="813" TopLine="792"/>
|
||||
</Position8>
|
||||
<Position9>
|
||||
<Filename Value="umain.pas"/>
|
||||
<Caret Line="697" Column="69" TopLine="683"/>
|
||||
<Caret Line="794" Column="7" TopLine="773"/>
|
||||
</Position9>
|
||||
<Position10>
|
||||
<Filename Value="umain.pas"/>
|
||||
<Caret Line="695" Column="9" TopLine="675"/>
|
||||
<Caret Line="813" TopLine="776"/>
|
||||
</Position10>
|
||||
<Position11>
|
||||
<Filename Value="umain.pas"/>
|
||||
<Caret Line="5" Column="23"/>
|
||||
<Caret Line="814" TopLine="777"/>
|
||||
</Position11>
|
||||
<Position12>
|
||||
<Filename Value="umain.pas"/>
|
||||
<Caret Line="274" Column="17" TopLine="242"/>
|
||||
<Caret Line="804" Column="34" TopLine="783"/>
|
||||
</Position12>
|
||||
<Position13>
|
||||
<Filename Value="umain.pas"/>
|
||||
<Caret Line="1133" Column="30" TopLine="1120"/>
|
||||
<Caret Line="813" TopLine="783"/>
|
||||
</Position13>
|
||||
<Position14>
|
||||
<Filename Value="umain.pas"/>
|
||||
<Caret Line="1060" Column="50" TopLine="1022"/>
|
||||
<Caret Line="814" TopLine="783"/>
|
||||
</Position14>
|
||||
<Position15>
|
||||
<Filename Value="umain.pas"/>
|
||||
<Caret Line="951"/>
|
||||
<Caret Line="772" Column="14" TopLine="759"/>
|
||||
</Position15>
|
||||
<Position16>
|
||||
<Filename Value="umain.pas"/>
|
||||
<Caret Line="1100" Column="79" TopLine="1070"/>
|
||||
<Caret Line="821" TopLine="760"/>
|
||||
</Position16>
|
||||
<Position17>
|
||||
<Filename Value="umain.pas"/>
|
||||
<Caret Line="59" Column="47" TopLine="49"/>
|
||||
<Caret Line="772" TopLine="760"/>
|
||||
</Position17>
|
||||
<Position18>
|
||||
<Filename Value="umain.pas"/>
|
||||
<Caret Line="730" Column="31" TopLine="726"/>
|
||||
<Caret Line="777" TopLine="766"/>
|
||||
</Position18>
|
||||
<Position19>
|
||||
<Filename Value="umain.pas"/>
|
||||
<Caret Line="733" Column="8" TopLine="711"/>
|
||||
<Caret Line="778" TopLine="766"/>
|
||||
</Position19>
|
||||
<Position20>
|
||||
<Filename Value="umain.pas"/>
|
||||
<Caret Line="732" Column="31" TopLine="712"/>
|
||||
<Caret Line="779" TopLine="766"/>
|
||||
</Position20>
|
||||
<Position21>
|
||||
<Filename Value="umain.pas"/>
|
||||
<Caret Line="767" Column="41" TopLine="86"/>
|
||||
<Caret Line="780" TopLine="766"/>
|
||||
</Position21>
|
||||
<Position22>
|
||||
<Filename Value="umain.pas"/>
|
||||
<Caret Line="3" Column="28"/>
|
||||
<Caret Line="770" TopLine="762"/>
|
||||
</Position22>
|
||||
<Position23>
|
||||
<Filename Value="umain.pas"/>
|
||||
<Caret Line="793" Column="24" TopLine="761"/>
|
||||
<Caret Line="771" TopLine="762"/>
|
||||
</Position23>
|
||||
<Position24>
|
||||
<Filename Value="umain.pas"/>
|
||||
<Caret Line="789" Column="30" TopLine="767"/>
|
||||
<Caret Line="772" TopLine="762"/>
|
||||
</Position24>
|
||||
<Position25>
|
||||
<Filename Value="umain.pas"/>
|
||||
<Caret Line="374" Column="40" TopLine="366"/>
|
||||
<Caret Line="793" Column="10" TopLine="762"/>
|
||||
</Position25>
|
||||
<Position26>
|
||||
<Filename Value="umain.pas"/>
|
||||
<Caret Line="379" Column="18" TopLine="363"/>
|
||||
<Caret Line="840" Column="27" TopLine="779"/>
|
||||
</Position26>
|
||||
<Position27>
|
||||
<Filename Value="umain.pas"/>
|
||||
<Caret Line="304" Column="19" TopLine="254"/>
|
||||
<Caret Line="226" TopLine="193"/>
|
||||
</Position27>
|
||||
<Position28>
|
||||
<Filename Value="umain.pas"/>
|
||||
<Caret Line="113" Column="26" TopLine="73"/>
|
||||
<Caret Line="1266" Column="35" TopLine="1186"/>
|
||||
</Position28>
|
||||
<Position29>
|
||||
<Filename Value="umain.pas"/>
|
||||
<Caret Line="1163" TopLine="1133"/>
|
||||
<Caret Line="1000" TopLine="975"/>
|
||||
</Position29>
|
||||
<Position30>
|
||||
<Filename Value="umain.pas"/>
|
||||
<Caret Line="930" TopLine="923"/>
|
||||
<Caret Line="771" Column="29" TopLine="745"/>
|
||||
</Position30>
|
||||
</JumpHistory>
|
||||
</ProjectSession>
|
||||
|
Binary file not shown.
@ -63,7 +63,8 @@ unit umain;
|
||||
0.2.2.0: Hints and Validation updated (minesadorada)
|
||||
0.2.3.0: ResourceStrings Updated (minesadorada)
|
||||
0.2.4.0: Bugfix: regression error: DisableInOPM (minesadorada)
|
||||
0.2.5.0: ??
|
||||
0.2.5.0: BugFix: regression error: CreateUniqueINIFile (minesadorada)
|
||||
0.2.6.0: ??
|
||||
}
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
@ -71,7 +72,7 @@ interface
|
||||
|
||||
{DefaultTranslator not used}
|
||||
uses
|
||||
Classes, Forms, Controls, StdCtrls, Menus, ActnList, StdActns, Grids,
|
||||
Classes, Forms, Controls, StdCtrls, Menus, ActnList, StdActns,
|
||||
Graphics, Buttons, fileutil, LazFileUtils, fileinfo, ugenericcollection,
|
||||
fpjsonrtti, Dialogs, LCLTranslator, PopupNotifier, SysUtils, inifiles,
|
||||
lclintf, lclVersion, LResources, Spin, {$IFDEF PO_BUILTINRES}LazUTF8Classes{$ENDIF};
|
||||
@ -167,7 +168,7 @@ type
|
||||
sb_PackageFiles: TScrollBox;
|
||||
spd_CheckURL: TSpeedButton;
|
||||
procedure chk_DisableInOPMMouseUp(Sender: TObject; Button: TMouseButton;
|
||||
Shift: TShiftState; X, Y: Integer);
|
||||
Shift: TShiftState; X, Y: integer);
|
||||
procedure cmd_AddPackageFileClick(Sender: TObject);
|
||||
procedure cmd_RemoveLastPackageFileClick(Sender: TObject);
|
||||
procedure FormCloseQuery(Sender: TObject; var CanClose: boolean);
|
||||
@ -215,15 +216,15 @@ type
|
||||
procedure AddNewControlArray;
|
||||
procedure DestroyControlArrays;
|
||||
procedure RemoveLastControlArray;
|
||||
function ValidationFailed: boolean;
|
||||
procedure ProcessNotify(Sender: TObject; Button: TMouseButton;
|
||||
Shift: TShiftState; X, Y: integer);
|
||||
procedure CtrlShowPopup(Sender: TObject);
|
||||
procedure CtrlHidePopup(Sender: TObject);
|
||||
procedure CtrlSetUpPopupHandlers;
|
||||
procedure CtrlMakeDirty(Sender: TObject);
|
||||
procedure CreateUniqueINI(var aCount: integer);
|
||||
function ValidationFailed: boolean;
|
||||
function FoundADuplicateLPK: boolean;
|
||||
function CreateUniqueINI(var aCount: integer): boolean;
|
||||
public
|
||||
{ public declarations }
|
||||
end;
|
||||
@ -286,13 +287,13 @@ resourcestring
|
||||
rsVersion = 'Version: ';
|
||||
rsFormatIsNNNN = 'Package version:%sFormat is: n.n.n.n';
|
||||
rsCheckThisIfY = 'Check this if you don''t want to increment the package '
|
||||
+'version';
|
||||
+ 'version';
|
||||
rsInternalVers = 'Internal Version: ';
|
||||
rsFilename = 'Filename: ';
|
||||
rsThisWillDisa = 'This will disable your package in Online Package Manager!%'
|
||||
+'sAre you SURE you want to do this?';
|
||||
+ 'sAre you SURE you want to do this?';
|
||||
rsThereWasAPro = 'There was a problem loading "%s" - is it corrupted or in '
|
||||
+'the wrong format?';
|
||||
+ 'the wrong format?';
|
||||
rsVersionForPa = 'Version for package %d is zero';
|
||||
rsInternalVers2 = 'Internal version number should not be Zero%s';
|
||||
rsOpeningYourB = 'Opening your browser...';
|
||||
@ -302,7 +303,7 @@ resourcestring
|
||||
constructor TUpdatePackageData.Create;
|
||||
begin
|
||||
FName := '';
|
||||
FDisableInOPM:= False;
|
||||
FDisableInOPM := False;
|
||||
FDownloadZipURL := '';
|
||||
end;
|
||||
|
||||
@ -411,7 +412,7 @@ var
|
||||
begin
|
||||
// Callked on Form_Destroy
|
||||
for i := 0 to High(ArrayGrpBox) do
|
||||
Begin
|
||||
begin
|
||||
FreeAndNil(ArraySpinEditInternalVersion[i]);
|
||||
FreeAndNil(ArrayLblPackageInternalVersion[i]);
|
||||
FreeAndNil(ArrayChkBoxForceNotify[i]);
|
||||
@ -480,7 +481,7 @@ begin
|
||||
OnMouseEnter := @CtrlShowPopup;
|
||||
OnMouseLeave := @CtrlHidePopup;
|
||||
OnClick := @CtrlHidePopup;
|
||||
Hint := Format('%s%s%s',[rsFilename,LineEnding,rsThePackageFi]);
|
||||
Hint := Format('%s%s%s', [rsFilename, LineEnding, rsThePackageFi]);
|
||||
Parent := ArrayGrpBox[iNumLpkFilesVisible];
|
||||
end;
|
||||
// EditBox - Package name
|
||||
@ -495,7 +496,7 @@ begin
|
||||
OnMouseLeave := @CtrlHidePopup;
|
||||
OnClick := @CtrlHidePopup;
|
||||
OnEditingDone := @CtrlMakeDirty;
|
||||
Hint := Format('%s%s%s',[rsFilename,LineEnding,rsThePackageFi]);
|
||||
Hint := Format('%s%s%s', [rsFilename, LineEnding, rsThePackageFi]);
|
||||
Parent := ArrayGrpBox[iNumLpkFilesVisible];
|
||||
end;
|
||||
// Label - Package Version
|
||||
@ -509,7 +510,7 @@ begin
|
||||
OnMouseEnter := @CtrlShowPopup;
|
||||
OnMouseLeave := @CtrlHidePopup;
|
||||
OnClick := @CtrlHidePopup;
|
||||
Hint := Format(rsFormatIsNNNN,[LineEnding]);
|
||||
Hint := Format(rsFormatIsNNNN, [LineEnding]);
|
||||
Parent := ArrayGrpBox[iNumLpkFilesVisible];
|
||||
end;
|
||||
// SpinEdit V1
|
||||
@ -524,7 +525,7 @@ begin
|
||||
OnMouseLeave := @CtrlHidePopup;
|
||||
OnClick := @CtrlHidePopup;
|
||||
OnChange := @CtrlMakeDirty;
|
||||
Hint := Format(rsFormatIsNNNN,[LineEnding]);
|
||||
Hint := Format(rsFormatIsNNNN, [LineEnding]);
|
||||
Parent := ArrayGrpBox[iNumLpkFilesVisible];
|
||||
end;
|
||||
// SpinEdit V2
|
||||
@ -539,7 +540,7 @@ begin
|
||||
OnMouseLeave := @CtrlHidePopup;
|
||||
OnClick := @CtrlHidePopup;
|
||||
OnChange := @CtrlMakeDirty;
|
||||
Hint := Format(rsFormatIsNNNN,[LineEnding]);
|
||||
Hint := Format(rsFormatIsNNNN, [LineEnding]);
|
||||
Parent := ArrayGrpBox[iNumLpkFilesVisible];
|
||||
end;
|
||||
// SpinEdit V3
|
||||
@ -554,7 +555,7 @@ begin
|
||||
OnMouseLeave := @CtrlHidePopup;
|
||||
OnClick := @CtrlHidePopup;
|
||||
OnChange := @CtrlMakeDirty;
|
||||
Hint := Format(rsFormatIsNNNN,[LineEnding]);
|
||||
Hint := Format(rsFormatIsNNNN, [LineEnding]);
|
||||
Parent := ArrayGrpBox[iNumLpkFilesVisible];
|
||||
end;
|
||||
// SpinEdit V4
|
||||
@ -569,7 +570,7 @@ begin
|
||||
OnMouseLeave := @CtrlHidePopup;
|
||||
OnClick := @CtrlHidePopup;
|
||||
OnChange := @CtrlMakeDirty;
|
||||
Hint := Format(rsFormatIsNNNN,[LineEnding]);
|
||||
Hint := Format(rsFormatIsNNNN, [LineEnding]);
|
||||
Parent := ArrayGrpBox[iNumLpkFilesVisible];
|
||||
end;
|
||||
// ChkBox Notify
|
||||
@ -586,7 +587,7 @@ begin
|
||||
OnClick := @CtrlHidePopup;
|
||||
OnMouseUp := @ProcessNotify;
|
||||
OnEditingDone := @CtrlMakeDirty;
|
||||
Hint := Format('%s:%s%s',[rsNotifyUpdate,LineEnding,rsCheckThisIfY]);
|
||||
Hint := Format('%s:%s%s', [rsNotifyUpdate, LineEnding, rsCheckThisIfY]);
|
||||
Parent := ArrayGrpBox[iNumLpkFilesVisible];
|
||||
end;
|
||||
// Label Internal version
|
||||
@ -600,7 +601,8 @@ begin
|
||||
OnMouseEnter := @CtrlShowPopup;
|
||||
OnMouseLeave := @CtrlHidePopup;
|
||||
OnClick := @CtrlHidePopup;
|
||||
Hint := Format('%s%s%s %s', [rsInternalVers,LineEnding,rsUseInCombina,rsNotifyUpdate]);
|
||||
Hint := Format('%s%s%s %s',
|
||||
[rsInternalVers, LineEnding, rsUseInCombina, rsNotifyUpdate]);
|
||||
Parent := ArrayGrpBox[iNumLpkFilesVisible];
|
||||
end;
|
||||
// SpinEdit Internal Version
|
||||
@ -615,7 +617,8 @@ begin
|
||||
OnMouseLeave := @CtrlHidePopup;
|
||||
OnClick := @CtrlHidePopup;
|
||||
OnChange := @CtrlMakeDirty;
|
||||
Hint := Format('%s%s%s %s', [rsInternalVers,LineEnding,rsUseInCombina,rsNotifyUpdate]);
|
||||
Hint := Format('%s%s%s %s',
|
||||
[rsInternalVers, LineEnding, rsUseInCombina, rsNotifyUpdate]);
|
||||
Parent := ArrayGrpBox[iNumLpkFilesVisible];
|
||||
end;
|
||||
// This sets the subcontrols up correctly
|
||||
@ -734,13 +737,13 @@ begin
|
||||
end;
|
||||
|
||||
procedure TfrmMain.chk_DisableInOPMMouseUp(Sender: TObject;
|
||||
Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
|
||||
Button: TMouseButton; Shift: TShiftState; X, Y: integer);
|
||||
begin
|
||||
// Warn user about DisableInOPM
|
||||
If chk_DisableInOPM.Checked=TRUE then
|
||||
if MessageDlg(Format(rsThisWillDisa, [LineEnding]),
|
||||
mtWarning,[MBYES,MBNO],0,MBNO) = mrNo then
|
||||
chk_DisableInOPM.Checked:=FALSE;
|
||||
// Warn user about DisableInOPM
|
||||
if chk_DisableInOPM.Checked = True then
|
||||
if MessageDlg(Format(rsThisWillDisa, [LineEnding]),
|
||||
mtWarning, [mbYes, mbNo], 0, mbNo) = mrNo then
|
||||
chk_DisableInOPM.Checked := False;
|
||||
end;
|
||||
|
||||
procedure TfrmMain.cmd_RemoveLastPackageFileClick(Sender: TObject);
|
||||
@ -755,8 +758,8 @@ begin
|
||||
begin
|
||||
if MessageDlg(rsFileMayBeUns, mtConfirmation, [mbYes, mbNo], 0, mbNo) = mrNo then
|
||||
CanClose := False;
|
||||
end
|
||||
else
|
||||
end;
|
||||
if CanClose = True then
|
||||
begin
|
||||
CFG.WriteBool('Options', 'Virgin', False); // Suppresses PopUp hints on next run
|
||||
CFG.WriteBool('Options', 'DiableWarnings', bDisableWarnings);
|
||||
@ -764,20 +767,33 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
function TfrmMain.CreateUniqueINI(var aCount: integer): boolean;
|
||||
// Recursively loop until correct INI found, or new one created
|
||||
// Based on Executable's path location
|
||||
procedure TfrmMain.CreateUniqueINI(var aCount: integer);
|
||||
// Recursively loop until correct INI found, or new one created
|
||||
// Based on Executable's path location
|
||||
begin
|
||||
Result := False;
|
||||
INIFilePath := GetAppConfigFile(False) + IntToStr(aCount);
|
||||
CFG := TIniFile.Create(INIFilePath);
|
||||
CFG.CacheUpdates := True;
|
||||
if CFG.ReadString('Options', 'AppPath', ProgramDirectory) <> ProgramDirectory then
|
||||
If C_DEBUGMESSAGES then ShowMessage(INIFilePath);
|
||||
if FileExistsUTF8(INIFilePath) then
|
||||
begin
|
||||
FreeAndNil(CFG); // Ditch the old one
|
||||
Inc(aCount);
|
||||
Result := True;
|
||||
CreateUniqueINI(aCount); // Make a new one
|
||||
CFG := TIniFile.Create(INIFilePath);
|
||||
CFG.CacheUpdates := True;
|
||||
if CFG.ReadString('Options', 'AppPath', 'unknown') = ProgramDirectory then
|
||||
begin
|
||||
Exit;
|
||||
end
|
||||
else
|
||||
begin
|
||||
FreeAndNil(CFG); // Ditch the old one
|
||||
Inc(aCount);
|
||||
CreateUniqueINI(aCount); // Make a new one
|
||||
end;
|
||||
end
|
||||
else
|
||||
begin
|
||||
CFG := TIniFile.Create(INIFilePath);
|
||||
CFG.CacheUpdates := True;
|
||||
CFG.WriteString('Options', 'AppPath', ProgramDirectory);
|
||||
Exit;
|
||||
end;
|
||||
end;
|
||||
|
||||
@ -811,8 +827,16 @@ begin
|
||||
// If program location is different, create a new CFG file
|
||||
// Because each component's location might be different
|
||||
iIniCount := 0;
|
||||
if CreateUniqueINI(iIniCount) then
|
||||
// First time run anywhere on the system
|
||||
INIFilePath := GetAppConfigFile(False) + '0';
|
||||
if not FileExistsUTF8(INIFilePath) then
|
||||
begin
|
||||
CFG := TIniFile.Create(INIFilePath);
|
||||
CFG.WriteString('Options', 'AppPath', ProgramDirectory);
|
||||
end
|
||||
else // Make a new INI if this is a new location
|
||||
CreateUniqueINI(iIniCount);
|
||||
|
||||
CFG.UpdateFile;
|
||||
|
||||
if C_DEBUGMESSAGES = True then // Dev only
|
||||
@ -875,7 +899,7 @@ begin
|
||||
begin
|
||||
edt_UpdateZipName.Text := JSONPackage.UpdatePackageData.Name;
|
||||
edt_DownloadZipURL.Text := JSONPackage.UpdatePackageData.DownloadZipURL;
|
||||
chk_DisableInOPM.Checked:=JSONPackage.UpdatePackageData.DisableInOPM;
|
||||
chk_DisableInOPM.Checked := JSONPackage.UpdatePackageData.DisableInOPM;
|
||||
for i := 0 to JSONPackage.UpdatePackageFiles.Count - 1 do
|
||||
begin
|
||||
if (i > 0) then
|
||||
@ -928,7 +952,7 @@ begin
|
||||
edt_DownloadZipURL.Text := rsHttpWwwUpdat;
|
||||
sJSONFilePath := '';
|
||||
sZipDirectory := '';
|
||||
chk_DisableInOPM.Checked:=False;
|
||||
chk_DisableInOPM.Checked := False;
|
||||
ResetPackageFileControlsToOne;
|
||||
ArrayEdtPackageFileName[0].Text := rsMypackagelpk;
|
||||
ArraySpinEditV1[0].Value := 0;
|
||||
@ -1116,13 +1140,13 @@ begin
|
||||
Result := True;
|
||||
end;
|
||||
// Check Forcenotify version isn't zero
|
||||
If ArrayChkBoxForceNotify[iCount].Checked = TRUE then
|
||||
If ArraySpinEditInternalVersion[iCount].Value = 0 then
|
||||
begin
|
||||
ArraySpinEditInternalVersion[iCount].Color := clYellow;
|
||||
slErrorList.Add(Format(rsInternalVers2, [LineEnding]));
|
||||
Result := True;
|
||||
end;
|
||||
if ArrayChkBoxForceNotify[iCount].Checked = True then
|
||||
if ArraySpinEditInternalVersion[iCount].Value = 0 then
|
||||
begin
|
||||
ArraySpinEditInternalVersion[iCount].Color := clYellow;
|
||||
slErrorList.Add(Format(rsInternalVers2, [LineEnding]));
|
||||
Result := True;
|
||||
end;
|
||||
// Check for duplicate .lpk entries
|
||||
if FoundADuplicateLPK then
|
||||
begin
|
||||
@ -1163,7 +1187,7 @@ begin
|
||||
try
|
||||
JSONPackage.UpdatePackageData.Name := edt_UpdateZipName.Text;
|
||||
JSONPackage.UpdatePackageData.DownloadZipURL := edt_DownloadZipURL.Text;
|
||||
JSONPackage.UpdatePackageData.DisableInOPM:=chk_DisableInOPM.Checked;
|
||||
JSONPackage.UpdatePackageData.DisableInOPM := chk_DisableInOPM.Checked;
|
||||
for i := 0 to High(ArrayGrpBox) do
|
||||
begin
|
||||
with JSONPackage.UpdatePackageFiles.Add do
|
||||
@ -1226,16 +1250,16 @@ procedure TfrmMain.spd_CheckURLClick(Sender: TObject);
|
||||
// Show a popup notification because it takes time to open a browser window
|
||||
var
|
||||
bTemp: boolean;
|
||||
sOldHint:String;
|
||||
sOldHint: string;
|
||||
begin
|
||||
if OpenURL(edt_DownloadZipURL.Text) then
|
||||
begin
|
||||
bTemp := bShowPopupHints;
|
||||
sOldHint:=spd_CheckURL.Hint;
|
||||
spd_CheckURL.Hint:=rsOpeningYourB;
|
||||
sOldHint := spd_CheckURL.Hint;
|
||||
spd_CheckURL.Hint := rsOpeningYourB;
|
||||
bShowPopupHints := True;
|
||||
CtrlShowPopup(spd_CheckURL);
|
||||
spd_CheckURL.Hint:=sOldHint;
|
||||
spd_CheckURL.Hint := sOldHint;
|
||||
bShowPopupHints := bTemp;
|
||||
end;
|
||||
end;
|
||||
|
Reference in New Issue
Block a user