|
Lines 750-755
Link Here
|
| 750 |
cu.setTouchpointType(MetadataGeneratorHelper.TOUCHPOINT_NATIVE); |
750 |
cu.setTouchpointType(MetadataGeneratorHelper.TOUCHPOINT_NATIVE); |
| 751 |
Map touchpointData = new HashMap(); |
751 |
Map touchpointData = new HashMap(); |
| 752 |
String configurationData = "unzip(source:@artifact, target:${installFolder});"; //$NON-NLS-1$ |
752 |
String configurationData = "unzip(source:@artifact, target:${installFolder});"; //$NON-NLS-1$ |
|
|
753 |
|
| 754 |
IInstallableUnit launcherNameIU = null; |
| 753 |
if (Constants.OS_MACOSX.equals(os)) { |
755 |
if (Constants.OS_MACOSX.equals(os)) { |
| 754 |
File[] appFolders = root.listFiles(new FilenameFilter() { |
756 |
File[] appFolders = root.listFiles(new FilenameFilter() { |
| 755 |
public boolean accept(File dir, String name) { |
757 |
public boolean accept(File dir, String name) { |
|
Lines 763-769
Link Here
|
| 763 |
for (int j = 0; j < launcherFiles.length; j++) { |
765 |
for (int j = 0; j < launcherFiles.length; j++) { |
| 764 |
configurationData += " chmod(targetDir:${installFolder}/" + appFolders[i].getName() + "/Contents/MacOS/, targetFile:" + launcherFiles[j].getName() + ", permissions:755);"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ |
766 |
configurationData += " chmod(targetDir:${installFolder}/" + appFolders[i].getName() + "/Contents/MacOS/, targetFile:" + launcherFiles[j].getName() + ", permissions:755);"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ |
| 765 |
if (new Path(launcherFiles[j].getName()).getFileExtension() == null) |
767 |
if (new Path(launcherFiles[j].getName()).getFileExtension() == null) |
| 766 |
MetadataGeneratorHelper.generateLauncherSetter(launcherFiles[j].getName(), launcherId, launcherVersion, os, ws, arch, result.rootIUs); |
768 |
launcherNameIU = MetadataGeneratorHelper.generateLauncherSetter(launcherFiles[j].getName(), launcherId, launcherVersion, os, ws, arch, result.rootIUs); |
| 767 |
} |
769 |
} |
| 768 |
} |
770 |
} |
| 769 |
} |
771 |
} |
|
Lines 773-781
Link Here
|
| 773 |
for (int i = 0; i < launcherFiles.length; i++) { |
775 |
for (int i = 0; i < launcherFiles.length; i++) { |
| 774 |
configurationData += " chmod(targetDir:${installFolder}, targetFile:" + launcherFiles[i].getName() + ", permissions:755);"; //$NON-NLS-1$ //$NON-NLS-2$ |
776 |
configurationData += " chmod(targetDir:${installFolder}, targetFile:" + launcherFiles[i].getName() + ", permissions:755);"; //$NON-NLS-1$ //$NON-NLS-2$ |
| 775 |
if (new Path(launcherFiles[i].getName()).getFileExtension() == null) |
777 |
if (new Path(launcherFiles[i].getName()).getFileExtension() == null) |
| 776 |
MetadataGeneratorHelper.generateLauncherSetter(launcherFiles[i].getName(), launcherId, launcherVersion, os, ws, arch, result.rootIUs); |
778 |
launcherNameIU = MetadataGeneratorHelper.generateLauncherSetter(launcherFiles[i].getName(), launcherId, launcherVersion, os, ws, arch, result.rootIUs); |
|
|
779 |
} |
| 780 |
} |
| 781 |
|
| 782 |
if (launcherNameIU == null) { |
| 783 |
File executableLocation = info.getExecutableLocation(); |
| 784 |
if (executableLocation != null) { |
| 785 |
if (!executableLocation.exists() && Constants.OS_WIN32.equals(os) && !executableLocation.getName().endsWith(".exe")) //$NON-NLS-1$ |
| 786 |
executableLocation = new File(executableLocation.getParentFile(), executableLocation.getName() + ".exe"); //$NON-NLS-1$ |
| 787 |
|
| 788 |
if (executableLocation.exists()) |
| 789 |
launcherNameIU = MetadataGeneratorHelper.generateLauncherSetter(executableLocation.getName(), launcherId, launcherVersion, os, ws, arch, result.rootIUs); |
| 777 |
} |
790 |
} |
| 778 |
} |
791 |
} |
|
|
792 |
|
| 779 |
touchpointData.put("install", configurationData); //$NON-NLS-1$ |
793 |
touchpointData.put("install", configurationData); //$NON-NLS-1$ |
| 780 |
String unConfigurationData = "cleanupzip(source:@artifact, target:${installFolder});"; //$NON-NLS-1$ |
794 |
String unConfigurationData = "cleanupzip(source:@artifact, target:${installFolder});"; //$NON-NLS-1$ |
| 781 |
touchpointData.put("uninstall", unConfigurationData); //$NON-NLS-1$ |
795 |
touchpointData.put("uninstall", unConfigurationData); //$NON-NLS-1$ |
|
Lines 785-793
Link Here
|
| 785 |
//The Product Query will need to include the launcher CU fragments as a workaround to bug 218890 |
799 |
//The Product Query will need to include the launcher CU fragments as a workaround to bug 218890 |
| 786 |
if (result.configurationIUs.containsKey(launcherIdPrefix)) { |
800 |
if (result.configurationIUs.containsKey(launcherIdPrefix)) { |
| 787 |
((Set) result.configurationIUs.get(launcherIdPrefix)).add(unit); |
801 |
((Set) result.configurationIUs.get(launcherIdPrefix)).add(unit); |
|
|
802 |
if (launcherNameIU != null) |
| 803 |
((Set) result.configurationIUs.get(launcherIdPrefix)).add(launcherNameIU); |
| 788 |
} else { |
804 |
} else { |
| 789 |
Set set = new HashSet(); |
805 |
Set set = new HashSet(); |
| 790 |
set.add(unit); |
806 |
set.add(unit); |
|
|
807 |
if (launcherNameIU != null) |
| 808 |
set.add(launcherNameIU); |
| 791 |
result.configurationIUs.put(launcherIdPrefix, set); |
809 |
result.configurationIUs.put(launcherIdPrefix, set); |
| 792 |
} |
810 |
} |
| 793 |
|
811 |
|