From d6f59a224bef5e32cb70397d22991fd3fbb0900e Mon Sep 17 00:00:00 2001 From: gbamber Date: Fri, 9 Dec 2016 08:59:02 +0000 Subject: [PATCH] To 0.1.19.0: Added IntrnalVersion integer field to json (minesadorada) Added SpinEdit to control the above (minesadorada) git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@5454 8e941d3f-bd1b-0410-a28a-d453659cc2b4 --- .../json_packager/deploywin/json_packager.iss | 2 +- applications/json_packager/jsonpackage.lpi | 2 +- applications/json_packager/jsonpackage.lps | 119 ++++++++------ applications/json_packager/jsonpackage.res | Bin 139504 -> 140996 bytes .../json_packager/locale/jsoneditor.en.mo | Bin 6778 -> 7152 bytes .../json_packager/locale/jsoneditor.en.po | 21 ++- .../json_packager/locale/jsoneditor.es.mo | Bin 7261 -> 7679 bytes .../json_packager/locale/jsoneditor.es.po | 25 ++- .../json_packager/locale/jsoneditor.po | 18 +++ applications/json_packager/umain.lfm | 147 ++++++++++++------ applications/json_packager/umain.lrj | 7 +- applications/json_packager/umain.pas | 68 ++++++-- 12 files changed, 287 insertions(+), 122 deletions(-) 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 2f23cba9fed09adafa498b919ffd8c40d5f627e9..130fbd3d7ebfcd9575815e427e6130b466c7dd8e 100644 GIT binary patch delta 1471 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 X*gezk@AJ*PN@|RsnM@sucY1#S6{36Q 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 970af714060b658989021b7345e9b71ef88a22e3..87b529afb127eaccff9121ca8ef9e76e5390d837 100644 GIT binary patch delta 2030 zcmZ|P?{8C89LMqF=r&hCx(%3f!j2#t4A*UfV{{Cu0;3vKG?HMVR6Hj{X>z@1LobNg3 zd;8PSKf|T#Eur@e;hCU)4wuosh+FX! z+=4%1KSmmB{l~G3_G{Q}Ov%h~vWW{{pa%XSXph`)Ob_izT!Lp&1D{78F&_liKgPqf zKgHG9L{tjQa!6ngMzDy>aSorwGBz^4`I!^mH8)U`zKJVw0X3s=*qFDl4R!qzs>2Fu zhTma3{((!eg@XcIiwe98`>+Rx@DuOWwiKVNSl~L<4pbg3rMTgm#f%_hkO zR^8-K0nOquJc<0w9S$s#XT*AUDtoEB zsLJ-Ise7pEW01Ousz9}>-TMBYxPEuR8XV)aw?397KN)tT#@U8@!?IdN8# zRjWfxh83J(=ZWQp74rp-gC0{pqnpLO5xG^QgI@m%Q+b@njO!MWrF+D+|Kx3G|h$3 zJuh)J7EXA{yz3NPyZF2fUa&K1*R!+!lubL+uFW|q*Cx}BH|Z95))v#QE%;OUq#Lz~ zqO~)Ae*KYx^}Xz@P5Qa(Tr#)PEN#*>x15}^MROqql}r!?Z5buPEP|qtA&mM1M7pU9 zZ;~P?GBD~U!MX||?}{`FOzcXE%Dkw)znMWi%rl?!o_Xgi&pGe=&ok@x%_TTSj8acz z5S<&$dho7;FG^OpSw3bXA8X<(3{T)j>uCL-|e2<#gGB)5U#$yeQG1!L3 z@iay-zCEVGJvM<_^earl*QgbJz+1Q&Z10Z>tZWEVX`jGN_zpF(S=59Vun3pXjj7zE z{#%i*tQ}(+-+HLr!vQ2q7R#uWn2h>EGpge@q%Z5jgV={oypLMIbJR*FF%M_37*}x{ z7O;G6MI(0OAo?`m92Na>0bB7GUc`pjz!tnj4fGY$aRt?JQe5C{)S~wM5;B&Jq3(Z% z5g}%8Q1?$Wh!&zBHEyJn{A)#VG-w5B$j5T{D#mg=g1uOR4^W5bBksXJ=)$~&!0#=n zGjtP+@EaCmT4G>J8d0flMv`qEiR521^3re(`%!zpge1ZKVgp9gsJ%Xk%G3aM;SJRP zKcN<|7`$G_9IjW8k7XpAJ;7qs^%v9@{`OHxp;FG#)y$fLwxdpa4{9a7ScZ3k?Qc;N zoI!Osk5l*)mD(3{dK4#76Lf3|Y)v$>8G*V^x$XA!c1<~ zgsN}|`;p^d-!U6Q(l}U{gST-MOVGu^VK=N3cj5(f>-is{vV(?ctivCuiFnv(l4Etq z8M0%9iq3-uR8h)xPcBhK)DXPC{AWa2QHIo~iWa4m?;==>|6LKT=l=i~DoTrHs%>kCIq>kky20hRgy{%@sUnJ5po zl_DuyD>@%~+{m#1snNSaTciEnO6a_h%(aq9P45AA%Kv7~LoLGpQqXBt$s$4tJzj?h m?UlC2Gu{;Lb&O9%Rfi2fjQ0(\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