[Esbox-commits] r2127 - in branches/work_Fabricio: org.maemo.esbox.cpp.project org.maemo.esbox.cpp.project/META-INF org.maemo.esbox.cpp.project/src/org/maemo/esbox/internal/cpp/project/core org.maemo.esbox.help/html org.maemo.esbox.help/html/images/debian org.maemo.esbox.help/html/images/install_wiz org.maemo.esbox.help/html/tasks org.maemo.esbox.maemosdk.core/src/org/maemo/esbox/internal/api/maemosdk/core/tools org.maemo.esbox.scratchbox.core/src/org/maemo/esbox/scratchbox/core/command org.maemo.esbox.scratchbox.sb1/src/org/maemo/esbox/internal/scratchbox/sb1/core org.maemo.esbox.scratchbox.sb1/src/org/maemo/esbox/internal/scratchbox/sb1/ui/wizard org.maemo.esbox.scratchbox.sb1/src/org/maemo/esbox/internal/scratchbox/sb1/ui/wizard/nokiabin org.maemo.esbox.vm.vmware/src/org/maemo/esbox/internal/api/vm/vmware
fabricioepa at garage.maemo.org
fabricioepa at garage.maemo.org
Wed Sep 9 20:12:43 EEST 2009
Author: fabricioepa
Date: 2009-09-09 20:12:34 +0300 (Wed, 09 Sep 2009)
New Revision: 2127
Added:
branches/work_Fabricio/org.maemo.esbox.help/html/images/install_wiz/wiz-maemovm-1-advanced.png
branches/work_Fabricio/org.maemo.esbox.help/html/images/install_wiz/wiz-maemovm-1.png
branches/work_Fabricio/org.maemo.esbox.help/html/images/install_wiz/wiz-maemovm-2.png
branches/work_Fabricio/org.maemo.esbox.help/html/images/install_wiz/wiz-maemovm-3.png
branches/work_Fabricio/org.maemo.esbox.help/html/images/install_wiz/wiz-maemovm-4.png
branches/work_Fabricio/org.maemo.esbox.help/html/tasks/InstallingMaemoSDKVMImage.html
Removed:
branches/work_Fabricio/org.maemo.esbox.cpp.project/src/org/maemo/esbox/internal/cpp/project/core/ApplyDoctoolsFixMarkerResolutionGenerator.java
Modified:
branches/work_Fabricio/org.maemo.esbox.cpp.project/META-INF/MANIFEST.MF
branches/work_Fabricio/org.maemo.esbox.cpp.project/plugin.xml
branches/work_Fabricio/org.maemo.esbox.help/html/images/debian/wiz-debian-deploy-package.png
branches/work_Fabricio/org.maemo.esbox.help/html/images/install_wiz/wiz-maemo-installers.png
branches/work_Fabricio/org.maemo.esbox.help/html/tasks/DebianPackage.html
branches/work_Fabricio/org.maemo.esbox.help/html/toctasks.html
branches/work_Fabricio/org.maemo.esbox.maemosdk.core/src/org/maemo/esbox/internal/api/maemosdk/core/tools/AfSbInitMaemoLauncherAdapter.java
branches/work_Fabricio/org.maemo.esbox.scratchbox.core/src/org/maemo/esbox/scratchbox/core/command/ScratchboxCommand.java
branches/work_Fabricio/org.maemo.esbox.scratchbox.sb1/src/org/maemo/esbox/internal/scratchbox/sb1/core/Scratchbox1SDK.java
branches/work_Fabricio/org.maemo.esbox.scratchbox.sb1/src/org/maemo/esbox/internal/scratchbox/sb1/ui/wizard/NewScratchbox1SDKWizard.java
branches/work_Fabricio/org.maemo.esbox.scratchbox.sb1/src/org/maemo/esbox/internal/scratchbox/sb1/ui/wizard/NewScratchbox1TargetWizard.java
branches/work_Fabricio/org.maemo.esbox.scratchbox.sb1/src/org/maemo/esbox/internal/scratchbox/sb1/ui/wizard/Scratchbox1TargetInstallerSelectionWizardPage.java
branches/work_Fabricio/org.maemo.esbox.scratchbox.sb1/src/org/maemo/esbox/internal/scratchbox/sb1/ui/wizard/nokiabin/SDKTargetSelectionPage.java
branches/work_Fabricio/org.maemo.esbox.vm.vmware/src/org/maemo/esbox/internal/api/vm/vmware/MaemoSDKVMInstaller.java
Log:
Merging from trunk 2112
Modified: branches/work_Fabricio/org.maemo.esbox.cpp.project/META-INF/MANIFEST.MF
===================================================================
--- branches/work_Fabricio/org.maemo.esbox.cpp.project/META-INF/MANIFEST.MF 2009-09-09 15:19:38 UTC (rev 2126)
+++ branches/work_Fabricio/org.maemo.esbox.cpp.project/META-INF/MANIFEST.MF 2009-09-09 17:12:34 UTC (rev 2127)
@@ -23,9 +23,6 @@
org.eclipse.cdt.core;bundle-version="5.0.2",
org.maemo.esbox.maemosdk.ui;bundle-version="2.0.0",
org.maemo.mica.maemosdk.core;bundle-version="2.0.0",
- org.maemo.mica.cpp.project.builder.make;bundle-version="2.0.0",
- org.maemo.mica.cpp.project.builder.autotools;bundle-version="2.0.0",
- org.maemo.esbox.scratchbox.sb1;bundle-version="2.0.0",
- org.maemo.esbox.scratchbox.core;bundle-version="2.0.0"
+ org.maemo.mica.cpp.project.builder.make;bundle-version="2.0.0"
Bundle-RequiredExecutionEnvironment: J2SE-1.5
Bundle-ActivationPolicy: lazy
Modified: branches/work_Fabricio/org.maemo.esbox.cpp.project/plugin.xml
===================================================================
--- branches/work_Fabricio/org.maemo.esbox.cpp.project/plugin.xml 2009-09-09 15:19:38 UTC (rev 2126)
+++ branches/work_Fabricio/org.maemo.esbox.cpp.project/plugin.xml 2009-09-09 17:12:34 UTC (rev 2127)
@@ -170,10 +170,6 @@
class="org.maemo.esbox.internal.cpp.project.core.ConvertCppProjectMarkerResolutionGenerator"
markerType="org.eclipse.core.resources.problemmarker">
</markerResolutionGenerator>
- <markerResolutionGenerator
- class="org.maemo.esbox.internal.cpp.project.core.ApplyDoctoolsFixMarkerResolutionGenerator"
- markerType="org.maemo.mica.cpp.project.builder.autotools.autotoolsProblemMarker">
- </markerResolutionGenerator>
</extension>
<extension
Deleted: branches/work_Fabricio/org.maemo.esbox.cpp.project/src/org/maemo/esbox/internal/cpp/project/core/ApplyDoctoolsFixMarkerResolutionGenerator.java
===================================================================
--- branches/work_Fabricio/org.maemo.esbox.cpp.project/src/org/maemo/esbox/internal/cpp/project/core/ApplyDoctoolsFixMarkerResolutionGenerator.java 2009-09-09 15:19:38 UTC (rev 2126)
+++ branches/work_Fabricio/org.maemo.esbox.cpp.project/src/org/maemo/esbox/internal/cpp/project/core/ApplyDoctoolsFixMarkerResolutionGenerator.java 2009-09-09 17:12:34 UTC (rev 2127)
@@ -1,172 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008 Nokia Corporation
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Ed Swartz (Nokia) - initial API and implementation
- *******************************************************************************/
-
-package org.maemo.esbox.internal.cpp.project.core;
-
-import java.lang.reflect.InvocationTargetException;
-
-import org.eclipse.core.resources.IMarker;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.IncrementalProjectBuilder;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-import org.eclipse.core.runtime.jobs.Job;
-import org.eclipse.jface.dialogs.ProgressMonitorDialog;
-import org.eclipse.jface.operation.IRunnableWithProgress;
-import org.eclipse.swt.graphics.Image;
-import org.eclipse.ui.IMarkerResolution;
-import org.eclipse.ui.IMarkerResolution2;
-import org.eclipse.ui.IMarkerResolutionGenerator2;
-import org.maemo.esbox.internal.cpp.project.Activator;
-import org.maemo.esbox.scratchbox.sb1.sdk.IScratchbox1SDKTarget;
-import org.maemo.mica.common.core.MicaException;
-import org.maemo.mica.common.core.sdk.ISDKTarget;
-import org.maemo.mica.common.project.core.ProjectManager;
-import org.maemo.mica.common.ui.dialogs.DialogUtils;
-import org.maemo.mica.cpp.project.builder.autotools.MicaAutotoolsConstants;
-import org.maemo.mica.internal.api.common.core.sdk.BaseSDKTarget;
-
-/**
- * Apply a "quick fix" for detected errors about intltool being out of date.
- * This really means, you need to add the "doctools" devkit.
- * @author eswartz
- *
- */
-public class ApplyDoctoolsFixMarkerResolutionGenerator implements
- IMarkerResolutionGenerator2 {
-
- private static class FixupDoctoolsMarkerResolution implements
- IMarkerResolution2 {
- public String getDescription() {
- return "Add the doctools devkit to your Scratchbox target. This provides the approved version of intltool (don't install it inside the target).";
- }
-
- public Image getImage() {
- return null;
- }
-
- public String getLabel() {
- return "Add doctools devkit to target";
- }
-
- public void run(final IMarker marker) {
- ProgressMonitorDialog dialog = new ProgressMonitorDialog(null);
- try {
- dialog.run(true, true, new IRunnableWithProgress() {
-
- public void run(IProgressMonitor monitor)
- throws InvocationTargetException,
- InterruptedException {
- monitor.beginTask("Adding devkit...", IProgressMonitor.UNKNOWN);
- addDoctoolsDevkit(marker);
- monitor.worked(1);
- monitor.done();
- }
-
- });
-
- } catch (InvocationTargetException e) {
- Activator.getErrorLogger().logError("Unexpected error fixing marker", e.getCause());
- return;
- } catch (InterruptedException e) {
- return;
- }
-
- boolean build = DialogUtils.showQuestionDialog(null,
- "Updated target",
- "Added the 'doctools' devkit to the target.\n \nDo you want to rebuild now?");
- if (build) {
- Job buildJob = new Job("Rebuild project") {
-
- @Override
- protected IStatus run(IProgressMonitor monitor) {
- try {
- marker.getResource().getProject().build(IncrementalProjectBuilder.FULL_BUILD,
- monitor);
- return Status.OK_STATUS;
-
- } catch (CoreException e) {
- return e.getStatus();
- }
- }
-
- };
- buildJob.schedule();
-
- }
-
- }
-
- /**
- * @param marker
- */
- private void addDoctoolsDevkit(final IMarker marker) {
- try {
- // already checked
- IResource rsrc = marker.getResource();
- ISDKTarget target = ProjectManager.getInstance().getSDKTarget(rsrc.getProject());
- // in case it changed...
- if (target instanceof IScratchbox1SDKTarget) {
- IScratchbox1SDKTarget sb1Target = (IScratchbox1SDKTarget) target;
- // in case out of date
- ((BaseSDKTarget) sb1Target).clearCache();
- sb1Target.addDevkit("doctools");
- marker.delete();
-
- }
- } catch (MicaException e) {
- Activator.getErrorLogger().logAndShowError("Error updating devkits", e);
- } catch (CoreException e) {
- Activator.getErrorLogger().logError("Failed to fix marker", e);
- }
- }
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.IMarkerResolutionGenerator2#hasResolutions(org.eclipse.core.resources.IMarker)
- */
- public boolean hasResolutions(IMarker marker) {
- try {
- if (marker.getType().equals(MicaAutotoolsConstants.AUTOTOOLS_PROBLEM_MARKER_TYPE)) {
- Object message = marker.getAttribute(IMarker.MESSAGE);
- if (message != null && message.toString().contains("Your intltool is too old")) {
- // make sure doctools is not already present
- IResource rsrc = marker.getResource();
- if (rsrc != null) {
- ISDKTarget target = ProjectManager.getInstance().getSDKTarget(rsrc.getProject());
- if (target instanceof IScratchbox1SDKTarget) {
- return true;
- }
- }
- }
- }
- } catch (CoreException e) {
- // marker bugs
- } catch (MicaException e) {
- // not a Mica project
- }
- return false;
- }
-
- /* (non-Javadoc)
- * @see org.eclipse.ui.IMarkerResolutionGenerator#getResolutions(org.eclipse.core.resources.IMarker)
- */
- public IMarkerResolution[] getResolutions(IMarker marker) {
- return new IMarkerResolution[] {
- new FixupDoctoolsMarkerResolution()
- };
- }
-
-
-
-}
Modified: branches/work_Fabricio/org.maemo.esbox.help/html/images/debian/wiz-debian-deploy-package.png
===================================================================
(Binary files differ)
Modified: branches/work_Fabricio/org.maemo.esbox.help/html/images/install_wiz/wiz-maemo-installers.png
===================================================================
(Binary files differ)
Copied: branches/work_Fabricio/org.maemo.esbox.help/html/images/install_wiz/wiz-maemovm-1-advanced.png (from rev 2112, trunk/org.maemo.esbox.help/html/images/install_wiz/wiz-maemovm-1-advanced.png)
===================================================================
(Binary files differ)
Copied: branches/work_Fabricio/org.maemo.esbox.help/html/images/install_wiz/wiz-maemovm-1.png (from rev 2112, trunk/org.maemo.esbox.help/html/images/install_wiz/wiz-maemovm-1.png)
===================================================================
(Binary files differ)
Copied: branches/work_Fabricio/org.maemo.esbox.help/html/images/install_wiz/wiz-maemovm-2.png (from rev 2112, trunk/org.maemo.esbox.help/html/images/install_wiz/wiz-maemovm-2.png)
===================================================================
(Binary files differ)
Copied: branches/work_Fabricio/org.maemo.esbox.help/html/images/install_wiz/wiz-maemovm-3.png (from rev 2112, trunk/org.maemo.esbox.help/html/images/install_wiz/wiz-maemovm-3.png)
===================================================================
(Binary files differ)
Copied: branches/work_Fabricio/org.maemo.esbox.help/html/images/install_wiz/wiz-maemovm-4.png (from rev 2112, trunk/org.maemo.esbox.help/html/images/install_wiz/wiz-maemovm-4.png)
===================================================================
(Binary files differ)
Modified: branches/work_Fabricio/org.maemo.esbox.help/html/tasks/DebianPackage.html
===================================================================
--- branches/work_Fabricio/org.maemo.esbox.help/html/tasks/DebianPackage.html 2009-09-09 15:19:38 UTC (rev 2126)
+++ branches/work_Fabricio/org.maemo.esbox.help/html/tasks/DebianPackage.html 2009-09-09 17:12:34 UTC (rev 2127)
@@ -82,8 +82,8 @@
</li>
<li>Click on <strong>Browse...</strong> to select a package if you haven't deployed it before, or type in the path to the package
if you're planning to build it for the first time in this step.</li>
- <li>Check <strong>Install package on device</strong> to install the package. When enabled, the <strong>Device Address</strong> field is enabled.</li>
-
+ <li>Check <strong>Install package on device</strong> to install the package. When enabled, the <strong>Device Address</strong> field is enabled.</li>
+ <li>Check <strong>Enable extra logging</strong> to log more information about the package installation. When enabled, the <strong>Extra Logging Options</strong> group is enabled. Common extra logging options are set as default.</li>
<li>Click <strong>Finish</strong>.</li>
<li>You may need to provide the root password to perform package management on the device:
<p><img alt="password prompt" src="../images/dialog-device-root-password.png"></p>
Copied: branches/work_Fabricio/org.maemo.esbox.help/html/tasks/InstallingMaemoSDKVMImage.html (from rev 2112, trunk/org.maemo.esbox.help/html/tasks/InstallingMaemoSDKVMImage.html)
===================================================================
--- branches/work_Fabricio/org.maemo.esbox.help/html/tasks/InstallingMaemoSDKVMImage.html (rev 0)
+++ branches/work_Fabricio/org.maemo.esbox.help/html/tasks/InstallingMaemoSDKVMImage.html 2009-09-09 17:12:34 UTC (rev 2127)
@@ -0,0 +1,71 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
+<html lang="en">
+<head>
+ <meta name="copyright" content="Copyright (c) INdT 2007-2009, (c) Nokia 2008-2009. This page is made available under license. For full details see the LEGAL in the documentation book that contains this page." >
+ <meta http-equiv="Content-Language" content="en-us">
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+ <title>Installing Maemo SDK Virtual Image</title>
+ <link rel="stylesheet" type="text/css" href="../help.css">
+</head>
+<body>
+
+<h2>Installing Maemo SDK Virtual Image</h2>
+
+<p>ESbox uses Maemo SDK Virtual Image installer to install and configure a virtual image to be used as Build Machine on.
+The wizard downloads the virtual image, uncompresses it and finally installs Scratchbox 1, Scratchbox 1 targets, Nokia binaries meta-package and
+also programming languages with biddings for C++ and Python. The wizard guides you through the configuration and prerequisites needed before start
+installation.
+</p>
+<p>Steps:</p>
+ <ol>
+ <li>Select <strong>File > New > Other > Maemo Installers > Maemo SDK Virtual Image</strong> from the main menu bar to open the wizard.
+ </p>
+ <img src="../images/install_wiz/wiz-maemo-installers.png" alt="menu">
+ </li>
+ <li>On the first page, select the Maemo SDK virtual image you want to install. There are virtual images with Ubuntu Server or
+ Ubuntu Desktop installed. Virtual images with Ubuntu Server are used as a Build Machine in ESbox. Server images do not have X installed
+ neither Scratchbox and the Maemo SDK by default. Desktop images have X and ESbox installed by default. It may also be used as a Build Machine in
+ ESbox, but is intended for standalone usage. On Desktop images, Scratchbox and the Maemo SDK are installed by default.
+ <p>(If the list of virtual images cannot be fetched, be sure the <em>Network Connections</em>
+ are set up properly and then retry the wizard.)</p>
+ <p>Select <em>Download latest Maemo SDK server image</em> to download the latest Maemo SDK virtual images with Ubuntu Server installed. Otherwise,
+ you can select a virtual image listed on table (Desktop/Server).</p>
+ <p>On <em>Install location</em> field, the directory wherein the Maemo SDK virtual image is uncompressed and installed must be specified.
+ <p/>
+ <img src="../images/install_wiz/wiz-maemovm-1.png" alt="platform">
+ </li>
+ <li>Click the <em>Advanced >></em> to see advanced options, such as
+ installing Maemo SDK virtual image from a previously downloaded virtual image.
+ <p/>
+ <img src="../images/install_wiz/wiz-maemovm-1-advanced.png" alt="advanced">
+ </li>
+ <li>Click <strong>Next</strong>. Now, a page with options to configure the Maemo SDK virtual image appears. It is possible to select
+ options to install Scratchbox 1, Scratchbox 1 Targets and programming language (C++ or Python). Some options are already marked
+ considering the virtual image you selected on initial page. (For installation from existing downloaded virtual image, default
+ values for a virtual image with Ubuntu Server installed is considered.)
+ <p/>
+ <img src="../images/install_wiz/wiz-maemovm-2.png" alt="existing installation">
+ </li>
+ <li>Click <strong>Next</strong>. Review the license notes. You can only proceed if you accept the terms of the license agreements.
+ <p/>
+ <img src="../images/install_wiz/wiz-maemovm-3.png" alt="work page">
+ </li>
+ <li> Click <strong>Finish</strong>.
+ The installation may prompt you with questions which arise when downloading, configuring and installing Scratchbox and meta-packages.
+ As initial configuration, you need to specify some information about how Maemo SDK virtual image will be accessed. For more information,
+ see <a href="../html/tasks/UsingVirtualMachines.html">Using ESbox with Virtual Machines</a> document. If you selected Scratchbox or any other installation option at second page, the installation may prompt you with wizards to
+ configure/install them. For more information, see <a href="../html/tasks/InstallingScratchbox1.html">Install Scratchbox 1</a> and <a href="../html/tasks/InstallingScratchbox1Targets.html">Install Scratchbox 1 Targets</a> documents.
+ </p>
+ <img src="../images/install_wiz/wiz-maemovm-4.png" alt="work page">
+ </li>
+ </ol>
+
+ <h3>Related Topics</h3>
+<ul>
+ <li><a href="../html/tasks/UsingVirtualMachines.html">Using ESbox with Virtual Machines</a></li>
+ <li><a href="../html/tasks/InstallingScratchbox1.html">Install Scratchbox 1</a></li>
+ <li><a href="../html/tasks/InstallingScratchbox1Targets.html">Install Scratchbox 1 Targets</a></li>
+
+</ul>
+</body>
+</html>
\ No newline at end of file
Modified: branches/work_Fabricio/org.maemo.esbox.help/html/toctasks.html
===================================================================
--- branches/work_Fabricio/org.maemo.esbox.help/html/toctasks.html 2009-09-09 15:19:38 UTC (rev 2126)
+++ branches/work_Fabricio/org.maemo.esbox.help/html/toctasks.html 2009-09-09 17:12:34 UTC (rev 2127)
@@ -17,6 +17,7 @@
</h3><li><h3><a href="../html/tasks/InstallingScratchbox1.html">Install Scratchbox 1</a>
</h3><li><h3><a href="../html/tasks/InstallingScratchbox1Targets.html">Install Scratchbox 1 Targets</a>
</h3><li><h3><a href="../html/tasks/InstallingScratchbox2Targets.html">Install Scratchbox 2 Targets</a>
+</h3><li><h3><a href="../html/tasks/InstallingMaemoSDKVMImage.html">Install Maemo SDK Virtual Image</a>
</h3><li><h3><a href="../html/tasks/SettingPreferences.html">Setting Up Preferences</a>
</h3><li><h3><a href="../html/tasks/MakingProjectsVisible.html">Making Projects Visible to Multiple Targets</a>
</h3><li><h3><a href="../html/tasks/CreatingCProject.html">Create a Maemo C Project</a>
Modified: branches/work_Fabricio/org.maemo.esbox.maemosdk.core/src/org/maemo/esbox/internal/api/maemosdk/core/tools/AfSbInitMaemoLauncherAdapter.java
===================================================================
--- branches/work_Fabricio/org.maemo.esbox.maemosdk.core/src/org/maemo/esbox/internal/api/maemosdk/core/tools/AfSbInitMaemoLauncherAdapter.java 2009-09-09 15:19:38 UTC (rev 2126)
+++ branches/work_Fabricio/org.maemo.esbox.maemosdk.core/src/org/maemo/esbox/internal/api/maemosdk/core/tools/AfSbInitMaemoLauncherAdapter.java 2009-09-09 17:12:34 UTC (rev 2127)
@@ -160,7 +160,7 @@
public void restartMaemo(IProgressMonitor monitor) throws MicaException {
if (monitor == null)
monitor = new NullProgressMonitor();
- monitor.beginTask("", 10);
+ monitor.beginTask("", IProgressMonitor.UNKNOWN);
ensureCorrectXRunning(new SubProgressMonitor(monitor, 1));
if (monitor.isCanceled())
@@ -176,7 +176,7 @@
public void startMaemo(IProgressMonitor monitor) throws MicaException {
if (monitor == null)
monitor = new NullProgressMonitor();
- monitor.beginTask("", 10);
+ monitor.beginTask("", IProgressMonitor.UNKNOWN);
ensureCorrectXRunning(new SubProgressMonitor(monitor, 1));
if (monitor.isCanceled())
@@ -383,7 +383,7 @@
public void stopMaemo(IProgressMonitor monitor) throws MicaException {
if (monitor == null)
monitor = new NullProgressMonitor();
- monitor.beginTask("", 10);
+ monitor.beginTask("", IProgressMonitor.UNKNOWN);
command.performCommand(MaemoPreferenceConstants.MAEMO_STOP_ACTION,
new SubProgressMonitor(monitor, 9));
@@ -488,12 +488,14 @@
// just hangs forever (waiting for input?)... dunno why.
// This happened at least as far back as 2.0.0M1 but
// there was no Job tracking, so we didn't notice.
+
+ monitor.subTask("Waiting until complete...");
Job job = new Job("Finishing Maemo AF startup") {
@Override
protected IStatus run(IProgressMonitor xmonitor) {
try {
- Thread.sleep(30000);
+ Thread.sleep(15000);
} catch (InterruptedException e) {
}
procMonitor.terminate();
Modified: branches/work_Fabricio/org.maemo.esbox.scratchbox.core/src/org/maemo/esbox/scratchbox/core/command/ScratchboxCommand.java
===================================================================
--- branches/work_Fabricio/org.maemo.esbox.scratchbox.core/src/org/maemo/esbox/scratchbox/core/command/ScratchboxCommand.java 2009-09-09 15:19:38 UTC (rev 2126)
+++ branches/work_Fabricio/org.maemo.esbox.scratchbox.core/src/org/maemo/esbox/scratchbox/core/command/ScratchboxCommand.java 2009-09-09 17:12:34 UTC (rev 2127)
@@ -262,6 +262,7 @@
final boolean allowError, final long timeout)
throws ScratchboxException {
final String[] inputs = { null };
+ final String[] errors = { "" };
final Exception[] excs = { null };
final int[] exits = { -1 };
Runnable runnable = new Runnable() {
@@ -270,11 +271,11 @@
try {
inputs[0] = getInputFromProcess(process);
- String error = getErrorInputFromProcess(process);
+ errors[0] = getErrorInputFromProcess(process);
if (!allowError) {
- if (error.length() > 0) {
+ if (errors[0].length() > 0) {
excs[0] = new ScratchboxInvalidOperationException(
- error);
+ errors[0]);
return;
}
}
@@ -321,8 +322,8 @@
throw new ScratchboxException(excs[0]);
} else if (exits[0] != 0) {
throw new ScratchboxException(
- MessageFormat.format("Process failed with exit code {0}",
- exits[0]));
+ MessageFormat.format("Process failed with exit code {0}\n{1}",
+ exits[0], errors[0]));
}
return inputs[0];
Modified: branches/work_Fabricio/org.maemo.esbox.scratchbox.sb1/src/org/maemo/esbox/internal/scratchbox/sb1/core/Scratchbox1SDK.java
===================================================================
--- branches/work_Fabricio/org.maemo.esbox.scratchbox.sb1/src/org/maemo/esbox/internal/scratchbox/sb1/core/Scratchbox1SDK.java 2009-09-09 15:19:38 UTC (rev 2126)
+++ branches/work_Fabricio/org.maemo.esbox.scratchbox.sb1/src/org/maemo/esbox/internal/scratchbox/sb1/core/Scratchbox1SDK.java 2009-09-09 17:12:34 UTC (rev 2127)
@@ -12,6 +12,7 @@
package org.maemo.esbox.internal.scratchbox.sb1.core;
import com.nokia.cpp.internal.api.utils.core.FileUtils;
+import com.nokia.cpp.internal.api.utils.ui.WorkbenchUtils;
import org.eclipse.core.filesystem.IFileStore;
import org.eclipse.core.runtime.*;
@@ -38,6 +39,7 @@
import org.maemo.mica.common.core.process.*;
import org.maemo.mica.common.core.sdk.*;
import org.maemo.mica.common.core.ui.*;
+import org.maemo.mica.common.ui.dialogs.DialogUtils;
import org.maemo.mica.internal.api.common.core.SudoWrappedProcessLauncherFactory;
import org.maemo.mica.internal.api.common.core.machine.HostMachineBackend;
import org.maemo.mica.internal.api.common.core.sdk.SDKPlatform;
@@ -92,6 +94,7 @@
ListTargetsCommand listTargetsCommand = new ListTargetsCommand(
getCommandAbstractor());
+
List<String> targets = (List<String>) wrapCommand(listTargetsCommand, EMPTY_ARGS);
targets = new ArrayList<String>(targets);
@@ -152,25 +155,7 @@
// ensure we actually try to invoke sb-conf below
getCache().set(VERSION_KEY, null);
- String version = null;
- try {
- version = getCurrentSboxVersion();
- } catch (ScratchboxException e) {
- if (e.getMessage().contains("vdso support") // need to do the "vdso=0" option dynamically
- || e.getMessage().contains("not properly set up") // this MAY be because it has not been enabled with sbox_ctl
- ) {
- IStatus status = Scratchbox1SDK.startup(getMachine(), sdkRoot,
- null, new ProgressReporterAdapter());
- if (!status.isOK() && !status.matches(IStatus.INFO)) {
- // already logged
- throw e;
- }
- Activator.getErrorLogger().log(status);
-
- // try again
- version = getCurrentSboxVersion();
- }
- }
+ String version = getCurrentSboxVersion();
if (version == null) {
// no scratchbox?
@@ -936,7 +921,20 @@
// might not be turned on yet
if (e.getMessage() != null &&
(e.getMessage().contains("properly set up")
- || e.getMessage().contains("Inconsistency detected by ld.so"))) {
+ || e.getMessage().contains("Inconsistency detected by ld.so")
+ || e.getMessage().contains("kernel has vdso support"))) {
+
+ boolean startup = WorkbenchUtils.isJUnitRunning();
+ if (!startup)
+ startup = DialogUtils.showQuestionDialog(null, "Scratchbox 1 Startup?",
+ MessageFormat.format(
+ "It appears that Scratchbox 1 at {0} is not started, perhaps because the kernel has some incompatible settings or you have not installed its startup script:\n\n{1}\n\nShould I try to start it now?",
+ getInstallRoot().toPortableString(),
+ e.getMessage())
+ );
+ if (!startup)
+ throw e;
+
IStatus status = Scratchbox1SDK.startup(
getMachine(), getInstallRoot(),
new NullProgressMonitor(),
Modified: branches/work_Fabricio/org.maemo.esbox.scratchbox.sb1/src/org/maemo/esbox/internal/scratchbox/sb1/ui/wizard/NewScratchbox1SDKWizard.java
===================================================================
--- branches/work_Fabricio/org.maemo.esbox.scratchbox.sb1/src/org/maemo/esbox/internal/scratchbox/sb1/ui/wizard/NewScratchbox1SDKWizard.java 2009-09-09 15:19:38 UTC (rev 2126)
+++ branches/work_Fabricio/org.maemo.esbox.scratchbox.sb1/src/org/maemo/esbox/internal/scratchbox/sb1/ui/wizard/NewScratchbox1SDKWizard.java 2009-09-09 17:12:34 UTC (rev 2127)
@@ -24,7 +24,6 @@
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.jface.window.Window;
import org.eclipse.jface.wizard.IWizardContainer;
import org.eclipse.jface.wizard.IWizardPage;
import org.eclipse.jface.wizard.Wizard;
@@ -74,6 +73,8 @@
private Scratchbox1InstallerWorkPage workPage;
private boolean canFinish =false;
+
+ private boolean success = false;
/**
* Constructs a new target wizard for the given SDK (from the target
@@ -92,6 +93,13 @@
}
/**
+ * @return the success
+ */
+ public boolean isSuccess() {
+ return success;
+ }
+
+ /**
* Constructs a new target wizard for the given SDK (from the target
* configuration page).
*
@@ -186,7 +194,7 @@
patchAutotools();
doReboot();
}
-
+ this.success = installedNew;
return goOn;
}
@@ -321,8 +329,8 @@
Shell parent = activeWorkbenchWindow.getShell();
WizardDialog dialog = new WizardDialog(parent, wizard);
dialog.create();
- int result = dialog.open();
- if (result == Window.CANCEL)
+ dialog.open();
+ if (!wizard.isSuccess())
return Activator.createStatus(IStatus.CANCEL, "Scratchbox 1 SDK installation was canceled");
else
return Activator.createStatus(IStatus.OK, "Scratchbox 1 SDK has finished");
Modified: branches/work_Fabricio/org.maemo.esbox.scratchbox.sb1/src/org/maemo/esbox/internal/scratchbox/sb1/ui/wizard/NewScratchbox1TargetWizard.java
===================================================================
--- branches/work_Fabricio/org.maemo.esbox.scratchbox.sb1/src/org/maemo/esbox/internal/scratchbox/sb1/ui/wizard/NewScratchbox1TargetWizard.java 2009-09-09 15:19:38 UTC (rev 2126)
+++ branches/work_Fabricio/org.maemo.esbox.scratchbox.sb1/src/org/maemo/esbox/internal/scratchbox/sb1/ui/wizard/NewScratchbox1TargetWizard.java 2009-09-09 17:12:34 UTC (rev 2127)
@@ -21,7 +21,6 @@
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.jface.viewers.StructuredSelection;
-import org.eclipse.jface.window.Window;
import org.eclipse.jface.wizard.IWizardContainer;
import org.eclipse.jface.wizard.IWizardPage;
import org.eclipse.jface.wizard.Wizard;
@@ -63,6 +62,9 @@
private final IBuildMachine buildMachine;
private Scratchbox1InstallerWorkPage workPage;
+ private boolean suppressNokiaBinariesWizard;
+
+ private boolean success;
/**
* Constructs a new target wizard.
@@ -77,6 +79,25 @@
initialize();
}
+ /**
+ * @return the success
+ */
+ public boolean isSuccess() {
+ return success;
+ }
+
+ /**
+ * Control whether this wizard will ask the user to install the Nokia Binaries
+ * afterwards. Since that wizard runs asynchronously after this one, it's
+ * hard to synchronize package operations around it. Instead, run it directly.
+ * (ESbox #4487)
+ * @param suppressNokiaBinariesWizard true to avoid asking user to run wizard
+ */
+ public void setSuppressNokiaBinariesWizard(
+ boolean suppressNokiaBinariesWizard) {
+ this.suppressNokiaBinariesWizard = suppressNokiaBinariesWizard;
+ }
+
private void initialize() {
setNeedsProgressMonitor(true);
setWindowTitle("Install Scratchbox 1 Targets");
@@ -155,14 +176,26 @@
final boolean goOn = workPage.reportOperationStatus("Target Installation Results", message, status, true)
&& !status.matches(IStatus.CANCEL);
+
+ if (success && !suppressNokiaBinariesWizard) {
+ promptInstallNokiaBinaries(false);
+ }
-
+ this.success = success;
+ return goOn;
+ }
+
+ /**
+ * Ask the user to install Nokia binaries, which are required in some cases.
+ * @param synchronous controls whether the wizard is launched synchronously or not.
+ * This is used in automatic invocations of the target wizard.
+ */
+ private void promptInstallNokiaBinaries(boolean synchronous) {
//calls Nokia-closed binaries wizard
- if (success
- && DialogUtils.showQuestionDialog(DialogUtils.getShell(),
+ if (DialogUtils.showQuestionDialog(DialogUtils.getShell(),
"Nokia-closed binaries installation",
"Would you like to install Nokia-closed binaries for installed targets now?")) {
- Display.getDefault().asyncExec(new Runnable() {
+ Runnable runnable = new Runnable() {
public void run() {
//get installed targets
Scratchbox1TargetInstallerData data = targetPage.getTargetInstallerData();
@@ -177,12 +210,14 @@
//call wizard with targets pre selected
NokiaBinariesInstallWizard.startWizard(installed.toArray(new ISDKTarget[installed.size()]));
}
- });
- }
-
- return goOn;
+ };
+ if (synchronous)
+ Display.getDefault().syncExec(runnable);
+ else
+ Display.getDefault().asyncExec(runnable);
+ }
}
-
+
public IStatus doWork() {
final IStatus[] statuses = { Policy.getCancelStatus(Activator.getDefault()) } ;
try {
@@ -243,13 +278,17 @@
NewScratchbox1TargetWizard wizard = new NewScratchbox1TargetWizard();
wizard.init(activeWorkbenchWindow.getWorkbench(),
StructuredSelection.EMPTY);
+ wizard.setSuppressNokiaBinariesWizard(true);
Shell parent = activeWorkbenchWindow.getShell();
WizardDialog dialog = new WizardDialog(parent, wizard);
dialog.create();
- int result = dialog.open();
- if (result == Window.CANCEL)
+ dialog.open();
+ if (!wizard.isSuccess())
return Activator.createStatus(IStatus.CANCEL, "Scratchbox 1 target installation was canceled");
- else
- return Activator.createStatus(IStatus.OK, "Scratchbox 1 target has finished");
+
+ // now install Nokia binaries synchronously
+ wizard.promptInstallNokiaBinaries(true);
+ return Activator.createStatus(IStatus.OK, "Scratchbox 1 target installation has finished");
}
+
}
Modified: branches/work_Fabricio/org.maemo.esbox.scratchbox.sb1/src/org/maemo/esbox/internal/scratchbox/sb1/ui/wizard/Scratchbox1TargetInstallerSelectionWizardPage.java
===================================================================
--- branches/work_Fabricio/org.maemo.esbox.scratchbox.sb1/src/org/maemo/esbox/internal/scratchbox/sb1/ui/wizard/Scratchbox1TargetInstallerSelectionWizardPage.java 2009-09-09 15:19:38 UTC (rev 2126)
+++ branches/work_Fabricio/org.maemo.esbox.scratchbox.sb1/src/org/maemo/esbox/internal/scratchbox/sb1/ui/wizard/Scratchbox1TargetInstallerSelectionWizardPage.java 2009-09-09 17:12:34 UTC (rev 2127)
@@ -175,10 +175,13 @@
sboxCombo.addSelectionChangedListener(new ISelectionChangedListener() {
public void selectionChanged(SelectionChangedEvent event) {
- sdk = ((IScratchbox1SDK) ((IStructuredSelection) event.getSelection()).getFirstElement());
- if (targetInstallerData != null && sdk != null)
- targetInstallerData.setScratchbox1SDK(sdk);
- validatePage();
+ Object firstElement = ((IStructuredSelection) event.getSelection()).getFirstElement();
+ if (firstElement instanceof IScratchbox1SDK) {
+ sdk = ((IScratchbox1SDK) firstElement);
+ if (targetInstallerData != null && sdk != null)
+ targetInstallerData.setScratchbox1SDK(sdk);
+ validatePage();
+ }
}
});
@@ -318,7 +321,8 @@
*/
@Override
public void widgetSelected(SelectionEvent e) {
- targetInstallerData.setForceRemove(forceRemove.getSelection());
+ if (targetInstallerData != null)
+ targetInstallerData.setForceRemove(forceRemove.getSelection());
validatePage();
}
});
@@ -366,7 +370,8 @@
cpuTranspCombo.addSelectionChangedListener(new ISelectionChangedListener() {
public void selectionChanged(SelectionChangedEvent event) {
- targetInstallerData.setQemu(((String) ((IStructuredSelection) event.getSelection()).getFirstElement()));
+ if (targetInstallerData != null)
+ targetInstallerData.setQemu(((String) ((IStructuredSelection) event.getSelection()).getFirstElement()));
validatePage();
}
@@ -393,9 +398,11 @@
public void modifyText(ModifyEvent e) {
String baseTarget = baseTargetText.getText();
- targetInstallerData.setBaseTarget(baseTarget);
- targetPreview.setText("(targets: " + targetInstallerData.getX86TargetName()
- + " and " + targetInstallerData.getARMELTargetName() + ")");
+ if (targetInstallerData != null) {
+ targetInstallerData.setBaseTarget(baseTarget);
+ targetPreview.setText("(targets: " + targetInstallerData.getX86TargetName()
+ + " and " + targetInstallerData.getARMELTargetName() + ")");
+ }
validatePage();
}
Modified: branches/work_Fabricio/org.maemo.esbox.scratchbox.sb1/src/org/maemo/esbox/internal/scratchbox/sb1/ui/wizard/nokiabin/SDKTargetSelectionPage.java
===================================================================
--- branches/work_Fabricio/org.maemo.esbox.scratchbox.sb1/src/org/maemo/esbox/internal/scratchbox/sb1/ui/wizard/nokiabin/SDKTargetSelectionPage.java 2009-09-09 15:19:38 UTC (rev 2126)
+++ branches/work_Fabricio/org.maemo.esbox.scratchbox.sb1/src/org/maemo/esbox/internal/scratchbox/sb1/ui/wizard/nokiabin/SDKTargetSelectionPage.java 2009-09-09 17:12:34 UTC (rev 2127)
@@ -137,6 +137,7 @@
targetTree.setSubtreeChecked(event.getElement(), event.getChecked());
if (event.getChecked())
targetTree.expandToLevel(event.getElement(), TreeViewer.ALL_LEVELS);
+ _page.setPageComplete(validatePage());
}
});
Modified: branches/work_Fabricio/org.maemo.esbox.vm.vmware/src/org/maemo/esbox/internal/api/vm/vmware/MaemoSDKVMInstaller.java
===================================================================
--- branches/work_Fabricio/org.maemo.esbox.vm.vmware/src/org/maemo/esbox/internal/api/vm/vmware/MaemoSDKVMInstaller.java 2009-09-09 15:19:38 UTC (rev 2126)
+++ branches/work_Fabricio/org.maemo.esbox.vm.vmware/src/org/maemo/esbox/internal/api/vm/vmware/MaemoSDKVMInstaller.java 2009-09-09 17:12:34 UTC (rev 2127)
@@ -221,7 +221,7 @@
*/
private IStatus installScratchbox(final Shell shell, IProgressMonitor monitor) {
monitor.subTask("Installing Scratchbox 1...");
- reporter.logInfo("Installing Scratchbox 1 on Maemo SDK virtual image. This operation may take several minutes.");
+ reporter.logInfo("Installing Scratchbox 1 on Maemo SDK virtual image. This operation will take several minutes.");
final IStatus[] statuses = { Activator.createStatus(IStatus.OK, "Scratchbox was properly installed on Maemo SDK virtual image.") } ;
@@ -244,14 +244,14 @@
*/
private IStatus installScratchboxTargets(final Shell shell, IProgressMonitor monitor) {
monitor.subTask("Installing Scratchbox 1 targets...");
- reporter.logInfo("Installing Scratchbox 1 Targets on Maemo SDK virtual image. This operation may take several minutes.");
+ reporter.logInfo("Installing Scratchbox 1 Targets on Maemo SDK virtual image. This operation will take several minutes.");
- final IStatus[] statuses = { Activator.createStatus(IStatus.OK, "Scratchbox targets was properly installed on Maemo SDK virtual image.") } ;
+ final IStatus[] statuses = { Activator.createStatus(IStatus.OK, "Scratchbox targets were properly installed on Maemo SDK virtual image.") } ;
shell.getDisplay().syncExec(new Runnable() {
public void run() {
- statuses[0] = NewScratchbox1TargetWizard.startWizard();
+ statuses[0] = NewScratchbox1TargetWizard.startWizard();
}
});
More information about the Esbox-commits
mailing list