Page 1 of 1
How to copy plist after 'Build all targets'?
Posted: Sat Sep 11, 2010 9:17 pm
by WilliamL
I made a little program to copy my plist to the executable (since, on creating an app a default plist is created). Is there a way to run this little program automatically upon creating the executable (in my case I'm using 'Build all targets')? ...or is there a better way to do this?
Re: How to copy plist after 'Build all targets'?
Posted: Sat Sep 11, 2010 9:50 pm
by freak
Just configure a tool to be executed on the "After create executable" trigger. This is also executed during the project build process. You can check whether this worked by looking at the build log. Any tools that are executed during 'Build all targets' are shown there.
Re: How to copy plist after 'Build all targets'?
Posted: Sat Sep 11, 2010 11:37 pm
by WilliamL
I thought of that and even tried it but it didn't seen to work.
I guess you can only have a .pb file as a tool (in this case my copy program) and not an app (won't let you select it). I wondered if the event loop in the copy program would stop the program but it didn't. I'm a little puzzled by this behavior. I also wonder if the tool will run after any program I build? Will I have to 'uncheck' the tool to keep that from happening?
It worked! The only way to tell it worked was to look at the log (also in this case if the plist is my copy and not the default).
Thanks freak, this is a time-saver.
[edit-later]
The file has a new create date, because of the new default file, but the file has not been replaced. It is not working. (see below)
Re: How to copy plist after 'Build all targets'?
Posted: Mon Jan 03, 2011 10:46 pm
by WilliamL
I tried to get LPP to work as a tool and, since it didn't work, it brings up many questions. Like...
-Does the tool have to be a .app or a .pb?
-Why doesn't browse, in Commandline:, allow selecting apps?
-What happens to the event loop in my program that I mentioned above?
I made a tool of one line MessageRequester("Tool","Continue") and created an .app out of it. I selected a trigger of 'Before Compile/Run' and 'Wait until tool quits' and ran the IDE and saw what happened. The tool seemed to be ignored. Why doesn't this work?
What would be an example I could test to see if the Tool function is working?
[later]
Note: Tools are created using 'Console' option when creating the executable.