This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

View | Details | Raw Unified | Return to bug 32080
Collapse All | Expand All

(-)core/build.xml (+10 lines)
Lines 24-35 Link Here
24
            <include name="${nb.bin.dir}/ide.cfg"/>
24
            <include name="${nb.bin.dir}/ide.cfg"/>
25
            <include name="${nb.bin.dir}/ide.policy"/>
25
            <include name="${nb.bin.dir}/ide.policy"/>
26
            <include name="${nb.bin.dir}/macosx_launcher.dmg"/>
26
            <include name="${nb.bin.dir}/macosx_launcher.dmg"/>
27
            <include name="${nb.lib/ext.dir}/boot.jar"/>
28
            <include name="${nb.bin.dir}/security.policy"/>
29
            <!--
27
            <include name="${nb.bin.dir}/runide.exe"/>
30
            <include name="${nb.bin.dir}/runide.exe"/>
28
            <include name="${nb.bin.dir}/runide.sh"/>
31
            <include name="${nb.bin.dir}/runide.sh"/>
29
            <include name="${nb.bin.dir}/runide_exe_defaults"/>
32
            <include name="${nb.bin.dir}/runide_exe_defaults"/>
30
            <include name="${nb.bin.dir}/runideopenvms.com"/>
33
            <include name="${nb.bin.dir}/runideopenvms.com"/>
31
            <include name="${nb.bin.dir}/runideos2.cmd"/>
34
            <include name="${nb.bin.dir}/runideos2.cmd"/>
32
            <include name="${nb.bin.dir}/runidew.exe"/>
35
            <include name="${nb.bin.dir}/runidew.exe"/>
36
            -->
33
            <include name="${nb.system.dir}/ModuleAutoDeps/org-netbeans-core.xml"/>
37
            <include name="${nb.system.dir}/ModuleAutoDeps/org-netbeans-core.xml"/>
34
            <include name="CREDITS.html"/>
38
            <include name="CREDITS.html"/>
35
        </patternset>
39
        </patternset>
Lines 53-62 Link Here
53
    <target name="netbeans-extra" depends="release"/>
57
    <target name="netbeans-extra" depends="release"/>
54
58
55
    <target name="release" depends="init">
59
    <target name="release" depends="init">
60
        <copy file="release/bin/runide.sh" tofile="${netbeans.dest.dir}/${cluster.dir}/${nb.bin.dir}/nbexec" />
61
        <copy file="release/bin/ide.policy" tofile="${netbeans.dest.dir}/${cluster.dir}/${nb.bin.dir}/security.policy" />
62
        <copy file="release/lib/ide.ks" tofile="${netbeans.dest.dir}/${cluster.dir}/${nb.lib.dir}/keystore.ks" />
56
        <copy todir="${netbeans.dest.dir}/${cluster.dir}/${nb.bin.dir}" includeEmptyDirs="false">
63
        <copy todir="${netbeans.dest.dir}/${cluster.dir}/${nb.bin.dir}" includeEmptyDirs="false">
57
            <fileset dir="release/bin" excludesfile="../nbbuild/standard-jar-excludes.txt">
64
            <fileset dir="release/bin" excludesfile="../nbbuild/standard-jar-excludes.txt">
58
                <!-- These do not currently work anyway: -->
65
                <!-- These do not currently work anyway: -->
59
                <exclude name="unsupported/nbscript*"/>
66
                <exclude name="unsupported/nbscript*"/>
67
                <exclude name="**/runide.sh" />
68
                <exclude name="**/ide.policy" />
69
                <exclude name="**/ide.ks" />
60
            </fileset>
70
            </fileset>
61
        </copy>
71
        </copy>
62
        <copy todir="${netbeans.dest.dir}/${cluster.dir}/${nb.lib.dir}" includeEmptyDirs="false">
72
        <copy todir="${netbeans.dest.dir}/${cluster.dir}/${nb.lib.dir}" includeEmptyDirs="false">
(-)core/bootstrap/nbproject/project.properties (-1 / +1 lines)
Lines 9-13 Link Here
9
# Code is Sun Microsystems, Inc. Portions Copyright 1997-2004 Sun
9
# Code is Sun Microsystems, Inc. Portions Copyright 1997-2004 Sun
10
# Microsystems, Inc. All Rights Reserved.
10
# Microsystems, Inc. All Rights Reserved.
11
11
12
module.jar.dir=lib/ext
12
module.jar.dir=${nb.lib/ext.dir}
13
module.jar.basename=boot.jar
13
module.jar.basename=boot.jar
(-)core/bootstrap/src/org/netbeans/Main.java (-6 / +15 lines)
Lines 73-88 Link Here
73
    ) throws Exception {     
73
    ) throws Exception {     
74
        ArrayList list = new ArrayList ();
74
        ArrayList list = new ArrayList ();
75
75
76
        HashSet processedDirs = new HashSet ();
76
        String home = System.getProperty ("netbeans.home"); // NOI18N
77
        String home = System.getProperty ("netbeans.home"); // NOI18N
77
        if (home != null) {
78
        if (home != null) {
78
            build_cp (new File (home), list, false);
79
            build_cp (new File (home), list, false, processedDirs);
79
        }
80
        }
80
        // #34069: need to do the same for nbdirs.
81
        // #34069: need to do the same for nbdirs.
81
        String nbdirs = System.getProperty("netbeans.dirs"); // NOI18N
82
        String nbdirs = System.getProperty("netbeans.dirs"); // NOI18N
82
        if (nbdirs != null) {
83
        if (nbdirs != null) {
83
            StringTokenizer tok = new StringTokenizer(nbdirs, File.pathSeparator);
84
            StringTokenizer tok = new StringTokenizer(nbdirs, File.pathSeparator);
84
            while (tok.hasMoreTokens()) {
85
            while (tok.hasMoreTokens()) {
85
                build_cp(new File(tok.nextToken()), list, true);
86
                // passing false as last argument as we need to initialize openfile-cli.jar
87
                build_cp(new File(tok.nextToken()), list, false, processedDirs);
86
            }
88
            }
87
        }
89
        }
88
        
90
        
Lines 214-223 Link Here
214
    }
