Distributing Stacks

Deploying to Mac OS? Ask Mac OS specific questions here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
andrew@ugh.net.au
Posts: 13
Joined: Sun Dec 17, 2006 12:30 pm

Distributing Stacks

Post by andrew@ugh.net.au » Wed May 07, 2014 11:57 pm

Hi,

I have a stack developed with Revolution 3.0 (for which I had some sort of commercial license). I hadn't looked at it for years but just had to do some maintenance so I downloaded LiveCode 6.6.2rc3 and everything worked fine (and it is much more stable than I remember Revolution being).

My problem is that I can't work out how to distribute the stack. Neither Revolution Player nor Stack Runner seem to support the new format. When I try and create a standalone executable (intel only) I get something that never finishes launching but just keeps bouncing in the dock. Console shows a few messages like:

[code]
08/05/14 00:41:53,107 Finder[1467]: There was an error parsing the Info.plist for the bundle at URL Contents/Info.plist -- file:///Users/andrew/tmp/VMD/MacOSX%20x86-32/VMD.app/
The data couldn’t be read because it isn’t in the correct format.
<CFBasicHash 0x608000c627c0 [0x7fff74542f00]>{type = immutable dict, count = 2,
entries =>
0 : <CFString 0x7fff74525e00 [0x7fff74542f00]>{contents = "NSDebugDescription"} = <CFString 0x6080006a5760 [0x7fff74542f00]>{contents = "Encountered unexpected character a on line 75 while looking for close tag"}
1 : <CFString 0x7fff745283a0 [0x7fff74542f00]>{contents = "kCFPropertyListOldStyleParsingError"} = Error Domain=NSCocoaErrorDomain Code=3840 "The data couldn’t be read because it isn’t in the correct format." (Malformed data byte group at line 1; invalid hex) UserInfo=0x60800106ba80 {NSDebugDescription=Malformed data byte group at line 1; invalid hex}
}
[/code]

and:

[code]
08/05/14 00:41:54,302 VMD[30680]: -[__NSCFError _cocoaErrorStringWithKind:]: unrecognized selector sent to instance 0x71d820
[/code]

I have since found I can save in an older version of the stack format and that seems to work OK with player - however it warns me I might loose some functionality and I'm not sure what, and if such loss will be silent, so I would like to find a better solution. Also I need to distribute to Windows users soon which I have not previously done with Revolution.

Is there a player for the current stack format?
Is there a way to get standalone apps working?

Thanks,

Andrew

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 10078
Joined: Fri Feb 19, 2010 10:17 am

Re: Distributing Stacks

Post by richmond62 » Thu May 08, 2014 7:28 am

If you authored your original stack in RR 3.0 and have not
altered anything when you opened it in 6.x just now
NO functionality will be lost by saving it back into the
3.0 compatible format.

The only things that would get lost are capabilities
built into Livecode since the file version was
changed.

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 10078
Joined: Fri Feb 19, 2010 10:17 am

Re: Distributing Stacks

Post by richmond62 » Thu May 08, 2014 7:34 am

Come to think of things, if you
are not altering any of the code in the stack why don't you just
run off a standalone from your copy of RR 3.0 ?

There is no pressing reason to use a newer version of RR/LC
unless you require any of the capabilities that have to be built into
it since version 3.0.

For the sake of argument; I develop my commercial software using version 4.5,
and as there are no advantage from the point of view of those titles in paying
for a newer commercial version I haven't done that. Should Livecode suddenly
develop a feature that would enhance the functionality of my titles
greatly then I'll take a walk to the bank.

andrew@ugh.net.au
Posts: 13
Joined: Sun Dec 17, 2006 12:30 pm

Re: Distributing Stacks

Post by andrew@ugh.net.au » Thu May 08, 2014 9:55 am

[quote="richmond62"]If you authored your original stack in RR 3.0 and have not
altered anything when you opened it in 6.x just now
NO functionality will be lost by saving it back into the
3.0 compatible format.
[/quote]

Sorry my original post was written rather late at night and a bit ramble. To be clear I did make some code changes (the maintenance I referred to). I didn't add anything fancy so hopefully it will be OK. Is there any automated way to check?

The advantage to me of using a newer build is that it is much more stable. My paid for version used to crash quite a lot. So far LC hasn't crashed once.

Perhaps the trick is just to use LC, save in an older format, open in RR and build a standalone form there. If it would want me about any specific thing I had done that would no longer work I would be content for now.

Thanks,

Andrew

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 10078
Joined: Fri Feb 19, 2010 10:17 am

Re: Distributing Stacks

Post by richmond62 » Thu May 08, 2014 7:23 pm

One of the ways to sort out this problem might be to:

1. List what changes you have made in your stack since you started reworking it in 6.x.

2. Looking up the code you have used in the built in Dictionary, as it states, very clearly, at which version
everything was introduced and/or changed.
charToNum.png

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 10078
Joined: Fri Feb 19, 2010 10:17 am

Re: Distributing Stacks

Post by richmond62 » Thu May 08, 2014 7:24 pm

