make/devkit/createWindowsDevkit2017.sh
author psadhukhan
Fri, 09 Nov 2018 09:29:43 +0530
changeset 52543 3853631e6a07
parent 50295 84256425a4e9
child 53141 6f2d65f29de3
permissions -rw-r--r--
8213181: Updation of ProblemList.txt for removal of passing swing test Reviewed-by: serb
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
31124
5faf40426878 8087208: Add devkit creation script for windows
erikj
parents:
diff changeset
     1
#!/bin/bash
5faf40426878 8087208: Add devkit creation script for windows
erikj
parents:
diff changeset
     2
#
48678
bcce1fa183e7 8196108: Add build support for VS 2015/2017
erikj
parents: 41458
diff changeset
     3
# Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved.
31124
5faf40426878 8087208: Add devkit creation script for windows
erikj
parents:
diff changeset
     4
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5faf40426878 8087208: Add devkit creation script for windows
erikj
parents:
diff changeset
     5
#
5faf40426878 8087208: Add devkit creation script for windows
erikj
parents:
diff changeset
     6
# This code is free software; you can redistribute it and/or modify it
5faf40426878 8087208: Add devkit creation script for windows
erikj
parents:
diff changeset
     7
# under the terms of the GNU General Public License version 2 only, as
5faf40426878 8087208: Add devkit creation script for windows
erikj
parents:
diff changeset
     8
# published by the Free Software Foundation.  Oracle designates this
5faf40426878 8087208: Add devkit creation script for windows
erikj
parents:
diff changeset
     9
# particular file as subject to the "Classpath" exception as provided
5faf40426878 8087208: Add devkit creation script for windows
erikj
parents:
diff changeset
    10
# by Oracle in the LICENSE file that accompanied this code.
5faf40426878 8087208: Add devkit creation script for windows
erikj
parents:
diff changeset
    11
#
5faf40426878 8087208: Add devkit creation script for windows
erikj
parents:
diff changeset
    12
# This code is distributed in the hope that it will be useful, but WITHOUT
5faf40426878 8087208: Add devkit creation script for windows
erikj
parents:
diff changeset
    13
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
5faf40426878 8087208: Add devkit creation script for windows
erikj
parents:
diff changeset
    14
# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
5faf40426878 8087208: Add devkit creation script for windows
erikj
parents:
diff changeset
    15
# version 2 for more details (a copy is included in the LICENSE file that
5faf40426878 8087208: Add devkit creation script for windows
erikj
parents:
diff changeset
    16
# accompanied this code).
5faf40426878 8087208: Add devkit creation script for windows
erikj
parents:
diff changeset
    17
#
5faf40426878 8087208: Add devkit creation script for windows
erikj
parents:
diff changeset
    18
# You should have received a copy of the GNU General Public License version
5faf40426878 8087208: Add devkit creation script for windows
erikj
parents:
diff changeset
    19
# 2 along with this work; if not, write to the Free Software Foundation,
5faf40426878 8087208: Add devkit creation script for windows
erikj
parents:
diff changeset
    20
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
5faf40426878 8087208: Add devkit creation script for windows
erikj
parents:
diff changeset
    21
#
5faf40426878 8087208: Add devkit creation script for windows
erikj
parents:
diff changeset
    22
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
5faf40426878 8087208: Add devkit creation script for windows
erikj
parents:
diff changeset
    23
# or visit www.oracle.com if you need additional information or have any
5faf40426878 8087208: Add devkit creation script for windows
erikj
parents:
diff changeset
    24
# questions.
5faf40426878 8087208: Add devkit creation script for windows
erikj
parents:
diff changeset
    25
#
5faf40426878 8087208: Add devkit creation script for windows
erikj
parents:
diff changeset
    26
48678
bcce1fa183e7 8196108: Add build support for VS 2015/2017
erikj
parents: 41458
diff changeset
    27
# This script copies parts of a Visual Studio installation into a devkit
31124
5faf40426878 8087208: Add devkit creation script for windows
erikj
parents:
diff changeset
    28
# suitable for building OpenJDK and OracleJDK. Needs to run in Cygwin.
5faf40426878 8087208: Add devkit creation script for windows
erikj
parents:
diff changeset
    29
