Skip to content

Commit

Permalink
Signing the exe for V1
Browse files Browse the repository at this point in the history
  • Loading branch information
wjrl committed Sep 4, 2018
1 parent 4c26bb7 commit 23c66fe
Show file tree
Hide file tree
Showing 7 changed files with 65 additions and 36 deletions.
27 changes: 17 additions & 10 deletions build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,9 @@ Here are the targets that count:
<property name="app.srcFile" location="${app.buildDir}/&appName;-&appVersion;-src.tar.gz" />
<property name="app.tarBaseDir" location="${app.srcDir}" />
<property name="app.signedJarDir" location="CodeSigning" />
<property name="app.buildWin" value="${basedir}/releaseTools/buildWindowsExe.sh" />
<property name="app.buildWin1" value="${basedir}/releaseTools/buildWindowsExe-Step1.sh" />
<property name="app.buildWin2" value="${basedir}/releaseTools/buildWindowsExe-Step2.sh" />
<property name="app.buildWin3" value="${basedir}/releaseTools/buildWindowsExe-Step3.sh" />
<property name="app.buildLin" value="${basedir}/releaseTools/buildLinuxReleaseTar.sh" />
<property name="app.buildMac" value="${basedir}/releaseTools/buildMacReleaseDir.sh" />
<property name="app.signJar" value="${basedir}/releaseTools/signIt.sh" />
Expand Down Expand Up @@ -175,7 +177,7 @@ Here are the targets that count:
<echo message="Need password! Execute: ${app.signJar} ${app.keyStoreDir} ${app.signDir} ${app.version}"/>
</target>

<target name="buildWindowsExe">
<target name="buildWindowsExe-Step1">
<delete dir="${app.winExeDir}" quiet="true" />
<mkdir dir="${app.winExeDir}" />
<copy file="${app.winExeSrcDir}/bioFabl4j.xml" tofile="${app.winExeDir}/bioFabl4jWorking.xml" />
Expand All @@ -186,12 +188,22 @@ Here are the targets that count:
<replace file="${app.winExeDir}/bioFabl4jWorking.xml" token="__WJRL_RESLOC__" value="${app.winExeSrcDir}"/>
<replace file="${app.winExeDir}/bioFabl4jWorking.xml" token="__WJRL_FULL_VERSTRING__" value="${app.datedVersion} "/>
<replace file="${app.winExeDir}/bioFabl4jWorking.xml" token="__WJRL_CURRYEAR__" value="${app.year}"/>
<exec executable="${app.buildWin}" failonerror="true">
<exec executable="${app.buildWin1}" failonerror="true">
<arg line="${app.winExeDir} ${app.winExeSrcDir} ${app.l4jDir} ${app.NDversion} ${app.year} ${app.releaseDir}/lib/ ${app.keyStoreDir}" />
</exec>
<copy file="${app.winExeDir}/BioFabric${app.NDversion}.zip" tofile="${app.releaseDists}/BioFabric${app.NDversion}.zip" />
</target>


<target name="buildWindowsExe-Step2">
<echo message="Need password! DO WE NEED TO CD FIRST??? Execute: ${app.buildWin2} ${app.winExeDir} ${app.winExeSrcDir} ${app.l4jDir} ${app.NDversion} ${app.year} ${app.releaseDir}/lib/ ${app.keyStoreDir}"/>
</target>

<target name="buildWindowsExe-Step3">
<exec executable="${app.buildWin2}" failonerror="true">
<arg line="${app.winExeDir} ${app.winExeSrcDir} ${app.l4jDir} ${app.NDversion} ${app.year} ${app.releaseDir}/lib/ ${app.keyStoreDir}" />
</exec>
<copy file="${app.winExeDir}/BioFabric${app.NDversion}.zip" tofile="${app.releaseDists}/BioFabric${app.NDversion}.zip" />
</target>

<target name="buildLinuxTar">
<delete dir="${app.linExeDir}" quiet="true" />
<mkdir dir="${app.linExeDir}" />
Expand All @@ -202,11 +214,6 @@ Here are the targets that count:
</target>



<target name="releaseDistribs" depends="buildWindowsExe, buildLinuxTar, stageForMacDmg" >
<copy file="${app.signJarFile}" todir="${app.releaseDists}" />
</target>

<!-- Build about file to have current version info -->

<target name="installAbout">
Expand Down
2 changes: 1 addition & 1 deletion releaseDistArchive/BioFabric20B1-MD5.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
MD5 (BioFabric20B1.zip) = 7f4dca38e26a5aec92acfccd442ded58
MD5 (BioFabric20B1.zip) = 3e65d26cabc6bead5b32d5ab14817336
Binary file removed releaseDistArchive/BioFabric20B1.zip
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,6 @@ CURRYEAR=$5
SC_HOME=$6
KEY_HOME=$7

