Changeset 19452 for release-kits
- Timestamp:
- 2009-05-13T16:41:41+12:00 (15 years ago)
- File:
-
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
release-kits/shared/windows/wirk.cpp
r19446 r19452 20 20 void show_help() { 21 21 22 cout << "Wirk 2 - Windows Release Kit for Greenstone2" << endl;22 cout << "WirkXXX - Windows Release Kit for GreenstoneXXX" << endl; 23 23 cout << "Helps you to create releases from the Repository" << endl << endl; 24 24 25 cout << "usage: wirk 2[args]" << endl;25 cout << "usage: wirkXXX [args]" << endl; 26 26 cout << " -sim" << endl; 27 27 cout << " simulation only, don't actually do anything" << endl << endl; … … 40 40 41 41 cout << " -cp" << endl; 42 cout << " show the classpath being used by wirk 2" << endl << endl;42 cout << " show the classpath being used by wirkXXX" << endl << endl; 43 43 44 44 } … … 52 52 bool ok = true; 53 53 if ( getenv( "JAVA_HOME" ) == NULL ) { 54 cerr << "Please set JAVA_HOME before running wirk 2" << endl;54 cerr << "Please set JAVA_HOME before running wirkXXX" << endl; 55 55 ok = false; 56 56 } 57 if ( getenv( "WIRK 2_HOME" ) == NULL ) {58 cerr << "Please set WIRK 2_HOME before running wirk2" << endl;57 if ( getenv( "WIRKXXX_HOME" ) == NULL ) { 58 cerr << "Please set WIRKXXX_HOME before running wirkXXX" << endl; 59 59 ok = false; 60 60 } … … 62 62 return -1; 63 63 } 64 //string PWD = getenv( "CD" );65 64 66 65 //load environment variables 67 66 string JAVA_HOME = getenv( "JAVA_HOME" ); 68 string WIRK 2_HOME = getenv( "WIRK2_HOME" );69 putenv( ("ANT_HOME=" + WIRK 2_HOME + "\\core\\ant").c_str() );67 string WIRKXXX_HOME = getenv( "WIRKXXX_HOME" ); 68 putenv( ("ANT_HOME=" + WIRKXXX_HOME + "\\core\\ant").c_str() ); 70 69 71 70 //get the pwd … … 77 76 system( "del cd.dat" ); 78 77 79 //set the classpath 80 //classpath = pwd + "\\installer\\classes;" + JAVA_HOME + "\\core\\lib\\tools.jar;" + WIRK2_HOME + "\\core\\lib\\serializer.jar;" + WIRK2_HOME + "\\core\\lib\\xalan.jar;" + WIRK2_HOME + "\\core\\lib\\xercesImpl.jar;" + WIRK2_HOME + "\\core\\lib\\xml-apis.jar;" + WIRK2_HOME + "\\core\\ant\\lib\\ant-antlr.jar;" + WIRK2_HOME + "\\core\\ant\\lib\\ant-apache-bcel.jar;" + WIRK2_HOME + "\\core\\ant\\lib\\ant-apache-bsf.jar;" + WIRK2_HOME + "\\core\\ant\\lib\\ant-apache-log4j.jar;" + WIRK2_HOME + "\\core\\ant\\lib\\ant-apache-oro.jar;" + WIRK2_HOME + "\\core\\ant\\lib\\ant-apache-regexp.jar;" + WIRK2_HOME + "\\core\\ant\\lib\\ant-apache-resolver.jar;" + WIRK2_HOME + "\\core\\ant\\lib\\ant-commons-logging.jar;" + WIRK2_HOME + "\\core\\ant\\lib\\ant-commons-net.jar;" + WIRK2_HOME + "\\core\\ant\\lib\\ant-icontract.jar;" + WIRK2_HOME + "\\core\\ant\\lib\\ant-jai.jar;" + WIRK2_HOME + "\\core\\ant\\lib\\ant.jar;" + WIRK2_HOME + "\\core\\ant\\lib\\ant-javamail.jar;" + WIRK2_HOME + "\\core\\ant\\lib\\ant-jdepend.jar;" + WIRK2_HOME + "\\core\\ant\\lib\\ant-jmf.jar;" + WIRK2_HOME + "\\core\\ant\\lib\\ant-jsch.jar;" + WIRK2_HOME + "\\core\\ant\\lib\\ant-junit.jar;" + WIRK2_HOME + "\\core\\ant\\lib\\ant-launcher.jar;" + WIRK2_HOME + "\\core\\ant\\lib\\ant-netrexx.jar;" + WIRK2_HOME + "\\core\\ant\\lib\\ant-nodeps.jar;" + WIRK2_HOME + "\\core\\ant\\lib\\ant-starteam.jar;" + WIRK2_HOME + "\\core\\ant\\lib\\ant-stylebook.jar;" + WIRK2_HOME + "\\core\\ant\\lib\\ant-swing.jar;" + WIRK2_HOME + "\\core\\ant\\lib\\ant-trax.jar;" + WIRK2_HOME + "\\core\\ant\\lib\\ant-vaj.jar;" + WIRK2_HOME + "\\core\\ant\\lib\\ant-weblogic.jar;" + WIRK2_HOME + "\\core\\ant\\lib\\ant-xalan1.jar;" + WIRK2_HOME + "\\core\\ant\\lib\\ant-xslp.jar;" + WIRK2_HOME + "\\core\\ant\\lib\\xercesImpl.jar;" + WIRK2_HOME + "\\core\\ant\\lib\\xml-apis.jar;" + WIRK2_HOME + "\\core\\ant-installer\\lib\\ai-icons-amaranth.jar;" + WIRK2_HOME + "\\core\\ant-installer\\lib\\ai-icons-bluecurve.jar;" + WIRK2_HOME + "\\core\\ant-installer\\lib\\ai-icons-crystalsvg.jar;" + WIRK2_HOME + "\\core\\ant-installer\\lib\\ai-icons-eclipse.jar;" + WIRK2_HOME + "\\core\\ant-installer\\lib\\ai-icons-krystaline.jar;" + WIRK2_HOME + "\\core\\ant-installer\\lib\\ant-installer-ext.jar;" + WIRK2_HOME + "\\core\\ant-installer\\lib\\ant-installer.jar;" + WIRK2_HOME + "\\core\\ant-installer\\lib\\jgoodies-edited-1_2_2.jar;" + WIRK2_HOME + "\\core\\ant-installer\\lib\\xercesImpl.jar;" + WIRK2_HOME + "\\core\\ant-installer\\lib\\xml-apis.jar;" + WIRK2_HOME + "\\core\\ant-installer\\classes"; 81 //putenv( ("CLASSPATH=" + classpath).c_str() ); 78 //create the command 79 command = WIRKXXX_HOME + "\\core\\ant\\bin\\ant.bat -f \"" + WIRKXXX_HOME + "\\ant-scripts\\build.xml\" -addressing \"-Dwirk3.home=" + WIRKXXX_HOME + "\""; 82 80 83 //check that it worked84 //string changed_classpath = getenv("CLASSPATH");85 //cout << "classpath: " << changed_classpath << endl;86 87 //create the command88 command = WIRK2_HOME + "\\core\\ant\\bin\\ant.bat -f " + WIRK2_HOME + "\\ant-scripts\\build.xml -addressing -Dwirk2.home=" + WIRK2_HOME;89 81 //pass on the arguments 90 82 string a; … … 92 84 for ( int i=0; i < argc; i++ ) { 93 85 a = argv[i]; 94 86 95 87 if ( a.compare("-help") == 0 || a.compare("--help") == 0 ) { 96 88 show_help(); … … 108 100 } 109 101 110 //use forward slashes for everything else111 //replace_all( pwd, "\\", "/" );112 113 102 //set the basedir in the command 114 command = command + " -Dbasedir="; 115 command = command + pwd; 116 117 118 119 //command = command + "."; 103 command = command + " \"-Dbasedir=" + pwd + "\""; 120 104 121 105 cout 122 106 << "O-----------------------------------------O" << endl 123 107 << "| |" << endl 124 << "| WiRK 2|" << endl125 << "| Windows Release Kit for Greenstone 2|" << endl108 << "| WiRKXXX |" << endl 109 << "| Windows Release Kit for GreenstoneXXX |" << endl 126 110 << "| |" << endl 127 111 << "O-----------------------------------------O" << endl
Note:
See TracChangeset
for help on using the changeset viewer.