# erik.joelsson@oracle.com
5faf40426878 8087208: Add devkit creation script for windows
erikj
parents:
diff changeset
    30
48678
bcce1fa183e7 8196108: Add build support for VS 2015/2017
erikj
parents: 41458
diff changeset
    31
VS_VERSION="2017"
bcce1fa183e7 8196108: Add build support for VS 2015/2017
erikj
parents: 41458
diff changeset
    32
VS_VERSION_NUM_NODOT="150"
bcce1fa183e7 8196108: Add build support for VS 2015/2017
erikj
parents: 41458
diff changeset
    33
VS_DLL_VERSION="140"
bcce1fa183e7 8196108: Add build support for VS 2015/2017
erikj
parents: 41458
diff changeset
    34
SDK_VERSION="10"
bcce1fa183e7 8196108: Add build support for VS 2015/2017
erikj
parents: 41458
diff changeset
    35
SDK_FULL_VERSION="10.0.16299.0"
bcce1fa183e7 8196108: Add build support for VS 2015/2017
erikj
parents: 41458
diff changeset
    36
MSVC_DIR="Microsoft.VC141.CRT"
31124
5faf40426878 8087208: Add devkit creation script for windows
erikj
parents:
diff changeset
    37
5faf40426878 8087208: Add devkit creation script for windows
erikj
parents:
diff changeset
    38
SCRIPT_DIR="$(cd "$(dirname $0)" > /dev/null && pwd)"
5faf40426878 8087208: Add devkit creation script for windows
erikj
parents:
diff changeset
    39
BUILD_DIR="${SCRIPT_DIR}/../../build/devkit"
48678
bcce1fa183e7 8196108: Add build support for VS 2015/2017
erikj
parents: 41458
diff changeset
    40
bcce1fa183e7 8196108: Add build support for VS 2015/2017
erikj
parents: 41458
diff changeset
    41
################################################################################
bcce1fa183e7 8196108: Add build support for VS 2015/2017
erikj
parents: 41458
diff changeset
    42
# Prepare settings
bcce1fa183e7 8196108: Add build support for VS 2015/2017
erikj
parents: 41458
diff changeset
    43
bcce1fa183e7 8196108: Add build support for VS 2015/2017
erikj
parents: 41458
diff changeset
    44
# Work around the insanely named ProgramFiles(x86) env variable
bcce1fa183e7 8196108: Add build support for VS 2015/2017
erikj
parents: 41458
diff changeset
    45
PROGRAMFILES_X86="$(cygpath "$(env | sed -n 's/^ProgramFiles(x86)=//p')")"
bcce1fa183e7 8196108: Add build support for VS 2015/2017
erikj
parents: 41458
diff changeset
    46
bcce1fa183e7 8196108: Add build support for VS 2015/2017
erikj
parents: 41458
diff changeset
    47
# Find Visual Studio installation dir
bcce1fa183e7 8196108: Add build support for VS 2015/2017
erikj
parents: 41458
diff changeset
    48
eval VSNNNCOMNTOOLS="\"\${VS${VS_VERSION_NUM_NODOT}COMNTOOLS}\""
bcce1fa183e7 8196108: Add build support for VS 2015/2017
erikj
parents: 41458
diff changeset
    49
if [ -d "$VSNNNCOMNTOOLS" ]; then
bcce1fa183e7 8196108: Add build support for VS 2015/2017
erikj
parents: 41458
diff changeset
    50
    VS_INSTALL_DIR="$(cygpath "$VSNNNCOMNTOOLS/../..")"
bcce1fa183e7 8196108: Add build support for VS 2015/2017
erikj
parents: 41458
diff changeset
    51
else
bcce1fa183e7 8196108: Add build support for VS 2015/2017
erikj
parents: 41458
diff changeset
    52
    VS_INSTALL_DIR="${PROGRAMFILES_X86}/Microsoft Visual Studio/2017"
bcce1fa183e7 8196108: Add build support for VS 2015/2017
erikj
parents: 41458
diff changeset
    53
    VS_INSTALL_DIR="$(ls -d "${VS_INSTALL_DIR}/"{Community,Professional} 2>/dev/null | head -n1)"
