Build to folder with source backup

Something you want to see in a LiveCode product? Want a new forum set up for a specific topic? Talk about it here.

Moderator: Klaus

Post Reply
BarrySumpter
Posts: 1201
Joined: Sun Apr 24, 2011 2:17 am

Build to folder with source backup

Post by BarrySumpter » Fri Jul 29, 2011 12:13 am

Can we please have an option in the Standalone Application Settings to build in exactly the same place by replacing the last build?

Also, can we please have an option in the Standalone Application Settings to save the source version along with the build?
I'd like it to be zipped and password protected.
All my best,
Barry G. Sumpter

Deving on WinXP sp3-32 bit. LC 5.5 Professional Build 1477
Android/iOS/Server Add Ons. OmegaBundle 2011 value ROCKS!
2 HTC HD2 Latest DorimanX Roms
Might have to reconsider LiveCode iOS Developer Program.

Mark
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5150
Joined: Thu Feb 23, 2006 9:24 pm
Contact:

Re: Build to folder with source backup

Post by Mark » Fri Jul 29, 2011 2:22 am

Hi ...,

Put this in your stack script:

Code: Select all

on standaloneSaved theFolder
  revCopyFile the effective filename of me,theFolder
end standaloneSaved
You can adjust this script to copy the parent folder of your stack, to add libraries and externals, etc.

Kind regards,

Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode

BarrySumpter
Posts: 1201
Joined: Sun Apr 24, 2011 2:17 am

Re: Build to folder with source backup

Post by BarrySumpter » Fri Jul 29, 2011 2:37 am

Is there a way to put this into every File | New Mainstack ?
All my best,
Barry G. Sumpter

Deving on WinXP sp3-32 bit. LC 5.5 Professional Build 1477
Android/iOS/Server Add Ons. OmegaBundle 2011 value ROCKS!
2 HTC HD2 Latest DorimanX Roms
Might have to reconsider LiveCode iOS Developer Program.

Mark
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5150
Joined: Thu Feb 23, 2006 9:24 pm
Contact:

Re: Build to folder with source backup

Post by Mark » Fri Jul 29, 2011 3:03 am

Hi,

Many of us have a standard library, which contains scripts that are included in every project we make. make your own version of my script and include it in your standard lib.

You could also make a template stack and open a copy of this stack every time you start a new project.

Best,

Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode

BarrySumpter
Posts: 1201
Joined: Sun Apr 24, 2011 2:17 am

Re: Build to folder with source backup

Post by BarrySumpter » Fri Jul 29, 2011 3:07 am

Is either the standard library or the template stack part of the File | New Mainstack?

Thats what I'm looking for.
All my best,
Barry G. Sumpter

Deving on WinXP sp3-32 bit. LC 5.5 Professional Build 1477
Android/iOS/Server Add Ons. OmegaBundle 2011 value ROCKS!
2 HTC HD2 Latest DorimanX Roms
Might have to reconsider LiveCode iOS Developer Program.

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

Re: Build to folder with source backup

Post by jacque » Fri Jul 29, 2011 3:09 am

The best way to have a library that applies to all stacks you open is to make yourself a custom plugin that sets up a backscript. I have one I've been using for years. My library opens and loads into a backscript when LiveCode starts up and is always available. A custom plugin is just a regular stack that you put into your plugins folder. To create a universal, always-available backscript, the stack should contain an preOpenStack handler in its card script like this:

Code: Select all

on preOpenStack
 insert script of this stack into back
end preOpenStack
In the stack script, put any custom handlers you want to be always available, such as the standaloneSaved handler. Save the plugin stack and place it in the LiveCode plugins folder. Restart LiveCode so the plugin is recognized.

To make it load automatically every time you start LiveCode, open the Plugins Settings in the Development menu in LiveCode. Select your custom stack. Set it to open when LiveCode starts up (it still says "Revolution", I notice) and to be invisible. LiveCode will take care of the rest. Don't worry about the custom messages you see in the list at the right, you don't need those.

Now every time you start up LiveCode your custom backscript will be inserted and you will have full access to any handlers in it at all times. My own contains a couple dozen handlers I call routinely from the message box. The "standaloneSaved" message will be caught by your backscript and executed. You'll want to change the "of me" designation to something else; probably you'll need to get the target for the stack name to save.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

Post Reply