Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[cdt-dev] Remote enabling auto tools

Jeff,

Here’s a summary of what I think needs to happen to make this work:

1. AutotoolsNewProjectNature#getBuildCommandsList() needs to check for a synchronized project builder (ID: org.eclipse.ptp.rdt.sync.cdt.core.SyncBuilder) in addition to the CDT managed project builder.

2. PTP to provide a drop-in replacement for CommandLauncher that uses the project to determine if the command should be launched locally or remotely. 

3. Autotools needs to refresh the project after creating the build directory, but prior to starting the build, so that in the case of synchronized projects, the build directory is replicated on the target. This should possibly be done in AutotoolsNewMakeGenerator#regenerateMakefiles(). The following code should achieve this:

	IRemoteResource remRes = (IRemoteResource)getProjectI().getAdapter(IRemoteResource.class);
	if (remRes != null) {
		remRes.refresh(progressMonitor);
	}

4. AutotoolsNewMakeGenerator#getPathString() checks to see if the local machine is Windows. This needs to be modified to use something along the following lines:

private String getOSName() {
	IRemoteResource remRes = (IRemoteResource)getProject().getAdapter(IRemoteResource.class);
	if (remRes != null) {
		URI uri = remRes.getActiveLocationURI();
		IRemoteServices remServices = RemoteServices.getRemoteServices(uri);
		if (remServices != null) {
			IRemoteConnection conn = remServices.getConnectionManager().getConnection(uri);
			if (conn != null) {
				return conn.getProperty(IRemoteConnection.OS_NAME_PROPERTY);
			}
		}
	}
	return Platform.getOS();
}

I don’t think the build environment will be an issue, but that’s something we can check later.

Let me know if you think of anything else.

Regards,
Greg



Back to the top