bcce1fa183e7 8196108: Add build support for VS 2015/2017
erikj
parents: 41458
diff changeset
    54
    VS_INSTALL_DIR="$(cygpath "$VS_INSTALL_DIR")"
bcce1fa183e7 8196108: Add build support for VS 2015/2017
erikj
parents: 41458
diff changeset
    55
fi
bcce1fa183e7 8196108: Add build support for VS 2015/2017
erikj
parents: 41458
diff changeset
    56
echo "VS_INSTALL_DIR: $VS_INSTALL_DIR"
bcce1fa183e7 8196108: Add build support for VS 2015/2017
erikj
parents: 41458
diff changeset
    57
bcce1fa183e7 8196108: Add build support for VS 2015/2017
erikj
parents: 41458
diff changeset
    58
# Extract semantic version
bcce1fa183e7 8196108: Add build support for VS 2015/2017
erikj
parents: 41458
diff changeset
    59
POTENTIAL_INI_FILES="Common7\IDE\wdexpress.isolation.ini Common7\IDE\devenv.isolation.ini"
bcce1fa183e7 8196108: Add build support for VS 2015/2017
erikj
parents: 41458
diff changeset
    60
for f in $POTENTIAL_INI_FILES; do
bcce1fa183e7 8196108: Add build support for VS 2015/2017
erikj
parents: 41458
diff changeset
    61
    if [ -f "$VS_INSTALL_DIR/$f" ]; then
bcce1fa183e7 8196108: Add build support for VS 2015/2017
erikj
parents: 41458
diff changeset
    62
        VS_VERSION_SP="$(grep ^SemanticVersion= "$VS_INSTALL_DIR/$f")"
bcce1fa183e7 8196108: Add build support for VS 2015/2017
erikj
parents: 41458
diff changeset
    63
        # Remove SemnaticVersion=
bcce1fa183e7 8196108: Add build support for VS 2015/2017
erikj
parents: 41458
diff changeset
    64
        VS_VERSION_SP="${VS_VERSION_SP#*=}"
bcce1fa183e7 8196108: Add build support for VS 2015/2017
erikj
parents: 41458
diff changeset
    65
        # Remove suffix of too detailed numbering starting with +
bcce1fa183e7 8196108: Add build support for VS 2015/2017
erikj
parents: 41458
diff changeset
    66
        VS_VERSION_SP="${VS_VERSION_SP%+*}"
bcce1fa183e7 8196108: Add build support for VS 2015/2017
erikj
parents: 41458
diff changeset
    67
        break
bcce1fa183e7 8196108: Add build support for VS 2015/2017
erikj
parents: 41458
diff changeset
    68
    fi
bcce1fa183e7 8196108: Add build support for VS 2015/2017
erikj
parents: 41458
diff changeset
    69
done
bcce1fa183e7 8196108: Add build support for VS 2015/2017
erikj
parents: 41458
diff changeset
    70
if [ -z "$VS_VERSION_SP" ]; then
bcce1fa183e7 8196108: Add build support for VS 2015/2017
erikj
parents: 41458
diff changeset
    71
    echo "Failed to find SP version"
bcce1fa183e7 8196108: Add build support for VS 2015/2017
erikj
parents: 41458
diff changeset
    72
    exit 1
bcce1fa183e7 8196108: Add build support for VS 2015/2017
erikj
parents: 41458
diff changeset
    73
fi
bcce1fa183e7 8196108: Add build support for VS 2015/2017
erikj
parents: 41458
diff changeset
    74
echo "Found Version SP: $VS_VERSION_SP"
bcce1fa183e7 8196108: Add build support for VS 2015/2017
erikj
parents: 41458
diff changeset
    75
bcce1fa183e7 8196108: Add build support for VS 2015/2017
erikj
parents: 41458
diff changeset
    76
# Setup output dirs
bcce1fa183e7 8196108: Add build support for VS 2015/2017
erikj
parents: 41458
diff changeset
    77
