Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,13 @@ jobs:
path: netbeans
ref: 22

- name: Checkout NetBeans l10n
uses: actions/checkout@v4
with:
repository: apache/netbeans-l10n
path: netbeans-l10n
ref: ece00239dc7a208fba60703c2256ffd818da1646

- name: Apply NetBeans patches
run: ant apply-patches

Expand Down
4 changes: 4 additions & 0 deletions BUILD.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,10 @@ $ git clone https://github.com/apache/netbeans.git
$ cd netbeans/
$ git checkout 22
$ cd ..
$ git clone https://github.com/apache/netbeans-l10n.git
$ cd netbeans-l10n
$ git checkout ece00239dc7a208fba60703c2256ffd818da1646 # head commit in master
$ cd ..
# the following target requires git executable to be on PATH:
$ ant apply-patches
$ ant build-netbeans
Expand Down
84 changes: 79 additions & 5 deletions build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,16 @@
<property name="nbplatform.default.harness.dir" location="${nbplatform.default.netbeans.dest.dir}/harness" />
<property name="nbantext.jar" location="netbeans/nbbuild/build/nbantext.jar" />
<property name="nb_all" location="netbeans" />
<loadresource property="patch-files-l10n">
<string>
patches/l10n/patch.diff
</string>
<filterchain>
<tokenfilter delimoutput=" ">
<replaceregex pattern="\s+" replace=""/>
</tokenfilter>
</filterchain>
</loadresource>
<loadresource property="patch-files">
<string>
patches/6330.diff
Expand Down Expand Up @@ -70,6 +80,10 @@
<condition property="has-patches">
<length string="${patches}" trim="true" when="greater" length="0"/>
</condition>
<property name="patches-l10n" value="${patch-files-l10n}"/>
<condition property="has-l10n-patches">
<length string="${patches-l10n}" trim="true" when="greater" length="0"/>
</condition>

<condition property="cmd.suffix" value=".cmd" else="">
<os family="windows"/>
Expand Down Expand Up @@ -103,7 +117,7 @@
<chmod file="${lsp.build.dir}/platform/lib/nbexec.sh" perm="u+x"/>
<chmod file="${lsp.build.dir}/java/maven/bin/mvn.sh" perm="u+x" />
</target>
<target name="add-extra-modules" depends="build-lsp-server" if="extra.modules">
<target name="add-extra-modules" depends="build-lsp-server,build-l10n-bundles" if="extra.modules">
<ant dir="../../nbbuild" target="build-nbms" inheritall="false" inheritrefs="false">
<property name="cluster.config" value="basic"/>
</ant>
Expand All @@ -123,6 +137,52 @@
<delete dir="vscode/out" />
<ant dir="nbcode" target="clean" inheritall="false" inheritrefs="false"/>
</target>

<property name="netbeans.l10n.dir" location="netbeans-l10n"/>
<property name="javavscode.nbuild.nb.dir" location="netbeans/nbbuild/netbeans"/>
<property name="javavscode.nbcode.extra.dir" location="vscode/nbcode/extra"/>

<target name="build-l10n-ant-text-jar">
<ant dir="${netbeans.l10n.dir}/l10nantext" inheritall="false" inheritrefs="false">
<property name="file.reference.ant.jar" value="${ant.home}/lib/ant.jar"/>
</ant>
</target>

<target name="build-l10n">
<ant dir="${netbeans.l10n.dir}/locale_${locale}" target="build" inheritall="false" inheritrefs="false">
<property name="nbplatform.default.harness.dir" location="${javavscode.nbuild.nb.dir}/harness"/>
<property name="nbplatform.default.netbeans.dest.dir" location="${javavscode.nbuild.nb.dir}"/>
</ant>
<copy todir="${javavscode.nbcode.extra.dir}">
<fileset dir="${netbeans.l10n.dir}/locale_${locale}/build/cluster"/>
</copy>
</target>
<target name="clean-l10n">
<delete dir="${netbeans.l10n.dir}/locale_${locale}/build"/>
<delete dir="${netbeans.l10n.dir}/locale_${locale}/release"/>
</target>
<target name="clean-l10n-bundles">
<delete dir="${netbeans.l10n.dir}/l10nantext/build"/>
<delete dir="${netbeans.l10n.dir}/l10nantext/dist"/>
<ant target="clean-l10n">
<property name="locale" value="ja"/>
</ant>
<ant target="clean-l10n">
<property name="locale" value="zh_CN"/>
</ant>
</target>
<target name="build-l10n-bundles" depends="clean-l10n-bundles,build-l10n-ant-text-jar">
<ant target="build-l10n">
<property name="locale" value="ja" description="japanese"/>
</ant>
<ant target="build-l10n">
<property name="locale" value="zh_CN" description="simplified chinese"/>
</ant>
</target>




<target name="build-vscode-ext" depends="add-extra-modules" description="Build the Visual Studio Code extension.">
<taskdef name="gitbranchhash" classname="org.netbeans.nbbuild.GitBranchHash" classpath="${nbantext.jar}" />
<gitbranchhash file="." branchproperty="metabuild.branch" hashproperty="metabuild.hash" />
Expand Down Expand Up @@ -214,16 +274,30 @@
</exec>
</target>

<target name="apply-patches" if="has-patches">
<echo>${patches}</echo>

<target name = "git-patch" if="${has-git-patches}" >
<echo>${git-patches-list}</echo>
<exec executable="git">
<arg value="apply"/>
<arg value="--directory=netbeans"/>
<arg value="--directory=${git-dir}"/>
<arg value="--whitespace=nowarn"/>
<arg line="${patches}"/>
<arg line="${git-patches-list}"/>
</exec>
</target>

<target name="apply-patches">
<ant target="git-patch">
<property name="git-patches-list" value="${patches}"/>
<property name="has-git-patches" value="${has-patches}"/>
<property name="git-dir" value="netbeans"/>
</ant>
<ant target="git-patch">
<property name="git-patches-list" value="${patches-l10n}"/>
<property name="has-git-patches" value="${has-l10n-patches}"/>
<property name="git-dir" value="netbeans-l10n"/>
</ant>
</target>

<target name="unapply-patches" if="has-patches">
<!--in the reverse order:-->
<echo file="${build.dir}/Reverse.java">
Expand Down
Loading