Skip to content
This repository has been archived by the owner on Jun 24, 2021. It is now read-only.

Commit

Permalink
Add a powershell script for Windows dev, use on Appveyor. (#153)
Browse files Browse the repository at this point in the history
JDK-8209765: Add powershell build script for OpenJFX
Reviewed-by: @kevinrushforth
  • Loading branch information
brcolow authored and kevinrushforth committed Aug 21, 2018
1 parent c33a624 commit 34f8c83
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 20 deletions.
22 changes: 2 additions & 20 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,36 +4,18 @@ image: Visual Studio 2017

environment:
JAVA_HOME: C:\jdk10
VCINSTALLDIR: C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build
APPVEYOR_CACHE_ENTRY_ZIP_ARGS: "-t7z -m0=lzma -mx=9"

shallow_clone: true

build_script:
- ps: |
choco install ant
$client = New-Object net.webclient
$client.DownloadFile('http://downloads.sourceforge.net/gnuwin32/zip-3.0-bin.zip', 'C:\Users\appveyor\zip-3.0.zip')
Expand-Archive -Path 'C:\Users\appveyor\zip-3.0.zip' -DestinationPath 'C:\Users\appveyor\zip'
$client.DownloadFile('http://downloads.sourceforge.net/gnuwin32/zip-3.0-dep.zip', 'C:\Users\appveyor\zip-3.0-deps.zip')
Expand-Archive -Path 'C:\Users\appveyor\zip-3.0-deps.zip' -DestinationPath 'C:\Users\appveyor\zip'
$env:PATH = "C:\Users\appveyor\zip\bin;$env:PATH"
$openJdk10 = 'https://github.com/AdoptOpenJDK/openjdk10-nightly/releases/download/jdk-10%2B23-20180524/OpenJDK10_x64_Win_20180524.zip'
$openJdk10 = 'https://github.com/AdoptOpenJDK/openjdk10-releases/releases/download/jdk-10.0.1%2B10/OpenJDK10_x64_Windows_201807101745.zip'
$client.DownloadFile($openJdk10, 'C:\Users\appveyor\openjdk10.zip')
Expand-Archive -Path 'C:\Users\appveyor\openjdk10.zip' -DestinationPath 'C:\Users\appveyor\openjdk10'
Copy-Item -Path 'C:\Users\appveyor\openjdk10\*\' -Destination 'C:\jdk10' -Recurse -Force
choco install gradle --version 4.3.0
$msvcToolsVer = Get-Content "$env:VCINSTALLDIR\Microsoft.VCToolsVersion.default.txt"
if ([string]::IsNullOrWhitespace($msvcToolsVer)) {
# The MSVC tools version file can have txt *or* props extension.
$msvcToolsVer = Get-Content "$env:VCINSTALLDIR\Microsoft.VCToolsVersion.default.props"
}
$env:MSVC_VER = $msvcToolsVer
$env:VS150COMNTOOLS = $env:VCINSTALLDIR
$env:VSVARS32FILE = "$env:VCINSTALLDIR\vcvars32.bat"
refreshenv
# Must invoke gradle with cmd.exe so stderr output doesn't fail the build:
- cmd: gradlew all test -PCOMPILE_WEBKIT=false -PCONF=DebugNative --stacktrace -x :web:test --info --no-daemon
. .\tools\scripts\build.ps1 2>&1
on_finish:
- ps: |
Expand Down
20 changes: 20 additions & 0 deletions tools/scripts/build.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
choco install ant
choco install vswhere
choco install zip
$env:WINSDK_DIR = (Get-ItemProperty -Path "HKLM:\SOFTWARE\Wow6432Node\Microsoft\Windows Kits\Installed Roots").KitsRoot10
$env:VCINSTALLDIR = "$(vswhere -legacy -latest -property installationPath)\VC\Auxiliary\Build"
$msvcToolsVer = Get-Content "$env:VCINSTALLDIR\Microsoft.VCToolsVersion.default.txt"
if ([string]::IsNullOrWhitespace($msvcToolsVer)) {
# The MSVC tools version file can have txt *or* props extension.
$msvcToolsVer = Get-Content "$env:VCINSTALLDIR\Microsoft.VCToolsVersion.default.props"
}
$env:MSVC_VER = $msvcToolsVer
$env:VS150COMNTOOLS = $env:VCINSTALLDIR
$env:VSVARS32FILE = "$env:VCINSTALLDIR\vcvars32.bat"
refreshenv
if ($env:APPVEYOR -eq "true") {
.\gradlew all test -PCOMPILE_WEBKIT=false -PCONF=DebugNative --stacktrace -x :web:test --info --no-daemon
} else {
.\gradlew all test -PCOMPILE_WEBKIT=false -PCONF=DebugNative --stacktrace -x :web:test --info
}

0 comments on commit 34f8c83

Please sign in to comment.