DEVKIT_ROOT="${BUILD_DIR}/VS${VS_VERSION}-${VS_VERSION_SP}-devkit"
31124
5faf40426878 8087208: Add devkit creation script for windows
erikj
parents:
diff changeset
    78
DEVKIT_BUNDLE="${DEVKIT_ROOT}.tar.gz"
5faf40426878 8087208: Add devkit creation script for windows
erikj
parents:
diff changeset
    79
5faf40426878 8087208: Add devkit creation script for windows
erikj
parents:
diff changeset
    80
echo "Creating devkit in $DEVKIT_ROOT"
5faf40426878 8087208: Add devkit creation script for windows
erikj
parents:
diff changeset
    81
48678
bcce1fa183e7 8196108: Add build support for VS 2015/2017
erikj
parents: 41458
diff changeset
    82
MSVCR_DLL=${MSVC_DIR}/vcruntime${VS_DLL_VERSION}.dll
bcce1fa183e7 8196108: Add build support for VS 2015/2017
erikj
parents: 41458
diff changeset
    83
MSVCP_DLL=${MSVC_DIR}/msvcp${VS_DLL_VERSION}.dll
31124
5faf40426878 8087208: Add devkit creation script for windows
erikj
parents:
diff changeset
    84
5faf40426878 8087208: Add devkit creation script for windows
erikj
parents:
diff changeset
    85
################################################################################
5faf40426878 8087208: Add devkit creation script for windows
erikj
parents:
diff changeset
    86
# Copy Visual Studio files
5faf40426878 8087208: Add devkit creation script for windows
erikj
parents:
diff changeset
    87
5faf40426878 8087208: Add devkit creation script for windows
erikj
parents:
diff changeset
    88
if [ ! -d $DEVKIT_ROOT/VC ]; then
48678
bcce1fa183e7 8196108: Add build support for VS 2015/2017
erikj
parents: 41458
diff changeset
    89
    VC_SUBDIR="VC/Tools/MSVC/14.12.25827"
bcce1fa183e7 8196108: Add build support for VS 2015/2017
erikj
parents: 41458
diff changeset
    90
    REDIST_SUBDIR="VC/Redist/MSVC/14.12.25810"
31124
5faf40426878 8087208: Add devkit creation script for windows
erikj
parents:
diff changeset
    91
    echo "Copying VC..."
5faf40426878 8087208: Add devkit creation script for windows
erikj
parents:
diff changeset
    92
    mkdir -p $DEVKIT_ROOT/VC/bin
48678
bcce1fa183e7 8196108: Add build support for VS 2015/2017
erikj
parents: 41458
diff changeset
    93
    cp -r "$VS_INSTALL_DIR/${VC_SUBDIR}/bin/Hostx64/x64" $DEVKIT_ROOT/VC/bin/
bcce1fa183e7 8196108: Add build support for VS 2015/2017
erikj
parents: 41458
diff changeset
    94
    cp -r "$VS_INSTALL_DIR/${VC_SUBDIR}/bin/Hostx86/x86" $DEVKIT_ROOT/VC/bin/
31124
5faf40426878 8087208: Add devkit creation script for windows
erikj
parents:
diff changeset
    95
    mkdir -p $DEVKIT_ROOT/VC/lib
48678
bcce1fa183e7 8196108: Add build support for VS 2015/2017
erikj
parents: 41458
diff changeset
    96
    cp -r "$VS_INSTALL_DIR/${VC_SUBDIR}/lib/x64" $DEVKIT_ROOT/VC/lib/
bcce1fa183e7 8196108: Add build support for VS 2015/2017
erikj
parents: 41458
diff changeset
    97
    cp -r "$VS_INSTALL_DIR/${VC_SUBDIR}/lib/x86" $DEVKIT_ROOT/VC/lib/
bcce1fa183e7 8196108: Add build support for VS 2015/2017
erikj
parents: 41458
diff changeset
    98
    cp -r "$VS_INSTALL_DIR/${VC_SUBDIR}/include" $DEVKIT_ROOT/VC/
31124
5faf40426878 8087208: Add devkit creation script for windows
erikj
parents:
diff changeset
    99
    mkdir -p $DEVKIT_ROOT/VC/atlmfc/lib
