A different version of these steps initiated by Patrick Reinhart can be found on the Adopt OpenJDK website.
One more version with screenshots by Roberto Coelho.
Last updated: 2013-10-11: added the direct link to VC++2010 web installer in English (for some reason it isn't available from the download page from France)
- Download Visual C++ 2010 Express (only C++ is needed, direct link), install it without optional products (ie without Silverlight or MS SQL 2008 Express SP1).
(it is only needed to build Freetype) - Download and install Windows SDK 7.1 (don't install the samples and .Net tools)
- Download and install Microsoft DirectX 9.0 SDK (the ReadMe says the version from summer 2004, however this does not seem to still be available from Microsoft, the version from June 2010 seems to be a working replacement)
- Download and install TortoiseHg (Mercurial client)
- Download and install Java 7 (if not already done)
- Download and install Cygwin in C:\cygwin64, select the following packages:
- [Archive] unzip
- [Archive] zip
- [Base] gawk
- [Devel] binutils
- [Devel] make
- [Interpreters] m4
- [Utils] cpio
- [Utils] files
- [System] procps
- Create a C:\dev\ directory
- Freetype
- Download the source
- Extract it to C:\dev\freetype-2.5.0.1
- Either
- Download prebuilt binaries from bintray and extract them so that the lib directory goes into C:\dev\freetype-2.5.0.1
or - Build it yourself
- Go to C:\dev\freetype-2.5.0.1\builds\win32\vc2010 and open freetype.sln
- Create a 64 bits configuration
- In the toolbar, click on the arrow by Win32, then on "Configuration Manager", then again click on Win32 below "Active solution platform", then on <New...>
- In the new dialog, call the new platform "x64" and copy its settings from Win32, click OK
- Back in the previous dialog select "Release Multithreaded" from "Active solution configuration" and Close
- Right click on the freetype project, then select Properties
- In the dialog adjust:
- "Output Directory" from ".\..\..\..\objs\win32\vc2010\" to ".\..\..\..\lib\"
- "Intermediate Directory" from ".\..\..\..\objs\release_mt\" to ".\..\..\..\objs\release_mt_64\"
- "Target Name" from "freetype2411MT" to "freetype"
- "Platform Toolset" from "v100" to "Windows7.1SDK"
- Ok to save
- Right click on the freetype project then Build or press <F7> to build
- Once built, return to the properties dialog
Change- "Configuration Type" from "Static library (.lib)" to "Dynamic Library (.dll)"
- Build again
- Download prebuilt binaries from bintray and extract them so that the lib directory goes into C:\dev\freetype-2.5.0.1
- Copy msvcr100.dll to its own directory C:\dev\vcrt from either C:\Windows\System32 or C:\Program Files\Java\jdk1.7.0_XX\bin (this because the build process seem to have difficulties copying the file properly from C:\Windows\System32, and the JDK bin directory is in a path with spaces)
- Adjust the PATH by appending ";C:\cygwin64\bin"
- Open Cygwin terminal (from link on the desktop)
- cd /cygdrive/c/dev
- Get the root source:
hg clone http://hg.openjdk.java.net/jdk8/jdk8
- Move to the new directory
cd /cygdrive/c/dev/jdk8
- Get the remainder of the source
./get_source.sh
- Force the permissions
chmod -R u+rwxs /cygdrive/c/dev/jdk8
(otherwise some files get access denied errors) - Run the auto-conf script
bash configure --with-freetype=/cygdrive/c/dev/freetype-2.5.0.1 --with-msvcr-dll=/cygdrive/c/dev/vcrt/msvcr100.dll
- Time for cooking
make
- Once done, open a new standard Windows console and navigate to
C:\dev\jdk8\build\windows-x86_64-normal-server-release\jdk
check that java runs:bin\java -version
or for something a bit more visual:bin\jconsole
- If needed make the images (ie the directory layouts that are created when installing a jdk/jre from the Oracle installers - or something pretty close to them)
make images
- enjoy!
- Go to the JDK directory
cd /cygdrive/c/dev/jdk8
- Get the sources updates
./get_source.sh
- Force the permissions
chmod -R u+rwxs /cygdrive/c/dev/jdk8
- Re-heat
make
or
make images
- If it fails, try
make clean
(it tends to fail in hotspot, in which case a
make clean-hotspot
is faster)
then re-heat - If it fails again, try to redo the configuration
make dist-clean
then re-heat
bash configure --with-freetype=/cygdrive/c/dev/freetype-2.5.0.1 --with-msvcr-dll=/cygdrive/c/dev/vcrt/msvcr100.dll
No comments:
Post a Comment