Win standalone question

Phil Davis revdev at pdslabs.net
Tue Aug 16 18:37:29 EDT 2016


Hi everyone,

In a Windows standalone, how do you retrieve its standalone version info 
(the info you entered when building the standalone)?

Here is what my code looks like right now. As you can see, it currently 
returns empty for a Win standalone:



function appLongVersion
     switch the platform
         case "MacOS"
             if the environment = "development"
             then return the cRevStandaloneSettings["OSX,longVersion"] of me
             else -- it's a standalone
                 -- extract info from the plist file
                 set the itemDel to slash
                 put item 1 to -3 of the filename of me & "/Info.plist" 
into tPath
                 put url ("file:" & tPath) into tPlist
                 replace tab with empty in tPlist
                 replace ("</key>" & CR & "<string>") with 
("</key><string>") in tPlist -- put each key/string pair on same line
                 filter tPlist with "*CFBundleLongVersionString*" -- the 
key name we need
                 delete char 1 to offset("<string>",tPlist)+8 of tPlist 
-- start line with the string content
                 set the itemDel to "<"
                 return item 1 of tPlist
             end if
             break
         case "Win32"
             if the environment = "development"
             then return the 
cRevStandaloneSettings["Windows,longVersion"] of me
             else -- it's a standalone
                 return empty -- ???
             end if
             break
     end switch
end appLongVersion



Thanks -
Phil Davis

-- 
Phil Davis





More information about the Use-livecode mailing list