216
    }
215
        
217
        
216
    
218
    
217
    private static void build_cp(File base, Collection toAdd, boolean localeOnly) {
219
    private static void build_cp(File base, Collection toAdd, boolean localeOnly, Set processedDirs) 
220
    throws java.io.IOException {
221
        base = base.getCanonicalFile ();
222
        if (!processedDirs.add (base)) {
223
            // already processed
224
            return;
225
        }
226
        
218
        if (!localeOnly) {
227
        if (!localeOnly) {
219
            append_jars_to_cp (new File (base, "lib/patches"), toAdd);
228
            append_jars_to_cp (new File (base, "boot/patches"), toAdd);
220
            append_jars_to_cp (new File (base, "lib"), toAdd);
229
            append_jars_to_cp (new File (base, "boot"), toAdd);
221
        }
230
        }
222
        // XXX a minor optimization: exclude any unused locale JARs
231
        // XXX a minor optimization: exclude any unused locale JARs
223
        // For example, lib/locale/ might contain:
232
        // For example, lib/locale/ might contain:
Lines 231-236 Link Here
231
        // [etc.]
240
        // [etc.]
232
        // Only some of these will apply to the current session, based on the
241
        // Only some of these will apply to the current session, based on the
233
        // current values of Locale.default and NbBundle.branding.
242
        // current values of Locale.default and NbBundle.branding.
234
        append_jars_to_cp (new File (base, "lib/locale"), toAdd);
243
        append_jars_to_cp (new File (base, "boot/locale"), toAdd);
235
    }
244
    }
236
}
245
}
(-)core/release/bin/runide.sh (-28 / +73 lines)
Lines 15-22 Link Here
15
# Normally, editing this script should not be required.
15
# Normally, editing this script should not be required.
16
# -----------------------------------------------------
16
# -----------------------------------------------------
17
17
18
# use $JDK_HOME or $NB_JDK_HOME or the -jdkhome switch, do not edit this here
18
# use $JDK_HOME or the -jdkhome switch, do not edit this here
19
# (see below for info on .runide_defaults.sh)
20
jdkhome=""
19
jdkhome=""
21
20
22
# append on command line or ide.cfg, with -J prefix on each
21
# append on command line or ide.cfg, with -J prefix on each
Lines 47-67 Link Here
47
46
48
oldpwd=`pwd` ; cd "${idehome}"; idehome=`pwd`; cd "${oldpwd}"; unset oldpwd
47
oldpwd=`pwd` ; cd "${idehome}"; idehome=`pwd`; cd "${oldpwd}"; unset oldpwd
49
48
50
# calculate branding to brand userdir with
51
defaults="$idehome/bin/.runide_defaults.sh"
52
if [ -r "$idehome/lib/branding" ]; then
53
    branding=`cat "$idehome/lib/branding"`
54
    if [ -r "$idehome/bin/.runide_defaults_$branding.sh" ]; then
55
        defaults="$idehome/bin/.runide_defaults_$branding.sh"
56
    fi
57
fi
58
# This script should set the var userdir at the least:
59
# (another likely option would be $jdkhome, see #18628)
60
. "$defaults"
61
62
jargs=${jreflags}
49
jargs=${jreflags}
63
jargs="$jargs -Dnetbeans.home=\"$idehome\""
50
jargs="$jargs -Dnetbeans.home=\"$idehome\""
64
jargs="$jargs -Djava.security.policy=\"$idehome/bin/ide.policy\""
51
jargs="$jargs -Djava.security.policy=\"$idehome/launcher/security.policy\""
65
52
66
args=""
53
args=""
67
54
Lines 87-92 Link Here
87
    jdkhome="$JAVA_PATH"
74
    jdkhome="$JAVA_PATH"
88
fi
75
fi
89
76
77
if [ ! -z "$NB_PATH" ]; then
78
    nbpath="$NB_PATH"
79
else 
80
    nbpath="$progdir/../.."
81
fi
82
83
# default value for dirs argument, starts only platform
84
nbdirs=platform*
85
90
#
86
#
91
# parse arguments
87
# parse arguments
92
#
88
#
Lines 130-136 Link Here
130
                prefixcp=$prefixcp$1;
126
                prefixcp=$prefixcp$1;
131
            fi
127
            fi
132
            ;;
128
            ;;
133
        
129
        --dirs)
130
            shift;
131
            if [ $# -gt 0 ] ; then
132
                nbdirs="$1"
133
            fi
134
            ;;
134
        -J*) jopt=`expr "X-$1" : 'X--J\(.*\)'`; jargs="$jargs \"$jopt\"";;
135
        -J*) jopt=`expr "X-$1" : 'X--J\(.*\)'`; jargs="$jargs \"$jopt\"";;
135
        *) args="$args \"$1\"" ;;
136
        *) args="$args \"$1\"" ;;
136
    esac
137
    esac
Lines 138-150 Link Here
138
done
139
done
139
} # parse_args()
140
} # parse_args()
140
141
141
# Process any ./ide.cfg or ~/ide.cfg.
142
# Process any system config
143
# Note that there is no quoting scheme for these files.
144
if [ -r "${NB_CONFIG_SYSTEM}" ]; then
145
    parse_args `cat "${NB_CONFIG_SYSTEM}"`
