build Windows application on the spot, using Unix tools;
authorwenzelm
Tue Jul 16 12:25:59 2013 +0200 (2013-07-16)
changeset 5267057a00f274130
parent 52669 fb59e6e9442a
child 52671 9a360530eac8
build Windows application on the spot, using Unix tools;
Admin/Windows/Cygwin/isabelle/init.bat
Admin/Windows/Installer/sfx.txt
Admin/Windows/launch4j/Isabelle.exe
Admin/Windows/launch4j/isabelle.xml
Admin/components/bundled-windows
Admin/components/components.sha1
Admin/lib/Tools/makedist_bundle
     1.1 --- a/Admin/Windows/Cygwin/isabelle/init.bat	Mon Jul 15 23:53:04 2013 +0200
     1.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.3 @@ -1,11 +0,0 @@
     1.4 -@echo off
     1.5 -
     1.6 -cd "%~dp0"
     1.7 -cd "..\..\.."
     1.8 -
     1.9 -set CYGWIN=nodosfilewarning
    1.10 -
    1.11 -echo Initializing Cygwin ...
    1.12 -"contrib\cygwin\bin\dash" /isabelle/rebaseall
    1.13 -"contrib\cygwin\bin\bash" /isabelle/postinstall
    1.14 -
     2.1 --- a/Admin/Windows/Installer/sfx.txt	Mon Jul 15 23:53:04 2013 +0200
     2.2 +++ b/Admin/Windows/Installer/sfx.txt	Tue Jul 16 12:25:59 2013 +0200
     2.3 @@ -1,9 +1,9 @@
     2.4  ;!@Install@!UTF-8!
     2.5  GUIFlags="64"
     2.6  InstallPath="%UserDesktop%"
     2.7 -BeginPrompt="Unpack Isabelle2013?"
     2.8 +BeginPrompt="Unpack {ISABELLE_NAME}?"
     2.9  ExtractPathText="Target directory"
    2.10 -ExtractTitle="Unpacking Isabelle2013 ..."
    2.11 -Shortcut="Du,{%%T\Isabelle2013\Isabelle2013.exe},{},{},{},{Isabelle2013},{%%T\Isabelle2013}"
    2.12 -RunProgram="\"%%T\Isabelle2013\contrib\cygwin\isabelle\init.bat\""
    2.13 +ExtractTitle="Unpacking {ISABELLE_NAME} ..."
    2.14 +Shortcut="Du,{%%T\{ISABELLE_NAME}\{ISABELLE_NAME}.exe},{},{},{},{{ISABELLE_NAME}},{%%T\{ISABELLE_NAME}}"
    2.15 +RunProgram="\"%%T\{ISABELLE_NAME}\contrib\jdk-7u21\x86-cygwin\jdk1.7.0_21\bin\java.exe\" -classpath \"%%T\{ISABELLE_NAME}\lib\classes\ext\Pure.jar;%%T\{ISABELLE_NAME}\lib\classes\ext\scala-library.jar;%%T\{ISABELLE_NAME}\lib\classes\ext\scala-swing.jar\" -D \"isabelle.home=\%%T\{ISABELLE_NAME}\""
    2.16  ;!@InstallEnd@!
     3.1 Binary file Admin/Windows/launch4j/Isabelle.exe has changed
     4.1 --- a/Admin/Windows/launch4j/isabelle.xml	Mon Jul 15 23:53:04 2013 +0200
     4.2 +++ b/Admin/Windows/launch4j/isabelle.xml	Tue Jul 16 12:25:59 2013 +0200
     4.3 @@ -20,7 +20,7 @@
     4.4      <cp>%EXEDIR%\lib\classes\ext\scala-swing.jar</cp>
     4.5    </classPath>
     4.6    <jre>
     4.7 -    <path>%EXEDIR%\contrib\jdk-7u13\x86-cygwin\jdk1.7.0_13</path>
     4.8 +    <path>%EXEDIR%\contrib\jdk-7u21\x86-cygwin\jdk1.7.0_21</path>
     4.9      <minVersion></minVersion>
    4.10      <maxVersion></maxVersion>
    4.11      <jdkPreference>jdkOnly</jdkPreference>
     5.1 --- a/Admin/components/bundled-windows	Mon Jul 15 23:53:04 2013 +0200
     5.2 +++ b/Admin/components/bundled-windows	Tue Jul 16 12:25:59 2013 +0200
     5.3 @@ -1,2 +1,3 @@
     5.4  #additional components to be bundled for release
     5.5  cygwin-20130117
     5.6 +windows_app-20130716
     6.1 --- a/Admin/components/components.sha1	Mon Jul 15 23:53:04 2013 +0200
     6.2 +++ b/Admin/components/components.sha1	Tue Jul 16 12:25:59 2013 +0200
     6.3 @@ -48,6 +48,7 @@
     6.4  43b5afbcad575ab6817d2289756ca22fd2ef43a9  spass-3.8ds.tar.gz
     6.5  1f4a2053cc1f34fa36c4d9d2ac906ad4ebc863fd  sumatra_pdf-2.1.1.tar.gz
     6.6  869ea6d8ea35c8ba68d7fcb028f16b2b7064c5fd  vampire-1.0.tar.gz
     6.7 +81d21dfd0ea5c58f375301f5166be9dbf8921a7a  windows_app-20130716.tar.gz
     6.8  2ae13aa17d0dc95ce254a52f1dba10929763a10d  xz-java-1.2.tar.gz
     6.9  4530a1aa6f4498ee3d78d6000fa71a3f63bd077f  yices-1.0.28.tar.gz
    6.10  12ae71acde43bd7bed1e005c43034b208c0cba4c  z3-3.2.tar.gz
     7.1 --- a/Admin/lib/Tools/makedist_bundle	Mon Jul 15 23:53:04 2013 +0200
     7.2 +++ b/Admin/lib/Tools/makedist_bundle	Tue Jul 16 12:25:59 2013 +0200
     7.3 @@ -97,6 +97,8 @@
     7.4    fi
     7.5  done
     7.6  
     7.7 +mv "$ISABELLE_TARGET/contrib/windows_app" "$TMP/."
     7.8 +
     7.9  
    7.10  # purge other platforms
    7.11  
    7.12 @@ -133,7 +135,7 @@
    7.13      perl -pi -e "s,lookAndFeel=.*,lookAndFeel=com.sun.java.swing.plaf.windows.WindowsLookAndFeel,g;" \
    7.14        "$TMP/$ISABELLE_NAME/src/Tools/jEdit/dist/properties/jEdit.props"
    7.15  
    7.16 -    cp "$ISABELLE_HOME/Admin/Windows/launch4j/Isabelle.exe" "$ISABELLE_TARGET/Isabelle2013.exe"
    7.17 +    cp "$TMP/windows_app/Isabelle.exe" "$ISABELLE_TARGET/${ISABELLE_NAME}.exe"
    7.18      cp "$ISABELLE_HOME/Admin/Windows/Cygwin/Cygwin-Setup.bat" \
    7.19        "$ISABELLE_HOME/Admin/Windows/Cygwin/Cygwin-Latex-Setup.bat" \
    7.20        "$ISABELLE_HOME/Admin/Windows/Cygwin/Cygwin-Terminal.bat" "$ISABELLE_TARGET"
    7.21 @@ -141,7 +143,7 @@
    7.22      (
    7.23        cd "$ISABELLE_TARGET"
    7.24  
    7.25 -      for NAME in init.bat postinstall rebaseall
    7.26 +      for NAME in postinstall rebaseall
    7.27        do
    7.28          cp -a "$ISABELLE_HOME/Admin/Windows/Cygwin/isabelle/$NAME" \
    7.29            "contrib/cygwin/isabelle/."
    7.30 @@ -180,15 +182,26 @@
    7.31  echo "packaging $(basename "$BUNDLE_ARCHIVE")"
    7.32  tar -C "$TMP" -c -z -f "$BUNDLE_ARCHIVE" "$ISABELLE_NAME" || exit 2
    7.33  
    7.34 +
    7.35 +# application
    7.36 +
    7.37  if [ "$PLATFORM_FAMILY" = windows ]
    7.38  then
    7.39    if type -p 7z >/dev/null
    7.40    then
    7.41 -    echo "packaging ${ISABELLE_NAME}.7z"
    7.42      (
    7.43        cd "$TMP"
    7.44        rm -f "${ARCHIVE_DIR}/${ISABELLE_NAME}.7z"
    7.45 -      7z -y a "${ARCHIVE_DIR}/${ISABELLE_NAME}.7z" "$ISABELLE_NAME" || exit 2
    7.46 +      7z -y -bd a "${ARCHIVE_DIR}/${ISABELLE_NAME}.7z" "$ISABELLE_NAME" || exit 2
    7.47 +
    7.48 +      echo "application for $PLATFORM_FAMILY"
    7.49 +      (
    7.50 +        cat "windows_app/7zsd_All.sfx"
    7.51 +        cat "$ISABELLE_HOME/Admin/Windows/Installer/sfx.txt" | \
    7.52 +          perl -p -e "s,{ISABELLE_NAME},${ISABELLE_NAME},g;"
    7.53 +        cat "${ARCHIVE_DIR}/${ISABELLE_NAME}.7z"
    7.54 +      ) > "${ARCHIVE_DIR}/${ISABELLE_NAME}.exe"
    7.55 +      chmod +x "${ARCHIVE_DIR}/${ISABELLE_NAME}.exe"
    7.56      )
    7.57    fi
    7.58  fi