Copying binaries

This is a discussion on Copying binaries within the Windows Programming forums, part of the Platform Specific Boards category; I'm hosting a project on svn (it's a game). it has two main folders, source (include source code) and game ...

  1. #1
    Allways learning cs_student's Avatar
    Join Date
    Aug 2008
    Location
    ~/
    Posts
    39

    Copying binaries

    I'm hosting a project on svn (it's a game). it has two main folders, source (include source code) and game (includes binaries/models/etc). The msvc++ project is in the src dirctory. How can I make it so that when it builds a binary it copies it's binary to /game/bin as well?


    I know I can do it under properties->build events->post build events-> command line
    But I don't know what to put in.

    With the project in (basepath)/src/project/
    I want the binary copied to (basepath)/game/bin

    Thank you for your time and effort,

    cs_student

    BTW if your wondering why I want a binary in the svn, it's so the artists/non-programmers don't have to worry about compiling.

  2. #2
    and the Hat of Guessing tabstop's Avatar
    Join Date
    Nov 2007
    Posts
    14,185
    I haven't tried to do this, so why doesn't "copy whatever.exe ..\..\game\bin" work?

  3. #3
    Allways learning cs_student's Avatar
    Join Date
    Aug 2008
    Location
    ~/
    Posts
    39
    I don't know why, but it doesn't seem to work. I just get "error during post build event" it doesn't say anything else.

    edit: and yes I changed it to the correct name, etc.

  4. #4
    int x = *((int *) NULL); Cactus_Hugger's Avatar
    Join Date
    Jul 2003
    Location
    Banks of the River Styx
    Posts
    902
    I'm not familiar with this, but perhaps your current directory isn't what you think it is, and your copy command can't find what it's looking for?

    You could stick a:
    Code:
    cd >C:\some\absolute\location\thecwd.txt
    in there to see what directory it's actually in, and whether that is different from what you think you're in.

    MSVC++ might have some make-like variables to help you get an absolute reference to the directories you need...

    BTW if your wondering why I want a binary in the svn, it's so the artists/non-programmers don't have to worry about compiling.
    Ah. I was wondering, actually... silly artists .
    long time; /* know C? */
    Unprecedented performance: Nothing ever ran this slow before.
    Any sufficiently advanced bug is indistinguishable from a feature.
    Real Programmers confuse Halloween and Christmas, because dec 25 == oct 31.
    The best way to accelerate an IBM is at 9.8 m/s/s.
    recursion (re - cur' - zhun) n. 1. (see recursion)

  5. #5
    and the Hat of Guessing tabstop's Avatar
    Join Date
    Nov 2007
    Posts
    14,185
    In VC++, you have to ctrl-click on the log file to get it to open (or go looking). But it will say exactly what Cactus knew it would: could not find file to copy. It appears, from my test, to run the command from the directory where your .vcproj is, so I would suggest you use the $(directories) as appropriate.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. copying file from one user directory to another
    By Bargi in forum Linux Programming
    Replies: 6
    Last Post: 05-17-2009, 05:09 PM
  2. Copying Files
    By ch4 in forum C Programming
    Replies: 8
    Last Post: 02-14-2009, 04:15 PM
  3. Copying a whole directory and its content
    By Enira in forum C Programming
    Replies: 4
    Last Post: 03-12-2006, 02:13 PM
  4. C and C++ binaries
    By Shiro in forum A Brief History of Cprogramming.com
    Replies: 3
    Last Post: 01-10-2002, 12:36 PM
  5. Copying a file
    By rkjd2 in forum C++ Programming
    Replies: 5
    Last Post: 09-09-2001, 11:24 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21