Skip to content

Commit

Permalink
Switch from cpack.exe to "choco.exe pack".
Browse files Browse the repository at this point in the history
  • Loading branch information
dkocher committed Jan 4, 2025
1 parent 6333439 commit 882b3bc
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 30 deletions.
50 changes: 25 additions & 25 deletions cli/windows/build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,12 @@
<import file="../../archive.xml"/>

<condition property="msbuild.configuration" value="Debug">
<equals arg1="${configuration}" arg2="debug" />
<equals arg1="${configuration}" arg2="debug"/>
</condition>
<condition property="msbuild.configuration" value="Release">
<equals arg1="${configuration}" arg2="release" />
<equals arg1="${configuration}" arg2="release"/>
</condition>

<property name="cpack.bin" value="${env.ChocolateyInstall}/bin/cpack"/>

<property name="chocolatey.source" value="${setup}/chocolatey/duck"/>
<property name="chocolatey.target" value="${build.deploy}"/>

Expand All @@ -40,42 +38,42 @@

<target name="restore" depends="init-msbuild, version">
<msbuild buildfile="build.proj">
<target name="Restore" />
<target name="Restore"/>

<property name="Exe" value="true" />
<property name="Installer" value="true" />
<property name="Exe" value="true"/>
<property name="Installer" value="true"/>
</msbuild>
</target>

<target name="build" depends="init-msbuild, version">
<msbuild buildfile="build.proj">
<target name="Build" />
<target name="Build"/>

<property name="Configuration" value="${msbuild.configuration}" />
<property name="Copyright" value="${copyright}" />
<property name="Exe" value="true" />
<property name="Platform" value="x64" />
<property name="ShortVersion" value="${version} (${revision})" />
<property name="Version" value="${version}.${revision}" />
<property name="Configuration" value="${msbuild.configuration}"/>
<property name="Copyright" value="${copyright}"/>
<property name="Exe" value="true"/>
<property name="Platform" value="x64"/>
<property name="ShortVersion" value="${version} (${revision})"/>
<property name="Version" value="${version}.${revision}"/>
</msbuild>
</target>

<target name="package" depends="init-msbuild, version">
<condition property="msbuild.sign" value="false">
<istrue value="${skip}" />
<istrue value="${skip}"/>
</condition>
<property name="msbuild.sign" value="" />
<property name="msbuild.sign" value=""/>

<msbuild buildfile="build.proj">
<target name="Build" />
<target name="Build"/>

<property name="BuildProjectReferences" value="false" />
<property name="Configuration" value="${msbuild.configuration}" />
<property name="Copyright" value="${copyright}" />
<property name="Installer" value="true" />
<property name="ShortVersion" value="${version} (${revision})" />
<property name="SignOutput" value="${msbuild.sign}" />
<property name="Version" value="${version}.${revision}" />
<property name="BuildProjectReferences" value="false"/>
<property name="Configuration" value="${msbuild.configuration}"/>
<property name="Copyright" value="${copyright}"/>
<property name="Installer" value="true"/>
<property name="ShortVersion" value="${version} (${revision})"/>
<property name="SignOutput" value="${msbuild.sign}"/>
<property name="Version" value="${version}.${revision}"/>
</msbuild>
</target>

Expand All @@ -102,6 +100,8 @@
<replacefilter token="${CHECKSUM}" value="${archive.sha256}"/>
<replacefilter token="${COPYRIGHT}" value="${copyright}"/>
</replace>
<exec executable="${cpack.bin}" dir="${chocolatey.target}" failonerror="true"/>
<exec executable="${choco.bin}" dir="${chocolatey.target}" failonerror="true">
<arg value="pack"/>
</exec>
</target>
</project>
8 changes: 3 additions & 5 deletions windows/build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@

<property name="app.name" value="Cyberduck"/>

<property name="cpack.bin" value="${env.ChocolateyInstall}/bin/cpack"/>

<property name="chocolatey.source" value="${setup}/chocolatey/cyberduck"/>
<property name="chocolatey.target" value="${build.deploy}"/>

Expand All @@ -38,8 +36,6 @@
<equals arg1="${configuration}" arg2="release" />
</condition>

<property name="cpack.bin" value="${env.ChocolateyInstall}/bin/cpack"/>

<target name="init-msbuild">
<taskdef name="msbuild" classname="org.apache.ant.dotnet.build.MSBuildTask">
<classpath path="${lib.ext}/ant-dotnet-1.1.jar"/>
Expand Down Expand Up @@ -172,6 +168,8 @@
<replacefilter token="${CHECKSUM}" value="${archive.sha256}"/>
<replacefilter token="${COPYRIGHT}" value="${copyright}"/>
</replace>
<exec executable="${cpack.bin}" dir="${chocolatey.target}" failonerror="true"/>
<exec executable="${choco.bin}" dir="${chocolatey.target}" failonerror="true">
<arg value="pack"/>
</exec>
</target>
</project>

0 comments on commit 882b3bc

Please sign in to comment.