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 diff --git a/Kaju Admin App/Kaju Admin.xojo_project b/Kaju Admin App/Kaju Admin.xojo_project index 5ade22f..1d6d966 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 @@ -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= diff --git a/Kaju Admin App/WndAdmin.xojo_window b/Kaju Admin App/WndAdmin.xojo_window index 934ef03..0175cc6 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 @@ -1760,6 +1747,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 @@ -1825,7 +1846,6 @@ Begin Window WndAdmin Selectable = False TabIndex = 11 TabPanelIndex = 0 - TabStop = True Text = "App Name:" TextAlign = 0 TextColor = &c00000000 @@ -1871,8 +1891,7 @@ Begin Window WndAdmin Width = 180 End Begin Timer tmrUpdateReleaseNotesPreview - Enabled = True - Height = "32" + Height = 32 Index = -2147483648 InitialParent = "" Left = 0 @@ -1882,8 +1901,7 @@ Begin Window WndAdmin Scope = 2 TabPanelIndex = 0 Top = 0 - Visible = True - Width = "32" + Width = 32 End Begin HTMLViewer hvNewWindow AutoDeactivate = True @@ -1938,8 +1956,7 @@ Begin Window WndAdmin Width = 186 End Begin Timer tmrUpdateImagePreview - Enabled = True - Height = "32" + Height = 32 Index = -2147483648 InitialParent = "" Left = 20 @@ -1949,8 +1966,7 @@ Begin Window WndAdmin Scope = 2 TabPanelIndex = 0 Top = 20 - Visible = True - Width = "32" + Width = 32 End Begin Label lblPlatform AutoDeactivate = True @@ -1970,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 @@ -2009,7 +2024,6 @@ Begin Window WndAdmin Selectable = False TabIndex = 13 TabPanelIndex = 0 - TabStop = True Text = "Platforms:" TextAlign = 0 TextColor = &c00000000 @@ -2548,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 @@ -2584,6 +2599,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() @@ -3157,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 @@ -3237,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 ) 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 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" 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. 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.