Changeset 17435 for release-kits


Ignore:
Timestamp:
2008-10-01T16:46:57+13:00 (16 years ago)
Author:
oranfry
Message:

got the uninstaller working

Location:
release-kits/shared/uninstaller
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • release-kits/shared/uninstaller/Uninstall.bat

    r17433 r17435  
    1414    rm uninst.flag
    1515    rm Uninstall.bat
     16   
     17    if NOT EXIST *.* (
     18        set GSDEL=%CD%
     19        cd ..
     20        rmdir %GSDEL%
     21    )
     22   
    1623)
  • release-kits/shared/uninstaller/Uninstaller.java

    r17434 r17435  
    2020import java.util.regex.Pattern;
    2121import java.util.regex.Matcher;
     22import java.util.ArrayList;
    2223
    2324public class Uninstaller {
     
    255256        //delete the files
    256257        try {
    257             ArrayList<File> exceptions = new ArrayList<File>();
     258            ArrayList exceptions = new ArrayList();
    258259
    259260            //never delete the things we are currently running
    260             exceptions.add( "bin/search4j.exe" );
    261             exceptions.add( "packages/jre" );
    262             exceptions.add( "uninst.jar" );
    263             exceptions.add( "Uninstall.bat" );
    264             exceptions.add( "Uninstall.sh" );
     261            exceptions.add( new File("bin/search4j.exe") );
     262            exceptions.add( new File("packages/jre") );
     263            exceptions.add( new File("uninst.jar") );
     264            exceptions.add( new File("Uninstall.bat") );
     265            exceptions.add( new File("Uninstall.sh") );
    265266
    266267            if ( keepCollections ) {
     
    277278                System.exit(0);
    278279            }
    279             recursiveDelete( cd , exceptions.toArray() );
     280           
     281            File[] ex = new File[exceptions.size()];
     282            for ( int i=0; i<exceptions.size(); i++ ) {
     283                ex[i] = (File)exceptions.get(i);
     284            }
     285           
     286            recursiveDelete( cd , ex );
    280287        } catch ( CancelledException ce ) {
    281288            log.append( bundle.getString("cancelled") + "\n" );
Note: See TracChangeset for help on using the changeset viewer.