[Esbox-commits] r1847 - in branches/work_Fabricio: org.maemo.esbox.cpp.project/src/org/maemo/esbox/internal/cpp/project/ui/properties org.maemo.esbox.help/html/concepts org.maemo.esbox.help/html/images/pref_images org.maemo.esbox.help/html/reference org.maemo.esbox.help/html/tasks org.maemo.esbox.maemosdk.core/src/org/maemo/esbox/internal/api/maemosdk/core/tools org.maemo.esbox.maemosdk.ui/src/org/maemo/esbox/internal/api/maemosdk/ui/preferences org.maemo.esbox.scratchbox.core/src/org/maemo/esbox/internal/api/scratchbox/core/execEnv org.maemo.esbox.scratchbox.core/src/org/maemo/esbox/internal/api/scratchbox/core/sdk org.maemo.esbox.scratchbox.core/src/org/maemo/esbox/internal/scratchbox/adapters org.maemo.esbox.scratchbox.sb1/src/org/maemo/esbox/internal/scratchbox/sb1/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.tests/src/org/maemo/esbox/scratchbox/tests org.maemo.esbox.vm/src/org/maemo/esbox/internal/api/vm/core
fabricioepa at garage.maemo.org
fabricioepa at garage.maemo.org
Fri Jul 3 20:12:05 EEST 2009
Author: fabricioepa
Date: 2009-07-03 20:12:02 +0300 (Fri, 03 Jul 2009)
New Revision: 1847
Modified:
branches/work_Fabricio/org.maemo.esbox.cpp.project/src/org/maemo/esbox/internal/cpp/project/ui/properties/ESboxCppBuildConfigurationsPage.java
branches/work_Fabricio/org.maemo.esbox.help/html/concepts/Sbrsh.html
branches/work_Fabricio/org.maemo.esbox.help/html/images/pref_images/prefs-maemo.png
branches/work_Fabricio/org.maemo.esbox.help/html/reference/FAQ.html
branches/work_Fabricio/org.maemo.esbox.help/html/tasks/InstallingPCConnectivity.html
branches/work_Fabricio/org.maemo.esbox.help/html/tasks/SettingPreferences.html
branches/work_Fabricio/org.maemo.esbox.help/html/tasks/UsingVirtualMachines.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.maemosdk.ui/src/org/maemo/esbox/internal/api/maemosdk/ui/preferences/SharedFolderTableViewer.java
branches/work_Fabricio/org.maemo.esbox.scratchbox.core/src/org/maemo/esbox/internal/api/scratchbox/core/execEnv/MaemoExecutionEnvironmentHandler.java
branches/work_Fabricio/org.maemo.esbox.scratchbox.core/src/org/maemo/esbox/internal/api/scratchbox/core/sdk/AbstractScratchboxSDK.java
branches/work_Fabricio/org.maemo.esbox.scratchbox.core/src/org/maemo/esbox/internal/api/scratchbox/core/sdk/BaseScratchboxSDKTarget.java
branches/work_Fabricio/org.maemo.esbox.scratchbox.core/src/org/maemo/esbox/internal/scratchbox/adapters/ESBoxSBRSHLaunchAdapter.java
branches/work_Fabricio/org.maemo.esbox.scratchbox.sb1/src/org/maemo/esbox/internal/scratchbox/sb1/command/GetCurrentTargetCommand.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/core/Scratchbox1SDKTarget.java
branches/work_Fabricio/org.maemo.esbox.scratchbox.sb1/src/org/maemo/esbox/internal/scratchbox/sb1/ui/wizard/Scratchbox1TargetInstallerData.java
branches/work_Fabricio/org.maemo.esbox.scratchbox.tests/src/org/maemo/esbox/scratchbox/tests/TestSB2SDKProvider.java
branches/work_Fabricio/org.maemo.esbox.vm/src/org/maemo/esbox/internal/api/vm/core/BaseVirtualBuildMachine.java
Log:
Merging to r1841 /trunk
Modified: branches/work_Fabricio/org.maemo.esbox.cpp.project/src/org/maemo/esbox/internal/cpp/project/ui/properties/ESboxCppBuildConfigurationsPage.java
===================================================================
--- branches/work_Fabricio/org.maemo.esbox.cpp.project/src/org/maemo/esbox/internal/cpp/project/ui/properties/ESboxCppBuildConfigurationsPage.java 2009-07-02 20:26:26 UTC (rev 1846)
+++ branches/work_Fabricio/org.maemo.esbox.cpp.project/src/org/maemo/esbox/internal/cpp/project/ui/properties/ESboxCppBuildConfigurationsPage.java 2009-07-03 17:12:02 UTC (rev 1847)
@@ -129,8 +129,10 @@
uiHolder.setVisible(true);
- ICppBuildConfigurationData cppData = (ICppBuildConfigurationData) data;
- table.initializeFrom(cppData.environmentModifierBlock());
+ if (data instanceof ICppBuildConfigurationData) {
+ ICppBuildConfigurationData cppData = (ICppBuildConfigurationData) data;
+ table.initializeFrom(cppData.environmentModifierBlock());
+ }
}
/* (non-Javadoc)
@@ -138,8 +140,10 @@
*/
@Override
protected void applyToConfigurationData(IBuildConfigurationData data) {
- ICppBuildConfigurationData cppData = (ICppBuildConfigurationData) data;
- table.performApply(cppData.environmentModifierBlock());
+ if (data instanceof ICppBuildConfigurationData) {
+ ICppBuildConfigurationData cppData = (ICppBuildConfigurationData) data;
+ table.performApply(cppData.environmentModifierBlock());
+ }
}
/* (non-Javadoc)
Modified: branches/work_Fabricio/org.maemo.esbox.help/html/concepts/Sbrsh.html
===================================================================
--- branches/work_Fabricio/org.maemo.esbox.help/html/concepts/Sbrsh.html 2009-07-02 20:26:26 UTC (rev 1846)
+++ branches/work_Fabricio/org.maemo.esbox.help/html/concepts/Sbrsh.html 2009-07-03 17:12:02 UTC (rev 1847)
@@ -68,7 +68,7 @@
<h3>SBRSH authentication setup</h3>
<p>SBRSH requires a bit of work to set up properly.
- See the <a href="http://pc-connectivity.garage.maemo.org/beta1/documentation_sbrsh.html">PC Connectivity documentation</a>
+ See the <a href="http://pc-connectivity.garage.maemo.org/documentation_sbrsh.html">PC Connectivity documentation</a>
for details.
If you have already added your host IP address or range in the
Modified: branches/work_Fabricio/org.maemo.esbox.help/html/images/pref_images/prefs-maemo.png
===================================================================
(Binary files differ)
Modified: branches/work_Fabricio/org.maemo.esbox.help/html/reference/FAQ.html
===================================================================
--- branches/work_Fabricio/org.maemo.esbox.help/html/reference/FAQ.html 2009-07-02 20:26:26 UTC (rev 1846)
+++ branches/work_Fabricio/org.maemo.esbox.help/html/reference/FAQ.html 2009-07-03 17:12:02 UTC (rev 1847)
@@ -222,7 +222,7 @@
href="https://garage.maemo.org/news/?group_id=192" target="_blank">ESbox Garage Project News page</a>.
</p>
<p>For regular integration releases, see the
- <a href="http://esbox.garage.maemo.org/beta1/releases.html" target="_blank">ESbox releases page</a>
+ <a href="http://esbox.garage.maemo.org/2nd_edition/releases.html" target="_blank">ESbox releases page</a>
</div>
<hr>
<div id="support" dir="LTR">
@@ -237,9 +237,9 @@
projects or workspace must be visible to both Scratchbox and the host.
When Scratchbox is running on a virtual machine, we support this via
Samba sharing from the host to the VM.</p>
-<p>See the <a href="http://maemovmware.garage.maemo.org/beta1">Maemo SDK virtual image page</a>
+<p>See the <a href="http://maemovmware.garage.maemo.org/">Maemo SDK virtual image page</a>
for configured and supported images and the
-<a href="http://esbox.garage.maemo.org/beta1/virtual_machines.html">ESbox virtual machine support documentation</a>.
+<a href="http://esbox.garage.maemo.org/2nd_edition/virtual_machines.html">ESbox virtual machine support documentation</a>.
</div>
<hr>
<div id="ask" dir="LTR">
@@ -273,7 +273,7 @@
<h2>Download and Installation:</h2>
<div id="howtos" dir="LTR">
<h3>Are there complete HowTos for setting up ESbox?</h3>
-<p>Yes, please see the <a href="http://esbox.garage.maemo.org/beta1/installation.html">ESbox installation guide</a>.
+<p>Yes, please see the <a href="http://esbox.garage.maemo.org/2nd_edition/installation.html">ESbox installation guide</a>.
You may install either a fully packaged product or update an existing Eclipse 3.4.2 installation over the Internet.
</p>
</div>
@@ -337,7 +337,7 @@
> Build Machines </em> is the
gateway to configuring this facility. </p>
<p>Please see the
-<a href="http://esbox.garage.maemo.org/beta1/virtual_machines.html">ESbox virtual machine support documentation</a>
+<a href="http://esbox.garage.maemo.org/2nd_edition/virtual_machines.html">ESbox virtual machine support documentation</a>
for all the details.
<hr>
<div id="new-scratchbox-sdk" dir="LTR"><a
@@ -442,7 +442,7 @@
images or available in the <em>host-pc-connectivity</em> package.)</p>
<p><b>All the details
</b>are on the <a
- href="http://pc-connectivity.garage.maemo.org/beta1/">PC connectivity garage project page</a>.</p>
+ href="http://pc-connectivity.garage.maemo.org/">PC connectivity garage project page</a>.</p>
</div>
<hr>
<div id="configure-for-esbox" dir="LTR"><a
Modified: branches/work_Fabricio/org.maemo.esbox.help/html/tasks/InstallingPCConnectivity.html
===================================================================
--- branches/work_Fabricio/org.maemo.esbox.help/html/tasks/InstallingPCConnectivity.html 2009-07-02 20:26:26 UTC (rev 1846)
+++ branches/work_Fabricio/org.maemo.esbox.help/html/tasks/InstallingPCConnectivity.html 2009-07-03 17:12:02 UTC (rev 1847)
@@ -22,7 +22,7 @@
applet provided by the PC Connectivity project.
</p>
<p>
-See <a href="http://pc-connectivity.garage.maemo.org/beta1">the PC Connectivity home page</a>
+See <a href="http://pc-connectivity.garage.maemo.org/">the PC Connectivity home page</a>
for full instructions.
</p>
</body>
Modified: branches/work_Fabricio/org.maemo.esbox.help/html/tasks/SettingPreferences.html
===================================================================
--- branches/work_Fabricio/org.maemo.esbox.help/html/tasks/SettingPreferences.html 2009-07-02 20:26:26 UTC (rev 1846)
+++ branches/work_Fabricio/org.maemo.esbox.help/html/tasks/SettingPreferences.html 2009-07-03 17:12:02 UTC (rev 1847)
@@ -75,6 +75,17 @@
with commands invoked by various wizards and build commands.</p>
<p>The <em>Path for command log</em> specifies a file to which entries are appended
when <em>Log commands</em> is enabled.</p>
+<p>The <em>Suppress warning when build platform and device platform do not match</em>
+setting disables notifications during a remote launch of a program when it was
+built or developed against a platform which is newer or older than that of the device.
+</p>
+<p>
+Such mismatches may result in programs that fail to launch, due to
+illegal instructions used in newer platforms, or due to libraries which are
+not available in the device.
+</p>
+<p>If you select the checkbox labeled "Do not tell me again", this preference is set.
+</p>
<p></p>
<img src="../images/pref_images/prefs-maemo.png" alt="maemo">
<p/>
Modified: branches/work_Fabricio/org.maemo.esbox.help/html/tasks/UsingVirtualMachines.html
===================================================================
--- branches/work_Fabricio/org.maemo.esbox.help/html/tasks/UsingVirtualMachines.html 2009-07-02 20:26:26 UTC (rev 1846)
+++ branches/work_Fabricio/org.maemo.esbox.help/html/tasks/UsingVirtualMachines.html 2009-07-03 17:12:02 UTC (rev 1847)
@@ -202,8 +202,12 @@
</li>
<li>For VirtualBox, this must match
the configuration established for a machine via VBoxManage before the machine is launched. (See
-<a href="http://maemovmware.garage.maemo.org/beta1/vbox_installers.html">the maemovmware VirtualBox configuration utility</a>, the
-<a href="http://maemovmware.garage.maemo.org/beta1/create_vbox_machine.html#portforwarding">the maemovmware port forwarding instructions</a>, or
+<a href="http://maemovmware.garage.maemo.org/beta1/vbox_installers.html" target="_blank">the maemovmware VirtualBox configuration utility</a>
+(or <a href="http://maemovmware.garage.maemo.org/2nd_edition/vbox_installers.html" target="_blank">here</a> if missing),
+the
+<a href="http://maemovmware.garage.maemo.org/beta1/create_vbox_machine.html#portforwarding" target="_blank">the maemovmware port forwarding instructions</a>
+(or <a href="http://maemovmware.garage.maemo.org/2nd_edition/create_vbox_machine.html#portforwarding" target="_blank">here</a> if missing),
+or
the Network Address Translation chapter of the VirtualBox manual.)
</li>
<li>For VMware, use the Virtual Network Editor > NAT>Edit>Port Forwarding... dialog to
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-07-02 20:26:26 UTC (rev 1846)
+++ branches/work_Fabricio/org.maemo.esbox.maemosdk.core/src/org/maemo/esbox/internal/api/maemosdk/core/tools/AfSbInitMaemoLauncherAdapter.java 2009-07-03 17:12:02 UTC (rev 1847)
@@ -207,17 +207,7 @@
// And watch for errors and termination
IStreamMonitor errorMonitor = new StreamLineMonitorAdapter() {
- private Process theProcess;
-
/* (non-Javadoc)
- * @see org.maemo.mica.common.core.process.StreamMonitorAdapter#processCreated(java.lang.Process)
- */
- @Override
- public void processCreated(Process process) {
- super.processCreated(process);
- theProcess = process;
- }
- /* (non-Javadoc)
* @see org.maemo.mica.common.core.process.IStreamLineMonitor#handleLine(java.lang.String, boolean)
*/
public void handleLine(String text, boolean errorStream)
@@ -239,7 +229,7 @@
Thread.sleep(30000);
} catch (InterruptedException e) {
}
- theProcess.destroy();
+ procMonitor.terminate();
return Status.OK_STATUS;
}
Modified: branches/work_Fabricio/org.maemo.esbox.maemosdk.ui/src/org/maemo/esbox/internal/api/maemosdk/ui/preferences/SharedFolderTableViewer.java
===================================================================
--- branches/work_Fabricio/org.maemo.esbox.maemosdk.ui/src/org/maemo/esbox/internal/api/maemosdk/ui/preferences/SharedFolderTableViewer.java 2009-07-02 20:26:26 UTC (rev 1846)
+++ branches/work_Fabricio/org.maemo.esbox.maemosdk.ui/src/org/maemo/esbox/internal/api/maemosdk/ui/preferences/SharedFolderTableViewer.java 2009-07-03 17:12:02 UTC (rev 1847)
@@ -37,6 +37,7 @@
import org.maemo.mica.common.core.filesystem.EShareType;
import org.maemo.mica.common.core.filesystem.ISharedFolder;
import org.maemo.mica.common.ui.TextAndDialogCellEditor;
+import org.maemo.mica.common.ui.dialogs.DirectoryDialogHelper;
import org.maemo.mica.internal.api.common.ui.ViewerTooltipSupport;
/**
@@ -100,7 +101,8 @@
protected Object openDialogBox(Control cellEditorWindow) {
DirectoryDialog dialog = new DirectoryDialog(cellEditorWindow.getShell());
Object current = getValue();
- dialog.setFilterPath(current instanceof String
+ DirectoryDialogHelper.setFilterPathToExistingDirectory(dialog,
+ current instanceof String
? new Path((String)current).toOSString() : Path.ROOT.toOSString());
return dialog.open();
}
Modified: branches/work_Fabricio/org.maemo.esbox.scratchbox.core/src/org/maemo/esbox/internal/api/scratchbox/core/execEnv/MaemoExecutionEnvironmentHandler.java
===================================================================
--- branches/work_Fabricio/org.maemo.esbox.scratchbox.core/src/org/maemo/esbox/internal/api/scratchbox/core/execEnv/MaemoExecutionEnvironmentHandler.java 2009-07-02 20:26:26 UTC (rev 1846)
+++ branches/work_Fabricio/org.maemo.esbox.scratchbox.core/src/org/maemo/esbox/internal/api/scratchbox/core/execEnv/MaemoExecutionEnvironmentHandler.java 2009-07-03 17:12:02 UTC (rev 1847)
@@ -104,7 +104,7 @@
public void run() {
doLaunch[0] = MessageDialog.openQuestion(shell, "Launch Maemo?",
- "The Maemo Application Framework is not running or is not showing in an X server.\n\nLaunch it now?");
+ "The Maemo Application Framework does not seem to be running.\n\nLaunch it now?");
}
});
@@ -116,7 +116,10 @@
// As long as X runs, any process can be re-windowed to the new
// window manager, and we don't really have to wait for it here.
Display display = Display.getCurrent();
- for (int timeout = 0; timeout < 10 * 1000; ) {
+ for (int timeout = 0; timeout < 15 * 1000; ) {
+ if (job.getResult() != null)
+ break;
+
if (display != null) {
while (display.readAndDispatch()) ;
}
Modified: branches/work_Fabricio/org.maemo.esbox.scratchbox.core/src/org/maemo/esbox/internal/api/scratchbox/core/sdk/AbstractScratchboxSDK.java
===================================================================
--- branches/work_Fabricio/org.maemo.esbox.scratchbox.core/src/org/maemo/esbox/internal/api/scratchbox/core/sdk/AbstractScratchboxSDK.java 2009-07-02 20:26:26 UTC (rev 1846)
+++ branches/work_Fabricio/org.maemo.esbox.scratchbox.core/src/org/maemo/esbox/internal/api/scratchbox/core/sdk/AbstractScratchboxSDK.java 2009-07-03 17:12:02 UTC (rev 1847)
@@ -11,7 +11,6 @@
package org.maemo.esbox.internal.api.scratchbox.core.sdk;
import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.Path;
import org.maemo.esbox.internal.api.scratchbox.core.commands.ICommandAbstractor;
import org.maemo.esbox.internal.api.scratchbox.core.commands.SDKCommandAbstractor;
import org.maemo.esbox.internal.api.scratchbox.core.commands.sbrsh.*;
Modified: branches/work_Fabricio/org.maemo.esbox.scratchbox.core/src/org/maemo/esbox/internal/api/scratchbox/core/sdk/BaseScratchboxSDKTarget.java
===================================================================
--- branches/work_Fabricio/org.maemo.esbox.scratchbox.core/src/org/maemo/esbox/internal/api/scratchbox/core/sdk/BaseScratchboxSDKTarget.java 2009-07-02 20:26:26 UTC (rev 1846)
+++ branches/work_Fabricio/org.maemo.esbox.scratchbox.core/src/org/maemo/esbox/internal/api/scratchbox/core/sdk/BaseScratchboxSDKTarget.java 2009-07-03 17:12:02 UTC (rev 1847)
@@ -15,7 +15,7 @@
import org.maemo.esbox.scratchbox.core.sdk.IScratchboxSDKTarget;
import org.maemo.mica.common.core.sdk.*;
import org.maemo.mica.internal.api.common.core.sdk.BaseSDKTarget;
-import org.maemo.mica.internal.maemosdk.core.adapters.MaemoRunStandaloneSupportAdapterFactory;
+import org.maemo.mica.internal.api.maemosdk.core.MaemoRunStandaloneSupportAdapterFactory;
/**
* Common base for (maemo) scratchbox SDK targets
Modified: branches/work_Fabricio/org.maemo.esbox.scratchbox.core/src/org/maemo/esbox/internal/scratchbox/adapters/ESBoxSBRSHLaunchAdapter.java
===================================================================
--- branches/work_Fabricio/org.maemo.esbox.scratchbox.core/src/org/maemo/esbox/internal/scratchbox/adapters/ESBoxSBRSHLaunchAdapter.java 2009-07-02 20:26:26 UTC (rev 1846)
+++ branches/work_Fabricio/org.maemo.esbox.scratchbox.core/src/org/maemo/esbox/internal/scratchbox/adapters/ESBoxSBRSHLaunchAdapter.java 2009-07-03 17:12:02 UTC (rev 1847)
@@ -197,6 +197,7 @@
* current project
* <li>${TARGET_PROJECT_PATH} -- the path on the target which will expose
* the project contents
+ * <li>${USER} -- the local username
* <p>
* The template may optionally expose a "rootstrap mount" (already filled
* in) for targets using sandbox mode.
Modified: branches/work_Fabricio/org.maemo.esbox.scratchbox.sb1/src/org/maemo/esbox/internal/scratchbox/sb1/command/GetCurrentTargetCommand.java
===================================================================
--- branches/work_Fabricio/org.maemo.esbox.scratchbox.sb1/src/org/maemo/esbox/internal/scratchbox/sb1/command/GetCurrentTargetCommand.java 2009-07-02 20:26:26 UTC (rev 1846)
+++ branches/work_Fabricio/org.maemo.esbox.scratchbox.sb1/src/org/maemo/esbox/internal/scratchbox/sb1/command/GetCurrentTargetCommand.java 2009-07-03 17:12:02 UTC (rev 1847)
@@ -55,7 +55,7 @@
Process process = createProcess(currentTargetCommand, null);
- String currentTarget = getInputFromProcessAndWait(process, true, 0);
+ String currentTarget = getInputFromProcessAndWait(process, false, 0);
return currentTarget;
}
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-07-02 20:26:26 UTC (rev 1846)
+++ branches/work_Fabricio/org.maemo.esbox.scratchbox.sb1/src/org/maemo/esbox/internal/scratchbox/sb1/core/Scratchbox1SDK.java 2009-07-03 17:12:02 UTC (rev 1847)
@@ -905,7 +905,9 @@
return command.performCommand(arguments);
} catch (ScratchboxException e) {
// might not be turned on yet
- if (e.getMessage() != null && e.getMessage().contains("properly set up")) {
+ if (e.getMessage() != null &&
+ (e.getMessage().contains("properly set up")
+ || e.getMessage().contains("Inconsistency detected by ld.so"))) {
IStatus status = Scratchbox1SDK.startup(
getMachine(), getInstallRoot(),
new NullProgressMonitor(),
Modified: branches/work_Fabricio/org.maemo.esbox.scratchbox.sb1/src/org/maemo/esbox/internal/scratchbox/sb1/core/Scratchbox1SDKTarget.java
===================================================================
--- branches/work_Fabricio/org.maemo.esbox.scratchbox.sb1/src/org/maemo/esbox/internal/scratchbox/sb1/core/Scratchbox1SDKTarget.java 2009-07-02 20:26:26 UTC (rev 1846)
+++ branches/work_Fabricio/org.maemo.esbox.scratchbox.sb1/src/org/maemo/esbox/internal/scratchbox/sb1/core/Scratchbox1SDKTarget.java 2009-07-03 17:12:02 UTC (rev 1847)
@@ -11,8 +11,23 @@
*******************************************************************************/
package org.maemo.esbox.internal.scratchbox.sb1.core;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
import org.eclipse.core.runtime.IPath;
+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.swt.SWT;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Menu;
+import org.eclipse.swt.widgets.MenuItem;
import org.maemo.esbox.internal.api.scratchbox.core.sdk.AbstractScratchboxSDKTarget;
import org.maemo.esbox.internal.scratchbox.sb1.Activator;
import org.maemo.esbox.internal.scratchbox.sb1.command.ShowTargetCommand;
@@ -28,10 +43,6 @@
import org.maemo.mica.common.core.sdk.ISDKPlatform;
import org.osgi.framework.Version;
-import java.util.*;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
/**
* SDK target for Scratchbox 1
*
@@ -228,4 +239,68 @@
return commandPattern;
}
+
+ /* (non-Javadoc)
+ * @see org.maemo.mica.internal.api.common.core.sdk.BaseSDKTarget#addToContextMenu(org.eclipse.swt.widgets.Menu)
+ */
+ @Override
+ public void addToContextMenu(final Menu menu) {
+ super.addToContextMenu(menu);
+
+ final MenuItem item = new MenuItem(menu, SWT.NONE);
+ item.setEnabled(false);
+ item.setText("Install doctools (libintl)");
+
+ // this can take some time to check, so do it asynchronously to avoid
+ // a delay creating or exiting the menu
+ Job job = new Job("Checking doctools...") {
+ /* (non-Javadoc)
+ * @see org.eclipse.core.runtime.jobs.Job#run(org.eclipse.core.runtime.IProgressMonitor)
+ */
+ @Override
+ protected IStatus run(IProgressMonitor monitor) {
+ boolean needDoctools = false;
+ try {
+ if (!isBroken && !getDevkits().contains("doctools"))
+ needDoctools = true;
+ } catch (MicaException e) {
+ isBroken = true;
+ }
+
+ if (needDoctools) {
+ Display.getDefault().asyncExec(new Runnable() {
+ public void run() {
+ if (!item.isDisposed()) {
+ item.setEnabled(true);
+
+ item.addSelectionListener(new SelectionAdapter() {
+ @Override
+ public void widgetSelected(SelectionEvent e) {
+ Job job = new Job("Installing doctools for " + getDisplayName()) {
+
+ @Override
+ protected IStatus run(IProgressMonitor monitor) {
+ try {
+ addDevkit("doctools");
+ return Status.OK_STATUS;
+ } catch (MicaException e) {
+ return Activator.createErrorStatus("Failed to add doctools support", e);
+ }
+ }
+
+ };
+ job.schedule();
+ }
+ });
+ }
+ }
+ });
+ }
+ return Status.OK_STATUS;
+ }
+ };
+ job.setUser(false);
+ job.schedule();
+
+ }
}
Modified: branches/work_Fabricio/org.maemo.esbox.scratchbox.sb1/src/org/maemo/esbox/internal/scratchbox/sb1/ui/wizard/Scratchbox1TargetInstallerData.java
===================================================================
--- branches/work_Fabricio/org.maemo.esbox.scratchbox.sb1/src/org/maemo/esbox/internal/scratchbox/sb1/ui/wizard/Scratchbox1TargetInstallerData.java 2009-07-02 20:26:26 UTC (rev 1846)
+++ branches/work_Fabricio/org.maemo.esbox.scratchbox.sb1/src/org/maemo/esbox/internal/scratchbox/sb1/ui/wizard/Scratchbox1TargetInstallerData.java 2009-07-03 17:12:02 UTC (rev 1847)
@@ -17,6 +17,7 @@
import java.util.List;
import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.Path;
import org.maemo.esbox.scratchbox.sb1.sdk.IScratchbox1SDK;
/**
@@ -260,7 +261,8 @@
* @return flag
*/
public boolean isNonDefaultInstallation() {
- return !getScratchboxLocation().equals("/scratchbox");
+ // use Path compare since terminating slash may differ
+ return !new Path(getScratchboxLocation()).equals(new Path("/scratchbox"));
}
/**
* Get the name of the X86 target, given the default basename
Modified: branches/work_Fabricio/org.maemo.esbox.scratchbox.tests/src/org/maemo/esbox/scratchbox/tests/TestSB2SDKProvider.java
===================================================================
--- branches/work_Fabricio/org.maemo.esbox.scratchbox.tests/src/org/maemo/esbox/scratchbox/tests/TestSB2SDKProvider.java 2009-07-02 20:26:26 UTC (rev 1846)
+++ branches/work_Fabricio/org.maemo.esbox.scratchbox.tests/src/org/maemo/esbox/scratchbox/tests/TestSB2SDKProvider.java 2009-07-03 17:12:02 UTC (rev 1847)
@@ -84,7 +84,7 @@
assertTrue(root.toPortableString().equals("/"));
((Scratchbox2SDK)sdk).realize();
- assertTrue(sdk.getVersion(), sdk.getVersion().matches("1\\.99\\..*|2\\.0\\.*"));
+ assertTrue(sdk.getVersion(), sdk.getVersion().matches("1\\.99\\..*|2\\.0.*"));
}
}
Modified: branches/work_Fabricio/org.maemo.esbox.vm/src/org/maemo/esbox/internal/api/vm/core/BaseVirtualBuildMachine.java
===================================================================
--- branches/work_Fabricio/org.maemo.esbox.vm/src/org/maemo/esbox/internal/api/vm/core/BaseVirtualBuildMachine.java 2009-07-02 20:26:26 UTC (rev 1846)
+++ branches/work_Fabricio/org.maemo.esbox.vm/src/org/maemo/esbox/internal/api/vm/core/BaseVirtualBuildMachine.java 2009-07-03 17:12:02 UTC (rev 1847)
@@ -12,7 +12,10 @@
package org.maemo.esbox.internal.api.vm.core;
-import org.eclipse.core.runtime.NullProgressMonitor;
+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.maemo.mica.common.core.filesystem.IFileSystemAccess;
import org.maemo.mica.common.core.filesystem.ISharedFilesystemProvider;
import org.maemo.mica.common.core.machine.IMachineController;
@@ -38,6 +41,35 @@
*/
@Override
public IFileSystemAccess getFileSystemAccess() {
+ // EJS 090624: do this in a job to avoid using a null progress monitor;
+ // if network settings are not perfect, then smbmount will hang for a
+ // very long time and this will be uncancellable.
+ //
+ // Contrary to the comment below, we re-validate shares before a
+ // build, and the flags below should prevent double dialogs.
+ //
+ Job job = new Job("Checking shared folders...") {
+
+ @Override
+ protected IStatus run(IProgressMonitor monitor) {
+ boolean shouldValidate;
+ synchronized (BaseVirtualBuildMachine.this) {
+ shouldValidate = !validatedShares && !isValidatingShares;
+ }
+ if (shouldValidate && !monitor.isCanceled()) {
+ // now, verify shared folders
+ ensureSharesMounted(monitor);
+
+ // maybe the user cancelled or there were errors... but don't keep asking
+ validatedShares = true;
+ }
+ return Status.OK_STATUS;
+ }
+
+ };
+ job.schedule();
+
+ /*
// for this kind of machine, check more proactively,
// otherwise build-related stuff is likely to fail
@@ -52,6 +84,7 @@
// maybe the user cancelled or there were errors... but don't keep asking
validatedShares = true;
}
+ */
return super.getFileSystemAccess();
}
More information about the Esbox-commits
mailing list