diff --git a/.gitattributes b/.gitattributes index b4f2295742..4a57f17619 100644 --- a/.gitattributes +++ b/.gitattributes @@ -12265,6 +12265,7 @@ tools/install/get_lazarus_version.bat svneol=native#text/x-msdos-program tools/install/get_lazarus_version.sh svneol=native#text/plain tools/install/get_svn_revision_number.sh svneol=native#text/plain tools/install/linux/environmentoptions.xml svneol=native#text/plain +tools/install/linux/pas2jsdsgnoptions.xml svneol=native#text/plain tools/install/macosx/License.html svneol=native#text/plain tools/install/macosx/README.txt svneol=native#text/plain tools/install/macosx/ReadMe.html svneol=native#text/plain diff --git a/tools/install/create_lazarus_deb.sh b/tools/install/create_lazarus_deb.sh index eb3bde0148..8c0e9f4ff4 100755 --- a/tools/install/create_lazarus_deb.sh +++ b/tools/install/create_lazarus_deb.sh @@ -9,12 +9,15 @@ # qt compile IDE and programs for qt. # append-revision append the svn revision to the .deb version # chmhelp add package chmhelp and add chm,kwd files in docs/chm +# pas2jszip +# unzip pas2js release zip to "pas2js/version" set -e LCLWidgetset= LazVersionPostfix= UseCHMHelp= +Pas2jsZip= LazRelease='0' while [ $# -gt 0 ]; do @@ -53,6 +56,23 @@ while [ $# -gt 0 ]; do UseCHMHelp=1 ;; + pas2jszip) + shift + echo "param=$1" + Pas2jsZip=$1 + Pattern="*pas2js*.zip" + if [[ $Pas2jsZip == $Pattern ]]; then + echo "using pas2js zip file $Pas2jsZip" + else + echo "invalid pas2js zip file $Pas2jsZip" + exit -1 + fi + if [ ! -f $Pas2jsZip ]; then + echo "missing pas2js zip file $Pas2jsZip" + exit -1 + fi + ;; + *) echo "invalid parameter $1" echo "Usage: ./create_lazarus_deb.sh [chmhelp] [gtk1] [qt] [qtlib=] [release=svn] " @@ -110,6 +130,7 @@ EtcSrcDir=$CurDir/linux LazSrcDir=../.. LazDestDir=$LazBuildDir/usr/share/lazarus/${LazVersion} LazDestDirInstalled=/usr/share/lazarus/${LazVersion} +Pas2jsVer= echo "ppcbin=$ppcbin" echo "LazVersion=$LazVersion" @@ -142,6 +163,18 @@ if [ "$UseCHMHelp" = "1" ]; then cp -v *.kwd *.chm $LazDestDir/docs/chm/ cd - fi +if [ -n $Pas2jsZip ]; then + # unzip pas2jszip to pas2js/version + mkdir $LazDestDir/pas2js # fails if already there -> good + unzip $Pas2jsZip -d $LazDestDir/pas2js + Pas2jsBin="$LazDestDir/pas2js/*pas2js*/bin/pas2js" + if [ ! -f $Pas2jsBin ]; then + echo "missing $Pas2jsZip/*pas2js*/bin/pas2js" + exit 1 + fi + Pas2jsVer=$($Pas2jsBin -iV | tr -d '\n') + mv $LazDestDir/pas2js/*pas2js* $LazDestDir/pas2js/$Pas2jsVer +fi chmod a-x $LazDestDir/debian/rules # compile @@ -226,6 +259,12 @@ cat $EtcSrcDir/environmentoptions.xml | \ sed -e "s#__LAZARUSDIR__#$LazDestDirInstalled/#" \ -e "s#__FPCSRCDIR__#/usr/share/fpcsrc/\$(FPCVER)/#" \ > $LazBuildDir/etc/lazarus/environmentoptions.xml +if [ -n $Pas2jsZip ]; then + cat $EtcSrcDir/pas2jsdsgnoptions.xml | \ + sed -e "s#__PAS2JSVERSION__#$Pas2jsVer#" \ + > $LazBuildDir/etc/lazarus/pas2jsdsgnoptions.xml + cat $LazBuildDir/etc/lazarus/pas2jsdsgnoptions.xml +fi chmod 644 $LazBuildDir/etc/lazarus/*.xml # fixing permissions diff --git a/tools/install/linux/pas2jsdsgnoptions.xml b/tools/install/linux/pas2jsdsgnoptions.xml new file mode 100644 index 0000000000..d479874398 --- /dev/null +++ b/tools/install/linux/pas2jsdsgnoptions.xml @@ -0,0 +1,4 @@ + + + +