diff --git a/applications/json_packager/deploywin/json_packager.iss b/applications/json_packager/deploywin/json_packager.iss
index e30eb6314..cb596e328 100644
--- a/applications/json_packager/deploywin/json_packager.iss
+++ b/applications/json_packager/deploywin/json_packager.iss
@@ -1,6 +1,6 @@
[Setup]
AppName=External OPM JSON package Editor
-AppVersion=0.1.18.0
+AppVersion=0.1.19.0
DefaultDirName={pf}\OPMUtilities
DefaultGroupName=OPM
UninstallDisplayIcon={app}\jsoneditor.exe
diff --git a/applications/json_packager/jsonpackage.lpi b/applications/json_packager/jsonpackage.lpi
index c4de18ec4..aca88c621 100644
--- a/applications/json_packager/jsonpackage.lpi
+++ b/applications/json_packager/jsonpackage.lpi
@@ -28,7 +28,7 @@
-
+
diff --git a/applications/json_packager/jsonpackage.lps b/applications/json_packager/jsonpackage.lps
index 81f8c89e7..809f1aaef 100644
--- a/applications/json_packager/jsonpackage.lps
+++ b/applications/json_packager/jsonpackage.lps
@@ -3,14 +3,14 @@
-
-
+
+
-
+
-
+
@@ -20,12 +20,12 @@
-
-
-
+
+
+
-
-
+
+
@@ -33,7 +33,7 @@
-
+
@@ -107,10 +107,11 @@
-
-
-
+
+
+
+
@@ -235,10 +236,10 @@
-
+
-
+
@@ -250,127 +251,149 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
-
+
-
+
-
+
-
-
+
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
-
+
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
-
+
+
-
+
-
+
-
+
+
+
+
+
diff --git a/applications/json_packager/jsonpackage.res b/applications/json_packager/jsonpackage.res
index 2f23cba9f..130fbd3d7 100644
Binary files a/applications/json_packager/jsonpackage.res and b/applications/json_packager/jsonpackage.res differ
diff --git a/applications/json_packager/locale/jsoneditor.en.mo b/applications/json_packager/locale/jsoneditor.en.mo
index f8f353cef..a69444cf7 100644
Binary files a/applications/json_packager/locale/jsoneditor.en.mo and b/applications/json_packager/locale/jsoneditor.en.mo differ
diff --git a/applications/json_packager/locale/jsoneditor.en.po b/applications/json_packager/locale/jsoneditor.en.po
index cfd191302..a924b6185 100644
--- a/applications/json_packager/locale/jsoneditor.en.po
+++ b/applications/json_packager/locale/jsoneditor.en.po
@@ -117,6 +117,19 @@ msgstr "Update Zip Name:"
msgid "Package Files:"
msgstr "Package Files:"
+#: tfrmmain.lbl_internalversion.caption
+msgid "Internal Version"
+msgstr "Internal Version"
+
+#: tfrmmain.lbl_internalversion.hint
+msgctxt "tfrmmain.lbl_internalversion.hint"
+msgid ""
+"Internal Version:\n"
+"Increase internal version when you have made changes in the source. It works only combined with ForceNotify.\n"
+msgstr ""
+"Internal Version:\n"
+"Increase internal version when you have made changes in the source. It works only combined with ForceNotify.\n"
+
#: tfrmmain.loaditem.caption
msgid "Load..."
msgstr "Load..."
@@ -183,6 +196,13 @@ msgstr "Check URL"
msgid "Attempting to Open URL"
msgstr "Attempting to Open URL"
+#: tfrmmain.spin_internalversion.hint
+msgctxt "tfrmmain.spin_internalversion.hint"
+msgid ""
+"Internal Version:\n"
+"Increase internal version when you have made changes in the source. It works only combined with ForceNotify.\n"
+msgstr ""
+
#: tfrmmain.stringpackagefiles.hint
msgid ""
"Package Files:\n"
@@ -340,4 +360,3 @@ msgstr "Would you like to copy %s to the %s folder?"
#: umain.rsyoumayneedto
msgid "(You may need to restart the app to see the change)"
msgstr "(You may need to restart the app to see the change)"
-
diff --git a/applications/json_packager/locale/jsoneditor.es.mo b/applications/json_packager/locale/jsoneditor.es.mo
index 970af7140..87b529afb 100644
Binary files a/applications/json_packager/locale/jsoneditor.es.mo and b/applications/json_packager/locale/jsoneditor.es.mo differ
diff --git a/applications/json_packager/locale/jsoneditor.es.po b/applications/json_packager/locale/jsoneditor.es.po
index df51eb988..307af8967 100644
--- a/applications/json_packager/locale/jsoneditor.es.po
+++ b/applications/json_packager/locale/jsoneditor.es.po
@@ -4,12 +4,12 @@ msgstr ""
"Project-Id-Version: jsoneditor\n"
"POT-Creation-Date: \n"
"PO-Revision-Date: \n"
-"Last-Translator: \n"
+"Last-Translator: minesadorada \n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: es\n"
-"X-Generator: Poedit 1.8.8\n"
+"X-Generator: Poedit 1.8.11\n"
"X-Poedit-SourceCharset: UTF-8\n"
#: tfrmmain.btnadd.caption
@@ -118,6 +118,19 @@ msgstr "Nombre del Zip de actualización:"
msgid "Package Files:"
msgstr "Archivos de Paquete:"
+#: tfrmmain.lbl_internalversion.caption
+msgid "Internal Version"
+msgstr "Versión interna"
+
+#: tfrmmain.lbl_internalversion.hint
+msgctxt "tfrmmain.lbl_internalversion.hint"
+msgid ""
+"Internal Version:\n"
+"Increase internal version when you have made changes in the source. It works only combined with ForceNotify.\n"
+msgstr ""
+"Versión interno:\n"
+"Aumenta versión interna cuando se han hecho cambios en la fuente. Sólo funciona combina con ForceNotify.\n"
+
#: tfrmmain.loaditem.caption
msgid "Load..."
msgstr "Cargar..."
@@ -184,6 +197,13 @@ msgstr "Verificar URL"
msgid "Attempting to Open URL"
msgstr "Intentando Abrir URL"
+#: tfrmmain.spin_internalversion.hint
+msgctxt "tfrmmain.spin_internalversion.hint"
+msgid ""
+"Internal Version:\n"
+"Increase internal version when you have made changes in the source. It works only combined with ForceNotify.\n"
+msgstr ""
+
#: tfrmmain.stringpackagefiles.hint
msgid ""
"Package Files:\n"
@@ -341,4 +361,3 @@ msgstr "¿Quieres copiar %s a la carpeta %s?"
#: umain.rsyoumayneedto
msgid "(You may need to restart the app to see the change)"
msgstr "(Quizás necesites reiniciar la aplicación para ver los cambios)"
-
diff --git a/applications/json_packager/locale/jsoneditor.po b/applications/json_packager/locale/jsoneditor.po
index ffab0c425..70a7d394d 100644
--- a/applications/json_packager/locale/jsoneditor.po
+++ b/applications/json_packager/locale/jsoneditor.po
@@ -103,6 +103,17 @@ msgstr ""
msgid "Package Files:"
msgstr ""
+#: tfrmmain.lbl_internalversion.caption
+msgid "Internal Version"
+msgstr ""
+
+#: tfrmmain.lbl_internalversion.hint
+msgctxt "tfrmmain.lbl_internalversion.hint"
+msgid ""
+"Internal Version:\n"
+"Increase internal version when you have made changes in the source. It works only combined with ForceNotify.\n"
+msgstr ""
+
#: tfrmmain.loaditem.caption
msgid "Load..."
msgstr ""
@@ -166,6 +177,13 @@ msgstr ""
msgid "Attempting to Open URL"
msgstr ""
+#: tfrmmain.spin_internalversion.hint
+msgctxt "tfrmmain.spin_internalversion.hint"
+msgid ""
+"Internal Version:\n"
+"Increase internal version when you have made changes in the source. It works only combined with ForceNotify.\n"
+msgstr ""
+
#: tfrmmain.stringpackagefiles.hint
msgid ""
"Package Files:\n"
diff --git a/applications/json_packager/umain.lfm b/applications/json_packager/umain.lfm
index 2fe6caca5..373674f0b 100644
--- a/applications/json_packager/umain.lfm
+++ b/applications/json_packager/umain.lfm
@@ -1,14 +1,14 @@
object frmMain: TfrmMain
- Left = 526
- Height = 420
+ Left = 503
+ Height = 425
Top = 226
- Width = 320
+ Width = 339
AutoSize = True
BorderIcons = [biSystemMenu]
BorderStyle = bsSingle
BorderWidth = 8
- ClientHeight = 400
- ClientWidth = 320
+ ClientHeight = 405
+ ClientWidth = 339
DefaultMonitor = dmPrimary
Menu = MainMenu1
OnClick = mnu_fileSaveClick
@@ -29,31 +29,21 @@ object frmMain: TfrmMain
ParentColor = False
end
object editName: TEdit
+ AnchorSideRight.Control = sb_editName
Left = 8
Height = 23
Hint = 'Update Zip Name:'#13#10'This is just the filename (not including the path)'#13#10'of your update zip. Type, or click the [...]'
- Top = 31
- Width = 264
+ Top = 32
+ Width = 291
Anchors = [akTop, akLeft, akRight]
+ BorderSpacing.Right = 6
Color = clWindow
TabOrder = 0
end
- object cbForceNotify: TCheckBox
- Left = 8
- Height = 19
- Hint = 'Force Notify check box:'#13#10'If this is checked the OPM user will be notified'#13#10'of your update. Only check this if the update is important.'
- Top = 72
- Width = 85
- Caption = 'Force Notify'
- Color = clWindow
- OnMouseUp = cbForceNotifyMouseUp
- ParentColor = False
- TabOrder = 1
- end
object lblDownloadZipURL: TLabel
Left = 8
Height = 15
- Top = 104
+ Top = 112
Width = 81
Caption = 'Download URL:'
ParentColor = False
@@ -62,17 +52,16 @@ object frmMain: TfrmMain
Left = 8
Height = 28
Hint = 'Download URL:'#13#10'Include the FULL url needed to download the package Zip file'
- Top = 128
- Width = 304
- Anchors = [akTop, akLeft, akRight]
+ Top = 136
+ Width = 322
AutoSize = False
Color = clWindow
- TabOrder = 2
+ TabOrder = 1
end
object lblPackageFiles: TLabel
Left = 8
Height = 15
- Top = 163
+ Top = 173
Width = 73
Caption = 'Package Files:'
ParentColor = False
@@ -81,65 +70,71 @@ object frmMain: TfrmMain
Left = 8
Height = 144
Hint = 'Package Files:'#13#10'[Add]: to make a new entry'#13#10'[Remove]: Remove last entry'#13#10'lpk filename: i.e. mycontrol.lpk'#13#10'Version: The FULL version (i.e. not 1.0 but 1.0.0.0)'
- Top = 192
- Width = 304
+ Top = 208
+ Width = 323
+ Anchors = [akTop, akLeft, akRight]
AutoFillColumns = True
ColCount = 2
Columns = <
item
Title.Caption = ''
- Width = 150
+ Width = 159
end
item
Title.Caption = ''
- Width = 150
+ Width = 160
end>
FixedCols = 0
Options = [goFixedVertLine, goFixedHorzLine, goVertLine, goHorzLine, goRangeSelect, goEditing, goThumbTracking, goSmoothScroll]
RowCount = 1
- TabOrder = 3
+ TabOrder = 2
TitleStyle = tsNative
ColWidths = (
- 150
- 150
+ 159
+ 160
)
end
object btnAdd: TButton
- Left = 160
+ AnchorSideRight.Control = btnRemove
+ Left = 176
Height = 25
Hint = 'Add Package File:'#13#10'The update zip can contain more than one lpk file'#13#10'deployed to the same place.'
- Top = 163
- Width = 75
+ Top = 173
+ Width = 65
+ Anchors = [akTop, akLeft, akRight]
+ BorderSpacing.Right = 5
Caption = 'Add'
OnClick = btnAddClick
- TabOrder = 4
+ TabOrder = 3
end
object btnRemove: TButton
- Left = 237
+ Left = 246
Height = 25
Hint = 'Remove Package File:'#13#10'Deletes the last entry from the list'
- Top = 163
+ Top = 173
Width = 75
+ Anchors = [akTop, akRight]
Caption = 'Remove'
OnClick = btnRemoveClick
- TabOrder = 5
+ TabOrder = 4
end
object cmd_Close: TBitBtn
- Left = 237
+ Left = 253
Height = 30
- Top = 352
- Width = 75
+ Top = 368
+ Width = 76
+ Anchors = [akTop, akLeft, akRight]
Cancel = True
Caption = '&Close'
Kind = bkClose
ModalResult = 11
- TabOrder = 6
+ TabOrder = 5
end
object cmd_save: TBitBtn
- Left = 123
+ Left = 134
Height = 30
Hint = 'Save the current configuration to disk'#13#10'as a JSON update file'
- Top = 352
+ Top = 368
Width = 75
Caption = '&Save'
Default = True
@@ -180,27 +175,79 @@ object frmMain: TfrmMain
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00
}
OnClick = mnu_fileSaveClick
- TabOrder = 7
+ TabOrder = 6
end
object sb_editName: TSpeedButton
- Left = 280
+ Left = 305
Height = 22
Hint = 'Update Zip Name:'#13#10'Click this to browse your system to find'#13#10' an existing Update Zip'
- Top = 31
+ Top = 32
Width = 24
+ Anchors = [akTop, akRight]
Caption = '...'
OnClick = sb_editNameClick
end
object spd_CheckURL: TSpeedButton
- Left = 104
+ Left = 257
Height = 19
Hint = 'Attempting to Open URL'
- Top = 102
+ Top = 112
Width = 61
+ Anchors = [akTop, akRight]
AutoSize = True
Caption = 'Check URL'
OnClick = spd_CheckURLClick
end
+ object grp_ForceNotify: TGroupBox
+ Left = 8
+ Height = 48
+ Top = 56
+ Width = 321
+ Anchors = [akTop, akLeft, akRight]
+ ClientHeight = 28
+ ClientWidth = 317
+ TabOrder = 7
+ object cbForceNotify: TCheckBox
+ Left = 8
+ Height = 19
+ Hint = 'Force Notify check box:'#13#10'If this is checked the OPM user will be notified'#13#10'of your update. Only check this if the update is important.'
+ Top = 0
+ Width = 85
+ Anchors = [akLeft]
+ Caption = 'Force Notify'
+ Color = clWindow
+ OnMouseUp = cbForceNotifyMouseUp
+ ParentColor = False
+ TabOrder = 0
+ end
+ object Spin_InternalVersion: TSpinEdit
+ AnchorSideTop.Control = grp_ForceNotify
+ AnchorSideRight.Control = grp_ForceNotify
+ Left = 256
+ Height = 23
+ Hint = 'Internal Version:'#13#10'Increase internal version when you have made changes in the source. It works only combined with ForceNotify.'
+ Top = 0
+ Width = 51
+ Anchors = []
+ BorderSpacing.Right = 7
+ MaxValue = 364
+ TabOrder = 1
+ end
+ object lbl_InternalVersion: TLabel
+ AnchorSideRight.Control = Spin_InternalVersion
+ Left = 104
+ Height = 15
+ Hint = 'Internal Version:'#13#10'Increase internal version when you have made changes in the source. It works only combined with ForceNotify.'
+ Top = 2
+ Width = 147
+ Alignment = taRightJustify
+ Anchors = [akLeft, akRight]
+ BorderSpacing.Right = 5
+ Caption = 'Internal Version'
+ ParentColor = False
+ OnClick = lbl_InternalVersionClick
+ end
+ end
object MainMenu1: TMainMenu
Left = 200
object FileMenu: TMenuItem
diff --git a/applications/json_packager/umain.lrj b/applications/json_packager/umain.lrj
index fae00fefe..8d663d52b 100644
--- a/applications/json_packager/umain.lrj
+++ b/applications/json_packager/umain.lrj
@@ -1,8 +1,6 @@
{"version":1,"strings":[
{"hash":183952426,"name":"tfrmmain.lblname.caption","sourcebytes":[85,112,100,97,116,101,32,90,105,112,32,78,97,109,101,58],"value":"Update Zip Name:"},
{"hash":260482813,"name":"tfrmmain.editname.hint","sourcebytes":[85,112,100,97,116,101,32,90,105,112,32,78,97,109,101,58,13,10,84,104,105,115,32,105,115,32,106,117,115,116,32,116,104,101,32,102,105,108,101,110,97,109,101,32,40,110,111,116,32,105,110,99,108,117,100,105,110,103,32,116,104,101,32,112,97,116,104,41,13,10,111,102,32,121,111,117,114,32,117,112,100,97,116,101,32,122,105,112,46,32,84,121,112,101,44,32,111,114,32,99,108,105,99,107,32,116,104,101,32,91,46,46,46,93],"value":"Update Zip Name:\r\nThis is just the filename (not including the path)\r\nof your update zip. Type, or click the [...]"},
-{"hash":147876574,"name":"tfrmmain.cbforcenotify.hint","sourcebytes":[70,111,114,99,101,32,78,111,116,105,102,121,32,99,104,101,99,107,32,98,111,120,58,13,10,73,102,32,116,104,105,115,32,105,115,32,99,104,101,99,107,101,100,32,116,104,101,32,79,80,77,32,117,115,101,114,32,119,105,108,108,32,98,101,32,110,111,116,105,102,105,101,100,13,10,111,102,32,121,111,117,114,32,117,112,100,97,116,101,46,32,32,79,110,108,121,32,99,104,101,99,107,32,116,104,105,115,32,105,102,32,116,104,101,32,117,112,100,97,116,101,32,105,115,32,105,109,112,111,114,116,97,110,116,46],"value":"Force Notify check box:\r\nIf this is checked the OPM user will be notified\r\nof your update. Only check this if the update is important."},
-{"hash":27272873,"name":"tfrmmain.cbforcenotify.caption","sourcebytes":[70,111,114,99,101,32,78,111,116,105,102,121],"value":"Force Notify"},
{"hash":202110442,"name":"tfrmmain.lbldownloadzipurl.caption","sourcebytes":[68,111,119,110,108,111,97,100,32,85,82,76,58],"value":"Download URL:"},
{"hash":265021141,"name":"tfrmmain.editdownloadzipurl.hint","sourcebytes":[68,111,119,110,108,111,97,100,32,85,82,76,58,13,10,73,110,99,108,117,100,101,32,116,104,101,32,70,85,76,76,32,117,114,108,32,110,101,101,100,101,100,32,116,111,32,100,111,119,110,108,111,97,100,32,116,104,101,32,112,97,99,107,97,103,101,32,90,105,112,32,102,105,108,101],"value":"Download URL:\r\nInclude the FULL url needed to download the package Zip file"},
{"hash":57627770,"name":"tfrmmain.lblpackagefiles.caption","sourcebytes":[80,97,99,107,97,103,101,32,70,105,108,101,115,58],"value":"Package Files:"},
@@ -20,6 +18,11 @@
{"hash":12558,"name":"tfrmmain.sb_editname.caption","sourcebytes":[46,46,46],"value":"..."},
{"hash":60451052,"name":"tfrmmain.spd_checkurl.hint","sourcebytes":[65,116,116,101,109,112,116,105,110,103,32,116,111,32,79,112,101,110,32,85,82,76],"value":"Attempting to Open URL"},
{"hash":194843532,"name":"tfrmmain.spd_checkurl.caption","sourcebytes":[67,104,101,99,107,32,85,82,76],"value":"Check URL"},
+{"hash":147876574,"name":"tfrmmain.cbforcenotify.hint","sourcebytes":[70,111,114,99,101,32,78,111,116,105,102,121,32,99,104,101,99,107,32,98,111,120,58,13,10,73,102,32,116,104,105,115,32,105,115,32,99,104,101,99,107,101,100,32,116,104,101,32,79,80,77,32,117,115,101,114,32,119,105,108,108,32,98,101,32,110,111,116,105,102,105,101,100,13,10,111,102,32,121,111,117,114,32,117,112,100,97,116,101,46,32,32,79,110,108,121,32,99,104,101,99,107,32,116,104,105,115,32,105,102,32,116,104,101,32,117,112,100,97,116,101,32,105,115,32,105,109,112,111,114,116,97,110,116,46],"value":"Force Notify check box:\r\nIf this is checked the OPM user will be notified\r\nof your update. Only check this if the update is important."},
+{"hash":27272873,"name":"tfrmmain.cbforcenotify.caption","sourcebytes":[70,111,114,99,101,32,78,111,116,105,102,121],"value":"Force Notify"},
+{"hash":43793310,"name":"tfrmmain.spin_internalversion.hint","sourcebytes":[73,110,116,101,114,110,97,108,32,86,101,114,115,105,111,110,58,13,10,73,110,99,114,101,97,115,101,32,105,110,116,101,114,110,97,108,32,118,101,114,115,105,111,110,32,119,104,101,110,32,121,111,117,32,104,97,118,101,32,109,97,100,101,32,99,104,97,110,103,101,115,32,105,110,32,116,104,101,32,115,111,117,114,99,101,46,32,73,116,32,32,119,111,114,107,115,32,111,110,108,121,32,99,111,109,98,105,110,101,100,32,119,105,116,104,32,70,111,114,99,101,78,111,116,105,102,121,46],"value":"Internal Version:\r\nIncrease internal version when you have made changes in the source. It works only combined with ForceNotify."},
+{"hash":43793310,"name":"tfrmmain.lbl_internalversion.hint","sourcebytes":[73,110,116,101,114,110,97,108,32,86,101,114,115,105,111,110,58,13,10,73,110,99,114,101,97,115,101,32,105,110,116,101,114,110,97,108,32,118,101,114,115,105,111,110,32,119,104,101,110,32,121,111,117,32,104,97,118,101,32,109,97,100,101,32,99,104,97,110,103,101,115,32,105,110,32,116,104,101,32,115,111,117,114,99,101,46,32,73,116,32,32,119,111,114,107,115,32,111,110,108,121,32,99,111,109,98,105,110,101,100,32,119,105,116,104,32,70,111,114,99,101,78,111,116,105,102,121,46],"value":"Internal Version:\r\nIncrease internal version when you have made changes in the source. It works only combined with ForceNotify."},
+{"hash":5825966,"name":"tfrmmain.lbl_internalversion.caption","sourcebytes":[73,110,116,101,114,110,97,108,32,86,101,114,115,105,111,110],"value":"Internal Version"},
{"hash":315429,"name":"tfrmmain.filemenu.caption","sourcebytes":[70,105,108,101],"value":"File"},
{"hash":21703,"name":"tfrmmain.mnu_filenew.caption","sourcebytes":[78,101,119],"value":"New"},
{"hash":56062302,"name":"tfrmmain.loaditem.caption","sourcebytes":[76,111,97,100,46,46,46],"value":"Load..."},
diff --git a/applications/json_packager/umain.pas b/applications/json_packager/umain.pas
index 45b0739d1..b0ac6f65d 100644
--- a/applications/json_packager/umain.pas
+++ b/applications/json_packager/umain.pas
@@ -49,8 +49,10 @@ unit umain;
0.1.17.0: po files stored in resources
Use Project/Options/Resources in Laz 1.7+
Use LazRes to make a file 'translate.lrs' in older Laz (minesadorada)
- 0.1.18.0: Bugfix: Linux path error when creating locale folder
- 0.1.19.0: ??
+ 0.1.18.0: Bugfix: Linux path error when creating locale folder (minesadorada)
+ 0.1.19.0: Added IntrnalVersion integer field to json (minesadorada)
+ Added SpinEdit to control the above (minesadorada)
+ 0.1.20.0: ??
}
{$mode objfpc}{$H+}
@@ -59,9 +61,9 @@ interface
{DefaultTranslator}
uses
Classes, Forms, Controls, StdCtrls, Menus, ActnList, StdActns, Grids,
- Graphics, Buttons, fileutil, LazFileUtils, fileinfo, ugenericcollection, fpjsonrtti,
- Dialogs, LCLTranslator, PopupNotifier, SysUtils, inifiles,
- lclintf, lclVersion,{$IFDEF PO_BUILTINRES}LResources,LazUTF8Classes{$ENDIF};
+ Graphics, Buttons, fileutil, LazFileUtils, fileinfo, ugenericcollection,
+ fpjsonrtti, Dialogs, LCLTranslator, PopupNotifier, SysUtils, inifiles,
+ lclintf, lclVersion, LResources, Spin, {$IFDEF PO_BUILTINRES}LazUTF8Classes{$ENDIF};
const
C_DEBUGMESSAGES = False;
@@ -89,12 +91,14 @@ type
FDownloadZipURL: string;
FForceNotify: boolean;
FName: string;
+ FInternalVersion:Integer;
public
constructor Create;
published
property Name: string read FName write FName;
property ForceNotify: boolean read FForceNotify write FForceNotify;
property DownloadZipURL: string read FDownloadZipURL write FDownloadZipURL;
+ property InternalVersion: integer read FInternalVersion write FInternalVersion;
end;
{ TUpdatePackage }
@@ -119,15 +123,17 @@ type
TfrmMain = class(TForm)
ActionList1: TActionList;
+ cbForceNotify: TCheckBox;
cmd_Close: TBitBtn;
cmd_save: TBitBtn;
btnAdd: TButton;
btnRemove: TButton;
- cbForceNotify: TCheckBox;
editName: TEdit;
editDownloadZipURL: TEdit;
FileOpen1: TFileOpen;
FileSaveAs1: TFileSaveAs;
+ grp_ForceNotify: TGroupBox;
+ lbl_InternalVersion: TLabel;
lblPackageFiles: TLabel;
lblName: TLabel;
lblDownloadZipURL: TLabel;
@@ -147,6 +153,7 @@ type
SaveAsItem: TMenuItem;
sb_editName: TSpeedButton;
spd_CheckURL: TSpeedButton;
+ Spin_InternalVersion: TSpinEdit;
stringPackageFiles: TStringGrid;
procedure btnAddClick(Sender: TObject);
procedure btnRemoveClick(Sender: TObject);
@@ -157,6 +164,7 @@ type
procedure FormCreate(Sender: TObject);
procedure FormDestroy(Sender: TObject);
procedure FormShow(Sender: TObject);
+ procedure lbl_InternalVersionClick(Sender: TObject);
procedure LoadItemClick(Sender: TObject);
procedure mnu_fileNewClick(Sender: TObject);
procedure mnu_fileSaveClick(Sender: TObject);
@@ -292,7 +300,7 @@ end;
procedure TfrmMain.CtrlSetUpPopupHandlers;
// Use different handlers for some controls
var
- iCount: integer;
+ iCount,jCount: integer;
begin
with frmMain do
begin
@@ -300,6 +308,31 @@ begin
begin
if (Controls[iCount].InheritsFrom(TControl) = False) then
continue;
+ if (Controls[iCount] is TGroupBox) then
+ // Iterate through the children of GroupBox
+ for jCount := 0 to Pred(TGroupBox(Controls[iCount]).ControlCount) do
+ Begin
+ if TGroupBox(Controls[iCount]).Controls[jCount] is TSpinEdit then
+ begin
+ TSpinEdit(TGroupBox(Controls[iCount]).Controls[jCount]).OnMouseEnter := @CtrlShowPopup;
+ TSpinEdit(TGroupBox(Controls[iCount]).Controls[jCount]).OnMouseLeave := @CtrlHidePopup;
+ TSpinEdit(TGroupBox(Controls[iCount]).Controls[jCount]).OnClick := @CtrlHidePopup;
+ TSpinEdit(TGroupBox(Controls[iCount]).Controls[jCount]).OnChange := @CtrlMakeDirty;
+ end;
+ if TGroupBox(Controls[iCount]).Controls[jCount] is TCheckBox then
+ begin
+ TCheckBox(TGroupBox(Controls[iCount]).Controls[jCount]).OnMouseEnter := @CtrlShowPopup;
+ TCheckBox(TGroupBox(Controls[iCount]).Controls[jCount]).OnMouseLeave := @CtrlHidePopup;
+ TCheckBox(TGroupBox(Controls[iCount]).Controls[jCount]).OnClick := @CtrlHidePopup;
+ TCheckBox(TGroupBox(Controls[iCount]).Controls[jCount]).OnEditingDone := @CtrlMakeDirty;
+ end;
+ if TGroupBox(Controls[iCount]).Controls[jCount] is TLabel then
+ begin
+ TLabel(TGroupBox(Controls[iCount]).Controls[jCount]).OnMouseEnter := @CtrlShowPopup;
+ TLabel(TGroupBox(Controls[iCount]).Controls[jCount]).OnMouseLeave := @CtrlHidePopup;
+ TLabel(TGroupBox(Controls[iCount]).Controls[jCount]).OnClick := @CtrlHidePopup;
+ end;
+ end;
if (Controls[iCount] is TEdit) then
begin
TEdit(Controls[iCount]).OnMouseEnter := @CtrlShowPopup;
@@ -307,13 +340,6 @@ begin
TEdit(Controls[iCount]).OnClick := @CtrlHidePopup;
TEdit(Controls[iCount]).OnEditingDone := @CtrlMakeDirty;
end;
- if (Controls[iCount] is TCheckBox) then
- begin
- TCheckBox(Controls[iCount]).OnMouseEnter := @CtrlShowPopup;
- TCheckBox(Controls[iCount]).OnMouseLeave := @CtrlHidePopup;
- TCheckBox(Controls[iCount]).OnClick := @CtrlHidePopup;
- TCheckBox(Controls[iCount]).OnEditingDone := @CtrlMakeDirty;
- end;
if (Controls[iCount] is TStringGrid) then
begin
TStringGrid(Controls[iCount]).OnMouseEnter := @CtrlShowPopup;
@@ -389,8 +415,11 @@ begin
begin
s := rsThisOptionSh;
if MessageDlg(s, mtConfirmation, [mbOK, mbAbort], 0, mbAbort) = mrAbort then
- cbForceNotify.Checked := False;
- end;
+ cbForceNotify.Checked := False
+ else
+ If Spin_InternalVersion.Value = 0 then Spin_InternalVersion.Value :=1;
+ end
+ else Spin_InternalVersion.Value :=0;
end;
procedure TfrmMain.FormClose(Sender: TObject; var CloseAction: TCloseAction);
@@ -502,6 +531,11 @@ begin
bDirty := False;
end;
+procedure TfrmMain.lbl_InternalVersionClick(Sender: TObject);
+begin
+
+end;
+
procedure TfrmMain.LoadItemClick(Sender: TObject);
var
i: integer;
@@ -520,6 +554,7 @@ begin
editName.Text := JSONPackage.UpdatePackageData.Name;
editDownloadZipURL.Text := JSONPackage.UpdatePackageData.DownloadZipURL;
cbForceNotify.Checked := JSONPackage.UpdatePackageData.ForceNotify;
+ Spin_InternalVersion.Value:=JSONPackage.UpdatePackageData.InternalVersion;
stringPackageFiles.RowCount := JSONPackage.UpdatePackageFiles.Count + 1;
for i := 0 to JSONPackage.UpdatePackageFiles.Count - 1 do
begin
@@ -781,6 +816,7 @@ begin
JSONPackage.UpdatePackageData.Name := editName.Text;
JSONPackage.UpdatePackageData.DownloadZipURL := editDownloadZipURL.Text;
JSONPackage.UpdatePackageData.ForceNotify := cbForceNotify.Checked;
+ JSONPackage.UpdatePackageData.InternalVersion:=Spin_InternalVersion.Value;
for i := 1 to stringPackageFiles.RowCount - 1 do
begin