mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-08-08 08:45:44 +02:00
Now I got it working...
This commit is contained in:
parent
3b02a1a7f8
commit
3cf528d841
3 changed files with 13 additions and 8 deletions
|
@ -61,11 +61,13 @@ public class MinGWGenerator implements IApplication {
|
|||
|
||||
Activator.getDefault().getBundle("org.eclipse.equinox.p2.exemplarysetup").start(Bundle.START_TRANSIENT); //$NON-NLS-1$
|
||||
|
||||
File repoDir = new File("C:\\Wascana\\repo");
|
||||
File repoDir = new File("E:\\Wascana\\repo");
|
||||
repoDir.mkdirs();
|
||||
|
||||
new File(repoDir, "artifacts.xml").delete();
|
||||
new File(repoDir, "content.xml").delete();
|
||||
|
||||
URI repoLocation = new File("C:\\Wascana\\repo").toURI();
|
||||
URI repoLocation = repoDir.toURI();
|
||||
|
||||
IMetadataRepositoryManager metaRepoMgr = Activator.getDefault().getService(IMetadataRepositoryManager.class);
|
||||
IArtifactRepositoryManager artiRepoMgr = Activator.getDefault().getService(IArtifactRepositoryManager.class);
|
||||
|
@ -269,7 +271,7 @@ public class MinGWGenerator implements IApplication {
|
|||
}
|
||||
|
||||
tpdata.put("install", cmd);
|
||||
tpdata.put("install", "cleanup" + cmd);
|
||||
tpdata.put("uninstall", "cleanup" + cmd);
|
||||
|
||||
iuDesc.addTouchpointData(MetadataFactory.createTouchpointData(tpdata));
|
||||
IArtifactKey artiKey = PublisherHelper.createBinaryArtifactKey(id, version);
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
point="org.eclipse.equinox.p2.engine.actions">
|
||||
<action
|
||||
class="org.eclipse.cdt.internal.p2.touchpoint.natives.actions.UntarAction"
|
||||
name="untar"
|
||||
name="org.eclipse.equinox.p2.touchpoint.natives.untar"
|
||||
touchpointType="org.eclipse.equinox.p2.native"
|
||||
touchpointVersion="1.0.0"
|
||||
version="1.0.0">
|
||||
|
@ -15,7 +15,7 @@
|
|||
point="org.eclipse.equinox.p2.engine.actions">
|
||||
<action
|
||||
class="org.eclipse.cdt.internal.p2.touchpoint.natives.actions.CleanupUntarAction"
|
||||
name="cleanupuntar"
|
||||
name="org.eclipse.equinox.p2.touchpoint.natives.cleanupuntar"
|
||||
touchpointType="org.eclipse.equinox.p2.native"
|
||||
touchpointVersion="1.0.0"
|
||||
version="1.0.0">
|
||||
|
|
|
@ -112,10 +112,12 @@ public class UntarAction extends ProvisioningAction {
|
|||
|
||||
private static File[] untar(String source, String destination, Compression compression) {
|
||||
File zipFile = new File(source);
|
||||
if (zipFile == null || !zipFile.exists()) {
|
||||
if (!zipFile.exists()) {
|
||||
Util.log(UnzipAction.class.getName() + " the files to be unzipped is not here"); //$NON-NLS-1$
|
||||
}
|
||||
|
||||
File target = new File(destination);
|
||||
|
||||
try {
|
||||
FileInputStream fileIn = new FileInputStream(zipFile);
|
||||
InputStream compIn = fileIn;
|
||||
|
@ -130,7 +132,7 @@ public class UntarAction extends ProvisioningAction {
|
|||
ArrayList<File> fileList = new ArrayList<File>();
|
||||
TarInputStream tarIn = new TarInputStream(compIn);
|
||||
for (TarEntry tarEntry = tarIn.getNextEntry(); tarEntry != null; tarEntry = tarIn.getNextEntry()) {
|
||||
File outFile = new File(source, tarEntry.getName());
|
||||
File outFile = new File(target, tarEntry.getName());
|
||||
if (tarEntry.isDirectory()) {
|
||||
outFile.mkdirs();
|
||||
} else {
|
||||
|
@ -149,7 +151,8 @@ public class UntarAction extends ProvisioningAction {
|
|||
tarIn.close();
|
||||
return fileList.toArray(new File[fileList.size()]);
|
||||
} catch (IOException e) {
|
||||
Util.log(UnzipAction.class.getName() + " error unzipping zipfile: " + zipFile.getAbsolutePath() + "destination: " + destination); //$NON-NLS-1$ //$NON-NLS-2$
|
||||
Util.log(UnzipAction.class.getName() + " error unzipping zipfile: " + zipFile.getAbsolutePath() + " destination: " + destination); //$NON-NLS-1$ //$NON-NLS-2$
|
||||
Util.log(e.getLocalizedMessage());
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue