/[pcsx2_0.9.7]/trunk/common/vsprops/postBuild.unknown
ViewVC logotype

Contents of /trunk/common/vsprops/postBuild.unknown

Parent Directory Parent Directory | Revision Log Revision Log


Revision 10 - (show annotations) (download)
Mon Sep 6 11:40:06 2010 UTC (9 years, 5 months ago) by william
File size: 1268 byte(s)
exported r3113 from ./upstream/trunk
1 ::@echo off
2 ::
3 :: Usage: postBuild.cmd SourcePath DestFile DestExt {plugins}
4 ::
5 :: SourcePath - $(TargetPath) - Fully qualified path of the generated target file.
6 :: DestFile - Base filename of the target/dest, without extension!
7 :: DestExt - Extension of the target/dest!
8 :: plugins - optional parameter used to generate plugins into the /plugins folder
9 ::
10 :: The destination file is determined by the PCSX2_TARGET_DIR environment var.
11
12 SETLOCAL ENABLEEXTENSIONS
13 if defined PCSX2_TARGET_COPY CALL :TestAndCopy "%PCSX2_TARGET_COPY%" %1 %2 %3 %4
14 ENDLOCAL
15 exit 0
16
17
18 :TestAndCopy
19 :: Subroutine. First parameter is our Target Dir. Since it's a parameter into
20 :: the subroutine, we can use tilda expansion to handle quotes correctly. :)
21
22 if NOT EXIST "%~1" (
23 md "%~1"
24 )
25
26 :: Error checking. Try to change to the dir. If it fails, it means the dir is
27 :: actually a file, and we should cancel the script.
28
29 set mycwd="%CD%"
30 cd "%~1"
31 if %ERRORLEVEL% NEQ 0 goto :eof
32 cd %mycwd%
33
34 set pcsxoutdir=%~1\%~5
35 set pcsxoutname=%pcsxoutdir%\%~3%4
36
37 IF NOT EXIST "%pcsxoutdir%" (
38 md "%pcsxoutdir%"
39 )
40
41 copy /Y "%~2" "%pcsxoutname%"
42 if %ERRORLEVEL% EQU 0 (
43 echo Target copied to %pcsxoutname%
44 )
45
46 goto :eof
47
48 :quit

  ViewVC Help
Powered by ViewVC 1.1.22