Changeset 19848 for release-kits
- Timestamp:
- 2009-06-15T17:00:45+12:00 (15 years ago)
- Location:
- release-kits/shared/windows
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
release-kits/shared/windows/ant-scripts/windows-targets.xml
r19326 r19848 8 8 </copy> 9 9 </target> 10 11 <target name="get-copy-of-wrapper-source"> 12 <copy todir="${todir}" overwrite="true"> 13 <fileset dir="${wirk2.home}/windows/wrapper"/> 14 <fileset dir="${wirk2.home}/greenstone2/wrapper" includes="*.bmp"/> 15 <fileset dir="${wirk2.home}/greenstone2/icon" includes="icon.ico"/> 16 <fileset dir="${wirk2.home}/core/search4j" includes="libsearch4j.cpp,libsearch4j.h"/> 17 </copy> 18 </target> 19 10 20 </project> -
release-kits/shared/windows/wirk.cpp
r19846 r19848 84 84 //create the command 85 85 stringstream command; 86 command << "c md.exe /c " << WIRK_HOME << "\\core\\ant\\bin\\ant.bat -f \"" << WIRK_HOME << "\\ant-scripts\\build.xml\" -addressing \"-Dwirk" << XXX << ".home=" << WIRK_HOME << "\"";86 command << "c:\\windows\\cmd.exe /c " << WIRK_HOME << "\\core\\ant\\bin\\ant.bat -f \"" << WIRK_HOME << "\\ant-scripts\\build.xml\" -addressing \"-Dwirk" << XXX << ".home=" << WIRK_HOME << "\""; 87 87 88 88 //pass on the arguments -
release-kits/shared/windows/wrapper/wrapper.cpp
r19594 r19848 11 11 using namespace std; 12 12 13 #if def WEB13 #ifndef CDROM 14 14 #include "libsearch4j.h" 15 15 #endif … … 294 294 295 295 //get the original working directory 296 char* owd = _getcwd(NULL, 1024); 297 296 char* owdChar = _getcwd(NULL, 1024); 297 string owd = ""; 298 owd.append( owdChar ); 299 delete owdChar; 300 301 //strip trailing slash 302 if ( owd.substr(owd.length()-1,1).compare( "\\" ) == 0 ) { 303 owd = owd.substr(0, owd.length()-1); 304 } 305 298 306 //using the users TMP directory for temp files rather than the current directory so 299 307 //installation from cdrom works … … 305 313 string title = "Failed to create the temp folder."; 306 314 string message = "Failed to create the temp folder.\nPlease set the environment variable TMP to a folder you have permission to write to."; 307 ShowWindow(splashWnd, SW_HIDE); //hide splash screen308 MessageBox( NULL, message.c_str(), title.c_str(), MB_OK);315 //ShowWindow(splashWnd, SW_HIDE); //hide splash screen 316 MessageBox(splashWnd, message.c_str(), title.c_str(), MB_OK); 309 317 return -1; 310 318 } … … 313 321 delete tmp; // deallocate memory 314 322 315 #ifdef WEB 323 #ifdef CDROM 324 325 //ask if they want to install, then do it if so 326 int choice = MessageBox(splashWnd, "Install Greenstone?", "Greenstone", MB_OKCANCEL | MB_ICONQUESTION ); 327 if ( choice == IDOK ) { 328 329 //prepare to launch the jar 330 set_splash_step( "LAUNCHING" ); 331 spoof_progress( SPOOF_TIME ); 332 333 string cmd = "\""; 334 cmd.append( owd ); 335 cmd.append( "\\Java\\Windows\\jre\\bin\\java.exe\" \"-Dorig.dir=" ); 336 cmd.append( owd ); 337 cmd.append( "\" -jar \"" ); 338 cmd.append( owd ); 339 cmd.append( "\\Java\\Jars\\windows.jar\"" ); 340 char cmdLpstr[1024]; 341 strcpy( cmdLpstr, cmd.c_str() ); 342 343 344 STARTUPINFO si; 345 PROCESS_INFORMATION pi; 346 memset(&pi, 0, sizeof(pi)); 347 memset(&si, 0, sizeof(si)); 348 si.cb = sizeof(si); 349 DWORD dwExitCode = -1; 350 351 //hide splash screen 352 ShowWindow(splashWnd, SW_HIDE); 353 354 //launch the jar 355 bool result; 356 result = CreateProcess(NULL, cmdLpstr, NULL, NULL, TRUE, CREATE_NO_WINDOW, NULL, NULL, &si, &pi); 357 358 WaitForSingleObject(pi.hProcess, INFINITE); 359 GetExitCodeProcess(pi.hProcess, &dwExitCode); 360 CloseHandle(pi.hThread); 361 CloseHandle(pi.hProcess); 362 363 } 364 #else 365 316 366 //rip out java archive if it is bundled 317 367 set_splash_step( "XJAVA" ); … … 348 398 349 399 string title = "Installation Failed: Couldn't find java"; 350 ShowWindow(splashWnd, SW_HIDE); //hide splash screen351 MessageBox( NULL, message.c_str(), title.c_str(), MB_OK);400 //ShowWindow(splashWnd, SW_HIDE); //hide splash screen 401 MessageBox(splashWnd, message.c_str(), title.c_str(), MB_OK); 352 402 353 403 //if java was found, carry on … … 380 430 string title = "Installation Error"; 381 431 string message = "The installation exited with an error. Java may not be installed properly, or the installation may have been interrupted partway through. Please try again."; 382 ShowWindow(splashWnd, SW_HIDE); //hide splash screen432 //ShowWindow(splashWnd, SW_HIDE); //hide splash screen 383 433 MessageBox(NULL, message.c_str(), title.c_str(), MB_OK); 384 434 } 385 435 } 386 387 436 #endif 388 389 #ifdef CDROM390 391 //ask if they want to install, then do it if so392 int choice = MessageBox(NULL, "Install Greenstone?", "Greenstone", MB_OKCANCEL | MB_ICONQUESTION );393 if ( choice == IDOK ) {394 395 //launch the jar396 set_splash_step( "LAUNCHING" );397 spoof_progress( SPOOF_TIME );398 string cmd = "\"";399 cmd.append( owd );400 cmd.append( "\\Java\\Windows\\jre\\bin\\java.exe\" \"-Dorig.dir=" );401 cmd.append( owd );402 cmd.append( "\" -jar greenstone.jar" );403 404 //hide splash screen405 ShowWindow(splashWnd, SW_HIDE);406 407 //run the jar408 int launch_exit_code = process( cmd, false );409 }410 411 #endif412 437 413 438 //clean up the temp directory 439 _unlink( "ant.install.log" ); 440 #ifndef CDROM 414 441 _unlink( "greenstone.jar" ); 415 _unlink( "ant.install.log" );416 442 _unlink( "@java.installer@" ); 417 443 process( "cmd.exe /c rd /s /q @java.extracted@", false ); 444 #endif 445 418 446 SetCurrentDirectory( ".." ); 419 447 _rmdir( tempdir.c_str() ); 420 421 delete owd;422 448 423 449 return 0;
Note:
See TracChangeset
for help on using the changeset viewer.