lkishalmi closed pull request #1073: [NETBEANS-1145] Make Windows Launchers 
part of the build process.
URL: https://github.com/apache/incubator-netbeans/pull/1073
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/README.md b/README.md
index 0306762dc8..d09de65a16 100644
--- a/README.md
+++ b/README.md
@@ -36,6 +36,7 @@ Apache NetBeans is an open source development environment, 
tooling platform, and
   * Ant 1.9.9 or above
   * Oracle JDK 8 or OpenJDK 8 (to build NetBeans)
   * Oracle JDK 9 or OpenJDK 9 (to run NetBeans)
+  * MinGW (optional), to build Windows Launchers
 
 **Note:** NetBeans also runs with JDK 8, although then it will not include 
tools for the JDK 9 Shell.
 
@@ -62,6 +63,19 @@ $ ant -Dcluster.config=platform
 
 **Note:** You can also use `php`, `enterprise`, etc. See the 
[cluster.properties](https://github.com/apache/incubator-netbeans/blob/master/nbbuild/cluster.properties)
 file.
 
+#### Building Windows Launchers
+Windows launchers can be build using [MinGW](http://www.mingw.org/) both on 
Windows and Linux.
+
+As of [NETBEANS-1145](https://issues.apache.org/jira/browse/NETBEANS-1145), 
the Windows Launchers can be built adding ```do.build.windows.launchers=true``` 
property to the build process.
+```
+$ ant -Ddo.build.windows.launchers=true
+```
+
+##### Software Requirement to Build Windows Launchers on Ubuntu (16.04+):
+```
+sudo apt install make mingw-w64
+```
+
 ### Running NetBeans
 
 Run the build:
diff --git a/harness/apisupport.harness/build.xml 
b/harness/apisupport.harness/build.xml
index 4bd581eabe..256442d06d 100644
--- a/harness/apisupport.harness/build.xml
+++ b/harness/apisupport.harness/build.xml
@@ -63,8 +63,9 @@
             <arg value="-f"/>
             <arg value="Makefile.mingw"/>
         </exec>
-        <copy file="windows-launcher-src/app.exe" 
tofile="${cluster}/launchers/app.exe" overwrite="true" />
-        <copy file="windows-launcher-src/app64.exe" 
tofile="${cluster}/launchers/app64.exe" overwrite="true" />
+        <copy todir="${cluster}/launchers" overwrite="true">
+            <fileset dir="windows-launcher-src" includes="app*.exe"/>
+        </copy>
     </target>
 
 </project>
diff --git a/nbbuild/build.xml b/nbbuild/build.xml
index a2c586c898..3f69b011a3 100644
--- a/nbbuild/build.xml
+++ b/nbbuild/build.xml
@@ -334,17 +334,40 @@
       <include name="${nb.cluster.platform.dir}/lib/nbexec" />
     </fixcrlf>
   </target>
-  <target name="finish-build-nb" depends="init,-check-nb-cluster" 
if="has.nb.cluster">
-    <loadproperties srcFile="${clusters.list.file}" />
-
+  <target name="-shall-build-nb-windows-launchers" 
depends="init,-check-nb-cluster">
+      <condition property="shall.build.windows.launchers">
+          <and>
+              <istrue value="${do.build.windows.launchers}"/>
+              <istrue value="${has.nb.cluster}"/>
+          </and>
+      </condition>
+  </target>
+  
+  <target name="-build-nb-windows-launchers" 
depends="-shall-build-nb-windows-launchers" if="shall.build.windows.launchers">
+    <exec executable="make" dir="../nb/ide.launcher/windows">
+        <arg value="-f"/>
+        <arg value="Makefile.mingw"/>
+    </exec>
+    <copy todir="${netbeans.dest.dir}/bin" overwrite="true">
+        <fileset dir="../nb/ide.launcher/windows" includes="netbeans*.exe"/>
+    </copy>
+  </target>
+  
+  <target name="-download-nb-windows-launchers" 
depends="init,-check-nb-cluster" if="has.nb.cluster" 
unless="do.build.windows.launchers">
     <downloadbinaries cache="${binaries.cache}" server="${binaries.server}">
         <manifest dir="${nb_all}" 
includes="nb/ide.launcher/external/binaries-list"/>
     </downloadbinaries>
 
+    <mkdir dir="${netbeans.dest.dir}/bin" />
+    <unzip src="../nb/ide.launcher/external/launchers-10.0.zip" 
dest="${netbeans.dest.dir}/bin" />
+  </target>
+
+  <target name="finish-build-nb" depends="init,-check-nb-cluster, 
-download-nb-windows-launchers, -build-nb-windows-launchers" 
if="has.nb.cluster">
+    <loadproperties srcFile="${clusters.list.file}" />
+
     <mkdir dir="${netbeans.dest.dir}/bin" />
     <copy file="../nb/ide.launcher/unix/netbeans" 
todir="${netbeans.dest.dir}/bin" />
     <chmod file="${netbeans.dest.dir}/bin/netbeans" perm="ugo+rx"/>
-    <unzip src="../nb/ide.launcher/external/launchers-10.0.zip" 
dest="${netbeans.dest.dir}/bin" />
     <!-- if anybody knows better place for icons, let me know: 
[email protected] -->
 
     <mkdir dir="${netbeans.dest.dir}/etc" />
diff --git a/platform/o.n.bootstrap/build.xml b/platform/o.n.bootstrap/build.xml
index df070d2d1c..1122aa1cc3 100644
--- a/platform/o.n.bootstrap/build.xml
+++ b/platform/o.n.bootstrap/build.xml
@@ -32,11 +32,24 @@
     <target name="rebuild-main" unless="main.up.to.date">
         <mkdir dir="${build.classes.dir}"/>
         <delete file="${build.classes.dir}/org/netbeans/Main.class"/>
-        <javac srcdir="${src.dir}" destdir="${build.classes.dir}" 
debug="${build.compiler.debug}" debuglevel="${build.compiler.debuglevel}" 
deprecation="${build.compiler.deprecation}" 
optimize="${build.compiler.optimize}" source="1.6" target="1.6" 
includeantruntime="false">
+        <javac srcdir="${src.dir}" destdir="${build.classes.dir}" 
debug="${build.compiler.debug}" debuglevel="${build.compiler.debuglevel}" 
deprecation="${build.compiler.deprecation}" 
optimize="${build.compiler.optimize}" source="1.8" target="1.8" 
includeantruntime="false">
             <classpath refid="cp"/>
             <include name="org/netbeans/Main.java"/>
             <compilerarg line="${javac.compilerargs}"/>
         </javac>
     </target>
-
+    
+    <target name="-build-windows-launchers" depends="build-init" 
if="do.build.windows.launchers">
+        <exec executable="make" dir="launcher/windows">
+            <arg value="-f"/>
+            <arg value="Makefile.mingw"/>
+        </exec>
+        <copy todir="${cluster}/bin" overwrite="true">
+            <fileset dir="launcher/windows">
+                <include name="nbexec*.dll"/>
+                <include name="nbexec*.exe"/>
+            </fileset>
+        </copy>
+    </target>
+    <target name="release" 
depends="projectized.release,-build-windows-launchers" />
 </project>


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists

Reply via email to