Code::Blocks Forums

User forums => Using Code::Blocks => Topic started by: AndiDog on May 28, 2008, 11:27:44 am

Title: Scripting - Copy a file after successful build
Post by: AndiDog on May 28, 2008, 11:27:44 am
Hi,

I searched the forum/wiki but didn't find an answer.
What I want to do is writing a script that copies my output DLL file to "C:\windows\system32". But I couldn't find any Squirrel script examples that have a function which is executed after a successful build (like "function SearchHelp(keyword)" for help plugins).

Where is the documentation about scripting in C::B ??
Title: Re: Scripting - Copy a file after successful build
Post by: Jan van den Borst on May 28, 2008, 01:04:00 pm
Try typing this in the post build steps:

[[IO.CopyFile(_("bin\\debug\\mydll.dll"), _("c:\\windows\\system32\\mydll.dll"), true);]]


Jan
Title: Re: Scripting - Copy a file after successful build
Post by: dje on May 28, 2008, 01:08:07 pm
Where is the documentation about scripting in C::B ??

Don't forget to look at the wiki, you'll find articles like this (http://wiki.codeblocks.org/index.php?title=Scripting)

Dje
Title: Re: Scripting - Copy a file after successful build
Post by: thomas on May 28, 2008, 01:21:20 pm
You can do that without scripting as a post-build step using the COPY command, as in a DOS shell.