Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files
[CB-1493] - finally got this stuff working on windows
  • Loading branch information
timkim committed Sep 19, 2012
1 parent adb1d9d commit 533a6c5eb382fcd81ff324927b458977cd123ebb
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 12 deletions.
@@ -1,3 +1,4 @@
@ECHO OFF
goto comment
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
@@ -17,7 +18,6 @@ goto comment
under the License.
:comment

@ECHO OFF
IF NOT DEFINED JAVA_HOME GOTO MISSING
FOR %%X in (ant.bat) do (
SET FOUND=%%~$PATH:X
@@ -44,8 +44,8 @@ function replaceInFile(filename, regexp, replacement) {
}
function downloadAntContrib(){
if (!fso.FileExists(ROOT + '\\bin\\templates\\project\\lib\\ant-contrib\\ant-contrib-1.0b3.jar')) {
// We need the .jar - url is pretty ugly, but unsure how to get around the re-direct on the download page other than using the direct download link
var url = 'http://downloads.sourceforge.net/project/ant-contrib/ant-contrib/1.0b3/ant-contrib-1.0b3-bin.zip?r=http%3A%2F%2Fsourceforge.net%2Fprojects%2Fant-contrib%2Ffiles%2Fant-contrib%2F1.0b3%2F&ts=1348092193&use_mirror=voxel';
// We need the .jar
var url = 'http://softlayer.dl.sourceforge.net/project/ant-contrib/ant-contrib/1.0b3/ant-contrib-1.0b3-bin.zip';
var libsPath = ROOT + '\\bin\\templates\\project\\lib';
var savePath = libsPath + '\\ant-contrib-1.0b3-bin.zip';
if (!fso.FileExists(savePath)) {
@@ -72,13 +72,11 @@ function downloadAntContrib(){
var source = app.NameSpace(savePath).Items();
var target = app.NameSpace(libsPath);
target.CopyHere(source, 256);

// Move the jar into libs
//fso.MoveFile(ROOT + '\\framework\\libs\\commons-codec-1.7\\commons-codec-1.7.jar', ROOT + '\\framework\\libs\\commons-codec-1.7.jar');


// Clean up
//fso.DeleteFile(ROOT + '\\framework\\libs\\commons-codec-1.7-bin.zip');
//fso.DeleteFolder(ROOT + '\\framework\\libs\\commons-codec-1.7', true);
fso.DeleteFile(libsPath + '\\ant-contrib-1.0b3-bin.zip');
fso.DeleteFolder(libsPath + '\\ant-contrib\\docs', true);
fso.DeleteFolder(libsPath + '\\ant-contrib\\lib', true);
}
}
function exec(s, output) {
@@ -128,7 +126,5 @@ if(fso.FolderExists(ROOT+'\\framework')){
// copy in the project template
exec('cmd /c xcopy '+ ROOT + '\\sample\\* '+PROJECT_PATH+' /I /S /Y');
}

replaceInFile(MANIFEST_PATH, /__NAME__/, APPNAME);

cleanup();
cleanup();

0 comments on commit 533a6c5

Please sign in to comment.