7 Replies Latest reply on Jun 23, 2013 7:43 PM by 962068

    How to compile only prism-es2 native on windows...

    962068
      Hi,
      I only desire to compile the JavaFX prism-es2 native for windows.
      (Because the prism-es2.dll is not included in JDK 8).
      The information I have from OpenJFX is:
      https://wiki.openjdk.java.net/display/OpenJFX/Building+OpenJFX
      (Not very usefull).
      https://wiki.openjdk.java.net/display/Nashorn/Building+Nashorn
      http://hg.openjdk.java.net/jdk8/build/raw-file/tip/README-builds.html
      I do not wish to recompile the JDK 8 in totality !!!!!!
      Only the part Prism-es2 native... How I can do that ???
      I had taken the source code from:
      http://hg.openjdk.java.net/openjfx/8/master/rt

      Thank you ....
        • 1. Re: How to compile only prism-es2 native on windows...
          jsmith

          Questions related to the openjfx development build process are best asked on the openjfx-dev mailing list.

          http://mail.openjdk.java.net/mailman/listinfo/openjfx-dev

           

          You might also be interested in the previous forum thread: Re: JavaFX 2.2: Enable OpenGL on Windows

          • 2. Re: How to compile only prism-es2 native on windows...
            962068

            Hi,
               I try to compile the OpenJFX, by using:
            https://wikis.oracle.com/display/OpenJDK/Building+OpenJFX
            http://hg.openjdk.java.net/jdk7/build/raw-file/tip/README-builds.html#windows

            Source code:
            http://hg.openjdk.java.net/openjfx/8/master
            http://hg.openjdk.java.net/openjfx/8/master/rt
            http://hg.openjdk.java.net/openjfx/8/master/tests

            +From OpenJDK)
            -Basic Windows Check List:    (I follow all the instructions).
            1. Install the CYGWIN product.                          <--Done (The 64 bits version)

            2. Install the Bootstrap JDK, set ALT_BOOTDIR.          <--Done (JDK 1.8)

            3. Optional Import JDK, set ALT_JDK_IMPORT_PATH.    <--Not done(Not necessary for us)

            4. Install the Microsoft Visual Studio Compilers).  <--Done
               Visual Studio 2010 Express (Visual C++/C) installed.
               Windows SDK 7.1 installed (To build 64 bits). ==>WindowsSdkDir added.
               VS100COMNTOOLS is defined.

            5. Setup all environment variables for compilers (see compilers).   <--Done (64 bits)
                ...\Common7\Tools\vsvars32.bat not used because
                    ...\VC\bin\amd64\vcvars64.bat is used for 64 bits.
               We set all manually for us)
                set CYGWIN=C:\ProgramFiles\cygwin64\bin
                set VSINSTALLDIR=C:\ProgramFiles(x86)\Microsoft_Visual_Studio10.0
                set WindowsSdkDir=C:\ProgramFiles\Microsoft_SDKs\Windows\v7.1
                set PATH=%VSINSTALLDIR%\vc\bin\amd64;%VSINSTALLDIR%\Common7\IDE;%WindowsSdkDir%\bin;%CYGWIN%;%PATH%
                set INCLUDE=%VSINSTALLDIR%\vc\include;%WindowsSdkDir%\include
                set LIB=%VSINSTALLDIR%\vc\lib\amd64;%WindowsSdkDir%\lib\x64

            6. Install Microsoft DirectX SDK.                         <--Done. (June 2010 version)
               (From: http://www.microsoft.com/en-ca/download/details.aspx?id=6812)
               set DXSDK_DIR=C:\ProgramFiles(x86)\MicrosoftDirectX_SDK(June2010)
               set INCLUDE=%INCLUDE%;%DXSDK_DIR%\Include;
               set LIB=%LIB%;%DXSDK_DIR%\Lib\x64;
              
            7. Install Ant 1.7.1 or newer, make sure it is in your PATH and set ANT_HOME. <--Done.
               (The version 1.9.1)

            And also)
              -So it's important that the Visual Studio paths in PATH preceed the CYGWIN path /usr/bin.
                  (due to link.exe)        <--Done
              -And for the: MSVCR100.DLL   <--Done
               set ALT_MSVCRNN_DLL_PATH=%VSINSTALLDIR%\Common7\Packages\Debugger\X64 (This is the only place found)
               set LIB=%LIB%;%ALT_MSVCRNN_DLL_PATH%;

            +From OpenJFX)
            I follow all the instructions...
            But for antlr, I use the version from: http://www.antlr3.org/download/

            ===>The execution is OK to:
            compile-jsl-compiler:

            BUILD FAILED
            C:\zgroup1\userbase1\javafx1\open-jfx\master\build.xml:47: The following error occurred while executing this line:
            C:\zgroup1\userbase1\javafx1\open-jfx\master\rt\build.xml:119: The following error occurred while executing this line:
            C:\zgroup1\userbase1\javafx1\open-jfx\master\rt\decora-runtime\build-common.xml:109: The following error occurred while executing this line:
            C:\zgroup1\userbase1\javafx1\open-jfx\master\rt\decora-runtime\build-common.xml:24: Class not found: javac1.8

            If javac compiles before correctly Why I receive this error !!!

            My only goal is only to have decora-es2 and prism-es2 (and what necessary for that).
            I try to compile only ES2 parts, but the glsl is not included in rt.

            Thanks !!!

            • 3. Re: How to compile only prism-es2 native on windows...
              jsmith

              Questions related to the openjfx development build process are best asked on the openjfx-dev mailing list.

              http://mail.openjdk.java.net/mailman/listinfo/openjfx-dev

              • 4. Re: How to compile only prism-es2 native on windows...
                Artem Ananiev-Oracle

                I didn't try ant 1.9.1, but 1.8.4 is known to have a bug, which results in that nasty "Class not found: javac1.8" error. As a workaround you can try to run ant with -Dbuild.compiler=javac1.7 or just downgrade to ant 1.8.2

                • 5. Re: How to compile only prism-es2 native on windows...
                  962068

                  -How to compile OpenJFX ?

                  I try several ways (JDK1.6, JDK1.7, ...) to compile and all time,
                  I receive a lot of errors.
                  (Missing com.sun.javafx.font,
                    I do not found these packages: com.sun.javafx.font and com.sun.javafx.text.
                        (possibly auto-generated)
                    , ...).
                  And the use of ant with: -Dbuild.compiler=javac1.7 change absolutely nothing...

                  =>This is how finally I compile sucessfully. (After one week of different tests !!!)

                  +First, I follow the instructions of:
                    https://wikis.oracle.com/display/OpenJDK/Building+OpenJFX
                    http://hg.openjdk.java.net/jdk7/build/raw-file/tip/README-builds.html#windows
                  Take the source code:
                    http://hg.openjdk.java.net/openjfx/8/master
                    http://hg.openjdk.java.net/openjfx/8/master/rt
                    http://hg.openjdk.java.net/openjfx/8/master/tests

                  +From OpenJDK)
                  -Basic Windows Check List:    (I follow all the instructions).
                  1. Install the CYGWIN product.                          <--Done (The 64 bits version)

                  2. Install the Bootstrap JDK, set ALT_BOOTDIR.          <--Done (JDK 1.8)

                  3. Optional Import JDK, set ALT_JDK_IMPORT_PATH.    <--Not done(Not necessary for us)

                  4. Install the Microsoft Visual Studio Compilers).  <--Done
                     Visual Studio 2010 Express (Visual C++/C) installed.
                     Windows SDK 7.1 installed (To build 64 bits). ==>WindowsSdkDir added.
                     VS100COMNTOOLS is defined.

                  5. Setup all environment variables for compilers (see compilers).   <--Done (64 bits)
                      ...\Common7\Tools\vsvars32.bat not used because
                          ...\VC\bin\amd64\vcvars64.bat is used for 64 bits.
                     We set all manually for us)
                      set CYGWIN=C:\ProgramFiles\cygwin64\bin
                      set VSINSTALLDIR=C:\ProgramFiles(x86)\Microsoft_Visual_Studio10.0
                      set WindowsSdkDir=C:\ProgramFiles\Microsoft_SDKs\Windows\v7.1
                      set PATH=%VSINSTALLDIR%\vc\bin\amd64;%VSINSTALLDIR%\Common7\IDE;%WindowsSdkDir%\bin;%CYGWIN%;%PATH%
                      set INCLUDE=%VSINSTALLDIR%\vc\include;%WindowsSdkDir%\include
                      set LIB=%VSINSTALLDIR%\vc\lib\amd64;%WindowsSdkDir%\lib\x64

                  6. Install Microsoft DirectX SDK.                         <--Done. (June 2010 version)
                     (From: http://www.microsoft.com/en-ca/download/details.aspx?id=6812)
                     set DXSDK_DIR=C:\ProgramFiles(x86)\MicrosoftDirectX_SDK(June2010)
                     set INCLUDE=%INCLUDE%;%DXSDK_DIR%\Include;
                     set LIB=%LIB%;%DXSDK_DIR%\Lib\x64;
                    
                  7. Install Ant 1.7.1 or newer, make sure it is in your PATH and set ANT_HOME. <--Done.
                     (The version 1.9.1)

                  And also)
                    -So it's important that the Visual Studio paths in PATH preceed the CYGWIN path /usr/bin.
                        (due to link.exe)        <--Done
                    -And for the: MSVCR100.DLL   <--Done
                     set ALT_MSVCRNN_DLL_PATH=%VSINSTALLDIR%\Common7\Packages\Debugger\X64 (This is the only place found)
                     set LIB=%LIB%;%ALT_MSVCRNN_DLL_PATH%;

                  +From OpenJFX)
                  I follow all the instructions...
                  But for antlr, I use the version from: http://www.antlr3.org/download/

                   

                  -Change inside build-src\genVSproperties.bat
                  to include my zzz_batch1\c_settings1.bat
                  c_settings1.bat)
                  REM ------------------------------------------------------------------------
                  REM PATCH ZZZ....Visual Studio 2010...
                  Rem Must be called by master\build-src\genVSproperties.bat
                  REM Result is inside vs.properties
                  REM No .NET\Framework...

                  REM These lines will be installation-dependent.
                  set CYGWIN=C:\ProgramFiles\cygwin64\bin
                  set VSINSTALLDIR=C:\ProgramFiles(x86)\Microsoft_Visual_Studio10.0
                  set WindowsSdkDir=C:\ProgramFiles\Microsoft_SDKs\Windows\v7.1
                  set DXSDK=C:\ProgramFiles(x86)\MicrosoftDirectX_SDK(June2010)
                  set ALT_MSVCRNN_DLL_PATH=%VSINSTALLDIR%\Common7\Packages\Debugger\X64

                  REM The following should be largely installation-independent.
                  set VCINSTALLDIR=%VSINSTALLDIR%\VC
                  REM
                  set INCLUDE=%VCINSTALLDIR%\include;%WindowsSdkDir%\include;%DXSDK%\Include;%INCLUDE%
                  set LIB=%VCINSTALLDIR%\lib\amd64;%WindowsSdkDir%\lib\x64;%DXSDK%\Lib\x64;%ALT_MSVCRNN_DLL_PATH%;%LIB%
                  set LIBPATH=%VCINSTALLDIR%\lib;%LIBPATH%

                  REM
                  set DEVENVDIR=%VSINSTALLDIR%\Common7\IDE
                  set DEVENVCMD=%DEVENVDIR%\VCExpress.exe

                  REM
                  set PATH=%VCINSTALLDIR%\bin\amd64;%VSINSTALLDIR%\Common7\IDE;%WindowsSdkDir%\bin;%CYGWIN%;%PATH%

                  REM echo "%DEVENVDIR%" %DEVENVDIR%
                  REM ------------------------------------------------------------------------

                   

                  genVSproperties.bat)
                  ...
                  if not exist "%DEVENVCMD%" set DEVENVCMD=%DEVENVDIR%\VCExpress.exe

                  REM ZZZ Patch...
                  call ..\zzz_batch1\c_settings1.bat

                  REM Echo out a properties file
                  ...

                  Now I receive a lot of errors at the compilation:
                  jar:
                      [mkdir] Created dir: C:\zgroup1\userbase1\javafx1\open-jfx\master\rt\javafx-ui-quantum\build\classes
                      [javac] Compiling 43 source files to C:\zgroup1\userbase1\javafx1\open-jfx\master\rt\javafx-ui-quantum\build\classes
                      [javac] C:\zgroup1\userbase1\javafx1\open-jfx\master\rt\javafx-ui-quantum\src\com\sun\javafx\tk\quantum\SceneState.java:49: error: constructor PresentableState in class PresentableState cannot be applied to given types;
                      [javac]         super();
                      [javac]         ^
                      [javac]   required: View
                  etc ...

                  After search, I found that the compilation process, use the file:
                     C:\ProgramFiles\Java\jdk1.8.0\jre\lib\ext\jfxrt.jar
                     I rename it: jfxrt.jarXXX
                     (I don't know how this jar is included after some searchs).
                     After the C:\zgroup1\userbase1\javafx1\open-jfx\master\artifacts\sdk\rt\lib\ext\jfxrt.jar
                     causes the same errors. I create an empty jar named jfxrt.jar.
                     Now I can recompile all, (After a clean)
                     I clean all, I recompile but I have the another errors.
                  I change the rt\build.xml:
                         <condition property="include.ogl">
                            <istrue value="${isWindows}"/>
                          </condition>

                       <!--
                          Build targets...
                        -->

                      <target name="jar" depends="init">
                          <ant antfile="${rt.root.dir}/javafx-accessible/build.xml" target="jar" inheritAll="false"/>

                          <ant antfile="${rt.root.dir}/javafx-common/build.xml" target="jar" inheritAll="false"/>
                          <ant antfile="${rt.root.dir}/javafx-logging/build.xml" target="jar" inheritAll="false"/>
                          <ant antfile="${rt.root.dir}/glass/build.xml" target="jar" inheritAll="false"/>
                          <ant antfile="${rt.root.dir}/javafx-beans/build.xml" target="jar" inheritAll="false"/>
                          <ant antfile="${rt.root.dir}/javafx-util-converter/build.xml" target="jar" inheritAll="false"/>
                          <ant antfile="${rt.root.dir}/javafx-anim/build.xml" target="jar" inheritAll="false"/>
                          <ant antfile="${rt.root.dir}/javafx-geom/build.xml" target="jar" inheritAll="false"/>
                          <ant antfile="${rt.root.dir}/pisces/build.xml" target="jar" inheritAll="false"/>
                          <ant antfile="${rt.root.dir}/decora-compiler/build.xml" target="jar" inheritAll="false"/>
                          <ant antfile="${rt.root.dir}/decora-runtime/build.xml" target="jar" inheritAll="false"/>
                          <ant antfile="${rt.root.dir}/javafx-sg-common/build.xml" target="jar" inheritAll="false"/>
                          <ant antfile="${rt.root.dir}/javafx-ui-common/build.xml" target="jar" inheritAll="false"/>
                          <ant antfile="${rt.root.dir}/javafx-concurrent/build.xml" target="jar" inheritAll="false"/>

                          <ant antfile="${rt.root.dir}/prism-util/build.xml" target="jar" inheritAll="false"/>
                          <ant antfile="${rt.root.dir}/prism-common/build.xml" target="jar" inheritAll="false"/>

                          <ant antfile="${rt.root.dir}/javafx-ui-quantum/build.xml" target="jar" inheritAll="false"/>
                          <ant antfile="${rt.root.dir}/javafx-sg-prism/build.xml" target="jar" inheritAll="false"/>
                          <ant antfile="${rt.root.dir}/javafx-embed-swing/build.xml" target="jar" inheritAll="false"/>
                          <ant antfile="${rt.root.dir}/javafx-ui-controls/build.xml" target="jar" inheritAll="false"/>
                          <ant antfile="${rt.root.dir}/javafx-ui-charts/build.xml" target="jar" inheritAll="false"/>
                          <ant antfile="${rt.root.dir}/decora-prism/build.xml" target="jar" inheritAll="false"/>
                          <antcall target="jar-decora-d3d"/>
                          <antcall target="jar-decora-es2"/>
                          <ant antfile="${rt.root.dir}/decora-jsw/build.xml" target="jar" inheritAll="false"/>
                          <ant antfile="${rt.root.dir}/decora-prism-sw/build.xml" target="jar" inheritAll="false"/>
                          <ant antfile="${rt.root.dir}/decora-prism-ps/build.xml" target="jar" inheritAll="false"/>
                          <antcall target="jar-decora-sse"/>
                          <ant antfile="${rt.root.dir}/prism-util/build.xml" target="jar" inheritAll="false"/>
                          <ant antfile="${rt.root.dir}/prism-common/build.xml" target="jar" inheritAll="false"/>
                          <ant antfile="${rt.root.dir}/prism-j2d/build.xml" target="jar" inheritAll="false"/>
                          <ant antfile="${rt.root.dir}/prism-ps/build.xml" target="jar" inheritAll="false"/>
                          <ant antfile="${rt.root.dir}/prism-null/build.xml" target="jar" inheritAll="false"/>
                          <antcall target="jar-prism-sw"/>
                          <antcall target="jar-prism-d3d"/>
                          <antcall target="jar-prism-es2-all"/>
                          <ant antfile="${rt.root.dir}/javafx-beans-dt/build.xml" target="jar" inheritAll="false"/>
                          <ant antfile="${rt.root.dir}/javafx-fxml/build.xml" target="jar" inheritAll="false"/>
                          <antcall target="jar-javafx-android"/>
                          <antcall target="jar-javafx-embed-swt"/>
                          <ant antfile="${rt.root.dir}/javafx-builders/build.xml" target="jar" inheritAll="false"/>
                      </target>

                  I recompile and now:

                  jar:
                      [mkdir] Created dir: C:\zgroup1\userbase1\javafx1\open-jfx\master\rt\javafx-ui-common\build\classes
                      [javac] Compiling 471 source files to C:\zgroup1\userbase1\javafx1\open-jfx\master\rt\javafx-ui-common\build\classes
                      [javac] C:\zgroup1\userbase1\javafx1\open-jfx\master\rt\javafx-ui-common\src\com\sun\webkit\dom\JSObject.java:30: error: cannot find symbol
                      [javac] import netscape.javascript.JSException;
                      [javac]                           ^
                      [javac]   symbol:   class JSException
                  --->Compile webview (and webview needs another packages, circular problems)...
                  Recompile all is not really possible due to intersecting packages...

                  I change rt\glass\glass\build.xml because missing)
                      <property name="jfx.accessible.dir" value="${rt.dist.root.dir}/javafx-accessible"/>
                      <property name="jfx.accessible.jar" value="${jfx.accessible.dir}/dist/javafx-accessible.jar"/>

                  Now I recompile, I have errors but now I understand something.
                  When master\artifacts\sdk\rt\lib\ext\jfxrt.jar is the empty version, I compile at a certain point.
                  I copy the C:\ProgramFiles\Java\jdk1.8.0\jre\lib\ext\jfxrt.jar to master\artifacts\sdk\rt\lib\ext
                  and I able to go to another point. When errors, I take the empty version and alternatively I pass
                  from the empty to full version.

                  Finally I compile all and:
                  dist:
                       [echo] Creating merged openjfxrt.jar file
                      [mkdir] Created dir: C:\zgroup1\userbase1\javafx1\open-jfx\master\rt\dist\lib
                        [jar] Building jar: C:\zgroup1\userbase1\javafx1\open-jfx\master\rt\dist\lib\openjfxrt.jar
                       [echo] Copying binaries
                      [mkdir] Created dir: C:\zgroup1\userbase1\javafx1\open-jfx\master\rt\dist\bin
                       [copy] Copying 1 file to C:\zgroup1\userbase1\javafx1\open-jfx\master\rt\dist\bin

                  BUILD SUCCESSFUL

                  I have my ES2 (Decora,Prism) part compiled with prism-es2.dll inside prism-es2-native.jar
                  Now I will test all !!!

                  • 6. Re: How to compile only prism-es2 native on windows...
                    962068

                    OK,

                    After a lot of test ES2 is really not visible....

                    I put prism-es2.dll at my C:\ProgramFiles\Java\jdk1.8.0\jre\bin

                    And inside my jfxrt.jar at: C:\ProgramFiles\Java\jdk1.8.0\jre\lib\ext

                       I append the content of decora-es2.jar and prism-es2.jar.

                    I have checked prism-es2.dll with dumpbin.exe and this file seems correct.

                    And in my application, I put: (in main)

                            Properties systemProperties = System.getProperties();

                            systemProperties.setProperty("prism.verbose", "true");

                            // PrismSettings.tryOrder

                            systemProperties.setProperty("prism.order", "es2,d3d,sw"); // "es2,d3d,sw"

                            System.out.println("TryOrder: " + systemProperties.getProperty("prism.order"));

                    and at start:

                           System.out.println("Pipeline: " + GraphicsPipeline.getPipeline().getClass().getName());

                            And this is the D3DPipeline, I have....

                    Someone can help me !!!


                    • 7. Re: How to compile only prism-es2 native on windows...
                      962068

                      OK,

                      After a lot of test ES2 is really not visible....

                      I put prism-es2.dll at my C:\ProgramFiles\Java\jdk1.8.0\jre\bin

                      And inside my jfxrt.jar at: C:\ProgramFiles\Java\jdk1.8.0\jre\lib\ext

                         I append the content of decora-es2.jar and prism-es2.jar.

                      I have checked prism-es2.dll with dumpbin.exe and this file seems correct.

                      And in my application, I put: (in main)

                              Properties systemProperties = System.getProperties();

                              systemProperties.setProperty("prism.verbose", "true");

                              // PrismSettings.tryOrder

                              systemProperties.setProperty("prism.order", "es2,d3d,sw"); // "es2,d3d,sw"

                              System.out.println("TryOrder: " + systemProperties.getProperty("prism.order"));

                      and at start:

                             System.out.println("Pipeline: " + GraphicsPipeline.getPipeline().getClass().getName());

                              And this is the D3DPipeline, I have....

                      Someone can help me !!!

                      My goal is only to have ES2....