LC's standalone settings are removed at build time. Not sure why, as
they contain useful info like versions numbers.
I use a custom prop in my mainstack for version and build numbers, with
a setProp handler that updates the SB settings in sync with it when it
changes.
--
Richard Gaskin
Fourth World Systems
Phil Davis wrote:
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
_______________________________________________
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode