diff --git a/platform/build-scripts/groovy/org/jetbrains/intellij/build/impl/MacDmgBuilder.groovy b/platform/build-scripts/groovy/org/jetbrains/intellij/build/impl/MacDmgBuilder.groovy index 6707d40b3f0d..5639f7be4edd 100644 --- a/platform/build-scripts/groovy/org/jetbrains/intellij/build/impl/MacDmgBuilder.groovy +++ b/platform/build-scripts/groovy/org/jetbrains/intellij/build/impl/MacDmgBuilder.groovy @@ -187,9 +187,10 @@ class MacDmgBuilder { } } + String helpFileName = customizer.getPathToHelpZip(buildContext) != null ? "${customizer.helpId}.help" : "no-help" String jreFileNameArgument = jreArchivePath != null ? " \"${PathUtilRt.getFileName(jreArchivePath)}\"" : "" sshExec("$remoteDir/signapp.sh ${targetFileName} ${buildContext.fullBuildNumber} ${this.macHostProperties.userName}" - + " ${this.macHostProperties.password} \"${this.macHostProperties.codesignString}\"$jreFileNameArgument", "signapp.log") + + " ${this.macHostProperties.password} \"${this.macHostProperties.codesignString}\" $helpFileName$jreFileNameArgument", "signapp.log") ftpAction("get", true, null, 3) { ant.fileset(dir: artifactsPath) { include(name: "${targetFileName}.sit") diff --git a/platform/build-scripts/tools/mac/scripts/signapp.sh b/platform/build-scripts/tools/mac/scripts/signapp.sh index d47fe2724fac..06f84031582c 100644 --- a/platform/build-scripts/tools/mac/scripts/signapp.sh +++ b/platform/build-scripts/tools/mac/scripts/signapp.sh @@ -5,6 +5,7 @@ EXPLODED=$2.exploded USERNAME=$3 PASSWORD=$4 CODESIGN_STRING=$5 +HELP_DIR_NAME=$6 cd $(dirname $0) @@ -19,8 +20,8 @@ unzip -q $1.sit -d ${EXPLODED}/ rm $1.sit BUILD_NAME=$(ls ${EXPLODED}/) -if [ $# -eq 6 ] && [ -f $6 ]; then - archiveJDK="$6" +if [ $# -eq 7 ] && [ -f $7 ]; then + archiveJDK="$7" echo "Modifying Info.plist" sed -i -e 's/1.6\*/1.6\+/' ${EXPLODED}/"$BUILD_NAME"/Contents/Info.plist jdk=jdk-bundled @@ -37,11 +38,12 @@ if [ $# -eq 6 ] && [ -f $6 ]; then rm -f $archiveJDK fi -HELP_FILE=`ls ${EXPLODED}/"$BUILD_NAME"/Contents/Resources/ | grep -i help` -HELP_DIR=${EXPLODED}/"$BUILD_NAME"/Contents/Resources/"$HELP_FILE"/Contents/Resources/English.lproj/ +if [ $HELP_DIR_NAME != "no-help" ]; then + HELP_DIR=${EXPLODED}/"$BUILD_NAME"/Contents/Resources/"$HELP_DIR_NAME"/Contents/Resources/English.lproj/ -echo "Building help indices for $HELP_DIR" -hiutil -Cagvf "$HELP_DIR/search.helpindex" "$HELP_DIR" + echo "Building help indices for $HELP_DIR" + hiutil -Cagvf "$HELP_DIR/search.helpindex" "$HELP_DIR" +fi #enable nullglob option to ensure that 'for' cycles don't iterate if nothing matches to the file pattern shopt -s nullglob