Hi,
I’d like to change the compile path: in project.xml I can specify the path XXX in the tag “app”, but when targeting HTML5 I’d like to change the resulting path from
The html5/ part is the way the tools separate the different targets,
and the bin/ part is there to separate the temporary files of the compilation and files like instanced template from the resulting application.
Compiling more than one project I’d like to have the compiled folders (named like the corresponding application) in a single folder that can be simply copied from my HDD to the server without copying and renaming the single bin subfolders everytime I do a batch compile.
I think the thing to do is run a post-build script that copies the relevant directories into a different folder.
So you’ll have an “Export” folder where everything gets built, with lots of extraneous folders and files. Then you’ll have an “Upload” folder, which only has the files you intend to upload. (This makes it less likely that you’ll upload those extraneous files.)
Is there a way to replace -TARGET- with the current compile target, “flash” or “html5”?
Also, is there a way to delete/empty the target folder before copying the new compiled one?
I tried to do a deltree before the copy operation, but it didn’t do anything.
Maybe I should try to move the script operations to a batch file, maybe it can execute more operations.
Maybe the folder is open? No, it would give you a different message.
Try opening Command Prompt for yourself and running rmdir. Do you get the same error that way?
Can you cd into that directory? How about the directory above it? If you cd into the directory above it, can you remove it from there?
Failing that, it’s time to make a batch file and put all your commands in there. You’ll need to pass $(TargetBuild) and $(ProjectName) as parameters, but it should be more reliable overall.
Nothing, I will try the batch way.
I tried it yesterday, but I abandoned it because, if I am not wrong, it couldn’t execute the batch file, but I will retry.
But how can I use $(OutputDir), $(TargetBuild) and $(ProjectName) without specifying tem?
EDIT: “$(ProjectDir)\postbuild.bat” “$(OutputDir)” “$(TargetBuild)” “$(ProjectName)” works, but only if target folder “flash” already exists!
So I edited the batch to do this
IF NOT EXIST "..\_compiled\%2\NUL" MD "..\_compiled\%2\%3"
xcopy /c /y /s "%1\bin\%2\bin" "..\_compiled\%2\%3"
If the folder %2/%3 already exists then it gives me the warning, but it continues compiling and copying.
I tried to delete the %3 before copying the compiled project, but no command works…