separate bundle for windows64;
authorwenzelm
Fri, 21 Aug 2015 20:18:52 +0200
changeset 61000 dd43980dc2c6
parent 60999 42c61f0b5748
child 61001 ea38a1922a0b
separate bundle for windows64;
Admin/Release/build
Admin/Windows/launch4j/isabelle.xml
Admin/lib/Tools/makedist_bundle
--- a/Admin/Release/build	Fri Aug 21 19:20:48 2015 +0200
+++ b/Admin/Release/build	Fri Aug 21 20:18:52 2015 +0200
@@ -115,7 +115,7 @@
 
 # make bundles
 
-for PLATFORM_FAMILY in linux windows macos
+for PLATFORM_FAMILY in linux windows windows64 macos
 do
 
 echo
@@ -141,6 +141,7 @@
 <ul>
 <li><a href="${DISTNAME}_linux.tar.gz">Linux</a></li>
 <li><a href="${DISTNAME}.exe">Windows</a></li>
+<li><a href="${DISTNAME}-win64.exe">Windows (64bit)</a></li>
 <li><a href="${DISTNAME}.dmg">Mac OS X</a></li>
 </ul>
 </body>
--- a/Admin/Windows/launch4j/isabelle.xml	Fri Aug 21 19:20:48 2015 +0200
+++ b/Admin/Windows/launch4j/isabelle.xml	Fri Aug 21 20:18:52 2015 +0200
@@ -19,13 +19,13 @@
 {CLASSPATH}
   </classPath>
   <jre>
-    <path>%EXEDIR%\contrib\jdk\x86-windows\jre</path>
-    <bundledJre64Bit>false</bundledJre64Bit>
+    <path>%EXEDIR%\contrib\jdk\{PLATFORM}\jre</path>
+    <bundledJre64Bit>{PLATFORM_IS_64}</bundledJre64Bit>
     <bundledJreAsFallback>false</bundledJreAsFallback>
     <minVersion></minVersion>
     <maxVersion></maxVersion>
     <jdkPreference>jdkOnly</jdkPreference>
-    <runtimeBits>64/32</runtimeBits>
+    <runtimeBits>{PLATFORM_BITS}</runtimeBits>
     <opt>-Disabelle.home=&quot;%EXEDIR%&quot; -Dcygwin.root=&quot;%EXEDIR%\\contrib\\cygwin&quot;</opt>
   </jre>
   <splash>
--- a/Admin/lib/Tools/makedist_bundle	Fri Aug 21 19:20:48 2015 +0200
+++ b/Admin/lib/Tools/makedist_bundle	Fri Aug 21 20:18:52 2015 +0200
@@ -11,8 +11,8 @@
   echo
   echo "Usage: isabelle $PRG ARCHIVE PLATFORM_FAMILY"
   echo
-  echo "  Re-package Isabelle source distribution with add-on components"
-  echo "  and post-hoc patches for platform family linux, windows, macos."
+  echo "  Re-package Isabelle source distribution with add-on components and"
+  echo "  post-hoc patches for platform family linux, windows, windows64, macos."
   echo
   echo "  Add-on components are that of the running Isabelle version!"
   echo
@@ -33,6 +33,12 @@
 ARCHIVE="$1"; shift
 PLATFORM_FAMILY="$1"; shift
 
+if [ "$PLATFORM_FAMILY" = windows64 ]; then
+  PLATFORM_FAM="windows"
+else
+  PLATFORM_FAM="$PLATFORM_FAMILY"
+fi
+
 [ -f "$ARCHIVE" ] || fail "Bad source archive: $ARCHIVE"
 
 ARCHIVE_DIR="$(cd $(dirname "$ARCHIVE"); echo "$PWD")"
@@ -81,7 +87,7 @@
 
 echo "#bundled components" >> "$ISABELLE_TARGET/etc/components"
 
-for CATALOG in main "$PLATFORM_FAMILY" bundled "bundled-$PLATFORM_FAMILY"
+for CATALOG in main "$PLATFORM_FAM" bundled "bundled-$PLATFORM_FAM"
 do
   CATALOG_FILE="$ISABELLE_HOME/Admin/components/$CATALOG"
   if [ -f "$CATALOG_FILE" ]
@@ -132,11 +138,11 @@
 
 # purge other platforms
 