48678
bcce1fa183e7 8196108: Add build support for VS 2015/2017
erikj
parents: 41458
diff changeset
   100
    cp -r "$VS_INSTALL_DIR/${VC_SUBDIR}/atlmfc/lib/x64" $DEVKIT_ROOT/VC/atlmfc/lib/
bcce1fa183e7 8196108: Add build support for VS 2015/2017
erikj
parents: 41458
diff changeset
   101
    cp -r "$VS_INSTALL_DIR/${VC_SUBDIR}/atlmfc/lib/x86" $DEVKIT_ROOT/VC/atlmfc/lib/
bcce1fa183e7 8196108: Add build support for VS 2015/2017
erikj
parents: 41458
diff changeset
   102
    cp -r "$VS_INSTALL_DIR/${VC_SUBDIR}/atlmfc/include" $DEVKIT_ROOT/VC/atlmfc/
bcce1fa183e7 8196108: Add build support for VS 2015/2017
erikj
parents: 41458
diff changeset
   103
    mkdir -p $DEVKIT_ROOT/VC/Auxiliary
bcce1fa183e7 8196108: Add build support for VS 2015/2017
erikj
parents: 41458
diff changeset
   104
    cp -r "$VS_INSTALL_DIR/VC/Auxiliary/Build" $DEVKIT_ROOT/VC/Auxiliary/
31124
5faf40426878 8087208: Add devkit creation script for windows
erikj
parents:
diff changeset
   105
    mkdir -p $DEVKIT_ROOT/VC/redist
48678
bcce1fa183e7 8196108: Add build support for VS 2015/2017
erikj
parents: 41458
diff changeset
   106
    cp -r "$VS_INSTALL_DIR/$REDIST_SUBDIR/x64" $DEVKIT_ROOT/VC/redist/
bcce1fa183e7 8196108: Add build support for VS 2015/2017
erikj
parents: 41458
diff changeset
   107
    cp -r "$VS_INSTALL_DIR/$REDIST_SUBDIR/x86" $DEVKIT_ROOT/VC/redist/
bcce1fa183e7 8196108: Add build support for VS 2015/2017
erikj
parents: 41458
diff changeset
   108
31124
5faf40426878 8087208: Add devkit creation script for windows
erikj
parents:
diff changeset
   109
    # The redist runtime libs are needed to run the compiler but may not be
5faf40426878 8087208: Add devkit creation script for windows
erikj
parents:
diff changeset
   110
    # installed on the machine where the devkit will be used.
50295
84256425a4e9 8203932: Windows devkit has wrong dlls in 32 bit tools dir
erikj
parents: 50073
diff changeset
   111
    cp $DEVKIT_ROOT/VC/redist/x86/$MSVCR_DLL $DEVKIT_ROOT/VC/bin/x86
84256425a4e9 8203932: Windows devkit has wrong dlls in 32 bit tools dir
erikj
parents: 50073
diff changeset
   112
    cp $DEVKIT_ROOT/VC/redist/x86/$MSVCP_DLL $DEVKIT_ROOT/VC/bin/x86
48678
bcce1fa183e7 8196108: Add build support for VS 2015/2017
erikj
parents: 41458
diff changeset
   113
    cp $DEVKIT_ROOT/VC/redist/x64/$MSVCR_DLL $DEVKIT_ROOT/VC/bin/x64
bcce1fa183e7 8196108: Add build support for VS 2015/2017
erikj
parents: 41458
diff changeset
   114
    cp $DEVKIT_ROOT/VC/redist/x64/$MSVCP_DLL $DEVKIT_ROOT/VC/bin/x64
31124
5faf40426878 8087208: Add devkit creation script for windows
erikj
parents:
diff changeset
   115
fi
5faf40426878 8087208: Add devkit creation script for windows
erikj
parents:
diff changeset
   116
5faf40426878 8087208: Add devkit creation script for windows
erikj
parents:
diff changeset
   117
################################################################################
5faf40426878 8087208: Add devkit creation script for windows
erikj
parents:
diff changeset
   118
# Copy SDK files
5faf40426878 8087208: Add devkit creation script for windows
erikj
parents:
diff changeset
   119
