Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds support for building Mandrel on Windows #71

Merged
merged 1 commit into from
Nov 10, 2020
Merged

Conversation

Karm
Copy link
Collaborator

@Karm Karm commented Nov 3, 2020

  • Windows support
  • zip archive support for both Linux and Windows
  • formatting according to the committed code-formatting-rules.xml
  • some type/stylistic changes that made it easier for me to work with it but I can revert...

Building on Windows

set PYTHONHTTPSVERIFY=0
vcvarsall.bat x86_amd64
set JAVA_HOME=C:\projects\openjdk-11.0.9_11\
set PATH=%JAVA_HOME%\bin;%PATH%
set MAVEN_REPO=C:/projects/.m2
set MANDREL_REPO=C:/projects/graal/graal
set MX_HOME=C:/projects/graal/mx
set MANDREL_HOME=C:/projects/graal/mandrel-java11-windows-amd64-20.2-SNAPSHOT
%JAVA_HOME%/bin/java -ea build.java --maven-local-repository %MAVEN_REPO% --mandrel-repo %MANDREL_REPO% --mx-home %MX_HOME% --mandrel-version 20.2-SNAPSHOT --mandrel-home %MANDREL_HOME% --archive-suffix zip --verbose

Status

It works, it builds Quarkus app on Windows and Linux (i.e. Linux build is not broken) in a "clean room" env. I will be doing some additional work though:

  • fix asserts in static void checkMx() method
  • cleanup some TODOs, e.g. superfluous flag --force-bash-launchers=false
  • running the Mandrel build in clean room to make absolutely certain that the dependencies and prerequisites are only those listed above

The overall picture is working and O.K. though....

@Karm Karm added enhancement New feature or request windows labels Nov 3, 2020
@Karm Karm requested review from galderz, jerboaa and zakkak November 3, 2020 15:32
@Karm Karm self-assigned this Nov 3, 2020
build.java Outdated Show resolved Hide resolved
build.java Show resolved Hide resolved
build.java Outdated Show resolved Hide resolved
build.java Outdated Show resolved Hide resolved
build.java Outdated Show resolved Hide resolved
build.java Outdated Show resolved Hide resolved
build.java Outdated Show resolved Hide resolved
build.java Show resolved Hide resolved
build.java Outdated Show resolved Hide resolved
@zakkak
Copy link
Collaborator

zakkak commented Nov 3, 2020

Nice work @Karm 👍

build.java Outdated Show resolved Hide resolved
build.java Show resolved Hide resolved
@Karm Karm requested review from galderz and zakkak November 4, 2020 23:09
@Karm Karm changed the title [WIP] Adds support for building Mandrel on Windows Adds support for building Mandrel on Windows Nov 4, 2020
@Karm
Copy link
Collaborator Author

Karm commented Nov 4, 2020

@zakkak @galderz @jerboaa Ready for review. I think it is ready to be merged.
I tested with Mandrel 20.2 on Windows 10 and Centos 8.

Copy link
Collaborator

@zakkak zakkak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the changes @Karm please see a couple more comments.

build.java Outdated Show resolved Hide resolved
build.java Outdated Show resolved Hide resolved
build.java Show resolved Hide resolved
build.java Outdated Show resolved Hide resolved
- Windows support
- zip archive support for both Linux and Windows

Building on Winows
------------------

* Installed Visual Studio (C/C++ support)
* Installed Python 2.7 and on PATH  (de facto mx requirements)
* Downloaded OpenJDK
* git et co., e.g. from https://github.com/cmderdev/cmder/releases/download/v1.3.16/cmder.zip
* Have on PATH: C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build
Then:
```
set PYTHONHTTPSVERIFY=0
vcvarsall.bat x86_amd64
set JAVA_HOME=C:\projects\openjdk-11.0.9_11\
set PATH=%JAVA_HOME%\bin;%PATH%
set MAVEN_REPO=C:/projects/.m2
set MANDREL_REPO=C:/projects/graal/graal
set MX_HOME=C:/projects/graal/mx
set MANDREL_HOME=C:/projects/graal/mandrel-java11-windows-amd64-20.2-SNAPSHOT
%JAVA_HOME%/bin/java -ea build.java --maven-local-repository %MAVEN_REPO% --mandrel-repo %MANDREL_REPO% --mx-home %MX_HOME% --mandrel-version 20.2-SNAPSHOT --mandrel-home %MANDREL_HOME% --archive-suffix zip --verbose
```
@Karm
Copy link
Collaborator Author

Karm commented Nov 5, 2020

Thanks for the changes @Karm please see a couple more comments.

@zakkak I addressed the comments. Thanks for pointing out the template, it didn't occur tome it's there...
I also removed the superfluous if-else branched and the redundant build module.

Copy link
Collaborator

@zakkak zakkak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks again @Karm

@Karm
Copy link
Collaborator Author

Karm commented Nov 6, 2020

@jerboaa , @galderz Can we proceed? Any further comments?

@Karm
Copy link
Collaborator Author

Karm commented Nov 6, 2020

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request windows
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants