From d1edace6a514c96684902898e4edeee863bab5dc Mon Sep 17 00:00:00 2001 From: Kem Tekinay Date: Wed, 3 Jun 2015 17:44:49 -0400 Subject: [PATCH 01/12] Added TO DO file --- TO DO.txt | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 TO DO.txt diff --git a/TO DO.txt b/TO DO.txt new file mode 100644 index 0000000..b5f773d --- /dev/null +++ b/TO DO.txt @@ -0,0 +1,6 @@ +Things To Do +(Ideas that may or may not be implemented) + +- Allow for the URL to use a placeholder like "$VERSION$" that will substitute the version on export. +- A command line utility that will let you read or update the admin file and export the UpdateInformation.html file. +- Ability to use Markdown instead of HTML to create the release notes. From 8f68044a10ac8965cf72b9817a9699764a0f746c Mon Sep 17 00:00:00 2001 From: Kem Tekinay Date: Wed, 3 Jun 2015 18:36:17 -0400 Subject: [PATCH 02/12] Admin: New version of Xojo --- Kaju Admin App/Kaju Admin.xojo_project | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Kaju Admin App/Kaju Admin.xojo_project b/Kaju Admin App/Kaju Admin.xojo_project index 5ade22f..639fb02 100644 --- a/Kaju Admin App/Kaju Admin.xojo_project +++ b/Kaju Admin App/Kaju Admin.xojo_project @@ -1,5 +1,5 @@ Type=Desktop -RBProjectVersion=2015.01 +RBProjectVersion=2015.022 MinIDEVersion=20070100 Folder=Kaju Classes;../Kaju Classes;&h2570CF64;&h0;false Class=App;App.xojo_code;&h7955649;&h0;false From c6c03731dc4f1d3d7e0c51fba53a733570d71d36 Mon Sep 17 00:00:00 2001 From: Kem Tekinay Date: Wed, 3 Jun 2015 18:36:47 -0400 Subject: [PATCH 03/12] WndAdmin: Added label to describe how to use $VERSION$ placeholder --- Kaju Admin App/WndAdmin.xojo_window | 34 +++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/Kaju Admin App/WndAdmin.xojo_window b/Kaju Admin App/WndAdmin.xojo_window index 934ef03..e1b4bfa 100644 --- a/Kaju Admin App/WndAdmin.xojo_window +++ b/Kaju Admin App/WndAdmin.xojo_window @@ -1760,6 +1760,40 @@ Begin Window WndAdmin Visible = False Width = 80 End + Begin Label Label2 + AutoDeactivate = True + Bold = False + DataField = "" + DataSource = "" + Enabled = True + Height = 20 + HelpTag = "" + Index = -2147483648 + InitialParent = "TabPanel1" + Italic = False + Left = 271 + LockBottom = False + LockedInPosition= False + LockLeft = True + LockRight = True + LockTop = True + Multiline = False + Scope = 2 + Selectable = False + TabIndex = 25 + TabPanelIndex = 2 + Text = "Use ‘$VERSION$’ in the URL to insert the version on export" + TextAlign = 1 + TextColor = &c00000000 + TextFont = "SmallSystem" + TextSize = 0.0 + TextUnit = 0 + Top = 588 + Transparent = False + Underline = False + Visible = True + Width = 613 + End End Begin TextFieldChanger fldAppName AcceptTabs = False From b917d6c8ad91c1e896c17d288bdfc22d4346df7d Mon Sep 17 00:00:00 2001 From: Kem Tekinay Date: Wed, 3 Jun 2015 18:37:06 -0400 Subject: [PATCH 04/12] WndAdmin: Made all controls private --- Kaju Admin App/WndAdmin.xojo_window | 32 ++++++----------------------- 1 file changed, 6 insertions(+), 26 deletions(-) diff --git a/Kaju Admin App/WndAdmin.xojo_window b/Kaju Admin App/WndAdmin.xojo_window index e1b4bfa..5edad81 100644 --- a/Kaju Admin App/WndAdmin.xojo_window +++ b/Kaju Admin App/WndAdmin.xojo_window @@ -202,7 +202,6 @@ Begin Window WndAdmin Selectable = False TabIndex = 12 TabPanelIndex = 0 - TabStop = True Text = "Version:" TextAlign = 0 TextColor = &c00000000 @@ -337,7 +336,6 @@ Begin Window WndAdmin Selectable = False TabIndex = 2 TabPanelIndex = 1 - TabStop = True Text = "Preview:" TextAlign = 0 TextColor = &c00000000 @@ -447,7 +445,6 @@ Begin Window WndAdmin Selectable = False TabIndex = 3 TabPanelIndex = 2 - TabStop = True Text = "Hash:" TextAlign = 0 TextColor = &c00000000 @@ -482,7 +479,6 @@ Begin Window WndAdmin Selectable = False TabIndex = 4 TabPanelIndex = 2 - TabStop = True Text = "URL:" TextAlign = 0 TextColor = &c00000000 @@ -517,7 +513,6 @@ Begin Window WndAdmin Selectable = False TabIndex = 3 TabPanelIndex = 1 - TabStop = True Text = "Release Notes (HTML):" TextAlign = 0 TextColor = &c00000000 @@ -627,7 +622,6 @@ Begin Window WndAdmin Selectable = False TabIndex = 8 TabPanelIndex = 2 - TabStop = True Text = "Hash:" TextAlign = 0 TextColor = &c00000000 @@ -662,7 +656,6 @@ Begin Window WndAdmin Selectable = False TabIndex = 9 TabPanelIndex = 2 - TabStop = True Text = "URL:" TextAlign = 0 TextColor = &c00000000 @@ -729,7 +722,6 @@ Begin Window WndAdmin Selectable = False TabIndex = 13 TabPanelIndex = 2 - TabStop = True Text = "Hash:" TextAlign = 0 TextColor = &c00000000 @@ -764,7 +756,6 @@ Begin Window WndAdmin Selectable = False TabIndex = 14 TabPanelIndex = 2 - TabStop = True Text = "URL:" TextAlign = 0 TextColor = &c00000000 @@ -842,7 +833,6 @@ Begin Window WndAdmin Selectable = False TabIndex = 1 TabPanelIndex = 3 - TabStop = True Text = "URL:" TextAlign = 0 TextColor = &c00000000 @@ -974,7 +964,6 @@ Begin Window WndAdmin Selectable = False TabIndex = 16 TabPanelIndex = 2 - TabStop = True Text = "Minimum Required Version:" TextAlign = 0 TextColor = &c00000000 @@ -1235,7 +1224,7 @@ Begin Window WndAdmin Mask = "" Password = False ReadOnly = True - Scope = 0 + Scope = 2 TabIndex = 1 TabPanelIndex = 2 TabStop = True @@ -1401,7 +1390,6 @@ Begin Window WndAdmin Selectable = False TabIndex = 18 TabPanelIndex = 2 - TabStop = True Text = "Executable:" TextAlign = 0 TextColor = &c00000000 @@ -1479,7 +1467,6 @@ Begin Window WndAdmin Selectable = False TabIndex = 20 TabPanelIndex = 2 - TabStop = True Text = "Executable:" TextAlign = 0 TextColor = &c00000000 @@ -1859,7 +1846,6 @@ Begin Window WndAdmin Selectable = False TabIndex = 11 TabPanelIndex = 0 - TabStop = True Text = "App Name:" TextAlign = 0 TextColor = &c00000000 @@ -1905,8 +1891,7 @@ Begin Window WndAdmin Width = 180 End Begin Timer tmrUpdateReleaseNotesPreview - Enabled = True - Height = "32" + Height = 32 Index = -2147483648 InitialParent = "" Left = 0 @@ -1916,8 +1901,7 @@ Begin Window WndAdmin Scope = 2 TabPanelIndex = 0 Top = 0 - Visible = True - Width = "32" + Width = 32 End Begin HTMLViewer hvNewWindow AutoDeactivate = True @@ -1972,8 +1956,7 @@ Begin Window WndAdmin Width = 186 End Begin Timer tmrUpdateImagePreview - Enabled = True - Height = "32" + Height = 32 Index = -2147483648 InitialParent = "" Left = 20 @@ -1983,8 +1966,7 @@ Begin Window WndAdmin Scope = 2 TabPanelIndex = 0 Top = 20 - Visible = True - Width = "32" + Width = 32 End Begin Label lblPlatform AutoDeactivate = True @@ -2004,11 +1986,10 @@ Begin Window WndAdmin LockRight = False LockTop = True Multiline = False - Scope = 0 + Scope = 2 Selectable = False TabIndex = 6 TabPanelIndex = 0 - TabStop = True Text = "None" TextAlign = 0 TextColor = &c00000000 @@ -2043,7 +2024,6 @@ Begin Window WndAdmin Selectable = False TabIndex = 13 TabPanelIndex = 0 - TabStop = True Text = "Platforms:" TextAlign = 0 TextColor = &c00000000 From 4cd83fcc4dce8dfe52de283051be285f94dddaf4 Mon Sep 17 00:00:00 2001 From: Kem Tekinay Date: Wed, 3 Jun 2015 18:37:15 -0400 Subject: [PATCH 05/12] Nothingness --- Kaju Admin App/FileTypes1.xojo_filetypeset | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/Kaju Admin App/FileTypes1.xojo_filetypeset b/Kaju Admin App/FileTypes1.xojo_filetypeset index 54422e8..edb92ed 100644 --- a/Kaju Admin App/FileTypes1.xojo_filetypeset +++ b/Kaju Admin App/FileTypes1.xojo_filetypeset @@ -8,6 +8,10 @@ MacType= Name=KajuDocument UTI=com.mactechnologies.kajudocument + UTIConformsTo= + Description= + MimeType= + Imported=True #tag EndFileType #tag FileType @@ -18,6 +22,10 @@ MacType=TEXT Name=text/html UTI=public.html + UTIConformsTo= + Description= + MimeType= + Imported=True #tag EndFileType #tag FileType @@ -27,6 +35,10 @@ MacCreator=???? MacType=???? Name=special/any + UTIConformsTo= + Description= + MimeType= + Imported=True #tag EndFileType #tag FileType @@ -36,6 +48,10 @@ MacCreator=SITx MacType=ZIP Name=application/zip + UTIConformsTo= + Description= + MimeType= + Imported=True #tag EndFileType #tag EndFileTypeSet From 9399df1ac6cfc5ac4a4a16f17cb473be416672cc Mon Sep 17 00:00:00 2001 From: Kem Tekinay Date: Wed, 3 Jun 2015 22:51:17 -0400 Subject: [PATCH 06/12] BinaryInformation: Added constants for JSON keys --- Kaju Classes/Kaju/BinaryInformation.xojo_code | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/Kaju Classes/Kaju/BinaryInformation.xojo_code b/Kaju Classes/Kaju/BinaryInformation.xojo_code index b6e99fe..a742761 100644 --- a/Kaju Classes/Kaju/BinaryInformation.xojo_code +++ b/Kaju Classes/Kaju/BinaryInformation.xojo_code @@ -49,10 +49,10 @@ Inherits Kaju.Information Function ToJSON() As JSONItem dim j as new JSONItem - j.Value( "Hash" ) = Hash - j.Value( "URL" ) = URL + j.Value( kKeyHash ) = Hash + j.Value( kKeyURL ) = URL if ExecutableName <> "" then - j.Value( "ExecutableName" ) = ExecutableName + j.Value( kKeyExecutableName ) = ExecutableName end if return j @@ -95,6 +95,16 @@ Inherits Kaju.Information #tag EndProperty + #tag Constant, Name = kKeyExecutableName, Type = String, Dynamic = False, Default = \"ExecutableName", Scope = Public + #tag EndConstant + + #tag Constant, Name = kKeyHash, Type = String, Dynamic = False, Default = \"Hash", Scope = Public + #tag EndConstant + + #tag Constant, Name = kKeyURL, Type = String, Dynamic = False, Default = \"URL", Scope = Public + #tag EndConstant + + #tag ViewBehavior #tag ViewProperty Name="ExecutableName" From 610378f41266c10336a48db8b1cded1cfcd04b22 Mon Sep 17 00:00:00 2001 From: Kem Tekinay Date: Wed, 3 Jun 2015 23:04:25 -0400 Subject: [PATCH 07/12] WndAdmin: Added InsertVersion function --- Kaju Admin App/WndAdmin.xojo_window | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Kaju Admin App/WndAdmin.xojo_window b/Kaju Admin App/WndAdmin.xojo_window index 5edad81..e6fb78a 100644 --- a/Kaju Admin App/WndAdmin.xojo_window +++ b/Kaju Admin App/WndAdmin.xojo_window @@ -2598,6 +2598,12 @@ End End Sub #tag EndMethod + #tag Method, Flags = &h21 + Private Function InsertVersion(originalURL As String, version As String) As String + return originalURL.ReplaceAllB( "$VERSION$", version ) + End Function + #tag EndMethod + #tag Method, Flags = &h21 Private Function IsDataValid() As Boolean StoreFieldsToVersionRow() From abaa2b1109b5e874f8fbdfdff134b28d4ab3c578 Mon Sep 17 00:00:00 2001 From: Kem Tekinay Date: Wed, 3 Jun 2015 23:05:04 -0400 Subject: [PATCH 08/12] WndAdmin: HashFromURL will insert the version first --- Kaju Admin App/WndAdmin.xojo_window | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Kaju Admin App/WndAdmin.xojo_window b/Kaju Admin App/WndAdmin.xojo_window index e6fb78a..190a276 100644 --- a/Kaju Admin App/WndAdmin.xojo_window +++ b/Kaju Admin App/WndAdmin.xojo_window @@ -2562,8 +2562,9 @@ End #tag EndMethod #tag Method, Flags = &h21 - Private Sub HashFromURL(url As String, hashField As TextField) + Private Sub HashFromURL(url As String, version As String, hashField As TextField) url = url.Trim + url = InsertVersion( url, version ) if url = "" then return @@ -3177,21 +3178,21 @@ End #tag Events btnMacHashFromURL #tag Event Sub Action() - HashFromURL( fldMacBinaryURL.Text, fldMacBinaryHash ) + HashFromURL( fldMacBinaryURL.Text, fldVersion.Text.Trim, fldMacBinaryHash ) End Sub #tag EndEvent #tag EndEvents #tag Events btnLinuxHashFromURL #tag Event Sub Action() - HashFromURL( fldLinuxBinaryURL.Text, fldLinuxBinaryHash ) + HashFromURL( fldLinuxBinaryURL.Text, fldVersion.Text.Trim, fldLinuxBinaryHash ) End Sub #tag EndEvent #tag EndEvents #tag Events btnWindowsHashFromURL #tag Event Sub Action() - HashFromURL( fldWindowsBinaryURL.Text, fldWindowsBinaryHash ) + HashFromURL( fldWindowsBinaryURL.Text, fldVersion.Text.Trim, fldWindowsBinaryHash ) End Sub #tag EndEvent #tag EndEvents From 7932560a90e6f8770e9bd3464257e0acfde05855 Mon Sep 17 00:00:00 2001 From: Kem Tekinay Date: Wed, 3 Jun 2015 23:05:22 -0400 Subject: [PATCH 09/12] WndAdmin: Export will insert the version into the URL first --- Kaju Admin App/WndAdmin.xojo_window | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/Kaju Admin App/WndAdmin.xojo_window b/Kaju Admin App/WndAdmin.xojo_window index 190a276..0175cc6 100644 --- a/Kaju Admin App/WndAdmin.xojo_window +++ b/Kaju Admin App/WndAdmin.xojo_window @@ -3258,6 +3258,27 @@ End dim data as JSONItem = KajuJSON data.Compact = false data.EscapeSlashes = false + + // + // Perform $VERSION$ substitutions + // + dim keys() as string = Array( Kaju.UpdateInformation.kMacBinaryName, Kaju.UpdateInformation.kWindowsBinaryName, _ + Kaju.UpdateInformation.kLinuxBinaryName ) + + dim lastVersionIndex as integer = data.Count - 1 + for versionIndex as integer = 0 to lastVersionIndex + dim thisVersionData as JSONItem = data( versionIndex ) + dim thisVersion as string = thisVersionData.Value( fldVersion.DataField ) + for each binaryKey as string in keys + if thisVersionData.HasName( binaryKey ) then + dim binaryData as JSONItem = thisVersionData.Value( binaryKey ) + dim url as string = binaryData.Value( Kaju.BinaryInformation.kKeyURL ) + url = InsertVersion( url, thisVersion ) + binaryData.Value( Kaju.BinaryInformation.kKeyURL ) = url + end if + next + next + dim dataString as string = data.ToString dim sig as string = Crypto.RSASign( dataString, RSAPrivateKey ) From e6188caaddf7b210aa756702a628d5d2a02a6168 Mon Sep 17 00:00:00 2001 From: Kem Tekinay Date: Wed, 3 Jun 2015 23:06:59 -0400 Subject: [PATCH 10/12] Admin: Updated version to 1.5 --- Kaju Admin App/Kaju Admin.xojo_project | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Kaju Admin App/Kaju Admin.xojo_project b/Kaju Admin App/Kaju Admin.xojo_project index 639fb02..1d6d966 100644 --- a/Kaju Admin App/Kaju Admin.xojo_project +++ b/Kaju Admin App/Kaju Admin.xojo_project @@ -31,8 +31,8 @@ SubVersion=1 NonRelease=0 Release=3 InfoVersion=Kaju Admin -LongVersion=v.1.4.1 -ShortVersion=1.4.1 +LongVersion=v.1.5 +ShortVersion=1.5 WinCompanyName=MacTechnologies Consulting WinInternalName= WinProductName= From 7049d79470ad2cd5c90e39dcbbc4188f82b5da65 Mon Sep 17 00:00:00 2001 From: Kem Tekinay Date: Wed, 3 Jun 2015 23:07:24 -0400 Subject: [PATCH 11/12] Kaju: Updated version to 1.5 --- Kaju Classes/Kaju.xojo_code | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Kaju Classes/Kaju.xojo_code b/Kaju Classes/Kaju.xojo_code index d2001ab..8554230 100644 --- a/Kaju Classes/Kaju.xojo_code +++ b/Kaju Classes/Kaju.xojo_code @@ -382,7 +382,7 @@ Protected Module Kaju #tag Constant, Name = kUpdatePacketMarker, Type = String, Dynamic = False, Default = \"KAJU ", Scope = Protected #tag EndConstant - #tag Constant, Name = Version, Type = String, Dynamic = False, Default = \"1.4.1", Scope = Protected + #tag Constant, Name = Version, Type = String, Dynamic = False, Default = \"1.5", Scope = Protected #tag EndConstant From d845fb427408eeb949cf200dd59b42e05c048989 Mon Sep 17 00:00:00 2001 From: Kem Tekinay Date: Wed, 3 Jun 2015 23:11:28 -0400 Subject: [PATCH 12/12] Updated README --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index 5a071b4..07573bd 100644 --- a/README.md +++ b/README.md @@ -379,3 +379,7 @@ Add a translation for each, then submit a pull request as outlined above. - **Admin app**: Lock "From URL" buttons to the right of the window. - Added Finnish translation. + +1.5 (June 3, 2015) + +- **Admin app**: Enable substitution of `$VERSION$` in binary URL's.