Page 1 of 1
Build to folder with source backup
Posted: Fri Jul 29, 2011 12:13 am
by BarrySumpter
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.
Re: Build to folder with source backup
Posted: Fri Jul 29, 2011 2:22 am
by Mark
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
Re: Build to folder with source backup
Posted: Fri Jul 29, 2011 2:37 am
by BarrySumpter
Is there a way to put this into every File | New Mainstack ?
Re: Build to folder with source backup
Posted: Fri Jul 29, 2011 3:03 am
by Mark
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
Re: Build to folder with source backup
Posted: Fri Jul 29, 2011 3:07 am
by BarrySumpter
Is either the standard library or the template stack part of the File | New Mainstack?
Thats what I'm looking for.
Re: Build to folder with source backup
Posted: Fri Jul 29, 2011 3:09 am
by jacque
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.