Changeset 2932
- Timestamp:
- 10/22/08 10:40:56 (17 months ago)
- Location:
- pcbsd
- Files:
-
- 2 removed
- 4 modified
-
branches/7.0/PBIdelete/PBIdelete.pro (modified) (1 diff)
-
branches/7.0/PBIdelete/PBIdelete.ui (deleted)
-
branches/7.0/PBIdelete/main.cpp (modified) (8 diffs)
-
trunk/PBIdelete/PBIdelete.pro (modified) (1 diff)
-
trunk/PBIdelete/PBIdelete.ui (deleted)
-
trunk/PBIdelete/main.cpp (modified) (8 diffs)
Legend:
- Unmodified
- Added
- Removed
-
pcbsd/branches/7.0/PBIdelete/PBIdelete.pro
r2800 r2932 8 8 SOURCES += main.cpp 9 9 10 FORMS = PBIdelete.ui10 //FORMS = PBIdelete.ui 11 11 12 12 -
pcbsd/branches/7.0/PBIdelete/main.cpp
r2261 r2932 1 #include <iostream .h>1 #include <iostream> 2 2 #include <qvariant.h> 3 3 #include <qapplication.h> … … 7 7 #include <qobject.h> 8 8 #include <qtextstream.h> 9 using namespace std; 9 10 10 11 QString ProgName[5000]; … … 261 262 { 262 263 QString ProgDirName = RemovePBI; 264 QString command; 263 265 264 266 QString Binary; … … 266 268 int i = 0; 267 269 268 cout << "Removing Directory \n";270 cout << "Removing Directory: /Programs/" << ProgDirName.toStdString() << "\n"; 269 271 270 272 … … 273 275 { 274 276 // Remove the hidden file 275 RemoveFile = new Q3Process(); 276 RemoveFile->addArgument( "rm" ); 277 RemoveFile->addArgument( "/usr/local/share/applnk/.hidden/" + MimeFile[RemNum][i] + ".desktop" ); 277 command = "rm '/usr/local/share/applnk/.hidden/" + MimeFile[RemNum][i] + ".desktop' >/dev/null 2>/dev/null"; 278 getLineFromCommandOutput(command); 278 279 279 if ( !RemoveFile->start() ) {280 281 }282 283 280 // Remove the application file 284 RemoveFile = new Q3Process(); 285 RemoveFile->addArgument( "rm" ); 286 RemoveFile->addArgument( "/usr/local/share/mimelnk/application/" + MimeFile[RemNum][i] + ".desktop" ); 287 288 if ( !RemoveFile->start() ) { 289 290 } 281 command = "rm '/usr/local/share/mimelnk/application/" + MimeFile[RemNum][i] + ".desktop' >/dev/null 2>/dev/null"; 282 getLineFromCommandOutput(command); 291 283 292 284 i++; … … 313 305 314 306 // Remove the script 315 RemoveFile = new Q3Process(); 316 RemoveFile->addArgument( "rm" ); 317 RemoveFile->addArgument( "/Programs/.sbin/" + Binary ); 307 command = "rm '/Programs/.sbin/" + Binary + "' >/dev/null 2>/dev/null"; 308 getLineFromCommandOutput(command); 318 309 319 if ( !RemoveFile->start() ) {320 321 }322 323 310 324 311 // Remove the Desktop item 325 RemoveFile = new Q3Process(); 326 RemoveFile->addArgument( "/Programs/.bin/RemoveDesktopLink.sh" ); 327 RemoveFile->addArgument( Binary + ".desktop" ); 328 RemoveFile->addArgument( ProgName[RemNum] ); 329 if ( !RemoveFile->start() ) { 330 331 } 312 command = "/Programs/.bin/RemoveDesktopLink.sh '" + Binary + ".desktop' '" + ProgName[RemNum] + "' >/dev/null 2>/dev/null" ; 313 getLineFromCommandOutput(command); 332 314 333 315 … … 336 318 } 337 319 338 339 340 320 // Remove the old start menu items 321 command = "rm -rf '/usr/local/share/applnk/My Programs/" + ProgName[RemNum] + "' >/dev/null 2>/dev/null"; 322 getLineFromCommandOutput(command); 323 341 324 // Remove the start menu item 342 RemoveFile = new Q3Process(); 343 RemoveFile->addArgument( "rm" ); 344 RemoveFile->addArgument( "-r" ); 345 RemoveFile->addArgument( "/usr/local/share/applnk/My Programs/" + ProgName[RemNum] ); 346 325 command = "rm -rf '/usr/local/share/applnk/" + ProgName[RemNum] + "' >/dev/null 2>/dev/null"; 326 getLineFromCommandOutput(command); 347 327 348 328 349 if ( !RemoveFile->start() ) {350 351 }352 353 354 // Remove the start menu item355 RemoveFile = new Q3Process();356 RemoveFile->addArgument( "rm" );357 RemoveFile->addArgument( "-r" );358 RemoveFile->addArgument( "/usr/local/share/applnk/" + ProgName[RemNum] );359 360 361 362 if ( !RemoveFile->start() ) {363 364 }365 366 367 329 // Remove the program folder 368 RemoveFile = new Q3Process(); 369 RemoveFile->addArgument( "rm" ); 370 RemoveFile->addArgument( "-r" ); 371 RemoveFile->addArgument( "/Programs/" + ProgDirName ); 372 373 374 if ( !RemoveFile->start() ) { 375 376 } 330 command = "rm -r '/Programs/" + ProgDirName + "' >/dev/null 2>/dev/null"; 331 getLineFromCommandOutput(command); 332 377 333 } 378 334 … … 382 338 { 383 339 384 cout << "PBIdelete Version 1. 0\n--------\n" << " PBIdelete -remove <pbi> \t- Removes a PBI file\n PBIdelete -list \t\t- Lists all PBI's installed\n\n";340 cout << "PBIdelete Version 1.1\n--------\n" << " PBIdelete -remove <pbi> \t- Removes a PBI file\n PBIdelete -list \t\t- Lists all PBI's installed\n\n"; 385 341 386 342 } -
pcbsd/trunk/PBIdelete/PBIdelete.pro
r2798 r2932 8 8 SOURCES += main.cpp 9 9 10 FORMS = PBIdelete.ui10 //FORMS = PBIdelete.ui 11 11 12 12 -
pcbsd/trunk/PBIdelete/main.cpp
r2261 r2932 1 #include <iostream .h>1 #include <iostream> 2 2 #include <qvariant.h> 3 3 #include <qapplication.h> … … 7 7 #include <qobject.h> 8 8 #include <qtextstream.h> 9 using namespace std; 9 10 10 11 QString ProgName[5000]; … … 261 262 { 262 263 QString ProgDirName = RemovePBI; 264 QString command; 263 265 264 266 QString Binary; … … 266 268 int i = 0; 267 269 268 cout << "Removing Directory \n";270 cout << "Removing Directory: /Programs/" << ProgDirName.toStdString() << "\n"; 269 271 270 272 … … 273 275 { 274 276 // Remove the hidden file 275 RemoveFile = new Q3Process(); 276 RemoveFile->addArgument( "rm" ); 277 RemoveFile->addArgument( "/usr/local/share/applnk/.hidden/" + MimeFile[RemNum][i] + ".desktop" ); 277 command = "rm '/usr/local/share/applnk/.hidden/" + MimeFile[RemNum][i] + ".desktop' >/dev/null 2>/dev/null"; 278 getLineFromCommandOutput(command); 278 279 279 if ( !RemoveFile->start() ) {280 281 }282 283 280 // Remove the application file 284 RemoveFile = new Q3Process(); 285 RemoveFile->addArgument( "rm" ); 286 RemoveFile->addArgument( "/usr/local/share/mimelnk/application/" + MimeFile[RemNum][i] + ".desktop" ); 287 288 if ( !RemoveFile->start() ) { 289 290 } 281 command = "rm '/usr/local/share/mimelnk/application/" + MimeFile[RemNum][i] + ".desktop' >/dev/null 2>/dev/null"; 282 getLineFromCommandOutput(command); 291 283 292 284 i++; … … 313 305 314 306 // Remove the script 315 RemoveFile = new Q3Process(); 316 RemoveFile->addArgument( "rm" ); 317 RemoveFile->addArgument( "/Programs/.sbin/" + Binary ); 307 command = "rm '/Programs/.sbin/" + Binary + "' >/dev/null 2>/dev/null"; 308 getLineFromCommandOutput(command); 318 309 319 if ( !RemoveFile->start() ) {320 321 }322 323 310 324 311 // Remove the Desktop item 325 RemoveFile = new Q3Process(); 326 RemoveFile->addArgument( "/Programs/.bin/RemoveDesktopLink.sh" ); 327 RemoveFile->addArgument( Binary + ".desktop" ); 328 RemoveFile->addArgument( ProgName[RemNum] ); 329 if ( !RemoveFile->start() ) { 330 331 } 312 command = "/Programs/.bin/RemoveDesktopLink.sh '" + Binary + ".desktop' '" + ProgName[RemNum] + "' >/dev/null 2>/dev/null" ; 313 getLineFromCommandOutput(command); 332 314 333 315 … … 336 318 } 337 319 338 339 340 320 // Remove the old start menu items 321 command = "rm -rf '/usr/local/share/applnk/My Programs/" + ProgName[RemNum] + "' >/dev/null 2>/dev/null"; 322 getLineFromCommandOutput(command); 323 341 324 // Remove the start menu item 342 RemoveFile = new Q3Process(); 343 RemoveFile->addArgument( "rm" ); 344 RemoveFile->addArgument( "-r" ); 345 RemoveFile->addArgument( "/usr/local/share/applnk/My Programs/" + ProgName[RemNum] ); 346 325 command = "rm -rf '/usr/local/share/applnk/" + ProgName[RemNum] + "' >/dev/null 2>/dev/null"; 326 getLineFromCommandOutput(command); 347 327 348 328 349 if ( !RemoveFile->start() ) {350 351 }352 353 354 // Remove the start menu item355 RemoveFile = new Q3Process();356 RemoveFile->addArgument( "rm" );357 RemoveFile->addArgument( "-r" );358 RemoveFile->addArgument( "/usr/local/share/applnk/" + ProgName[RemNum] );359 360 361 362 if ( !RemoveFile->start() ) {363 364 }365 366 367 329 // Remove the program folder 368 RemoveFile = new Q3Process(); 369 RemoveFile->addArgument( "rm" ); 370 RemoveFile->addArgument( "-r" ); 371 RemoveFile->addArgument( "/Programs/" + ProgDirName ); 372 373 374 if ( !RemoveFile->start() ) { 375 376 } 330 command = "rm -r '/Programs/" + ProgDirName + "' >/dev/null 2>/dev/null"; 331 getLineFromCommandOutput(command); 332 377 333 } 378 334 … … 382 338 { 383 339 384 cout << "PBIdelete Version 1. 0\n--------\n" << " PBIdelete -remove <pbi> \t- Removes a PBI file\n PBIdelete -list \t\t- Lists all PBI's installed\n\n";340 cout << "PBIdelete Version 1.1\n--------\n" << " PBIdelete -remove <pbi> \t- Removes a PBI file\n PBIdelete -list \t\t- Lists all PBI's installed\n\n"; 385 341 386 342 }
