Author Topic: [SOLVED] Compiling libPNG failing on pre-build steps, "copy" or "xcopy"  (Read 2303 times)

Offline Melchior

  • Multiple posting newcomer
  • *
  • Posts: 64
  • Sage of Life, Reason, and Time
After importing from the
- .\lpng1630\projects\visualc71\libpng.vcproj

"copy"  doesn't  work because it creates a prompt for overwrite confirmation
regardless if  the file exists or NOT.. and because its in the compile log there is no way to interact
with said prompt...

so I resorted to modifying the cmdline from/to:
Code
from: "copy ..\..\scripts\pnglibconf.h.prebuilt ..\..\pnglibconf.h"

to  : "xcopy ..\..\scripts\pnglibconf.h.prebuilt ..\..\pnglibconf.h /Y"

even though...
and even then it only works if I manually copy and rename said file
first.. its strange.. and annoying...

idk.. if you could figure out a fix for that too?, please.

I FOUND this.... after an extensive Google search..
Code
echo f | xcopy /Y /F ..\..\scripts\pnglibconf.h.prebuilt ..\..\pnglibconf.h 

works from a .cmd batch file BUT fails inside of CodeBlocks... XD
go figure....

then this
Code
echo.>pnglibconf.h
xcopy /Y /F ..\..\scripts\pnglibconf.h.prebuilt ..\..\pnglibconf.h
works from cmd prompt or bat file BUT again fails in C::B..
does C::B NOT like the "echo" command???

so I tried this from the same site/article,
C::B didn't like it eirther so,
then modified to add "cmd /C"
IT WORKS, C::B LIKED THAT!!! lol :D : D
Code
cmd /C type ..\..\scripts\pnglibconf.h.prebuilt > ..\..\pnglibconf.h
« Last Edit: July 22, 2017, 10:17:20 am by Melchior »
(PC Specs)
CPU: AMD FX-9590 4.7GHz 8-core  RAM: 32GB
Motherboard: Asus SABERTOOTH 990FX R2.0
GPU: nVidia GTX 1070 Ti 8GB  --  GFX Drivers: Nvidia v431.60
OS: Windows 7 Ultimate 64-bit SP1 (x64)