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

(-)ide/branding/build.xml (+6 lines)
Lines 121-126 Link Here
121
      basedir="core/windows/src"
121
      basedir="core/windows/src"
122
      jarfile="${netbeans.dest.dir}/${cluster.dir}/modules/org-netbeans-core-windows.jar"
122
      jarfile="${netbeans.dest.dir}/${cluster.dir}/modules/org-netbeans-core-windows.jar"
123
    />
123
    />
124
125
    <locjar 
126
      basedir="autoupdate/libsrc"
127
      jarfile="${netbeans.dest.dir}/${cluster.dir}/core/updater.jar"
128
    />
129
124
  </target>
130
  </target>
125
131
126
  <target name="nbm" depends="netbeans" description="Create Localized NBM's">
132
  <target name="nbm" depends="netbeans" description="Create Localized NBM's">
(-)ide/branding/autoupdate/libsrc/org/netbeans/updater/Bundle_nb.properties (+35 lines)
Added Link Here
1
#                 Sun Public License Notice
2
# 
3
# The contents of this file are subject to the Sun Public License
4
# Version 1.0 (the "License"). You may not use this file except in
5
# compliance with the License. A copy of the License is available at
6
# http://www.sun.com/
7
# 
8
# The Original Code is NetBeans. The Initial Developer of the Original
9
# Code is Sun Microsystems, Inc. Portions Copyright 1997-2005 Sun
10
# Microsystems, Inc. All Rights Reserved.
11
12
CTL_PreparingUnpack=Preparing to Unpack
13
CTL_UnpackingFile=Unpacking File:
14
UpdaterFrame.jTextArea1.text=The Update Center is now updating the IDE.\n\nPlease wait ...
15
UpdaterFrame.textLabel.text=Preparing to Unpack
16
UpdaterFrame.Form.title=IDE - UPDATER
17
18
# In case you are branding your distribution you might want to
19
# add some of following keys into your branded Bundle
20
21
#UpdaterFrame.TextBackground_R=255
22
#UpdaterFrame.TextBackground_G=255
23
#UpdaterFrame.TextBackground_B=255
24
25
#UpdaterFrame.TextForeground_R=0
26
#UpdaterFrame.TextForeground_G=0
27
#UpdaterFrame.TextForeground_B=0
28
29
#UpdaterFrame.hasBorder=true
30
31
#Netbeans defaults
32
#UpdaterFrame.ProgressBar.PreferredSize_X=300
33
#UpdaterFrame.ProgressBar.PreferredSize_Y=20
34
35
#UpdaterFrame.isGradient=false // set true to make gradient
(-)ide/golden/files-layout.txt (+1 lines)
Lines 844-849 Link Here
844
nb4.1/config/Modules/org-netbeans-modules-updatecenters.xml
844
nb4.1/config/Modules/org-netbeans-modules-updatecenters.xml
845
nb4.1/config/Modules/org-netbeans-modules-welcome.xml
845
nb4.1/config/Modules/org-netbeans-modules-welcome.xml
846
nb4.1/core/locale/core_nb.jar
846
nb4.1/core/locale/core_nb.jar
847
nb4.1/core/locale/updater_nb.jar
847
nb4.1/core/org-netbeans-upgrader.jar
848
nb4.1/core/org-netbeans-upgrader.jar
848
nb4.1/docs/CustomerDetail.java
849
nb4.1/docs/CustomerDetail.java
849
nb4.1/docs/CustomerFacadeBean.java
850
nb4.1/docs/CustomerFacadeBean.java
(-)autoupdate/libsrc/org/netbeans/updater/Localization.java (-3 / +11 lines)
Lines 35-41 Link Here
35
    private static HashMap bundleCache = new HashMap();
35
    private static HashMap bundleCache = new HashMap();
36
36
37
    public static String getBranding() {
37
    public static String getBranding() {
38
        init();
38
        if (brandingToken != null) {
39
            init();
40
        }
39
        return brandingToken;
41
        return brandingToken;
40
    }
42
    }
41
    
43
    
Lines 123-134 Link Here
123
        return null;
125
        return null;
124
    }
126
    }
125
    
127
    
126
    // Private methods ---------------------------------------------------------
128
    public static void setBranding (String branding) {
129
        brandingToken = branding;
130
    }
127
    
131
    
132
    // Private methods ---------------------------------------------------------
128
    private static synchronized void init() {
133
    private static synchronized void init() {
129
        if ( brandedLoader == null ) {
134
        if (brandingToken == null) {
130
            // Initialize the branding token
135
            // Initialize the branding token
131
            brandingToken = initBranding();
136
            brandingToken = initBranding();
137
        }
138
        if (brandedLoader == null) {
132
            
139
            
133
            // Fallback to default class loader
140
            // Fallback to default class loader
134
            brandedLoader = Localization.class.getClassLoader();
141
            brandedLoader = Localization.class.getClassLoader();
Lines 176-181 Link Here
176
                    "lib" + FILE_SEPARATOR + "branding");  // NOI18N
183
                    "lib" + FILE_SEPARATOR + "branding");  // NOI18N
177
            in = new BufferedReader(new FileReader(brandf));
184
            in = new BufferedReader(new FileReader(brandf));
178
            if (in.ready()) {
185
            if (in.ready()) {
186
                System.out.println("Warning - It's obsolete. Use --branding <branding> instead 'branding' file.");
179
                s = in.readLine();
187
                s = in.readLine();
180
            }
188
            }
181
        } 
189
        } 
