Skip to content

Commit ab6b939

Browse files
committed
support for mac OS
1 parent 79107c6 commit ab6b939

File tree

2 files changed

+24
-2
lines changed

2 files changed

+24
-2
lines changed

build.xml

+14-1
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,20 @@
6262
<lib>
6363
<fileset file="lib/swt_win32.jar"/>
6464
<fileset file="lib/json-simple-1.1.1.jar"/>
65-
<fileset file="${plugin.dir}/org.eclipse.jface_3.10.1.v20140813-1009.jar"/>
65+
<fileset file="${plugin.dir}/org.eclipse.jface_3.10.2.v20141021-1035.jar"/>
66+
<fileset file="${plugin.dir}/org.eclipse.core.runtime_3.10.0.v20140318-2214.jar"/>
67+
<fileset file="${plugin.dir}/org.eclipse.core.commands_3.6.100.v20140528-1422.jar"/>
68+
<fileset file="${plugin.dir}/org.eclipse.equinox.common_3.6.200.v20130402-1505.jar"/>
69+
</lib>
70+
</one-jar>
71+
<one-jar destfile="build/serverwiz2_macosx64.jar" onejarmainclass="com.ibm.ServerWizard2.ServerWizard2">
72+
<main>
73+
<fileset dir="build/classes"/>
74+
</main>
75+
<lib>
76+
<fileset file="lib/swt_macosx.jar"/>
77+
<fileset file="lib/json-simple-1.1.1.jar"/>
78+
<fileset file="${plugin.dir}/org.eclipse.jface_3.10.2.v20141021-1035.jar"/>
6679
<fileset file="${plugin.dir}/org.eclipse.core.runtime_3.10.0.v20140318-2214.jar"/>
6780
<fileset file="${plugin.dir}/org.eclipse.core.commands_3.6.100.v20140528-1422.jar"/>
6881
<fileset file="${plugin.dir}/org.eclipse.equinox.common_3.6.200.v20130402-1505.jar"/>

src/com/ibm/ServerWizard2/Launcher.java

+10-1
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,11 @@ public static void main(String[] args) {
6565
}
6666
LOGGER.config("======================================================================");
6767
LOGGER.config("Retreiving ServerWiz...");
68-
68+
69+
boolean isMac = false;
70+
if (getOSName() == "macosx") { isMac = true; }
6971
String jarName = getArchFilename("serverwiz2");
72+
7073
LOGGER.info("JarName = "+jarName);
7174
GithubFile jar = new GithubFile(REPOSITORY,version,jarName,"jars",true,LOGGER);
7275
GithubFile zip = new GithubFile(REPOSITORY,version,ZIP_NAME,"jars",true,LOGGER);
@@ -135,6 +138,9 @@ public static void main(String[] args) {
135138
for (String arg : args) {
136139
commandLine.add(arg);
137140
}
141+
if (isMac) {
142+
commandLine.add("-XstartOnFirstThread");
143+
}
138144
if (updated) {
139145
commandLine.add("-v");
140146
commandLine.add(version);
@@ -207,6 +213,9 @@ private static String getOSName() {
207213
} else if (osNameProperty.contains("linux") || osNameProperty.contains("nix"))
208214
{
209215
return "linux";
216+
} else if (osNameProperty.contains("mac"))
217+
{
218+
return "macosx";
210219
} else {
211220
throw new RuntimeException("Unknown OS name: " + osNameProperty);
212221
}

0 commit comments

Comments
 (0)