5faf40426878 8087208: Add devkit creation script for windows
erikj
parents:
diff changeset
   120
SDK_INSTALL_DIR="$(cygpath "$PROGRAMFILES_X86/Windows Kits/$SDK_VERSION")"
5faf40426878 8087208: Add devkit creation script for windows
erikj
parents:
diff changeset
   121
echo "SDK_INSTALL_DIR: $SDK_INSTALL_DIR"
5faf40426878 8087208: Add devkit creation script for windows
erikj
parents:
diff changeset
   122
5faf40426878 8087208: Add devkit creation script for windows
erikj
parents:
diff changeset
   123
if [ ! -d $DEVKIT_ROOT/$SDK_VERSION ]; then
5faf40426878 8087208: Add devkit creation script for windows
erikj
parents:
diff changeset
   124
    echo "Copying SDK..."
5faf40426878 8087208: Add devkit creation script for windows
erikj
parents:
diff changeset
   125
    mkdir -p $DEVKIT_ROOT/$SDK_VERSION/bin
48678
bcce1fa183e7 8196108: Add build support for VS 2015/2017
erikj
parents: 41458
diff changeset
   126
    cp -r "$SDK_INSTALL_DIR/bin/$SDK_FULL_VERSION/x64" $DEVKIT_ROOT/$SDK_VERSION/bin/
bcce1fa183e7 8196108: Add build support for VS 2015/2017
erikj
parents: 41458
diff changeset
   127
    cp -r "$SDK_INSTALL_DIR/bin/$SDK_FULL_VERSION/x86" $DEVKIT_ROOT/$SDK_VERSION/bin/
31124
5faf40426878 8087208: Add devkit creation script for windows
erikj
parents:
diff changeset
   128
    mkdir -p $DEVKIT_ROOT/$SDK_VERSION/lib
48678
bcce1fa183e7 8196108: Add build support for VS 2015/2017
erikj
parents: 41458
diff changeset
   129
    cp -r "$SDK_INSTALL_DIR/lib/$SDK_FULL_VERSION/um/x64" $DEVKIT_ROOT/$SDK_VERSION/lib/
bcce1fa183e7 8196108: Add build support for VS 2015/2017
erikj
parents: 41458
diff changeset
   130
    cp -r "$SDK_INSTALL_DIR/lib/$SDK_FULL_VERSION/um/x86" $DEVKIT_ROOT/$SDK_VERSION/lib/
bcce1fa183e7 8196108: Add build support for VS 2015/2017
erikj
parents: 41458
diff changeset
   131
    cp -r "$SDK_INSTALL_DIR/lib/$SDK_FULL_VERSION/ucrt/x64" $DEVKIT_ROOT/$SDK_VERSION/lib/
bcce1fa183e7 8196108: Add build support for VS 2015/2017
erikj
parents: 41458
diff changeset
   132
    cp -r "$SDK_INSTALL_DIR/lib/$SDK_FULL_VERSION/ucrt/x86" $DEVKIT_ROOT/$SDK_VERSION/lib/
50073
35b22ca681d1 8202557: OpenJDK fails to start in Windows 7 and 8.1 after upgrading compiler to VC 2017
erikj
parents: 48678
diff changeset
   133
    mkdir -p $DEVKIT_ROOT/$SDK_VERSION/Redist
35b22ca681d1 8202557: OpenJDK fails to start in Windows 7 and 8.1 after upgrading compiler to VC 2017
erikj
parents: 48678
diff changeset
   134
    cp -r "$SDK_INSTALL_DIR/Redist/ucrt" $DEVKIT_ROOT/$SDK_VERSION/Redist/
48678
bcce1fa183e7 8196108: Add build support for VS 2015/2017
erikj
parents: 41458
diff changeset
   135
    mkdir -p $DEVKIT_ROOT/$SDK_VERSION/include
bcce1fa183e7 8196108: Add build support for VS 2015/2017
erikj
parents: 41458
diff changeset
   136
    cp -r "$SDK_INSTALL_DIR/include/$SDK_FULL_VERSION/"* $DEVKIT_ROOT/$SDK_VERSION/include/
