Changeset 28712 for main/trunk/release-kits
- Timestamp:
- 2013-11-28T16:24:42+13:00 (10 years ago)
- Location:
- main/trunk/release-kits/shared/linux
- Files:
-
- 57 added
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/release-kits/shared/linux/wrapper.cpp
r23282 r28712 37 37 38 38 string scratch = (getenv("TMPDIR") == NULL) ? "/tmp" : getenv("TMPDIR"); 39 string tempdir = scratch + "/ greenstone-installer.tmp"; //temporary directory where we will store extracted files39 string tempdir = scratch + "/@projectname@-installer.tmp"; //temporary directory where we will store extracted files 40 40 bool succeeded = false; 41 41 bool text_mode = false; … … 51 51 usage( argv[0], 0 ); 52 52 } else if ( a.compare("-textonly") == 0 || a.compare("-text") == 0 || a.compare("text") == 0 ) { 53 //cerr << "-text is deprecated, please use -extract and then run \"java -jar greenstone.jar text\"" << endl;53 //cerr << "-text is deprecated, please use -extract and then run \"java -jar @projectname@.jar text\"" << endl; 54 54 text_mode = true; 55 55 #ifndef CDROM … … 58 58 cout << "Extracting java installer..." << endl; 59 59 cout << "----------------------------" << endl; 60 bool result = extract_bundled_file( greenstonejar, sizeof(greenstonejar), "greenstone.jar", false);60 bool result = extract_bundled_file( @projectname@jar, sizeof(@projectname@jar), "@projectname@.jar", false); 61 61 if(result){ 62 62 cout << "\nExtraction Complete" << endl; 63 cout << "You can now run \"java -jar greenstone.jar text\" to run the installer from the command line\n" << endl;63 cout << "You can now run \"java -jar @projectname@.jar text\" to run the installer from the command line\n" << endl; 64 64 return 0; 65 65 } … … 114 114 #ifndef CDROM 115 115 116 string jarfile = tempdir + "/ greenstone.jar"; //where we will store the jar file116 string jarfile = tempdir + "/@projectname@.jar"; //where we will store the jar file 117 117 string javafile = tempdir + "/@java.installer@"; //where we will store the java tar file 118 118 … … 120 120 //extract files 121 121 cout << "Extracting installer jar..." << endl; 122 succeeded = extract_bundled_file( greenstonejar, sizeof(greenstonejar), (char*)jarfile.c_str(), false);122 succeeded = extract_bundled_file( @projectname@jar, sizeof(@projectname@jar), (char*)jarfile.c_str(), false); 123 123 124 124 #ifdef java_is_bundled 125 cout << "Preparing Greenstoneinstaller..." << endl;125 cout << "Preparing @projectname@ installer..." << endl; 126 126 succeeded = extract_bundled_file( java, sizeof(java), (char*)javafile.c_str(), true ) && succeeded; 127 127 #endif … … 164 164 165 165 //did not find a good java 166 cout << " Greenstonerequires java @java.min.version@ or greater." << endl;166 cout << "@projectname@ requires java @java.min.version@ or greater." << endl; 167 167 168 168 //tell them if java is absent or just too old … … 184 184 cout << "Launching Installer ..." << endl; 185 185 int launch_exit_code = 0; 186 launch_exit_code = system( (foundJvm.getExecutable() + " -Xmx200M -jar greenstone.jar" + (text_mode?" text":"") ).c_str() );186 launch_exit_code = system( (foundJvm.getExecutable() + " -Xmx200M -jar @projectname@.jar" + (text_mode?" text":"") ).c_str() ); 187 187 188 188 //report how it went … … 191 191 } else { 192 192 cout << "The installer exited with an error" << endl; 193 cout << " Greenstonemay not be correctly installed" << endl;193 cout << "@projectname@ may not be correctly installed" << endl; 194 194 } 195 195
Note:
See TracChangeset
for help on using the changeset viewer.