diff --git a/applications/json_packager/jsonpackage.lpi b/applications/json_packager/jsonpackage.lpi
index 91057e4c6..3fa47660e 100644
--- a/applications/json_packager/jsonpackage.lpi
+++ b/applications/json_packager/jsonpackage.lpi
@@ -27,8 +27,7 @@
-
-
+
@@ -252,7 +251,7 @@
-
+
@@ -268,6 +267,11 @@
+
+
+
+
+
diff --git a/applications/json_packager/jsonpackage.lps b/applications/json_packager/jsonpackage.lps
index 99db662b8..e58533290 100644
--- a/applications/json_packager/jsonpackage.lps
+++ b/applications/json_packager/jsonpackage.lps
@@ -3,14 +3,14 @@
-
-
+
+
-
-
-
+
+
+
@@ -20,12 +20,13 @@
-
-
-
-
-
-
+
+
+
+
+
+
+
@@ -33,9 +34,17 @@
-
+
+
+
+
+
+
+
+
+
@@ -43,174 +52,174 @@
-
-
-
-
-
-
+
+
+
+
+
+
-
-
-
+
+
+
-
-
-
+
+
+
-
-
-
+
+
+
-
-
-
+
+
+
-
-
-
+
+
+
-
+
-
-
+
+
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
-
-
-
+
+
+
-
-
-
+
+
+
-
-
-
+
+
+
-
-
-
+
+
+
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
-
-
-
+
+
+
-
-
-
+
+
+
-
-
-
-
-
+
+
+
+
+
-
-
-
+
+
+
-
-
-
+
+
+
-
-
-
+
+
+
-
-
-
+
+
+
@@ -218,57 +227,138 @@
-
-
-
-
-
-
-
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
-
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
+
+
+
+
+
+
+
+
@@ -276,123 +366,123 @@
-
+
-
+
-
+
-
-
+
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
-
+
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
diff --git a/applications/json_packager/jsonpackage.res b/applications/json_packager/jsonpackage.res
index decc80d95..461947bc8 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.po b/applications/json_packager/locale/jsoneditor.en.po
index a924b6185..35d8e9a34 100644
--- a/applications/json_packager/locale/jsoneditor.en.po
+++ b/applications/json_packager/locale/jsoneditor.en.po
@@ -37,19 +37,9 @@ msgstr ""
"Remove Package File:\n"
"Deletes the last entry from the list\n"
-#: tfrmmain.cbforcenotify.caption
-msgid "Force Notify"
-msgstr "Force Notify"
-
-#: tfrmmain.cbforcenotify.hint
-msgid ""
-"Force Notify check box:\n"
-"If this is checked the OPM user will be notified\n"
-"of your update. Only check this if the update is important.\n"
+#: tfrmmain.chk_disableinopm.caption
+msgid "Disable in OPM"
msgstr ""
-"Force Notify check box:\n"
-"If this is checked the OPM user will be notified\n"
-"of your update. Only check this if the update is important.\n"
#: tfrmmain.cmd_close.caption
msgid "&Close"
@@ -117,23 +107,14 @@ 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..."
+#: tfrmmain.mnu_fileexit.caption
+msgid "E&xit"
+msgstr ""
+
#: tfrmmain.mnu_filenew.caption
msgid "New"
msgstr "New"
@@ -196,27 +177,6 @@ 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"
-"[Add]: to make a new entry\n"
-"[Remove]: Remove last entry\n"
-"lpk filename: i.e. mycontrol.lpk\n"
-"Version: The FULL version (i.e. not 1.0 but 1.0.0.0)\n"
-msgstr ""
-"Package Files:\n"
-"[Add]: to make a new entry\n"
-"[Remove]: Remove last entry\n"
-"lpk filename: i.e. mycontrol.lpk\n"
-"Version: The FULL version (i.e. not 1.0 but 1.0.0.0)\n"
-
#: umain.rsabout
msgid "About"
msgstr "About"
@@ -342,6 +302,7 @@ msgid "- Update zip name missing extension \".zip\""
msgstr "- Update zip name missing extension \".zip\""
#: umain.rsversion0000
+msgctxt "umain.rsversion0000"
msgid "Version (n.n.n.n)"
msgstr "Version (n.n.n.n)"
@@ -360,3 +321,4 @@ 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.po b/applications/json_packager/locale/jsoneditor.es.po
index 307af8967..c3d42eaa2 100644
--- a/applications/json_packager/locale/jsoneditor.es.po
+++ b/applications/json_packager/locale/jsoneditor.es.po
@@ -38,19 +38,9 @@ msgstr ""
"Quitar archivo de paquete:\n"
"Elimina la última entrada de la lista\n"
-#: tfrmmain.cbforcenotify.caption
-msgid "Force Notify"
-msgstr "Forzar Notificación"
-
-#: tfrmmain.cbforcenotify.hint
-msgid ""
-"Force Notify check box:\n"
-"If this is checked the OPM user will be notified\n"
-"of your update. Only check this if the update is important.\n"
+#: tfrmmain.chk_disableinopm.caption
+msgid "Disable in OPM"
msgstr ""
-"Forzar Notificación casilla de verificación:\n"
-"Si esto es marcado el usuario del OPM será notificado\n"
-"de tu actualización. Solo marca esto si la actualización es importante.\n"
#: tfrmmain.cmd_close.caption
msgid "&Close"
@@ -118,23 +108,14 @@ 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..."
+#: tfrmmain.mnu_fileexit.caption
+msgid "E&xit"
+msgstr ""
+
#: tfrmmain.mnu_filenew.caption
msgid "New"
msgstr "Nuevo"
@@ -197,27 +178,6 @@ 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"
-"[Add]: to make a new entry\n"
-"[Remove]: Remove last entry\n"
-"lpk filename: i.e. mycontrol.lpk\n"
-"Version: The FULL version (i.e. not 1.0 but 1.0.0.0)\n"
-msgstr ""
-"Archivos de paquete:\n"
-"[Agregar]: para crear una nueva entrada\n"
-"[Quitar]: eliminar última entrada\n"
-"Archivo .lpk: ejemplo micontrol.lpk\n"
-"Versión: La versión COMPLETA (ejemplo no 1.0 pero si 1.0.0.0)\n"
-
#: umain.rsabout
msgid "About"
msgstr "Acerca de"
@@ -343,6 +303,7 @@ msgid "- Update zip name missing extension \".zip\""
msgstr "- El nombre del zip no tiene la extensión \".zip\""
#: umain.rsversion0000
+msgctxt "umain.rsversion0000"
msgid "Version (n.n.n.n)"
msgstr "Versión (n.n.n.n)"
@@ -361,3 +322,4 @@ 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 70a7d394d..53c50de6a 100644
--- a/applications/json_packager/locale/jsoneditor.po
+++ b/applications/json_packager/locale/jsoneditor.po
@@ -33,15 +33,8 @@ msgid ""
"Deletes the last entry from the list\n"
msgstr ""
-#: tfrmmain.cbforcenotify.caption
-msgid "Force Notify"
-msgstr ""
-
-#: tfrmmain.cbforcenotify.hint
-msgid ""
-"Force Notify check box:\n"
-"If this is checked the OPM user will be notified\n"
-"of your update. Only check this if the update is important.\n"
+#: tfrmmain.chk_disableinopm.caption
+msgid "Disable in OPM"
msgstr ""
#: tfrmmain.cmd_close.caption
@@ -103,21 +96,14 @@ 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 ""
+#: tfrmmain.mnu_fileexit.caption
+msgid "E&xit"
+msgstr ""
+
#: tfrmmain.mnu_filenew.caption
msgid "New"
msgstr ""
@@ -177,22 +163,6 @@ 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"
-"[Add]: to make a new entry\n"
-"[Remove]: Remove last entry\n"
-"lpk filename: i.e. mycontrol.lpk\n"
-"Version: The FULL version (i.e. not 1.0 but 1.0.0.0)\n"
-msgstr ""
-
#: umain.rsabout
msgid "About"
msgstr ""
@@ -318,6 +288,7 @@ msgid "- Update zip name missing extension \".zip\""
msgstr ""
#: umain.rsversion0000
+msgctxt "umain.rsversion0000"
msgid "Version (n.n.n.n)"
msgstr ""
diff --git a/applications/json_packager/umain.lfm b/applications/json_packager/umain.lfm
index 373674f0b..3f554463a 100644
--- a/applications/json_packager/umain.lfm
+++ b/applications/json_packager/umain.lfm
@@ -1,18 +1,17 @@
object frmMain: TfrmMain
- Left = 503
- Height = 425
- Top = 226
- Width = 339
- AutoSize = True
+ Left = 588
+ Height = 330
+ Top = 157
+ Width = 613
+ Anchors = []
BorderIcons = [biSystemMenu]
BorderStyle = bsSingle
BorderWidth = 8
- ClientHeight = 405
- ClientWidth = 339
+ ClientHeight = 310
+ ClientWidth = 613
DefaultMonitor = dmPrimary
Menu = MainMenu1
OnClick = mnu_fileSaveClick
- OnClose = FormClose
OnCloseQuery = FormCloseQuery
OnCreate = FormCreate
OnDestroy = FormDestroy
@@ -29,13 +28,15 @@ object frmMain: TfrmMain
ParentColor = False
end
object editName: TEdit
+ AnchorSideLeft.Control = Owner
AnchorSideRight.Control = sb_editName
- Left = 8
+ Left = 12
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 = 32
- Width = 291
+ Width = 561
Anchors = [akTop, akLeft, akRight]
+ BorderSpacing.Left = 4
BorderSpacing.Right = 6
Color = clWindow
TabOrder = 0
@@ -43,99 +44,87 @@ object frmMain: TfrmMain
object lblDownloadZipURL: TLabel
Left = 8
Height = 15
- Top = 112
+ Top = 64
Width = 81
Caption = 'Download URL:'
ParentColor = False
end
object editDownloadZipURL: TEdit
- Left = 8
+ AnchorSideLeft.Control = Owner
+ AnchorSideRight.Control = spd_CheckURL
+ Left = 12
Height = 28
Hint = 'Download URL:'#13#10'Include the FULL url needed to download the package Zip file'
- Top = 136
- Width = 322
+ Top = 88
+ Width = 411
+ Anchors = [akTop, akLeft, akRight]
AutoSize = False
+ BorderSpacing.Left = 4
Color = clWindow
TabOrder = 1
end
object lblPackageFiles: TLabel
+ AnchorSideRight.Control = btnAdd
Left = 8
Height = 15
- Top = 173
- Width = 73
+ Top = 130
+ Width = 399
+ Alignment = taRightJustify
+ Anchors = [akTop, akLeft, akRight]
+ AutoSize = False
+ BorderSpacing.Right = 8
Caption = 'Package Files:'
ParentColor = False
end
- object stringPackageFiles: TStringGrid
- 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 = 208
- Width = 323
- Anchors = [akTop, akLeft, akRight]
- AutoFillColumns = True
- ColCount = 2
- Columns = <
- item
- Title.Caption = ''
- Width = 159
- end
- item
- Title.Caption = ''
- Width = 160
- end>
- FixedCols = 0
- Options = [goFixedVertLine, goFixedHorzLine, goVertLine, goHorzLine, goRangeSelect, goEditing, goThumbTracking, goSmoothScroll]
- RowCount = 1
- TabOrder = 2
- TitleStyle = tsNative
- ColWidths = (
- 159
- 160
- )
- end
object btnAdd: TButton
AnchorSideRight.Control = btnRemove
- Left = 176
+ Left = 415
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 = 173
- Width = 65
- Anchors = [akTop, akLeft, akRight]
- BorderSpacing.Right = 5
+ Top = 128
+ Width = 97
+ Anchors = [akTop, akRight]
+ BorderSpacing.Right = 8
Caption = 'Add'
OnClick = btnAddClick
- TabOrder = 3
+ TabOrder = 2
end
object btnRemove: TButton
- Left = 246
+ Left = 520
Height = 25
Hint = 'Remove Package File:'#13#10'Deletes the last entry from the list'
- Top = 173
+ Top = 128
Width = 75
- Anchors = [akTop, akRight]
+ Anchors = [akTop]
+ BorderSpacing.Right = 8
Caption = 'Remove'
OnClick = btnRemoveClick
- TabOrder = 4
+ TabOrder = 3
end
object cmd_Close: TBitBtn
- Left = 253
+ Left = 520
Height = 30
- Top = 368
- Width = 76
- Anchors = [akTop, akLeft, akRight]
+ Top = 270
+ Width = 83
+ Anchors = []
+ BorderSpacing.Top = 30
+ BorderSpacing.Right = 10
Cancel = True
Caption = '&Close'
Kind = bkClose
ModalResult = 11
- TabOrder = 5
+ OnClick = cmd_CloseClick
+ TabOrder = 4
end
object cmd_save: TBitBtn
- Left = 134
+ AnchorSideTop.Control = btnAdd
+ Left = 269
Height = 30
Hint = 'Save the current configuration to disk'#13#10'as a JSON update file'
- Top = 368
+ Top = 270
Width = 75
+ Anchors = []
+ BorderSpacing.Top = 30
Caption = '&Save'
Default = True
Glyph.Data = {
@@ -175,10 +164,10 @@ object frmMain: TfrmMain
FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00
}
OnClick = mnu_fileSaveClick
- TabOrder = 6
+ TabOrder = 5
end
object sb_editName: TSpeedButton
- Left = 305
+ Left = 579
Height = 22
Hint = 'Update Zip Name:'#13#10'Click this to browse your system to find'#13#10' an existing Update Zip'
Top = 32
@@ -188,65 +177,28 @@ object frmMain: TfrmMain
OnClick = sb_editNameClick
end
object spd_CheckURL: TSpeedButton
- Left = 257
+ AnchorSideRight.Control = chk_DisableInOPM
+ Left = 433
Height = 19
Hint = 'Attempting to Open URL'
- Top = 112
+ Top = 88
Width = 61
Anchors = [akTop, akRight]
- AutoSize = True
+ BorderSpacing.Left = 10
+ BorderSpacing.Right = 8
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
+ object chk_DisableInOPM: TCheckBox
+ Left = 502
+ Height = 19
+ Top = 88
+ Width = 101
+ Anchors = [akTop, akRight]
+ AutoSize = False
+ BorderSpacing.Right = 10
+ Caption = 'Disable in OPM'
+ TabOrder = 6
end
object MainMenu1: TMainMenu
Left = 200
@@ -268,6 +220,10 @@ object frmMain: TfrmMain
Caption = 'Save As...'
OnClick = SaveAsItemClick
end
+ object mnu_fileExit: TMenuItem
+ Caption = 'E&xit'
+ OnClick = mnu_fileExitClick
+ end
end
object mnu_help: TMenuItem
Caption = '&Help'
diff --git a/applications/json_packager/umain.lrj b/applications/json_packager/umain.lrj
index 8d663d52b..ff5b24132 100644
--- a/applications/json_packager/umain.lrj
+++ b/applications/json_packager/umain.lrj
@@ -4,9 +4,6 @@
{"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:"},
-{"hash":168058793,"name":"tfrmmain.stringpackagefiles.hint","sourcebytes":[80,97,99,107,97,103,101,32,70,105,108,101,115,58,13,10,91,65,100,100,93,58,32,32,116,111,32,109,97,107,101,32,97,32,110,101,119,32,101,110,116,114,121,13,10,91,82,101,109,111,118,101,93,58,32,82,101,109,111,118,101,32,108,97,115,116,32,101,110,116,114,121,13,10,108,112,107,32,102,105,108,101,110,97,109,101,58,32,105,46,101,46,32,109,121,99,111,110,116,114,111,108,46,108,112,107,13,10,86,101,114,115,105,111,110,58,32,84,104,101,32,70,85,76,76,32,118,101,114,115,105,111,110,32,40,105,46,101,46,32,110,111,116,32,49,46,48,32,98,117,116,32,49,46,48,46,48,46,48,41],"value":"Package Files:\r\n[Add]: to make a new entry\r\n[Remove]: Remove last entry\r\nlpk filename: i.e. mycontrol.lpk\r\nVersion: The FULL version (i.e. not 1.0 but 1.0.0.0)"},
-{"hash":4294967295,"name":"tfrmmain.stringpackagefiles.columns[0].title.caption","sourcebytes":[],"value":""},
-{"hash":4294967295,"name":"tfrmmain.stringpackagefiles.columns[1].title.caption","sourcebytes":[],"value":""},
{"hash":61051198,"name":"tfrmmain.btnadd.hint","sourcebytes":[65,100,100,32,80,97,99,107,97,103,101,32,70,105,108,101,58,13,10,84,104,101,32,117,112,100,97,116,101,32,122,105,112,32,99,97,110,32,99,111,110,116,97,105,110,32,109,111,114,101,32,116,104,97,110,32,111,110,101,32,108,112,107,32,102,105,108,101,13,10,100,101,112,108,111,121,101,100,32,116,111,32,116,104,101,32,115,97,109,101,32,112,108,97,99,101,46],"value":"Add Package File:\r\nThe update zip can contain more than one lpk file\r\ndeployed to the same place."},
{"hash":18340,"name":"tfrmmain.btnadd.caption","sourcebytes":[65,100,100],"value":"Add"},
{"hash":3931908,"name":"tfrmmain.btnremove.hint","sourcebytes":[82,101,109,111,118,101,32,80,97,99,107,97,103,101,32,70,105,108,101,58,13,10,68,101,108,101,116,101,115,32,116,104,101,32,108,97,115,116,32,101,110,116,114,121,32,102,114,111,109,32,116,104,101,32,108,105,115,116],"value":"Remove Package File:\r\nDeletes the last entry from the list"},
@@ -18,16 +15,13 @@
{"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":108520077,"name":"tfrmmain.chk_disableinopm.caption","sourcebytes":[68,105,115,97,98,108,101,32,105,110,32,79,80,77],"value":"Disable in OPM"},
{"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..."},
{"hash":366789,"name":"tfrmmain.mnu_filesave.caption","sourcebytes":[83,97,118,101],"value":"Save"},
{"hash":122542542,"name":"tfrmmain.saveasitem.caption","sourcebytes":[83,97,118,101,32,65,115,46,46,46],"value":"Save As..."},
+{"hash":4710148,"name":"tfrmmain.mnu_fileexit.caption","sourcebytes":[69,38,120,105,116],"value":"E&xit"},
{"hash":2812976,"name":"tfrmmain.mnu_help.caption","sourcebytes":[38,72,101,108,112],"value":"&Help"},
{"hash":186260755,"name":"tfrmmain.mnu_helpshowhints.caption","sourcebytes":[83,104,111,119,32,80,111,112,117,112,32,72,105,110,116,115],"value":"Show Popup Hints"},
{"hash":253903779,"name":"tfrmmain.mnu_helpdisablewarnings.caption","sourcebytes":[68,105,115,97,98,108,101,32,119,97,114,110,105,110,103,115],"value":"Disable warnings"},
diff --git a/applications/json_packager/umain.pas b/applications/json_packager/umain.pas
index 87ad84472..6bb9cca59 100644
--- a/applications/json_packager/umain.pas
+++ b/applications/json_packager/umain.pas
@@ -58,7 +58,11 @@ unit umain;
0.1.19.0: Added IntrnalVersion integer field to json (getmem/minesadorada)
Added SpinEdit to control the above (minesadorada)
In Laz 1.7 DPIAwareness configured
- 0.1.20.0: ??
+ 0.2.0.0: Refactored GUI
+ 0.2.1.0: ToDo
+ - sort out resourcestrings
+ - Update Validation
+ - Update hints
}
{$mode objfpc}{$H+}
@@ -83,9 +87,13 @@ type
private
FName: string;
FVersion: string;
+ FForceNotify: boolean;
+ FInternalVersion: integer;
published
property Name: string read FName write FName;
property Version: string read FVersion write FVersion;
+ property ForceNotify: boolean read FForceNotify write FForceNotify;
+ property InternalVersion: integer read FInternalVersion write FInternalVersion;
end;
TPackageFilesList = specialize TGenericCollection;
@@ -95,16 +103,14 @@ type
TUpdatePackageData = class(TPersistent)
private
FDownloadZipURL: string;
- FForceNotify: boolean;
+ FDisableInOPM: 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;
+ property DisableInOPM:Boolean read FDisableInOPM write FDisableInOPM;
end;
{ TUpdatePackage }
@@ -129,7 +135,7 @@ type
TfrmMain = class(TForm)
ActionList1: TActionList;
- cbForceNotify: TCheckBox;
+ chk_DisableInOPM: TCheckBox;
cmd_Close: TBitBtn;
cmd_save: TBitBtn;
btnAdd: TButton;
@@ -138,14 +144,13 @@ type
editDownloadZipURL: TEdit;
FileOpen1: TFileOpen;
FileSaveAs1: TFileSaveAs;
- grp_ForceNotify: TGroupBox;
- lbl_InternalVersion: TLabel;
lblPackageFiles: TLabel;
lblName: TLabel;
lblDownloadZipURL: TLabel;
MainMenu1: TMainMenu;
FileMenu: TMenuItem;
LoadItem: TMenuItem;
+ mnu_fileExit: TMenuItem;
mnu_fileNew: TMenuItem;
mnu_helpDisableWarnings: TMenuItem;
mnu_lang_es: TMenuItem;
@@ -159,19 +164,17 @@ type
SaveAsItem: TMenuItem;
sb_editName: TSpeedButton;
spd_CheckURL: TSpeedButton;
- Spin_InternalVersion: TSpinEdit;
- stringPackageFiles: TStringGrid;
procedure btnAddClick(Sender: TObject);
procedure btnRemoveClick(Sender: TObject);
procedure cbForceNotifyMouseUp(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: integer);
- procedure FormClose(Sender: TObject; var CloseAction: TCloseAction);
+ procedure cmd_CloseClick(Sender: TObject);
procedure FormCloseQuery(Sender: TObject; var CanClose: boolean);
procedure FormCreate(Sender: TObject);
procedure FormDestroy(Sender: TObject);
procedure FormShow(Sender: TObject);
- procedure lbl_InternalVersionClick(Sender: TObject);
procedure LoadItemClick(Sender: TObject);
+ procedure mnu_fileExitClick(Sender: TObject);
procedure mnu_fileNewClick(Sender: TObject);
procedure mnu_fileSaveClick(Sender: TObject);
procedure mnu_helpAboutClick(Sender: TObject);
@@ -191,6 +194,26 @@ type
slErrorList: TStrings;
CFG: TIniFile;
INIFilePath: string;
+ // Start of Package Information controls
+ ArrayGrpBox:Array of TGroupBox;
+ ArrayLblPackageFileName:Array of TLabel;
+ ArrayEdtPackageFileName:Array of TEdit;
+ ArrayLblPackageVersion:Array of TLabel;
+ ArraySpinEditV1:Array of TSpinEdit;
+ ArraySpinEditV2:Array of TSpinEdit;
+ ArraySpinEditV3:Array of TSpinEdit;
+ ArraySpinEditV4:Array of TSpinEdit;
+ ArrayChkBoxForceNotify:Array of TCheckBox;
+ ArraySpinEditInternalVersion:Array of TSpinEdit;
+ ArrayLblPackageInternalVersion:Array of TLabel;
+ // End of Package Information controls
+ iNumLpkFilesVisible:Integer;
+ procedure AddPackageFileToList;
+ procedure RemovePackageFileFromList;
+ procedure ResetPackageFileControlsToOne;
+ procedure AddNewControlArray;
+ procedure DestroyControlArrays;
+ procedure RemoveLastControlArray;
function ValidationFailed: boolean;
procedure CtrlShowPopup(Sender: TObject);
procedure CtrlHidePopup(Sender: TObject);
@@ -263,7 +286,7 @@ resourcestring
constructor TUpdatePackageData.Create;
begin
FName := '';
- FForceNotify := False;
+// FForceNotify := False;
FDownloadZipURL := '';
end;
@@ -306,7 +329,7 @@ end;
procedure TfrmMain.CtrlSetUpPopupHandlers;
// Use different handlers for some controls
var
- iCount,jCount: integer;
+ iCount, jCount: integer;
begin
with frmMain do
begin
@@ -315,29 +338,41 @@ 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;
+ // Iterate through the children of GroupBox
+ for jCount := 0 to Pred(TGroupBox(Controls[iCount]).ControlCount) do
+ // With TGroupBox(Controls[iCount]).Controls[jCount] 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
@@ -377,10 +412,263 @@ begin
end;
end;
end;
+procedure TfrmMain.DestroyControlArrays;
+Var i:Integer;
+begin
+ For i:=0 to High(ArraySpinEditInternalVersion) do
+ FreeAndNil(ArraySpinEditInternalVersion[i]);
+ For i:=0 to High(ArrayLblPackageInternalVersion) do
+ FreeAndNil(ArrayLblPackageInternalVersion[i]);
+ For i:=0 to High(ArrayChkBoxForceNotify) do
+ FreeAndNil(ArrayChkBoxForceNotify[i]);
+ For i:=0 to High(ArraySpinEditV4) do
+ FreeAndNil(ArraySpinEditV4[i]);
+ For i:=0 to High(ArraySpinEditV3) do
+ FreeAndNil(ArraySpinEditV3[i]);
+ For i:=0 to High(ArraySpinEditV2) do
+ FreeAndNil(ArraySpinEditV2[i]);
+ For i:=0 to High(ArraySpinEditV1) do
+ FreeAndNil(ArraySpinEditV1[i]);
+ For i:=0 to High(ArrayLblPackageVersion) do
+ FreeAndNil(ArrayLblPackageVersion[i]);
+ For i:=0 to High(ArrayEdtPackageFileName) do
+ FreeAndNil(ArrayEdtPackageFileName[i]);
+ For i:=0 to High(ArrayLblPackageFileName) do
+ FreeAndNil(ArrayLblPackageFileName[i]);
+ For i:=0 to High(ArrayGrpBox) do
+ FreeAndNil(ArrayGrpBox[i]);
+
+end;
+
+procedure TfrmMain.AddNewControlArray;
+{
+ArrayGrpBox:Array of TGroupBox;
+// Line 1
+ArrayLblPackageFileName:Array of TLabel;
+ArrayEdtPackageFileName:Array of TEdit;
+ArrayLblPackageVersion:Array of TLabel;
+ArraySpinEditV1:Array of TSpinEdit;
+ArraySpinEditV2:Array of TSpinEdit;
+ArraySpinEditV3:Array of TSpinEdit;
+ArraySpinEditV4:Array of TSpinEdit;
+// Line 2
+ArrayChkBoxForceNotify:Array of TCheckBox;
+ArrayLblPackageInternalVersion:Array of TLabel;
+ArraySpinEditInternalVersion:Array of TSpinEdit;
+SetBounds(Left,Top,Width,Height);
+}
+begin
+ SetLength(ArrayGrpBox,Succ(iNumLpkFilesVisible));
+ ArrayGrpBox[iNumLpkFilesVisible]:=TGroupBox.Create(Self);
+
+ SetLength(ArrayLblPackageFileName,Succ(iNumLpkFilesVisible));
+ SetLength(ArrayEdtPackageFileName,Succ(iNumLpkFilesVisible));
+ SetLength(ArrayLblPackageVersion,Succ(iNumLpkFilesVisible));
+ SetLength(ArraySpinEditV1,Succ(iNumLpkFilesVisible));
+ SetLength(ArraySpinEditV2,Succ(iNumLpkFilesVisible));
+ SetLength(ArraySpinEditV3,Succ(iNumLpkFilesVisible));
+ SetLength(ArraySpinEditV4,Succ(iNumLpkFilesVisible));
+ SetLength(ArrayChkBoxForceNotify,Succ(iNumLpkFilesVisible));
+ SetLength(ArrayLblPackageInternalVersion,Succ(iNumLpkFilesVisible));
+ SetLength(ArraySpinEditInternalVersion,Succ(iNumLpkFilesVisible));
+
+ With ArrayGrpBox[iNumLpkFilesVisible] do
+ begin
+ Caption:='Package Information';
+ if (iNumLpkFilesVisible > 0) then
+ SetBounds(8,ArrayGrpBox[Pred(iNumLpkFilesVisible)].Top + ArrayGrpBox[Pred(iNumLpkFilesVisible)].Height + 10,frmMain.Width - 16,100)
+ else
+ SetBounds(8,btnAdd.Top + btnAdd.Height + 10,frmMain.Width - 16,100);
+ Visible:=False;
+ Tag:=Pred(iNumLpkFilesVisible);
+ // Label - Package name
+ ArrayLblPackageFileName[iNumLpkFilesVisible]:=TLabel.Create(Nil);
+ With ArrayLblPackageFileName[iNumLpkFilesVisible] do
+ begin
+ Caption:='Filename: ';
+ SetBounds(8,10,50,23);
+ Visible:=True;
+ Tag:=Pred(iNumLpkFilesVisible);
+ Parent:=ArrayGrpBox[iNumLpkFilesVisible];
+ end;
+ // EditBox - Package name
+ ArrayEdtPackageFileName[iNumLpkFilesVisible]:=TEdit.Create(Nil);
+ With ArrayEdtPackageFileName[iNumLpkFilesVisible] do
+ begin
+ Text:=rsMypackagenam;
+ SetBounds(64,8,256,23);
+ Visible:=True;
+ Tag:=Pred(iNumLpkFilesVisible);
+ Parent:=ArrayGrpBox[iNumLpkFilesVisible];
+ end;
+ // Label - Package Version
+ ArrayLblPackageVersion[iNumLpkFilesVisible]:=TLabel.Create(Nil);
+ With ArrayLblPackageVersion[iNumLpkFilesVisible] do
+ begin
+ Caption:='Version: ';
+ SetBounds(330,10,50,23);
+ Visible:=True;
+ Tag:=Pred(iNumLpkFilesVisible);
+ Parent:=ArrayGrpBox[iNumLpkFilesVisible];
+ end;
+ // SpinEdit V1
+ ArraySpinEditV1[iNumLpkFilesVisible]:=TSpinEdit.Create(Nil);
+ With ArraySpinEditV1[iNumLpkFilesVisible] do
+ begin
+ Value:=0;
+ SetBounds(380,8,40,20);
+ Visible:=True;
+ Tag:=Pred(iNumLpkFilesVisible);
+ Hint:='Format is: n.n.n.n';
+ Parent:=ArrayGrpBox[iNumLpkFilesVisible];
+ end;
+ // SpinEdit V2
+ ArraySpinEditV2[iNumLpkFilesVisible]:=TSpinEdit.Create(Nil);
+ With ArraySpinEditV2[iNumLpkFilesVisible] do
+ begin
+ Value:=0;
+ SetBounds(430,8,40,20);
+ Visible:=True;
+ Tag:=Pred(iNumLpkFilesVisible);
+ Hint:='Format is: n.n.n.n';
+ Parent:=ArrayGrpBox[iNumLpkFilesVisible];
+ end;
+ // SpinEdit V3
+ ArraySpinEditV3[iNumLpkFilesVisible]:=TSpinEdit.Create(Nil);
+ With ArraySpinEditV3[iNumLpkFilesVisible] do
+ begin
+ Value:=0;
+ SetBounds(480,8,40,20);
+ Visible:=True;
+ Tag:=Pred(iNumLpkFilesVisible);
+ Hint:='Format is: n.n.n.n';
+ Parent:=ArrayGrpBox[iNumLpkFilesVisible];
+ end;
+ // SpinEdit V4
+ ArraySpinEditV4[iNumLpkFilesVisible]:=TSpinEdit.Create(Nil);
+ With ArraySpinEditV4[iNumLpkFilesVisible] do
+ begin
+ Value:=0;
+ SetBounds(530,8,40,20);
+ Visible:=True;
+ Tag:=Pred(iNumLpkFilesVisible);
+ Hint:='Format is: n.n.n.n';
+ Parent:=ArrayGrpBox[iNumLpkFilesVisible];
+ end;
+ // ChkBox Notify
+ ArrayChkBoxForceNotify[iNumLpkFilesVisible]:=TCheckBox.Create(Nil);
+ With ArrayChkBoxForceNotify[iNumLpkFilesVisible] do
+ begin
+ Checked:=False;
+ Caption:='Notify Update';
+ SetBounds(8,50,40,20);
+ Visible:=True;
+ Tag:=Pred(iNumLpkFilesVisible);
+ Parent:=ArrayGrpBox[iNumLpkFilesVisible];
+ end;
+ // Label Internal version
+ ArrayLblPackageInternalVersion[iNumLpkFilesVisible]:=TLabel.Create(Nil);
+ With ArrayLblPackageInternalVersion[iNumLpkFilesVisible] do
+ begin
+ Caption:='Internal Version: ';
+ SetBounds(160,50,40,23);
+ Visible:=True;
+ Tag:=Pred(iNumLpkFilesVisible);
+ Parent:=ArrayGrpBox[iNumLpkFilesVisible];
+ end;
+ // SpinEdit Internal Version
+ ArraySpinEditInternalVersion[iNumLpkFilesVisible]:=TSpinEdit.Create(Nil);
+ With ArraySpinEditInternalVersion[iNumLpkFilesVisible] do
+ begin
+ Value:=0;
+ SetBounds(260,48,40,20);
+ Visible:=True;
+ Tag:=Pred(iNumLpkFilesVisible);
+ Parent:=ArrayGrpBox[iNumLpkFilesVisible];
+ end;
+ // This sets the subcontrols up correctly
+ Parent:=frmMain;
+ end;
+end;
+
+procedure TfrmMain.RemoveLastControlArray;
+// Uses iLpkFilesCount
+Var iLast:Integer;
+begin
+ iLast:=High(ArrayGrpBox);
+ // Makes the group control invisible
+ ArrayGrpBox[iLast].Parent:=nil;
+
+ // Tidy up memory
+ FreeAndNil(ArrayChkBoxForceNotify[iLast]);
+ FreeAndNil(ArrayLblPackageInternalVersion[iLast]);
+ FreeAndNil(ArraySpinEditInternalVersion[iLast]);
+ FreeAndNil(ArraySpinEditV4[iLast]);
+ FreeAndNil(ArraySpinEditV3[iLast]);
+ FreeAndNil(ArraySpinEditV2[iLast]);
+ FreeAndNil(ArraySpinEditV1[iLast]);
+ FreeAndNil(ArrayLblPackageVersion[iLast]);
+ FreeAndNil(ArrayEdtPackageFileName[iLast]);
+ FreeAndNil(ArrayLblPackageFileName[iLast]);
+ FreeAndNil(ArrayGrpBox[iLast]);
+ // Tidy up control arrays
+ SetLength(ArrayChkBoxForceNotify,iLast);
+ SetLength(ArrayLblPackageInternalVersion,iLast);
+ SetLength(ArraySpinEditInternalVersion,iLast);
+ SetLength(ArraySpinEditV4,iLast);
+ SetLength(ArraySpinEditV3,iLast);
+ SetLength(ArraySpinEditV2,iLast);
+ SetLength(ArraySpinEditV1,iLast);
+ SetLength(ArrayLblPackageVersion,iLast);
+ SetLength(ArrayEdtPackageFileName,iLast);
+ SetLength(ArrayLblPackageFileName,iLast);
+ SetLength(ArrayGrpBox,iLast);
+end;
+
+procedure TfrmMain.AddPackageFileToList;
+begin
+ AddNewControlArray; // make another one
+
+ // Makes it visible
+ ArrayGrpBox[High(ArrayGrpBox)].Visible:=TRUE;
+ Inc(iNumLpkFilesVisible);
+
+ // Adjust form
+ Height:=Height + 108;//ArrayGrpBox[High(ArrayGrpBox)].Height;
+ cmd_Save.Top:=Height - cmd_Save.Height - cmd_Save.Height;
+ cmd_Close.Top:=Height - cmd_Close.Height - cmd_Close.Height;
+ CtrlSetUpPopupHandlers;
+ Refresh;
+end;
+
+procedure TfrmMain.ResetPackageFileControlsToOne;
+Var iCount:Integer;
+begin
+ if (iNumLpkFilesVisible = 1) then exit;
+ For iCount:=iNumLpkFilesVisible downto 1 do
+ begin
+ RemovePackageFileFromList;
+ end;
+end;
+
+procedure TfrmMain.RemovePackageFileFromList;
+begin
+ // Always have one set of controls present
+ if (iNumLpkFilesVisible > 1) then
+ begin
+ RemoveLastControlArray;
+ Dec(iNumLpkFilesVisible);
+ CtrlSetUpPopupHandlers;
+ // Adjust form
+ Height:=Height - 108; //ArrayGrpBox[High(ArrayGrpBox)].Height;
+ cmd_Save.Top:=Height - cmd_Save.Height - cmd_Save.Height;
+ cmd_Close.Top:=Height - cmd_Close.Height - cmd_Close.Height;
+ end;
+end;
function TfrmMain.FoundADuplicateLPK: boolean;
-// Add lpk entries one-by-one to a temp stringlist looking for a duplicate
+ // Add lpk entries one-by-one to a temp stringlist looking for a duplicate
var
TempStringList: TStrings;
iCount: integer;
@@ -388,13 +676,13 @@ begin
Result := False;
TempStringList := TStringList.Create;
try
- for iCount := 0 to Pred(stringPackageFiles.RowCount) do
- begin
- if TempStringlist.IndexOf(stringPackageFiles.Cells[0, iCount]) = -1 then
- TempStringList.Add(stringPackageFiles.Cells[0, iCount])
- else
- Result := True;
- end;
+ //for iCount := 0 to Pred(stringPackageFiles.RowCount) do
+ //begin
+ // if TempStringlist.IndexOf(stringPackageFiles.Cells[0, iCount]) = -1 then
+ // TempStringList.Add(stringPackageFiles.Cells[0, iCount])
+ // else
+ // Result := True;
+ // end;
finally
TempStringList.Free;
end;
@@ -402,35 +690,22 @@ end;
procedure TfrmMain.btnAddClick(Sender: TObject);
begin
- stringPackageFiles.RowCount := stringPackageFiles.RowCount + 1;
+ AddPackageFileToList;
end;
procedure TfrmMain.btnRemoveClick(Sender: TObject);
begin
- if stringPackageFiles.RowCount > 1 then
- stringPackageFiles.RowCount := stringPackageFiles.RowCount - 1;
+ RemovePackageFileFromList;
end;
procedure TfrmMain.cbForceNotifyMouseUp(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: integer);
-var
- s: string;
begin
- if bDisableWarnings then
- exit;
- if cbForceNotify.Checked then
- begin
- s := rsThisOptionSh;
- if MessageDlg(s, mtConfirmation, [mbOK, mbAbort], 0, mbAbort) = mrAbort then
- 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);
+procedure TfrmMain.cmd_CloseClick(Sender: TObject);
begin
+
end;
procedure TfrmMain.FormCloseQuery(Sender: TObject; var CanClose: boolean);
@@ -470,27 +745,25 @@ var
sLang: string;
iIniCount: integer;
begin
- {
- Self.AutoAdjustLayout(lapAutoAdjustForDPI, Self.DesignTimeDPI,
- Screen.PixelsPerInch, Self.Width, ScaleX(Self.Width, Self.DesignTimeDPI));
- }
// Enable AutoSize again to get correct Height
editName.AutoSize := True;
editDownloadZipURL.AutoSize := True;
// Furniture
Caption := Application.Title;
Icon := Application.Icon;
+ Height:=btnAdd.Top + btnAdd.Height + (cmd_Save.Height * 3);
+ cmd_Save.Top:=Height - cmd_Save.Height - cmd_Save.Height;
+ cmd_Close.Top:=Height - cmd_Close.Height - cmd_Close.Height;
{$IFNDEF IGNOREPICTURE}
MyPopup.Icon := TPicture(Application.Icon);
{$ENDIF}
editname.Text := rsMypackagenam;
editDownloadZipURL.Text := rsHttpWwwUpdat;
- stringPackageFiles.Columns[0].Title.Caption := rsLpkFileName;
- stringPackageFiles.Columns[1].Title.Caption := rsVersion0000;
// Defaults
slErrorList := TStringList.Create;
bForceSaveAs := True;
bShowPopupHints := True;
+ iNumLpkFilesVisible:=0;
// Encourage the user to maintain an updates folder
sUpdateDirectory := ProgramDirectory + 'updates';
if not FileExistsUTF8(sUpdateDirectory) then
@@ -503,8 +776,10 @@ begin
if CreateUniqueINI(iIniCount) then
CFG.WriteString('Options', 'AppPath', ProgramDirectory);
CFG.UpdateFile;
- if C_DEBUGMESSAGES = True then
+
+ if C_DEBUGMESSAGES = True then // Dev only
ShowMessageFmt('Inifile=%s, Count=%d', [INIFilePath, iIniCount]);
+
// Pop-up hints (show on first run, then not again unless the user chooses)
bIsVirgin := CFG.ReadBool('Options', 'Virgin', True);
bShowPopupHints := bIsVirgin;
@@ -512,9 +787,11 @@ begin
// Override here if the user has re-enabled them
bShowPopupHints := CFG.ReadBool('Options', 'ShowPopupHints', bShowPopupHints);
mnu_helpShowHints.Checked := bShowPopupHints;
+
bDisableWarnings := CFG.ReadBool('Options', 'DiableWarnings', False);
mnu_helpDisableWarnings.Checked := bDisableWarnings;
CtrlSetUpPopupHandlers; // Set the Hint property of various controls to show a Popup
+
// Language translation
sLang := CFG.ReadString('Options', 'Language', 'en'); // First default is English
SetDefaultLang(sLang, 'locale', True);
@@ -529,6 +806,8 @@ end;
procedure TfrmMain.FormDestroy(Sender: TObject);
begin
+ // No memory leak!
+ DestroyControlArrays;
CFG.Free;
slErrorList.Free;
end;
@@ -536,22 +815,21 @@ end;
procedure TfrmMain.FormShow(Sender: TObject);
begin
bDirty := False;
-end;
-
-procedure TfrmMain.lbl_InternalVersionClick(Sender: TObject);
-begin
-
+ AddPackageFileToList;
end;
procedure TfrmMain.LoadItemClick(Sender: TObject);
var
i: integer;
+ sVersionString:String;
+ Quad: TVersionQuad;
begin
FileOpen1.Dialog.InitialDir :=
CFG.ReadString('Options', 'LastLoadedJSONPath', sUpdateDirectory);
FileOpen1.Dialog.Filter := 'JSON|*.json';
if FileOpen1.Dialog.Execute then
begin
+ ResetPackageFileControlsToOne; // So iNumLpkFilesVisible=1
sJSONFilePath := FileOpen1.Dialog.Filename;
CFG.WriteString('Options', 'LastLoadedJSONPath', ExtractFileDir(sJSONFilePath));
JSONPackage := TUpdatePackage.Create;
@@ -560,15 +838,20 @@ begin
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
- stringPackageFiles.Cells[0, i + 1] :=
- JSONPackage.UpdatePackageFiles.Items[i].Name;
- stringPackageFiles.Cells[1, i + 1] :=
- JSONPackage.UpdatePackageFiles.Items[i].Version;
+ If (i > 0) then AddPackageFileToList;
+ ArrayEdtPackageFileName[i].Text:=JSONPackage.UpdatePackageFiles.Items[i].Name;
+ sVersionString:=JSONPackage.UpdatePackageFiles.Items[i].Version;
+ If fileinfo.TryStrToVersionQuad(sVersionString,Quad) then
+ begin
+ ArraySpinEditV1[i].Value:=Quad[1];
+ ArraySpinEditV2[i].Value:=Quad[2];
+ ArraySpinEditV3[i].Value:=Quad[3];
+ ArraySpinEditV4[i].Value:=Quad[4];
+ end;
+ ArrayChkBoxForceNotify[i].Checked:=JSONPackage.UpdatePackageFiles.Items[i].ForceNotify;
+ ArraySpinEditInternalVersion[i].Value:=JSONPackage.UpdatePackageFiles.Items[i].InternalVersion;
end;
if ValidationFailed then
begin
@@ -592,12 +875,16 @@ begin
end;
end;
+procedure TfrmMain.mnu_fileExitClick(Sender: TObject);
+begin
+ Close;
+end;
+
procedure TfrmMain.mnu_fileNewClick(Sender: TObject);
begin
editname.Text := rsMypackagenam;
editDownloadZipURL.Text := rsHttpWwwUpdat;
- cbForceNotify.Checked := False;
- stringPackageFiles.RowCount := 1;
+ // stringPackageFiles.RowCount := 1;
sJSONFilePath := '';
sZipDirectory := '';
end;
@@ -631,6 +918,7 @@ begin
s += RightStr(VInfo.VersionStrings[1], Length(VInfo.VersionStrings[1]) -
EqualsPos) + LineEnding;
end;
+ // Comment line below out for JEDI source prettification
s+=Format(rsCompiledWith2,
[{$I %FPCVERSION%},lcl_major,lcl_minor,LineEnding,{$I %FPCTARGETCPU%},{$I %FPCTARGETOS%},LineEnding,LineEnding]);
if VInfo.VersionStrings.Count > 1 then
@@ -716,12 +1004,14 @@ begin
Result := True;
end;
// No lpk file?
+{
if (stringPackageFiles.RowCount = 1) then
begin
slErrorList.Add(rsThereAreNoLp);
stringPackageFiles.Color := clYellow;
Result := True;
end;
+}
// Remembered to type 'zip'?
if (Length(editName.Text) > 4) then
if (RightStr(LowerCase(editName.Text), 4) <> '.zip') then
@@ -755,6 +1045,7 @@ begin
end;
// Check package files entries
+{
if (stringPackageFiles.RowCount > 1) then
for iCount := 1 to stringPackageFiles.RowCount - 1 do
begin
@@ -791,11 +1082,13 @@ begin
slErrorList.Add(Format(rsThereAreOneO, [LineEnding]));
Result := True;
end;
+}
end;
procedure TfrmMain.SaveAsItemClick(Sender: TObject);
var
i: integer;
+ Quad:TVersionQuad;
begin
if ValidationFailed then
begin
@@ -822,16 +1115,19 @@ begin
try
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
+ For i:=0 to High(ArrayGrpBox) do
begin
- with JSONPackage.UpdatePackageFiles.Add do
- begin
- Name := stringPackageFiles.Cells[0, i];
- Version := stringPackageFiles.Cells[1, i];
- end;
+ with JSONPackage.UpdatePackageFiles.Add do
+ begin
+ Name:=ArrayEdtPackageFileName[i].Text;
+ Quad[1]:=ArraySpinEditV1[i].Value;
+ Quad[2]:=ArraySpinEditV2[i].Value;
+ Quad[3]:=ArraySpinEditV3[i].Value;
+ Quad[4]:=ArraySpinEditV4[i].Value;
+ Version:=VersionQuadToStr(Quad);
+ ForceNotify:=ArrayChkBoxForceNotify[i].Checked;
+ InternalVersion:=ArraySpinEditInternalVersion[i].Value;
+ end;
end;
if FileExistsUTF8(sJSONFilePath) and (bDisableWarnings = False) then
begin
@@ -958,15 +1254,16 @@ begin
end;
// Use embedded .po resources if not distributed with executable
+// Update for more languages
initialization
{$IFDEF PO_BUILTINRES}
sPoPath_en := ProgramDirectory + 'locale' + PathDelim + ExtractFilenameOnly(
Application.EXEName) + '.en.po';
sPoPath_es := ProgramDirectory + 'locale' + PathDelim + ExtractFilenameOnly(
Application.EXEName) + '.es.po';
- if (lcl_major > 0) and (lcl_minor > 6) then
+ if (lcl_major > 0) and (lcl_minor > 6) then // Can't use a LazVersion $DEFINE :(
begin
- // This uses a resource file added via Project/Options
+ // This uses a resource file added via Project/Options (Laz 1.7+)
if not FileExistsUTF8(sPoPath_en) then
begin
// create a resource stream which points to the po file
@@ -1002,6 +1299,7 @@ initialization
else
begin // Older version of laz
// This uses an lrs file generated from lazres
+ // Can't disable this with a LazVersion $DEFINE :(
{$I translate.lrs}
if not FileExistsUTF8(sPoPath_es) then
begin