31124
5faf40426878 8087208: Add devkit creation script for windows
erikj
parents:
diff changeset
   137
fi
5faf40426878 8087208: Add devkit creation script for windows
erikj
parents:
diff changeset
   138
5faf40426878 8087208: Add devkit creation script for windows
erikj
parents:
diff changeset
   139
################################################################################
5faf40426878 8087208: Add devkit creation script for windows
erikj
parents:
diff changeset
   140
# Generate devkit.info
5faf40426878 8087208: Add devkit creation script for windows
erikj
parents:
diff changeset
   141
5faf40426878 8087208: Add devkit creation script for windows
erikj
parents:
diff changeset
   142
echo-info() {
5faf40426878 8087208: Add devkit creation script for windows
erikj
parents:
diff changeset
   143
    echo "$1" >> $DEVKIT_ROOT/devkit.info
5faf40426878 8087208: Add devkit creation script for windows
erikj
parents:
diff changeset
   144
}
5faf40426878 8087208: Add devkit creation script for windows
erikj
parents:
diff changeset
   145
5faf40426878 8087208: Add devkit creation script for windows
erikj
parents:
diff changeset
   146
echo "Generating devkit.info..."
5faf40426878 8087208: Add devkit creation script for windows
erikj
parents:
diff changeset
   147
rm -f $DEVKIT_ROOT/devkit.info
5faf40426878 8087208: Add devkit creation script for windows
erikj
parents:
diff changeset
   148
echo-info "# This file describes to configure how to interpret the contents of this devkit"
33029
06a8c5e5959b 8139735: Switch compilers in JPRT for windows and linux
erikj
parents: 31124
diff changeset
   149
echo-info "DEVKIT_NAME=\"Microsoft Visual Studio $VS_VERSION $VS_VERSION_SP (devkit)\""
31124
5faf40426878 8087208: Add devkit creation script for windows
erikj
parents:
diff changeset
   150
echo-info "DEVKIT_VS_VERSION=\"$VS_VERSION\""
5faf40426878 8087208: Add devkit creation script for windows
erikj
parents:
diff changeset
   151
echo-info ""
48678
bcce1fa183e7 8196108: Add build support for VS 2015/2017
erikj
parents: 41458
diff changeset
   152
echo-info "DEVKIT_TOOLCHAIN_PATH_x86=\"\$DEVKIT_ROOT/VC/bin/x86:\$DEVKIT_ROOT/$SDK_VERSION/bin/x86\""
bcce1fa183e7 8196108: Add build support for VS 2015/2017
erikj
parents: 41458
diff changeset
   153
echo-info "DEVKIT_VS_INCLUDE_x86=\"\$DEVKIT_ROOT/VC/include;\$DEVKIT_ROOT/VC/atlmfc/include;\$DEVKIT_ROOT/$SDK_VERSION/include/shared;\$DEVKIT_ROOT/$SDK_VERSION/include/ucrt;\$DEVKIT_ROOT/$SDK_VERSION/include/um;\$DEVKIT_ROOT/$SDK_VERSION/include/winrt\""
bcce1fa183e7 8196108: Add build support for VS 2015/2017
erikj
parents: 41458
diff changeset
   154
echo-info "DEVKIT_VS_LIB_x86=\"\$DEVKIT_ROOT/VC/lib/x86;\$DEVKIT_ROOT/VC/atlmfc/lib/x86;\$DEVKIT_ROOT/$SDK_VERSION/lib/x86\""
31124
5faf40426878 8087208: Add devkit creation script for windows
erikj
parents:
diff changeset
   155
echo-info "DEVKIT_MSVCR_DLL_x86=\"\$DEVKIT_ROOT/VC/redist/x86/$MSVCR_DLL\""
5faf40426878 8087208: Add devkit creation script for windows
erikj
parents:
diff changeset
   156
echo-info "DEVKIT_MSVCP_DLL_x86=\"\$DEVKIT_ROOT/VC/redist/x86/$MSVCP_DLL\""
50073
35b22ca681d1 8202557: OpenJDK fails to start in Windows 7 and 8.1 after upgrading compiler to VC 2017
erikj
parents: 48678
diff changeset
   157
