CopyFile Step

I’m trying to get this to copy a Valentino Project to a subdirectory when I am debugging the app. I launched the app, it opens in browser, then go to finder and the file is not been copied.

I can’t seem to find any documentation on Copyfile.

How does one get a file that is needed to be copied into the apps home folder.

Thanks

Rich

[quote=138040:@Richard Albrecht]I’m trying to get this to copy a Valentino Project to a subdirectory when I am debugging the app. I launched the app, it opens in browser, then go to finder and the file is not been copied.

I can’t seem to find any documentation on Copyfile.

How does one get a file that is needed to be copied into the apps home folder.[/quote]

Go Insert/Build step/Copy File
In Copy File inspector, select destination App parent folder
In the central pane, drop the file(s) you want to copy
Drag the copyfile in the Build Settings of the platform you build for, below the gear icon

This is well described in the User Guide-Framework, in the Documentation folder, next to Xojo IDE app.

Thanks I was looking in the Lang Ref.

I was missing the last step, moving it to the build section.

Guess I need to check all the docs next time!

Thanks again

Rich

Now in building I keep getting this error:

The script ‘CopyFiles11’ can’t copy files to the destination in a pre build step. The destination does not exist yet. This step will not be executed.

Any Ideas

Got it, needed to be after the gear!

[quote=138097:@Richard Albrecht]Now in building I keep getting this error:

The script ‘CopyFiles11’ can’t copy files to the destination in a pre build step. The destination does not exist yet. This step will not be executed.

Any Ideas

Got it, needed to be after the gear![/quote]

That’s right. The gear represents the build. So if you place the copyfile before, no program exists.

[quote=138097:@Richard Albrecht]Now in building I keep getting this error:

The script ‘CopyFiles11’ can’t copy files to the destination in a pre build step. The destination does not exist yet. This step will not be executed.[/quote]
Me, I also stumbled upon this CopyFile Step issue while building an appliation recently.

The hint (I’ve not seen in the documentation/User Guide yet) is to Drag & Drop the order of the build steps.

You’ve dragged the CopyFile Step onto the Compiler Setting “Web” before, as the error can’t pop up without this step.

Look at the destination, it got a triangle. When a CopyFile Step has been dragged on, the order is:
Build
CopyFiles

The order written above results in your err msg.

-> Drag the CopyFiles above of the Build Step, and you’re done.

Copy Files Steps need to be below the build step.