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 196075
Collapse All | Expand All

(-)a/ide/launcher/netbeans.conf (-2 / +22 lines)
Lines 1-5 Link Here
1
# ${HOME} will be replaced by JVM user.home system property
1
# On Windows ${DEFAULT_USERDIR_ROOT} will be replaced by the launcher
2
netbeans_default_userdir="${HOME}/.netbeans/dev"
2
# with a path to "<AppData>/NetBeans" folder where <AppData> is user's
3
# value of AppData key in Windows Registry under
4
#   Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders
5
# ${DEFAULT_CACHEDIR_ROOT} will be replaced by the launcher
6
# with a path to "<Local AppData>/NetBeans" folder where <Local AppData>
7
# is user's value of Local AppData key in Windows Registry under
8
#   Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders
9
#
10
# On Mac ${DEFAULT_USERDIR_ROOT} will be replaced by the launcher
11
# with a path to ~/Library/Application Support/NetBeans
12
# ${DEFAULT_CACHEDIR_ROOT} with a path to ~/Library/Caches/NetBeans
13
#
14
# On other systems ${DEFAULT_USERDIR_ROOT} will be replaced with
15
# a path to ~/.netbeans folder in user's home and
16
# ${DEFAULT_CACHEDIR_ROOT} with a path to ~/.cache/netbeans folder.
17
#
18
# NOTE: If an user specify non-default userdir so cachedir
19
# will be mapped to ${userdir}/var/cache.
20
#
21
netbeans_default_userdir="${DEFAULT_USERDIR_ROOT}/dev"
22
netbeans_default_cachedir="${DEFAULT_CACHEDIR_ROOT}/dev"
3
23
4
# Options used by NetBeans launcher by default, can be overridden by explicit
24
# Options used by NetBeans launcher by default, can be overridden by explicit
5
# command line switches:
25
# command line switches:
(-)a/ide/launcher/unix/netbeans (-1 / +31 lines)
Lines 59-64 Link Here
59
59
60
progdir=`dirname "$PRG"`
60
progdir=`dirname "$PRG"`
61
61
62
case "`uname`" in
63
    Darwin*)
64
        # set default userdir and cachedir on MacOS
65
        DEFAULT_USERDIR_ROOT=${HOME}/Library/Application Support/NetBeans
66
        DEFAULT_CACHEDIR_ROOT=${HOME}/Library/Caches/NetBeans
67
        ;;
68
    *) 
69
        # set default userdir and cachedir on unix systems
70
        DEFAULT_USERDIR_ROOT=${HOME}/.netbeans
71
        DEFAULT_CACHEDIR_ROOT=${HOME}/.cache/netbeans
72
        ;;
73
esac
74
75
62
if [ -f "$progdir"/../etc/netbeans.conf ] ; then
76
if [ -f "$progdir"/../etc/netbeans.conf ] ; then
63
    . "$progdir"/../etc/netbeans.conf
77
    . "$progdir"/../etc/netbeans.conf
64
fi
78
fi
Lines 68-76 Link Here
68
#     . /etc/netbeans.conf
82
#     . /etc/netbeans.conf
69
# fi
83
# fi
70
84
85
export DEFAULT_USERDIR_ROOT
71
86
72
# #68373: look for userdir, but do not modify "$@"
87
# #68373: look for userdir, but do not modify "$@"
73
userdir="${netbeans_default_userdir}"
88
userdir="${netbeans_default_userdir}"
89
cachedir="${netbeans_default_cachedir}"
90
74
founduserdir=""
91
founduserdir=""
75
for opt in "$@"; do
92
for opt in "$@"; do
76
    if [ "${founduserdir}" = "yes" ]; then
93
    if [ "${founduserdir}" = "yes" ]; then
Lines 80-85 Link Here
80
        founduserdir="yes"
97
        founduserdir="yes"
81
    fi
98
    fi
82
done
99
done
100
foundcachedir=""
101
for opt in "$@"; do
102
    if [ "${foundcachedir}" = "yes" ]; then
103
        cachedir="$opt"
104
        break
105
    elif [ "$opt" = "--cachedir" ]; then
106
        foundcachedir="yes"
107
    fi
108
done
83
109
84
if [ -f "${userdir}"/etc/netbeans.conf ] ; then
110
if [ -f "${userdir}"/etc/netbeans.conf ] ; then
85
    . "${userdir}"/etc/netbeans.conf
111
    . "${userdir}"/etc/netbeans.conf
Lines 178-184 Link Here
178
    if [ "${founduserdir}" = "yes" ]; then
204
    if [ "${founduserdir}" = "yes" ]; then
179
        exec $sh "$nbexec" "$@"
205
        exec $sh "$nbexec" "$@"
180
    else
206
    else
181
        exec $sh "$nbexec" --userdir "${userdir}" "$@"
207
        if [ "${foundcachedir}" = "yes" ]; then
208
            exec $sh "$nbexec" --userdir "${userdir}" "$@"
209
        else
210
            exec $sh "$nbexec" --userdir "${userdir}" --cachedir "${cachedir}" "$@"
211
        fi
182
    fi
212
    fi
183
}
213
}
184
214
(-)a/o.n.bootstrap/launcher/unix/nbexec (+5 lines)
Lines 480-485 Link Here
480
	jargs="-Dnetbeans.system_socks_proxy=\"$socks_proxy_tmp\" $jargs"
480
	jargs="-Dnetbeans.system_socks_proxy=\"$socks_proxy_tmp\" $jargs"
481
fi
481
fi
482
482
483
if [ ! -z "${DEFAULT_USERDIR_ROOT}" ] ; then
484
	jargs="-Dnetbeans.default_userdir_root=\"${DEFAULT_USERDIR_ROOT}\" $jargs"
485
        unset DEFAULT_USERDIR_ROOT
486
fi
487
483
# http://java.sun.com/j2se/1.5.0/docs/guide/2d/flags.html#pixmaps
488
# http://java.sun.com/j2se/1.5.0/docs/guide/2d/flags.html#pixmaps
484
J2D_PIXMAPS=shared
489
J2D_PIXMAPS=shared
485
export J2D_PIXMAPS
490
export J2D_PIXMAPS

Return to bug 196075