Author Topic: Scripting - Copy a file after successful build  (Read 5920 times)

Offline AndiDog

  • Single posting newcomer
  • *
  • Posts: 6
Scripting - Copy a file after successful build
« 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 ??

Offline Jan van den Borst

  • Multiple posting newcomer
  • *
  • Posts: 99
Re: Scripting - Copy a file after successful build
« Reply #1 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

Offline dje

  • Lives here!
  • ****
  • Posts: 683
Re: Scripting - Copy a file after successful build
« Reply #2 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

Dje

Offline thomas

  • Administrator
  • Lives here!
  • *****
  • Posts: 3979
Re: Scripting - Copy a file after successful build
« Reply #3 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.
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."