Package net.rim.tumbler.session

Examples of net.rim.tumbler.session.BBWPProperties


            SessionManager sessionManager = cmd.createSession();

            // create bbwp.properties
            Logger.logMessage( LogType.INFO, "PROGRESS_SESSION_BBWP_PROPERTIES" );
            String propertiesFile = sessionManager.getBBWPJarFolder() + WidgetPackager.PROPERTIES_FILE;
            BBWPProperties bbwpProperties = new BBWPProperties( propertiesFile, sessionManager.getSessionHome() );

            // validate BlackBerry WebWorks application archive
            Logger.logMessage( LogType.INFO, "PROGRESS_VALIDATING_WIDGET_ARCHIVE" );
            WidgetArchive wa = new WidgetArchive( sessionManager.getWidgetArchive() );
            wa.validate();

            // parse/validate config.xml
            Logger.logMessage( LogType.INFO, "PROGRESS_SESSION_CONFIGXML" );
            XMLParser xmlparser = new ConfigXMLParser();
            WidgetConfig config = xmlparser.parseXML( wa ); // raw data, without \

            // create/clean outputs/source
            // Logger.printInfoMessage("BlackBerry WebWorks application packaging starts...");
            FileManager fileManager = new FileManager( bbwpProperties, config.getAccessTable() );
            Logger.logMessage( LogType.INFO, "PROGRESS_FILE_POPULATING_SOURCE" );
            fileManager.prepare();

            // Set 3rd party extension classes
            config.setExtensionClasses( fileManager.getExtensionClasses() );
            config.setExtensionJSFiles( fileManager.getExtensionJSFiles() );
            config.setSharedGlobalJSFiles( fileManager.getSharedGlobalJSFiles() );

            // create autogen file
            WidgetConfigSerializer wcs = new WidgetConfig_v1Serializer( config );
            byte[] autogenFile = wcs.serialize();
            fileManager.writeToSource( autogenFile, AUTOGEN_FILE );

            // create jdw/jdp files
            fileManager.generateProjectFiles( sessionManager.getSourceFolder(), sessionManager.getArchiveName(),
                    config.getName(), config.getVersion(), config.getAuthor(), config.getContent(), config.getBackgroundSource(),
                    config.isStartupEnabled(), config.getIconSrc(), config.getHoverIconSrc(), fileManager.getFiles(),
                    bbwpProperties.getImports() );

            // run rapc
            Logger.logMessage( LogType.INFO, "PROGRESS_COMPILING" );
            Rapc rapc = new Rapc( bbwpProperties, config, fileManager.getCompiledJARDependencies() );
            if( !rapc.run( fileManager.getFiles() ) ) {
View Full Code Here


            SessionManager sessionManager = cmd.createSession();

            // create bbwp.properties
            Logger.logMessage(LogType.INFO, "PROGRESS_SESSION_BBWP_PROPERTIES");
            String propertiesFile = sessionManager.getBBWPJarFolder() + WidgetPackager.PROPERTIES_FILE;
            BBWPProperties bbwpProperties = new BBWPProperties(propertiesFile, sessionManager.getSessionHome());

            // validate widget archive
            Logger.logMessage(LogType.INFO, "PROGRESS_VALIDATING_WIDGET_ARCHIVE");
            WidgetArchive wa = new WidgetArchive(sessionManager.getWidgetArchive());
            wa.validate();

            // parse/validate config.xml
            Logger.logMessage(LogType.INFO, "PROGRESS_SESSION_CONFIGXML");
            XMLParser xmlparser = new ConfigXMLParser();     
            WidgetConfig config = xmlparser.parseXML(wa); // raw data, without \
           
            // create/clean outputs/source
            // Logger.printInfoMessage("Widget packaging starts...");
            FileManager fileManager = new FileManager(bbwpProperties);
            Logger.logMessage(LogType.INFO, "PROGRESS_FILE_POPULATING_SOURCE");
            fileManager.prepare();

            //
            // Copy the JS extensions.
            //
            Map<String, Vector<String>> entryClassTable = null;
            if (SessionManager.getInstance().isPlayBook()) {
                entryClassTable = copyExtensions(bbwpProperties, config);
            }

            // Set 3rd party extension classes
            if (!SessionManager.getInstance().isPlayBook()) {
                config.setExtensionClasses(fileManager.getExtensionClasses());
            }
           
            // create autogen file
            WidgetConfigSerializer wcs = new WidgetConfig_v1Serializer(config, entryClassTable);
            byte[] autogenFile = wcs.serialize();
            fileManager.writeToSource(autogenFile, AUTOGEN_FILE);

            // create jdw/jdp files
            if (!SessionManager.getInstance().isPlayBook()) {
            fileManager.generateProjectFiles(sessionManager.getSourceFolder(),
                    sessionManager.getArchiveName(), config.getName(), config
                            .getVersion(), config.getAuthor(),config.getContent(),config.getBackgroundSource(),config.isStartupEnabled(), config
                            .getIconSrc(), config.getHoverIconSrc(),
                    fileManager.getFiles(), bbwpProperties.getImports());
            }

            // run mxmlc to compile ActionScript into SWF
            Logger.logMessage(LogType.INFO, "PROGRESS_COMPILING");
            if (SessionManager.getInstance().isPlayBook()) {
View Full Code Here

TOP

Related Classes of net.rim.tumbler.session.BBWPProperties

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.