146
fi
147
148
# Process user config
142
# Note that there is no quoting scheme for these files.
149
# Note that there is no quoting scheme for these files.
143
if [ -r "${HOME}/ide.cfg" ]; then
150
if [ -r "${NB_CONFIG_USER}" ]; then
144
    parse_args `cat "${HOME}"/ide.cfg`
151
    parse_args `cat "${NB_CONFIG_USER}"`
145
elif [ -r "${progdir}/ide.cfg" ]; then
146
    parse_args `cat "${progdir}"/ide.cfg`
147
# else leave as is
148
fi
152
fi
149
153
150
if [ -f /usr/j2se/opt/javahelp/lib/jhall.jar ]; then
154
if [ -f /usr/j2se/opt/javahelp/lib/jhall.jar ]; then
Lines 156-161 Link Here
156
# Process arguments given on the command line.
160
# Process arguments given on the command line.
157
parse_args "$@"
161
parse_args "$@"
158
162
163
164
resolvedirs() {
165
    # iterate thru $2 == $nbdirs to find them
166
    SEP=""
167
    echo $nbdirs | tr ':' '\n' | while read CLUSTER; do
168
        # iterate thru $1 == $nbpath
169
        FOUND=`echo $nbpath | tr ':' '\n' | while read DIR; do
170
            if [ -d "$CLUSTER" ]; then
171
                echo $CLUSTER
172
            else 
173
                ls -d "$DIR"/$CLUSTER 2>/dev/null
174
            fi
175
        done | sort -u -r` 
176
177
        if [ -z "$FOUND" ]; then
178
            echo Cannot found directory \"$CLUSTER\" in search locations \"$nbpath\"
179
            exit 2
180
        fi
181
182
        echo -n "$SEP"
183
        echo -n "$FOUND"
184
        SEP=":"
185
    done
186
} # end of resolvedirs
187
188
dirsresult=`resolvedirs \"$nbpath\" \"$nbdirs\"`
189
exitcode=$?
190
if [ "0" != "$exitcode" ]; then
191
    echo $dirsresult
192
    exit 5
193
fi
194
195
jargs="$jargs -Dnetbeans.dirs=\"$dirsresult\""
196
197
159
#
198
#
160
# check JDK
199
# check JDK
161
#
200
#
Lines 177-186 Link Here
177
# check userdir
216
# check userdir
178
#
217
#
179
218
180
if [ ! -z "$userdir" ] ; then
219
if [ -z "$userdir" ]; then
181
    args="--userdir \"${userdir}\" $args"
220
    if [ -z "$NB_USER_DIR" ]; then
221
        echo Need to specify user dir using env variable NB_USER_DIR or command line option --userdir
222
        exit 7
223
    fi
224
    userdir="$NB_USER_DIR"