echo-info "DEVKIT_UCRT_DLL_DIR_x86=\"\$DEVKIT_ROOT/10/Redist/ucrt/DLLs/x86\""
31124
5faf40426878 8087208: Add devkit creation script for windows
erikj
parents:
diff changeset
   158
echo-info ""
48678
bcce1fa183e7 8196108: Add build support for VS 2015/2017
erikj
parents: 41458
diff changeset
   159
echo-info "DEVKIT_TOOLCHAIN_PATH_x86_64=\"\$DEVKIT_ROOT/VC/bin/x64:\$DEVKIT_ROOT/$SDK_VERSION/bin/x64:\$DEVKIT_ROOT/$SDK_VERSION/bin/x86\""
bcce1fa183e7 8196108: Add build support for VS 2015/2017
erikj
parents: 41458
diff changeset
   160
echo-info "DEVKIT_VS_INCLUDE_x86_64=\"\$DEVKIT_ROOT/VC/include;\$DEVKIT_ROOT/VC/atlmfc/include;\$DEVKIT_ROOT/$SDK_VERSION/include/shared;\$DEVKIT_ROOT/$SDK_VERSION/include/ucrt;\$DEVKIT_ROOT/$SDK_VERSION/include/um;\$DEVKIT_ROOT/$SDK_VERSION/include/winrt\""
bcce1fa183e7 8196108: Add build support for VS 2015/2017
erikj
parents: 41458
diff changeset
   161
echo-info "DEVKIT_VS_LIB_x86_64=\"\$DEVKIT_ROOT/VC/lib/x64;\$DEVKIT_ROOT/VC/atlmfc/lib/x64;\$DEVKIT_ROOT/$SDK_VERSION/lib/x64\""
31124
5faf40426878 8087208: Add devkit creation script for windows
erikj
parents:
diff changeset
   162
echo-info "DEVKIT_MSVCR_DLL_x86_64=\"\$DEVKIT_ROOT/VC/redist/x64/$MSVCR_DLL\""
5faf40426878 8087208: Add devkit creation script for windows
erikj
parents:
diff changeset
   163
echo-info "DEVKIT_MSVCP_DLL_x86_64=\"\$DEVKIT_ROOT/VC/redist/x64/$MSVCP_DLL\""
50073
35b22ca681d1 8202557: OpenJDK fails to start in Windows 7 and 8.1 after upgrading compiler to VC 2017
erikj
parents: 48678
diff changeset
   164
echo-info "DEVKIT_UCRT_DLL_DIR_x86_64=\"\$DEVKIT_ROOT/10/Redist/ucrt/DLLs/x64\""
31124
5faf40426878 8087208: Add devkit creation script for windows
erikj
parents:
diff changeset
   165
5faf40426878 8087208: Add devkit creation script for windows
erikj
parents:
diff changeset
   166
################################################################################
5faf40426878 8087208: Add devkit creation script for windows
erikj
parents:
diff changeset
   167
# Copy this script
5faf40426878 8087208: Add devkit creation script for windows
erikj
parents:
diff changeset
   168
5faf40426878 8087208: Add devkit creation script for windows
erikj
parents:
diff changeset
   169
echo "Copying this script..."
5faf40426878 8087208: Add devkit creation script for windows
erikj
parents:
diff changeset
   170
cp $0 $DEVKIT_ROOT/
5faf40426878 8087208: Add devkit creation script for windows
erikj
parents:
diff changeset
   171
5faf40426878 8087208: Add devkit creation script for windows
erikj
parents:
diff changeset
   172
################################################################################
5faf40426878 8087208: Add devkit creation script for windows
erikj
parents:
diff changeset
   173
# Create bundle
5faf40426878 8087208: Add devkit creation script for windows
erikj
parents:
diff changeset
   174
5faf40426878 8087208: Add devkit creation script for windows
erikj
parents:
diff changeset
   175
echo "Creating bundle: $DEVKIT_BUNDLE"
5faf40426878 8087208: Add devkit creation script for windows
erikj
parents:
diff changeset
   176
(cd "$DEVKIT_ROOT" && tar zcf "$DEVKIT_BUNDLE" .)