ignore all launchers that end with c or c.exe, fix naming

Change-Id: Ibb5972cb30b393d17f186410ebc7800a18fe7986
Signed-off-by: Markus Duft <markus.duft@ssi-schaefer.com>
diff --git a/org.eclipse.tea.library.build/src/org/eclipse/tea/library/build/p2/TeaApplicationLauncherAction.java b/org.eclipse.tea.library.build/src/org/eclipse/tea/library/build/p2/TeaApplicationLauncherAction.java
index 7a0408f..89cc214 100644
--- a/org.eclipse.tea.library.build/src/org/eclipse/tea/library/build/p2/TeaApplicationLauncherAction.java
+++ b/org.eclipse.tea.library.build/src/org/eclipse/tea/library/build/p2/TeaApplicationLauncherAction.java
@@ -75,13 +75,14 @@
 
 		String launcherName = null;
 		for (File file : result.listFiles()) {
-			if (file.getName().toLowerCase().equals("eclipsec.exe")) {
-				// ignore for compat.
+			if (file.getName().toLowerCase().endsWith("c.exe") || file.getName().toLowerCase().endsWith("c")) {
+				// ignore for compat. eclipsec.exe (older versions), myprodc.exe
+				// (newer versions). also catch unix files which just end with c
 				continue;
 			}
 
 			if (file.getName().toLowerCase().endsWith(".exe")) {
-				launcherName = file.getName().substring(file.getName().length() - 4);
+				launcherName = file.getName().substring(0, file.getName().length() - 4);
 			} else {
 				launcherName = file.getName();
 			}