182
fi
225
fi
183
226
227
args="--userdir \"${userdir}\" $args"
228
184
#
229
#
185
# increase file descriptor's limit, on Solaris it's set to 64, too small for
230
# increase file descriptor's limit, on Solaris it's set to 64, too small for
186
# fastjavac
231
# fastjavac
Lines 202-209 Link Here
202
247
203
build_cp() {
248
build_cp() {
204
    base="$1"
249
    base="$1"
205
    append_jars_to_cp "${base}/lib/ext"
250
    append_jars_to_cp "${base}/launcher"
206
    append_jars_to_cp "${base}/lib/ext/locale"
251
    append_jars_to_cp "${base}/launcher/locale"
207
}
252
}
208
253
209
do_run_updater() {
254
do_run_updater() {
Lines 287-294 Link Here
287
    
332
    
288
    build_cp "${idehome}"
333
    build_cp "${idehome}"
289
    
334
    
290
    if [ -f "${idehome}/lib/updater.jar" ] ; then
335
    if [ -f "${idehome}/boot/updater.jar" ] ; then
291
        updatercp="${idehome}/lib/updater.jar"
336
        updatercp="${idehome}/boot/updater.jar"
292
    fi
337
    fi
293
338
294
    # JDK tools
339
    # JDK tools
(-)core/src/org/netbeans/core/Bundle.properties (-2 / +2 lines)
Lines 162-169 Link Here
162
NTF_ExceptionalException=\
162
NTF_ExceptionalException=\
163
        A {0} exception has occurred.\n\
163
        A {0} exception has occurred.\n\
164
	Please report this at http://www.netbeans.org/issues.html,\n\
164
	Please report this at http://www.netbeans.org/issues.html,\n\
165
	including a copy of your ide.log file as an attachment.\n\
165
	including a copy of your messages.log file as an attachment.\n\
166
	The ide.log file is located in your {1} folder.
166
	The messages.log file is located in your {1} folder.
167
NTF_ExceptionalExceptionTitle=Unexpected Exception
167
NTF_ExceptionalExceptionTitle=Unexpected Exception
168
# {0} - class name of exception
168
# {0} - class name of exception
169
NTF_ExceptionWarning=\
169
NTF_ExceptionWarning=\
(-)core/src/org/netbeans/core/CLIOptions.java (-1 / +1 lines)
Lines 178-184 Link Here
178
        
178
        
179
        if (!NonGui.noLogging) {
179
        if (!NonGui.noLogging) {
180
            try {
180
            try {
181
                NonGui.logger = new TopLogging(NonGui.getSystemDir());
181
                NonGui.logger = new TopLogging(NonGui.getLogDir());
182
            } catch (IOException e) {
182
            } catch (IOException e) {
183
                System.err.println("Cannot create log file. Logging disabled."); // NOI18N
183
                System.err.println("Cannot create log file. Logging disabled."); // NOI18N
184
                e.printStackTrace();
184
                e.printStackTrace();
(-)core/src/org/netbeans/core/LookupCache.java (-2 / +2 lines)
Lines 155-161 Link Here
155
    private static File cacheFile() {
155
    private static File cacheFile() {
156
        String ud = System.getProperty("netbeans.user");
156
        String ud = System.getProperty("netbeans.user");
157
        if (ud != null) {
157
        if (ud != null) {
158
            File cachedir = new File(ud, "cache"); // NOI18N
158
            File cachedir = new File(new File (ud, "var"), "cache"); // NOI18N
159
            cachedir.mkdirs();
159
            cachedir.mkdirs();
160
            return new File(cachedir, "folder-lookup.ser"); // NOI18N
160
            return new File(cachedir, "folder-lookup.ser"); // NOI18N
161
        } else {
161
        } else {
Lines 170-176 Link Here
170
    private static File stampFile() {
170
    private static File stampFile() {
171
        String ud = System.getProperty("netbeans.user");
171
        String ud = System.getProperty("netbeans.user");
172
        if (ud != null) {
172
        if (ud != null) {
173
            File cachedir = new File(ud, "cache"); // NOI18N
173
            File cachedir = new File(new File (ud, "var"), "cache"); // NOI18N
174
            cachedir.mkdirs();
174
            cachedir.mkdirs();
175
            return new File(cachedir, "lookup-stamp.txt"); // NOI18N
175
            return new File(cachedir, "lookup-stamp.txt"); // NOI18N
176
        } else {
176
        } else {
(-)core/src/org/netbeans/core/NbRepository.java (-1 / +1 lines)
Lines 28-34 Link Here
28
 */
28
 */
29
public final class NbRepository extends Repository {
29
public final class NbRepository extends Repository {
30
    /** name of system folder to be located in the USER_DIR and HOME_DIR */
30
    /** name of system folder to be located in the USER_DIR and HOME_DIR */
31
    static final String SYSTEM_FOLDER = "system"; // NOI18N
31
    static final String SYSTEM_FOLDER = "config"; // NOI18N
32
32
33
    /**
33
    /**
34
     * Create a repository based on the normal system file system.
34
     * Create a repository based on the normal system file system.
(-)core/src/org/netbeans/core/NonGui.java (+6 lines)
Lines 137-142 Link Here
137
        }
137
        }
138
    }
138
    }
139
139
140
    /** Directory to place logs into logging.
141
    */
142
    protected static String getLogDir () {
143
        return new File (new File (getUserDir (), "var"), "log").toString ();
144
    }
145
    
140
    /** System directory getter.
146
    /** System directory getter.
141
    */
147
    */
142
    protected static String getSystemDir () {
148
    protected static String getSystemDir () {
(-)core/src/org/netbeans/core/NotifyException.java (-1 / +1 lines)
Lines 314-320 Link Here
314
                            curBundle.getString("NTF_ExceptionalException"),
314
                            curBundle.getString("NTF_ExceptionalException"),
315
                            new Object[] {
315
                            new Object[] {
316
                                current.getClassName (),
316
                                current.getClassName (),
317
                                new File (System.getProperty("netbeans.user"), "system") // NOI18N
317
                                NonGui.getLogDir ()
318
                            }
318
                            }
319
                        )
319
                        )
320
                    );
320
                    );
(-)core/src/org/netbeans/core/TopLogging.java (-3 / +3 lines)
Lines 29-35 Link Here
29
public class TopLogging
29
public class TopLogging
30
{
30
{
31
    /** The name of the log file */
31
    /** The name of the log file */
32
    public static final String LOG_FILE_NAME = "ide.log"; // NOI18N
32
    public static final String LOG_FILE_NAME = "messages.log"; // NOI18N
33
33
34
    private static boolean disabledConsole = true;
34
    private static boolean disabledConsole = true;
35
35
Lines 49-55 Link Here
49
    /** Creates a new TopLogging - redirects the System.err to a log file.
49
    /** Creates a new TopLogging - redirects the System.err to a log file.
50
     * @param logDir A directory for the log file
50
     * @param logDir A directory for the log file
51
     */
51
     */
52
    public TopLogging (String logDir) throws IOException  {
52
    TopLogging (String logDir) throws IOException  {
53
        topLogging = this;
53
        topLogging = this;
54
        
54
        
55
        File logFileDir = new File (logDir);
55
        File logFileDir = new File (logDir);
Lines 87-93 Link Here
87
    private static TopLogging getDefault() {
87
    private static TopLogging getDefault() {
88
        if (topLogging == null) {
88
        if (topLogging == null) {
89
            try {
89
            try {
90
                new TopLogging(NonGui.getSystemDir());
90
                new TopLogging(NonGui.getLogDir());
91
            } catch (IOException x) {
91
            } catch (IOException x) {
92
                org.openide.ErrorManager.getDefault().notify(x);
92
                org.openide.ErrorManager.getDefault().notify(x);
93
            }
93
            }
(-)core/src/org/netbeans/core/modules/Module.java (-1 / +1 lines)
Lines 1104-1110 Link Here
1104
        /** look for JNI libraries also in modules/bin/ */
1104
        /** look for JNI libraries also in modules/bin/ */
1105
        protected String findLibrary(String libname) {
1105
        protected String findLibrary(String libname) {
1106
            String mapped = System.mapLibraryName(libname);
1106
            String mapped = System.mapLibraryName(libname);
1107
            File lib = new File(new File(jar.getParentFile(), "bin"), mapped); // NOI18N
1107
            File lib = new File(new File(jar.getParentFile(), "lib"), mapped); // NOI18N
1108
            if (lib.isFile()) {
1108
            if (lib.isFile()) {
1109
                return lib.getAbsolutePath();
1109
                return lib.getAbsolutePath();
1110
            } else {
1110
            } else {
(-)core/src/org/netbeans/core/modules/NbInstaller.java (-1 / +1 lines)
Lines 1098-1104 Link Here
1098
        if (usingManifestCache) {
1098
        if (usingManifestCache) {
1099
            String userdir = System.getProperty("netbeans.user");
1099
            String userdir = System.getProperty("netbeans.user");
1100
            if (userdir != null) {
1100
            if (userdir != null) {
1101
                manifestCacheFile = new File(new File(new File(userdir), "cache"), "all-manifests.dat"); // NOI18N
1101
                manifestCacheFile = new File(new File(new File(new File (userdir), "var"), "cache"), "all-manifests.dat"); // NOI18N
1102
                Util.err.log("Using manifest cache in " + manifestCacheFile);
1102
                Util.err.log("Using manifest cache in " + manifestCacheFile);
1103
            } else {
1103
            } else {
1104
                // Some special startup mode, e.g. with Plain.
1104
                // Some special startup mode, e.g. with Plain.
(-)core/src/org/netbeans/core/projects/SystemFileSystem.java (-1 / +4 lines)
Lines 286-291 Link Here
286
286
287
        if (userDir != null) {
287
        if (userDir != null) {
288
            // only one file system
288
            // only one file system
289
            if (!userDir.exists ()) {
290
                userDir.mkdirs ();
291
            }
289
            LocalFileSystem l = new LocalFileSystemEx ();
292
            LocalFileSystem l = new LocalFileSystemEx ();
290
            l.setRootDirectory (userDir);
293
            l.setRootDirectory (userDir);
291
            user = l;
294
            user = l;
Lines 311-317 Link Here
311
        FileSystem[] arr = new FileSystem[home == null ? 2 : 3];
314
        FileSystem[] arr = new FileSystem[home == null ? 2 : 3];
312
        arr[0] = new ModuleLayeredFileSystem(user, new FileSystem[0], null);
315
        arr[0] = new ModuleLayeredFileSystem(user, new FileSystem[0], null);
313
        if (home != null) {
316
        if (home != null) {
314
            File cachedir = new File(userDir.getParentFile(), "cache"); // NOI18N
317
            File cachedir = new File(new File (userDir.getParentFile(), "var"), "cache"); // NOI18N
315
            arr[1] = new ModuleLayeredFileSystem(home, extras, cachedir);
318
            arr[1] = new ModuleLayeredFileSystem(home, extras, cachedir);
316
        }
319
        }
317
        FixedFileSystem.deflt = new FixedFileSystem
320
        FixedFileSystem.deflt = new FixedFileSystem
(-)core/test/unit/src/org/netbeans/CLIHandlerTest.java (-1 / +7 lines)
Lines 33-39 Link Here
33
    }
33
    }
34
    
34
    
35
    public static void main(String[] args) {
35
    public static void main(String[] args) {
36
        TestRunner.run(new NbTestSuite(CLIHandlerTest.class));
36
        junit.framework.Test t;
37
        if (args.length == 0) { 
38
            t = new NbTestSuite(CLIHandlerTest.class);
39
        } else {
40
            t = new CLIHandlerTest (args[0]);
41
        }
42
        TestRunner.run(t);
37
    }
43
    }
38
    
44
    
39
    protected void setUp() throws Exception {
45
    protected void setUp() throws Exception {
(-)nbbuild/build.properties (+2 lines)
Lines 161-166 Link Here
161
        core/windows
161
        core/windows
162
config.modules.platform=autoupdate, \
162
config.modules.platform=autoupdate, \
163
        core/settings, \
163
        core/settings, \
164
        core/execution, \
165
        openide/execution, \
164
        core/javahelp, \
166
        core/javahelp, \
165
        text
167
        text
166
168
(-)nbbuild/build.xml (-9 / +45 lines)
Lines 267-273 Link Here
267
    <echo message="Building module a11y..."/>
267
    <echo message="Building module a11y..."/>
268
    <ant dir="../a11y" target="netbeans"/>
268
    <ant dir="../a11y" target="netbeans"/>
269
  </target>
269
  </target>
270
  <target name="all-ant" depends="all-openide,all-core/javahelp,all-openide/execution,all-openide/io,all-java/api">
270
  <target name="all-ant" depends="all-openide,all-core/javahelp,all-openide/execution,all-openide/io,all-java/api,all-libs/xerces">
271
    <echo message="Building module ant..."/>
271
    <echo message="Building module ant..."/>
272
    <ant dir="../ant" target="netbeans"/>
272
    <ant dir="../ant" target="netbeans"/>
273
  </target>
273
  </target>
Lines 1109-1118 Link Here
1109
    <delete file="NetBeans-${buildnum}.zip"/>
1109
    <delete file="NetBeans-${buildnum}.zip"/>
1110
    <!-- see issue #35744 http://www.netbeans.org/issues/show_bug.cgi?id=35744 -->
1110
    <!-- see issue #35744 http://www.netbeans.org/issues/show_bug.cgi?id=35744 -->
1111
    <delete file="NetBeans-${buildnum}.zip"/>
1111
    <delete file="NetBeans-${buildnum}.zip"/>
1112
1113
    <loadproperties srcfile="${netbeans.dest.dir}/moduleCluster.properties" />
1114
        
1115
    <!-- generate the generic launcher -->
1116
    <mkdir dir="${netbeans.dest.dir}/bin" />
1117
    <echo file="${netbeans.dest.dir}/bin/netbeans">#!/bin/sh
1118
#
1119
# resolve symlinks
1120
#
1121
PRG=$0
1122
1123
while [ -h "$PRG" ]; do
1124
    ls=`ls -ld "$PRG"`
1125
    link=`expr "$ls" : '^.*-> \(.*\)$' 2>/dev/null`
1126
    if expr "$link" : '^/' 2> /dev/null >/dev/null; then
1127
	PRG="$link"
1128
    else
1129
	PRG="`dirname "$PRG"`/$link"
1130
    fi
1131
done
1132
1133
progdir=`dirname "$PRG"`
1134
export NB_USER_DIR=$HOME/.netbeans/dev
1135
export NB_CONFIG_SYSTEM="$progdir"/../etc/netbeans.conf
1136
export NB_CONFIG_USER=$NB_USER_DIR/config
1137
exec /bin/sh $progdir/../${nb.cluster.platform.dir}/${nb.bin.dir}/nbexec --dirs ${nb.cluster.platform.dir}:${nb.cluster.ide.dir}:${nb.cluster.nb.dir} "$@"
1138
</echo>
1139
    <!-- generate nb config -->
1140
    <mkdir dir="${netbeans.dest.dir}/etc" />
1141
    <echo file="${netbeans.dest.dir}/etc/netbeans.conf">-J-Xms24m -J-Xmx96m
1142
-J-Dnetbeans.logger.console=true
1143
-J-ea
1144
</echo>
1145
1146
    <!-- package the zip file -->
1112
    <zip destfile="NetBeans-${buildnum}.zip" update="true" duplicate="preserve">
1147
    <zip destfile="NetBeans-${buildnum}.zip" update="true" duplicate="preserve">
1113
      <zipfileset file="${netbeans.dest}/bin/runide.sh" filemode="755" prefix="${netbeans.dest}/bin"/>
1148
      <zipfileset file="${netbeans.dest}/bin/netbeans" filemode="755" prefix="${netbeans.dest}/bin"/>
1114
      <zipfileset file="${netbeans.dest}/bin/*.com" filemode="755" prefix="${netbeans.dest}/bin"/>
1149
      <zipfileset file="${netbeans.dest}/${nb.cluster.platform.dir}/${nb.bin.dir}/nbexec" filemode="755" prefix="${netbeans.dest}/${nb.cluster.platform.dir}/${nb.bin.dir}"/>
1115
      <zipfileset file="${netbeans.dest}/bin/*.exe" filemode="755" prefix="${netbeans.dest}/bin"/>
1150
      <zipfileset file="${netbeans.dest}/${nb.cluster.platform.dir}/${nb.bin.dir}/*.com" filemode="755" prefix="${netbeans.dest}/${nb.cluster.platform.dir}/${nb.bin.dir}"/>
1151
      <zipfileset file="${netbeans.dest}/${nb.cluster.platform.dir}/${nb.bin.dir}/*.exe" filemode="755" prefix="${netbeans.dest}/${nb.cluster.platform.dir}/${nb.bin.dir}"/>
1116
      <zipfileset dir="${netbeans.dest}" prefix="${netbeans.dest}"/>
1152
      <zipfileset dir="${netbeans.dest}" prefix="${netbeans.dest}"/>
1117
    </zip>
1153
    </zip>
1118
    <echo>Build created; see NetBeans-${buildnum}.zip (in nbbuild/).
1154
    <echo>Build created; see NetBeans-${buildnum}.zip (in nbbuild/).
Lines 1188-1194 Link Here
1188
      <arg line="${sanitystart.args}"/>
1224
      <arg line="${sanitystart.args}"/>
1189
    </exec>
1225
    </exec>
1190
    <exec os="Linux SunOS Solaris Mac OS X" dir="." executable="sh" failonerror="yes" timeout="600000">
1226
    <exec os="Linux SunOS Solaris Mac OS X" dir="." executable="sh" failonerror="yes" timeout="600000">
1191
      <arg value="${netbeans.dest}/bin/runide.sh"/>
1227
      <arg value="${netbeans.dest}/bin/netbeans"/>
1192
      <arg value="-jdkhome"/>
1228
      <arg value="-jdkhome"/>
1193
      <arg file="${jdkhome}"/>
1229
      <arg file="${jdkhome}"/>
1194
      <arg value="-userdir"/>
1230
      <arg value="-userdir"/>
Lines 1198-1205 Link Here
1198
    <echo>Finished starting the IDE, pay attention to any reported errors.</echo>
1234
    <echo>Finished starting the IDE, pay attention to any reported errors.</echo>
1199
  </target>
1235
  </target>
1200
1236
1201
  <target name="check-for-build">
1237
  <target name="check-for-build"  >
1202
    <available property="have-build" file="${netbeans.dest}/lib/openide.jar"/>
1238
    <available property="have-build" file="${openide.dir}/${nb.lib.dir}/openide.jar"/>
1203
  </target>
1239
  </target>
1204
  <target name="maybe-build-nozip" depends="check-for-build" unless="have-build">
1240
  <target name="maybe-build-nozip" depends="check-for-build" unless="have-build">
1205
    <ant dir="." target="build-nozip"/>
1241
    <ant dir="." target="build-nozip"/>
Lines 1225-1231 Link Here
1225
      <arg line="${tryme.args}"/>
1261
      <arg line="${tryme.args}"/>
1226
    </exec>
1262
    </exec>
1227
    <exec os="Linux SunOS Solaris Mac OS X" dir="." executable="sh" failonerror="yes">
1263
    <exec os="Linux SunOS Solaris Mac OS X" dir="." executable="sh" failonerror="yes">
1228
      <arg value="${netbeans.dest}/bin/runide.sh"/>
1264
      <arg value="${netbeans.dest}/bin/netbeans"/>
1229
      <arg value="-jdkhome"/>
1265
      <arg value="-jdkhome"/>
1230
      <arg file="${jdkhome}"/>
1266
      <arg file="${jdkhome}"/>
1231
      <arg value="-userdir"/>
1267
      <arg value="-userdir"/>
Lines 1246-1252 Link Here
1246
      <arg line="-J-Xdebug -J-Xnoagent -J-Xrunjdwp:transport=dt_socket,suspend=${debug.pause},server=y,address=${debug.port}" />
1282
      <arg line="-J-Xdebug -J-Xnoagent -J-Xrunjdwp:transport=dt_socket,suspend=${debug.pause},server=y,address=${debug.port}" />
1247
    </exec>
1283
    </exec>
1248
    <exec os="Linux SunOS Solaris Mac OS X" dir="." executable="sh" failonerror="yes">
1284
    <exec os="Linux SunOS Solaris Mac OS X" dir="." executable="sh" failonerror="yes">
1249
      <arg value="${netbeans.dest}/bin/runide.sh"/>
1285
      <arg value="${netbeans.dest}/bin/netbeans"/>
1250
      <arg value="-jdkhome"/>
1286
      <arg value="-jdkhome"/>
1251
      <arg file="${jdkhome}"/>
1287
      <arg file="${jdkhome}"/>
1252
      <arg value="-userdir"/>
1288
      <arg value="-userdir"/>
(-)nbbuild/cluster.properties (-16 / +22 lines)
Lines 35-47 Link Here
35
        vcsgeneric/profiles/pvcs, \
35
        vcsgeneric/profiles/pvcs, \
36
        vcsgeneric/profiles/vss
36
        vcsgeneric/profiles/vss
37
37
38
clusters.list=nb.cluster.platform,nb.cluster.ide
38
clusters.list=nb.cluster.platform,nb.cluster.ide,nb.cluster.nb
39
39
40
# XXX need to revisit clusterization w/ build system modules added
40
# XXX need to revisit clusterization w/ build system modules added
41
41
42
nb.cluster.platform=core, \
42
nb.cluster.platform=core, \
43
        openide, \
43
        openide, \
44
        openide/compiler, \
45
        openide/util, \
44
        openide/util, \
46
        openide/actions, \
45
        openide/actions, \
47
        openide/awt, \
46
        openide/awt, \
Lines 49-85 Link Here
49
        openide/nodes, \
48
        openide/nodes, \
50
        openide/explorer, \
49
        openide/explorer, \
51
        openide/fs, \
50
        openide/fs, \
52
        openide/compat, \
53
        openide/text, \
51
        openide/text, \
54
        openide/windows, \
52
        openide/windows, \
55
        openide/deprecated, \
56
        openide/loaders, \
53
        openide/loaders, \
57
        openide/io, \
54
        openide/io, \
58
        openide/execution, \
55
        openide/execution, \
59
        openide/execution/deprecated, \
60
        openide/masterfs, \
56
        openide/masterfs, \
61
        core/term, \
57
        core/term, \
62
        core/output, \
58
        core/output, \
63
        core/settings, \
59
        core/settings, \
64
        core/deprecated, \
65
        java/srcmodel, \
66
        libs/regexp, \
67
        debuggercore/oldapi, \
68
        core/javahelp, \
60
        core/javahelp, \
69
        core/compiler, \
70
        core/execution, \
61
        core/execution, \
62
        core/bootstrap, \
71
        core/ui, \
63
        core/ui, \
72
        core/windows, \
64
        core/windows, \
73
        core/ide, \
65
        autoupdate, \
74
        projects/queries
66
        projects/queries
75
67
76
nb.cluster.platform.dir=netbeans
68
nb.cluster.platform.dir=platform4
77
69
78
nb.cluster.ide=classfile, \
70
nb.cluster.ide=classfile, \
79
        clazz, \
71
        clazz, \
72
        openide/compiler, \
73
        core/compiler, \
74
        openide/execution/deprecated, \
75
        openide/deprecated, \
76
        core/deprecated, \
77
        openide/compat, \
78
        core/ide, \
79
        libs/regexp, \
80
        editor, \
80
        editor, \
81
        html, \
81
        html, \
82
        image, \
82
        image, \
83
        java/srcmodel, \
83
        java/api, \
84
        java/api, \
84
        java, \
85
        java, \
85
        junit, \
86
        junit, \
Lines 88-100 Link Here
88
        text, \
89
        text, \
89
        utilities, \
90
        utilities, \
90
        utilities/group,\
91
        utilities/group,\
91
        autoupdate, \
92
        autoupdate/updatecenters, \
93
        apisupport, \
92
        apisupport, \
94
        apisupport/apidocs, \
93
        apisupport/apidocs, \
95
        apisupport/lite, \
94
        apisupport/lite, \
96
        beans, \
95
        beans, \
97
        debuggercore, \
96
        debuggercore, \
97
        debuggercore/oldapi, \
98
        debuggerjpda, \
98
        debuggerjpda, \
99
        form, \
99
        form, \
100
        httpserver, \
100
        httpserver, \
Lines 132-138 Link Here
132
        tomcatint/tomcat5, \
132
        tomcatint/tomcat5, \
133
        tomcatint/tomcat5/bundled, \
133
        tomcatint/tomcat5/bundled, \
134
        treefs, \
134
        treefs, \
135
        ui/welcome, \
136
        usersguide, \
135
        usersguide, \
137
        vcscore, \
136
        vcscore, \
138
        vcscvs/compat, \
137
        vcscvs/compat, \
Lines 170-176 Link Here
170
        ${local.config.tasklist4barracuda}, \
169
        ${local.config.tasklist4barracuda}, \
171
        ${local.config.tasklist4barracuda_auc}
170
        ${local.config.tasklist4barracuda_auc}
172
171
173
nb.cluster.ide.dir=netbeans
172
nb.cluster.ide.dir=ide4
173
174
# special cluster for NetBeans IDE only extensions
175
nb.cluster.nb=\
176
        autoupdate/updatecenters, \
177
        ui/welcome
178
179
nb.cluster.nb.dir=nb4.0
174
180
175
nb.cluster.test=xtest/plugins_src/deprecated, \
181
nb.cluster.test=xtest/plugins_src/deprecated, \
176
        xtest/plugins_src/ide
182
        xtest/plugins_src/ide
(-)nbbuild/default-properties.xml (-1 / +1 lines)
Lines 8-14 Link Here
8
  <property name="nbm_alias" value="nb_ide"/>
8
  <property name="nbm_alias" value="nb_ide"/>
9
9
10
  <property name="clusters.list.file" location="${nb_all}/nbbuild/cluster.properties"/>
10
  <property name="clusters.list.file" location="${nb_all}/nbbuild/cluster.properties"/>
11
  <property name="netbeans.dest.dir" location="${nb_all}/nbbuild"/>
11
  <property name="netbeans.dest.dir" location="${nb_all}/nbbuild/netbeans"/>
12
  <property name="moduleCluster.file" location="${netbeans.dest.dir}/moduleCluster.properties"/>
12
  <property name="moduleCluster.file" location="${netbeans.dest.dir}/moduleCluster.properties"/>
13
  <property name="directoryList.file" location="${nb_all}/nbbuild/directories.properties"/>
13
  <property name="directoryList.file" location="${nb_all}/nbbuild/directories.properties"/>
14
14
(-)nbbuild/directories.properties (-5 / +5 lines)
Lines 1-16 Link Here
1
nb.beans.dir=beans
1
nb.beans.dir=beans
2
nb.bin.dir=bin
2
nb.bin.dir=launcher
3
nb.docs.dir=docs
3
nb.docs.dir=docs
4
nb.lib.dir=lib
4
nb.lib.dir=boot
5
nb.lib/ext.dir=lib/ext
5
nb.lib/ext.dir=launcher
6
nb.lib/patches.dir=${nb.lib.dir}/patches
6
nb.lib/patches.dir=${nb.lib.dir}/patches
7
nb.modules.dir=modules
7
nb.modules.dir=modules
8
nb.modules/autoload.dir=${nb.modules.dir}/autoload
8
nb.modules/autoload.dir=${nb.modules.dir}/autoload
9
nb.modules/autoload/docs.dir=${nb.modules/autoload.dir}/docs
9
nb.modules/autoload/docs.dir=${nb.modules/autoload.dir}/docs
10
nb.modules/bin.dir=${nb.modules.dir}/bin
10
nb.modules/bin.dir=${nb.modules.dir}/lib
11
nb.modules/docs.dir=${nb.modules.dir}/docs
11
nb.modules/docs.dir=${nb.modules.dir}/docs
12
nb.modules/eager.dir=${nb.modules.dir}/eager
12
nb.modules/eager.dir=${nb.modules.dir}/eager
13
nb.modules/patches.dir=${nb.modules.dir}/patches
13
nb.modules/patches.dir=${nb.modules.dir}/patches
14
nb.sources.dir=sources
14
nb.sources.dir=sources
15
nb.system.dir=system
15
nb.system.dir=config
16
nb.update_tracking.dir=update_tracking
16
nb.update_tracking.dir=update_tracking
(-)xtest/lib/default-module-build.xml (-1 / +1 lines)
Lines 26-32 Link Here
26
    <property name="nb_all" location="../.."/>
26
    <property name="nb_all" location="../.."/>
27
27
28
    <!-- Points to directory with moduleCluster.properties and directories.properties -->
28
    <!-- Points to directory with moduleCluster.properties and directories.properties -->
29
    <property name="netbeans.dest.dir" location="${nb_all}/nbbuild"/>
29
    <property name="netbeans.dest.dir" location="${nb_all}/nbbuild/netbeans"/>
30
    
30
    
31
    <!-- Ant property. Value 'ignore' means that system classpath is ignored
31
    <!-- Ant property. Value 'ignore' means that system classpath is ignored
32
         and only classpath specified in build file is used. -->
32
         and only classpath specified in build file is used. -->
(-)xtest/lib/module_harness.xml (+4 lines)
Lines 155-161 Link Here
155
    <target name="init_cluster_properties">
155
    <target name="init_cluster_properties">
156
         <!-- Read moduleCluster.properties and directories.properties from netbeans.dest.dir -->
156
         <!-- Read moduleCluster.properties and directories.properties from netbeans.dest.dir -->
157
         <property file="${netbeans.dest.dir}/directories.properties"/>
157
         <property file="${netbeans.dest.dir}/directories.properties"/>
158
         <!-- read from second location -->
159
         <property file="${netbeans.dest.dir}/../directories.properties"/>
158
         <property file="${netbeans.dest.dir}/moduleCluster.properties"/>
160
         <property file="${netbeans.dest.dir}/moduleCluster.properties"/>
161
         <!-- read also from this location -->
162
         <property file="${netbeans.dest.dir}/netbeans/moduleCluster.properties"/>
159
    </target>
163
    </target>
160
    
164
    
161
    <!-- ======== -->
165
    <!-- ======== -->
(-)xtest/plugins_src/deprecated/lib/ide_execution_targets.xml (-1 / +1 lines)
Lines 228-234 Link Here
228
              os="Linux SunOS Solaris Mac OS X"
228
              os="Linux SunOS Solaris Mac OS X"
229
              enableAssertions="${xtest.enable.assertions}" debugPort="${xtest.debug.port}" debugSuspend="${xtest.debug.suspend}"
229
              enableAssertions="${xtest.enable.assertions}" debugPort="${xtest.debug.port}" debugSuspend="${xtest.debug.suspend}"
230
              failonerror="no" timeout="${xtest.ide.timeout}" ideuserdir="${xtest.userdir}">
230
              failonerror="no" timeout="${xtest.ide.timeout}" ideuserdir="${xtest.userdir}">
231
            <arg line="runide.sh ${args}"/>
231
            <arg line="./nbexec --dirs platform4:ide4 ${args}"/>
232
        </ideexec>
232
        </ideexec>
233
233
234
        
234
        

Return to bug 32080