(-)autoupdate/libsrc/org/netbeans/updater/UpdaterFrame.java (-8 / +72 lines)
Lines 14-19 Link Here
14
package org.netbeans.updater;
14
package org.netbeans.updater;
15
15
16
import java.awt.*;
16
import java.awt.*;
17
import java.util.Locale;
17
import javax.swing.*;
18
import javax.swing.*;
18
import java.io.*;
19
import java.io.*;
19
import java.beans.PropertyChangeListener;
20
import java.beans.PropertyChangeListener;
Lines 56-62 Link Here
56
    private static Window splashWindow;
57
    private static Window splashWindow;
57
    
58
    
58
    /** For external running Updater without GUI */
59
    /** For external running Updater without GUI */
59
    private static boolean nongui = false;
60
    private static boolean noSplash = false;
60
    
61
    
61
    /** Creates new form UpdaterFrame */
62
    /** Creates new form UpdaterFrame */
62
    public UpdaterFrame() {
63
    public UpdaterFrame() {
Lines 181-191 Link Here
181
    * @param args the command line arguments
182
    * @param args the command line arguments
182
    */
183
    */
183
    public static void main (String args[]) {
184
    public static void main (String args[]) {
184
        if ( args.length > 0 && args[0].equals( "-nodisplay" ) )  // NOI18N
185
        if (args.length > 0) {
185
            nongui = true;
186
            cli (args);
186
        else {
187
        }
188
        
189
        if (!noSplash) {
187
            panel = new UpdaterFrame ();
190
            panel = new UpdaterFrame ();
188
            showSplash();
191
            showSplash ();
189
        }
192
        }
190
193
191
        mu = new ModuleUpdater();
194
        mu = new ModuleUpdater();
Lines 239-245 Link Here
239
242
240
    static void setLabel( final String text ) {
243
    static void setLabel( final String text ) {
241
        
244
        
242
        if ( nongui ) return;
245
        if (noSplash) return;
243
246
244
        final javax.swing.JLabel label = panel.textLabel;
247
        final javax.swing.JLabel label = panel.textLabel;
245
248
Lines 254-260 Link Here
254
257
255
    static void setProgressRange( final long min, final long max ) {
258
    static void setProgressRange( final long min, final long max ) {
256
        
259
        
257
        if ( nongui ) return;
260
        if (noSplash) return;
258
261
259
        bigBounds = max > 0xFFFF;
262
        bigBounds = max > 0xFFFF;
260
263
Lines 272-278 Link Here
272
275
273
    static void setProgressValue( final long value ) {
276
    static void setProgressValue( final long value ) {
274
        
277
        
275
        if ( nongui ) return;
278
        if (noSplash) return;
276
279
277
        final javax.swing.JProgressBar progressBar = panel.progressBar;
280
        final javax.swing.JProgressBar progressBar = panel.progressBar;
278
        final boolean bb = bigBounds;
281
        final boolean bb = bigBounds;
Lines 393-398 Link Here
393
        public java.awt.Dimension getPreferredSize () {
396
        public java.awt.Dimension getPreferredSize () {
394
            return stringToDimension("UpdaterFrame.Splash.PreferredSize", new Dimension (400, 280));
397
            return stringToDimension("UpdaterFrame.Splash.PreferredSize", new Dimension (400, 280));
395
        }        
398
        }        
399
    }
400
    
401
    // copied from core/CLIOptions
402
    
403
    private static boolean isOption (String value, String optionName) {
404
        if (value == null) return false;
405
        
406
        if (value.startsWith ("--")) {
407
            return value.substring (2).equals (optionName);
408
        } else if (value.startsWith ("-")) {
409
            return value.substring (1).equals (optionName);
410
        }
411
        return false;
412
    }
413
    
414
    private static int cli(String[] args) {
415
        // let's go through the command line
416
        for (int i = 0; i < args.length; i++) {
417
            if (args[i] == null) {
418
                continue;
419
            }
420
            if (isOption (args[i], "nosplash")) { // NOI18N
421
                UpdaterFrame.noSplash = true;
422
            } else if (isOption (args[i], "locale")) { // NOI18N
423
                args[i] = null;
424
                String localeParam = args[++i];
425
                String language;
426
                String country = ""; // NOI18N
427
                String variant = ""; // NOI18N
428
                int index1 = localeParam.indexOf(":"); // NOI18N
429
                if (index1 == -1)
430
                    language = localeParam;
431
                else {
432
                    language = localeParam.substring(0, index1);
433
                    int index2 = localeParam.indexOf(":", index1+1); // NOI18N
434
                    if (index2 != -1) {
435
                        country = localeParam.substring(index1+1, index2);
436
                        variant = localeParam.substring(index2+1);
437
                    }
438
                    else
439
                        country = localeParam.substring(index1+1);
440
                }
441
                Locale.setDefault(new Locale(language, country, variant));
442
            } else if (isOption (args[i], "branding")) { // NOI18N
443
                args[i] = null;
444
                if (++i == args.length) {
445
                    System.err.println("Option --branding requires one argument.");
446
                    return 2;
447
                }
448
                String branding = args[i];
449
                if (branding.equals("-")) branding = null; // NOI18N
450
                try {
451
                    Localization.setBranding(branding);
452
                } catch (IllegalArgumentException iae) {
453
                    iae.printStackTrace();
454
                    return 1;
455
                }
456
            }
457
        }
458
        
459
        return 0;
396
    }
460
    }
397
    
461
    
398
}
462
}

Return to bug 46225