Hi, a few suggestions and explanations from my side:
To your approach of the problem to copy the dll:
1) I would not recommend to copy the dll on every time you build your project... This are several MByte and unnecessary... So the Pre and Post build steps from the Build options are not the best way...
2) There are two possibilities left:
a) Use a Tool menu entry, so you have to manually call this tool one time you create the project
b) Modify the wizard script so it copies the dll at the time it is creating the project
To your confusion with the script thing:
In cb are generally two types of possibilities to automate things:
a) Use the normal CMD or shell commands. You can use this if you don't share this project across multiple platforms like windows linux mac...
b) Use the cb integrated squirrel script engine. This is a platform Independent approach. Use this if you share your project between machines..
(or c) a combination of the two things)
When i write something like this:
IO.CopyFile(ReplaceMacros(_("$(#wx.lib)\\gcc_dll\\wxmsw310u_gcc_cb.dll")),ReplaceMacros( _("$(PROJECT_DIR)$(TARGET_OUTPUT_DIR)wxmsw310u_gcc_cb.dll")), true)
i mean a squirrel code. This has to be embedded in "[[]]" parenthesis so cb recognize them as squirrel script. So if you use this script in the pre/post build steps it would look like this:
[[IO.CopyFile(ReplaceMacros(_("$(#wx.lib)\\gcc_dll\\wxmsw310u_gcc_cb.dll")),ReplaceMacros( _("$(PROJECT_DIR)$(TARGET_OUTPUT_DIR)wxmsw310u_gcc_cb.dll")), true)]]
If you want to use the normal cmd or shell commands like this:
cmd /c copy "$(PROJECT_DIR)$(TARGET_OUTPUT_FILE)" "C:\Program\bin"
you post this in the pre/post build steps like this (note: no ""[[]]":
cmd /c copy "$(PROJECT_DIR)$(TARGET_OUTPUT_FILE)" "C:\Program\bin"
cb will then replace all your variables (starting with $( )) and execute the command
This should clear things up. Now to your question:
If you want to copy the dll every time you build the target (not my recommendation) you put either of the two script lines in
Project->Build Options-> Select the top most target on the left->Pre/post build Steps
If you want to create a Tool entry:
Tools+->Configure Tools->New
Enter a Tool name like, "Copy wx dll"
As command line you can enter one of the two scripts i posted above (here i would recommend the cmd approach)
Now every time you call Tools+->Copy wx dll your dll gets copied in the current target output directorie
Modifying the script wizard is a bit more complicated, and i don't have the time to write it down now... You can ask me in 10 days again
. But maybe someone else can help you with this...
greetings