Another thing you may not have thought about is whether you really need to protect your code.

If you don't just build your standalones with the Community version.

andrew@ugh.net.au
Posts: 13
Joined: Sun Dec 17, 2006 12:30 pm

Re: Distributing Stacks

Post by andrew@ugh.net.au » Thu May 08, 2014 9:08 pm

[quote="richmond62"]One of the ways to sort out this problem might be to:

1. List what changes you have made in your stack since you started reworking it in 6.x.
[/quote]

It might come to that. Alas any system requiring me to remember what I have done is bound to fail eventually. If only there was an easy way to store stacks in revision control as something other than an incomprehensible blob!

andrew@ugh.net.au
Posts: 13
Joined: Sun Dec 17, 2006 12:30 pm

Re: Distributing Stacks

Post by andrew@ugh.net.au » Thu May 08, 2014 9:12 pm

[quote="richmond62"]Another thing you may not have thought about is whether you really need to protect your code.

If you don't just build your standalones with the Community version.[/quote]

I don't need to protect the code. What I used to do was just send the .rev file and the users had a copy of the Revolution Player already downloaded. I would have continued to do that if there was a player that would read the new format.

I tried building a standalone but as I think I said in my original post, they don't actually run - at least under OSX 10.9. Maybe to do with the plist parsing errors that show up. If I could fix that then this method would be OK.

I could get the users to install the full LC but opening up into the IDE will cause confusion I fear. Perhaps there is a way for a stack to ask to be run rather than edited?

Thanks for your help!

andrew@ugh.net.au
Posts: 13
Joined: Sun Dec 17, 2006 12:30 pm

Re: Distributing Stacks

Post by andrew@ugh.net.au » Thu May 08, 2014 10:52 pm

As an experiment I tried creating a new stack in LC and saving it as a standalone and that worked fine. So presumably my standalone problems are either the fact that my stack was created with an older format or something wrong with it's settings. That gives me something to look at at least.

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7389
Joined: Sat Apr 08, 2006 8:31 pm
Contact:

Re: Distributing Stacks

Post by jacque » Fri May 09, 2014 8:20 pm

It's trivial to create your own player. Just make a one-card standalone that has a button on it. The script of the button can be a one-liner as long as your working stack is in the same folder with the standalone:

Code: Select all

on mouseUp
  go stack "myRealStack"
end mouseUp
You can get fancier if you want. You can put a list field with different stack names on the card, which goes to the stack listed on the clickline. Or you can hard-code the stack name into the app and go there without user intervention by sending a command on openCard. Or you can put up an answer file dialog so the user can choose any stack. The options are limitless.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

bn
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 4163
Joined: Sun Jan 07, 2007 9:12 pm

Re: Distributing Stacks

Post by bn » Mon May 12, 2014 11:10 am

Hi Andrew,

today I stumbled across a dictionary entry for "StackFileVersion".

I lists what you loose when saving in legacy format.
The following properties are not supported in the 2.4 stack file format and will be lost or altered when saving in 2.4 format:

antialiased property - lost
ink property - lost for cards, reverted to GXcopy for controls if not supported
opaque property - lost for cards
blendLevel property - lost

The following properties are not supported in the 2.7 stack file format and will be lost or altered when saving in 2.7 format:

textFont property - separation lost
textStyle property - separation lost
textSize property - separation lost
textFont property - separation lost
unicodeToolTip property - lost
all paragraph level properties - lost
separation of Unicode attribute of chars - lost
character level metadata property - lost
Kind regards
Bernd

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 10078
Joined: Fri Feb 19, 2010 10:17 am

Re: Distributing Stacks

Post by richmond62 » Mon May 12, 2014 12:56 pm

Lest we forget, after file version 2.4 there is version 2.7, version 5.5 and, now, version 7.0

so not quite as simple as it seems.

stackFileVersion in the dictionary of Livecode 6.7 dp3 lists exactly what Bernd quotes.

What is does NOT list is what is lost when one saves a file developed in a version of Livecode post 5.5 in version 2.7.

I cannot look up stackFileVersion in the dictionary of LC 7.0 dp3 because it won't
accept text insertion cursors in any field (Ubuntu Studio 14,04 [XFCE]).

bn
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 4163
Joined: Sun Jan 07, 2007 9:12 pm

Re: Distributing Stacks

Post by bn » Mon May 12, 2014 1:28 pm

What is does NOT list is what is lost when one saves a file developed in a version of Livecode post 5.5 in version 2.7.
This is from a dictionary that has 5.5 stackfileversion as default. So they list what you lose if you save in any prior version.
(in 7.0 the stackfileformat will change again)

So what you loose if you develop in a version of 5.5 up to 6.x and save in 2.7 format is this:
The following properties are not supported in the 2.7 stack file format and will be lost or altered when saving in 2.7 format:

textFont property - separation lost
textStyle property - separation lost
textSize property - separation lost
textFont property - separation lost
unicodeToolTip property - lost
all paragraph level properties - lost
separation of Unicode attribute of chars - lost
character level metadata property - lost
Kind regards
Bernd

Post Reply