-function purge_contrib
+function purge_target
 {
   (
     cd "$ISABELLE_TARGET"
-    for DIR in $(eval find contrib "$@" | sort)
+    for DIR in $(eval find "$@" | sort)
     do
       echo "removing $DIR"
       rm -rf "$DIR"
@@ -175,9 +181,9 @@
 perl -pi -e "s,view.title=Isabelle/jEdit,view.title=${ISABELLE_NAME},g;" \
   "$ISABELLE_TARGET/src/Tools/jEdit/dist/properties/jEdit.props"
 
-case "$PLATFORM_FAMILY" in
+case "$PLATFORM_FAM" in
   linux)
-    purge_contrib '-name "x86*-darwin" -o -name "x86*-cygwin" -o -name "x86*-windows"'
+    purge_target 'contrib -name "x86*-darwin" -o -name "x86*-cygwin" -o -name "x86*-windows"'
     purge_jdk "x86-linux"
     purge_jdk "x86_64-linux"
 
@@ -199,7 +205,7 @@
     cp "$TMP/linux_app/Isabelle" "$ISABELLE_TARGET/$ISABELLE_NAME"
     ;;
   macos)
-    purge_contrib '-name "x86*-linux" -o -name "x86*-cygwin" -o -name "x86*-windows"'
+    purge_target 'contrib -name "x86*-linux" -o -name "x86*-cygwin" -o -name "x86*-windows"'
     purge_jdk "x86_64-darwin/Contents/Home"
     mv "$ISABELLE_TARGET/contrib/macos_app" "$TMP/."
 
@@ -212,8 +218,20 @@
       "$ISABELLE_TARGET/src/Tools/jEdit/dist/properties/jEdit.props"
     ;;
   windows)
-    purge_contrib '-name x86_64-windows -o -name "x86*-linux" -o -name "x86*-darwin"'
-    purge_jdk "x86-windows"
+    if [ "$PLATFORM_FAMILY" = windows ]; then
+      purge_target 'contrib -name x86_64-windows -o -name "x86*-linux" -o -name "x86*-darwin"'
+      PLATFORM="x86-windows"
+      PLATFORM_IS_64="false"
+      PLATFORM_BITS="32"
+    else
+      purge_target 'contrib -name "x86*-linux" -o -name "x86*-darwin"'
+      purge_target 'contrib/jdk -name "x86-windows"'
+      PLATFORM="x86_64-windows"
+      PLATFORM_IS_64="true"
+      PLATFORM_BITS="64"
+    fi
+    purge_jdk "$PLATFORM"
+
     mv "$ISABELLE_TARGET/contrib/windows_app" "$TMP/."
 
     perl -pi \
@@ -250,6 +268,9 @@
         -e "s,{ICON},$APP_TEMPLATE/isabelle_transparent.ico,g;" \
         -e "s,{SPLASH},$APP_TEMPLATE/isabelle.bmp,g;" \
         -e "s,{CLASSPATH},$EXE_CLASSPATH,g;" \
+        -e "s,{PLATFORM},$PLATFORM,g;" \
+        -e "s,{PLATFORM_IS_64},$PLATFORM_IS_64,g;" \
+        -e "s,{PLATFORM_BITS},$PLATFORM_BITS,g;" \
         "$APP_TEMPLATE/isabelle.xml" > isabelle.xml
 
       "windows_app/launch4j-${ISABELLE_PLATFORM_FAMILY}/launch4j" isabelle.xml
@@ -295,7 +316,7 @@
 
 if [ "$ISABELLE_PLATFORM_FAMILY" = linux -a "$PLATFORM_FAMILY" != macos -o "$ISABELLE_PLATFORM_FAMILY" = macos ]
 then
-  case "$PLATFORM_FAMILY" in
+  case "$PLATFORM_FAM" in
     macos)
       echo "application for $PLATFORM_FAMILY"
       (
@@ -352,6 +373,12 @@
       ;;
     windows)
       (
+        if [ "$PLATFORM_FAMILY" = windows ]; then
+          PLATFORM_SUFFIX=""
+        else
+          PLATFORM_SUFFIX="-win64"
+        fi
+
         cd "$TMP"
         rm -f "${ARCHIVE_DIR}/${ISABELLE_NAME}.7z"
         7z -y -bd a "$TMP/${ISABELLE_NAME}.7z" "$ISABELLE_NAME" || exit 2
@@ -362,8 +389,8 @@
           cat "$ISABELLE_HOME/Admin/Windows/Installer/sfx.txt" | \
             perl -p -e "s,{ISABELLE_NAME},${ISABELLE_NAME},g;"
           cat "$TMP/${ISABELLE_NAME}.7z"
-        ) > "${ARCHIVE_DIR}/${ISABELLE_NAME}.exe"
-        chmod +x "${ARCHIVE_DIR}/${ISABELLE_NAME}.exe"
+        ) > "${ARCHIVE_DIR}/${ISABELLE_NAME}${PLATFORM_SUFFIX}.exe"
+        chmod +x "${ARCHIVE_DIR}/${ISABELLE_NAME}${PLATFORM_SUFFIX}.exe"
       )
       ;;
     *)