echo $EXEHOME
echo $L4J_WORKING
cat $L4J_WORKING

java -jar $LAUNCH4J_HOME/launch4j.jar $L4J_WORKING

#
# This requires that the osslsigncode tool (https://sourceforge.net/projects/osslsigncode/) has been installed:
#
Expand All @@ -23,8 +17,10 @@ echo -n "Enter the key:"
read -s PERM
echo

mv BioFabric.exe UnsignedBioFabric.exe

${SC_HOME}/osslsigncode sign -pkcs12 ${KEY_HOME}/isbcert.p12 -pass ${PERM} -n "BioFabric" -i http://www.BioFabric.org \
-t http://timestamp.verisign.com/scripts/timstamp.dll -in BioFabric.exe -out SignedBioFabric.exe
-t http://timestamp.verisign.com/scripts/timstamp.dll -in UnsignedBioFabric.exe -out BioFabric.exe

# signcode says everything is fine, but Windows says there is no signature. Use osslsigncode above instead:
# openssl pkcs12 -in isbcert.p12 -nocerts -nodes -out key.pem
Expand All @@ -36,21 +32,3 @@ ${SC_HOME}/osslsigncode sign -pkcs12 ${KEY_HOME}/isbcert.p12 -pass ${PERM} -n "B
# signcode -spc authenticode.spc -v authenticode.pvk -a sha1 -$ commercial -n BioFabric \
# -i http://www.BioFabric.org/ -t http://timestamp.verisign.com/scripts/timstamp.dll -tr 10 \
# $EXEHOME/BioFabric.exe

cd $EXEHOME
rm -rf $EXEHOME/Licenses
mkdir $EXEHOME/Licenses
cat $RESHOME/Licenses/LICENSE-README-TEMPLATE.txt | sed "s#__WJRL_CURRYEAR__#$CURRYEAR#" > Licenses/LICENSE-README.txt
cp $RESHOME/Licenses/LICENSE.txt $RESHOME/Licenses/LICENSE-SUN.txt \
$RESHOME/Licenses/launch4j-head-LICENSE.txt $EXEHOME/Licenses
cp $RESHOME/README-INSTALL.txt $EXEHOME

zip BioFabric$VERCOMP.zip Licenses Licenses/LICENSE.txt Licenses/LICENSE-README.txt \
Licenses/LICENSE-SUN.txt Licenses/launch4j-head-LICENSE.txt BioFabric.exe README-INSTALL.txt







28 changes: 28 additions & 0 deletions releaseTools/buildWindowsExe2-Step3.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# /bin/sh

EXEHOME=$1
RESHOME=$2
LAUNCH4J_HOME=$3
L4J_WORKING=$EXEHOME/bioFabl4jWorking.xml
VERCOMP=$4
CURRYEAR=$5
SC_HOME=$6
KEY_HOME=$7

cd $EXEHOME
rm -rf $EXEHOME/Licenses
mkdir $EXEHOME/Licenses
cat $RESHOME/Licenses/LICENSE-README-TEMPLATE.txt | sed "s#__WJRL_CURRYEAR__#$CURRYEAR#" > Licenses/LICENSE-README.txt
cp $RESHOME/Licenses/LICENSE.txt $RESHOME/Licenses/LICENSE-SUN.txt \
$RESHOME/Licenses/launch4j-head-LICENSE.txt $EXEHOME/Licenses
cp $RESHOME/README-INSTALL.txt $EXEHOME

zip BioFabric$VERCOMP.zip Licenses Licenses/LICENSE.txt Licenses/LICENSE-README.txt \
Licenses/LICENSE-SUN.txt Licenses/launch4j-head-LICENSE.txt BioFabric.exe README-INSTALL.txt







16 changes: 16 additions & 0 deletions releaseTools/buildWindowsExeStep1.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# /bin/sh

EXEHOME=$1
RESHOME=$2
LAUNCH4J_HOME=$3
L4J_WORKING=$EXEHOME/bioFabl4jWorking.xml
VERCOMP=$4
CURRYEAR=$5
SC_HOME=$6
KEY_HOME=$7

echo $EXEHOME
echo $L4J_WORKING
cat $L4J_WORKING

java -jar $LAUNCH4J_HOME/launch4j.jar $L4J_WORKING

0 comments on commit 23c66fe

Please sign in to comment.