Ignore:
Timestamp:
2009-05-01T14:57:14+12:00 (15 years ago)
Author:
ak19
Message:

The download panel should be available in client-gli if there's a gs2build folder inside the client-gli checkout. In such a case, the gsdl flag is set to the gs2build folder in client-gli.sh/bat scripts, and gli is launched with this. Still only partially complete: the download panel is available AND it no longer throws an exception when you try to download, but it doesn't download anything either at the moment.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • gli/trunk/src/org/greenstone/gatherer/Gatherer.java

    r19304 r19306  
    122122    static public boolean isGsdlRemote = false;
    123123
     124    /* TODO: If we're using local GLI, collections are built locally. If we're using client-GLI
     125     * and it contains a gs2build folder in it, then localBuild will also be true (if this is not
     126     * turned off in Preferences). If we're remote and this is turned off in Prefs, build remotely. */
     127    /*static public boolean buildingLocally = true;*/
     128    /** If we're using local GLI, we can always download. If we're using client-GLI, we can only
     129     * download if we have a gs2build folder inside it. And if we don't turn off downloadEnabling
     130     * in the preferences.
     131    */
     132    static public boolean isDownloadEnabled = true;
     133
    124134    // feedback stuff
    125135    /** is the feedback feature enabled? */
     
    171181
    172182        // We don't have a local Greenstone!
    173         go.gsdl_path = null;
    174183        go.gsdl3_path=null;
    175184        go.gsdl3_src_path=null;
    176185
     186        // Don't set go.gsdl_path to null, since gdsl_path may still be set
     187        // if we have a client-gli containing gs2build folder.
     188        // However, keep track of whether we can download.
     189        if(go.gsdl_path == null) {
     190        isDownloadEnabled = false;
     191        }
     192
    177193        // We have to use our own collect directory since we can't use the Greenstone one
    178194        setCollectDirectoryPath(getGLIUserDirectoryPath() + "collect" + File.separator);
    179195    }
    180     // No, we have a local Greenstone
    181     else {
     196    // We have a local Greenstone. OR we have a gs2build folder inside
     197    // the client-GLI folder (with which the Download panel becomes enabled)
     198    if(isDownloadEnabled) {
    182199        LocalGreenstone.setDirectoryPath(go.gsdl_path);
    183200    }
Note: See TracChangeset for help on using the changeset viewer.