Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » Building SWT JNI for 64 Bit
Building SWT JNI for 64 Bit [message #932845] Thu, 04 October 2012 13:44 Go to next message
James Long is currently offline James LongFriend
Messages: 3
Registered: October 2012
Junior Member
Hi,

I'm trying to build a version of the swt.jar file that contains support for 64 bit JVM's. The complication is that i also need xulrunner support for this as well.

So i've downloaded the src.zip file and tried to start building the 32 bit version as a confidence building effort.

I have been following: http://www.eclipse.org/swt/faq.php#howbuildjar

I have got the environment set up so i can build the first four files (swt_win_xxx.dll, swt-wgl-win32-xxxx.dll, swt-gdip-win32-xxxx.dll, swt-awt-win32-4307) however I have run into a brick wall in that i cannot even build the swt_xulrunner_xxxx.dll because of xpcom.cpp etc. being missing.

Does anyone know what i'm missing here. I know i need some extra packages but i have no idea what they are or how to find them.

Has anyone tried to do this?

Is anyone aware of issues that will prevent me from building a 64 bit version?

Thanks

.James
Re: Building SWT JNI for 64 Bit [message #932849 is a reply to message #932845] Thu, 04 October 2012 13:48 Go to previous messageGo to next message
James Long is currently offline James LongFriend
Messages: 3
Registered: October 2012
Junior Member
I forgot to add to my original post that we have a restriction that prevents us from using a 32 bit JVM on the system as well as the 64 bit. The final app we are going to use this with will only have access to a 64bit JVM.
Re: Building SWT JNI for 64 Bit [message #938200 is a reply to message #932845] Tue, 09 October 2012 16:51 Go to previous messageGo to next message
Grant Gayed is currently offline Grant GayedFriend
Messages: 2150
Registered: July 2009
Senior Member
Do you really need to build all of swt, including its libraries, from
source? The most typical scenario for wanting to build swt's jar is to
include some java-level changes (eg.- customizations, bug fix backports,
etc.), in which case only swt's java content needs to be compiled and
the libraries from its corresponding version can be used as-is.

If building the libraries from source is really needed then you need to
point at a XULRunner 1.8.x SDK corresponding to the target platform. A
XULRunner 1.8.0.4 SDK is (or at least was) available for x86 from
mozilla.org. However mozilla.org did not publish SDKs for x86_64 back
then, so we had to compile one from source, done by compiling XULRunner
1.8.0.1 from source (which creates its SDK as a side-effect). If you
grep swt's source for "XULRUNNER_SDK" then you'll see where to
substitute your path-to-XULRunner for the default value.

HTH,
Grant


On 10/4/2012 9:44 AM, James Long wrote:
> Hi,
>
> I'm trying to build a version of the swt.jar file that contains support
> for 64 bit JVM's. The complication is that i also need xulrunner support
> for this as well.
> So i've downloaded the src.zip file and tried to start building the 32
> bit version as a confidence building effort.
>
> I have been following: http://www.eclipse.org/swt/faq.php#howbuildjar
>
> I have got the environment set up so i can build the first four files
> (swt_win_xxx.dll, swt-wgl-win32-xxxx.dll, swt-gdip-win32-xxxx.dll,
> swt-awt-win32-4307) however I have run into a brick wall in that i
> cannot even build the swt_xulrunner_xxxx.dll because of xpcom.cpp etc.
> being missing.
>
> Does anyone know what i'm missing here. I know i need some extra
> packages but i have no idea what they are or how to find them.
>
> Has anyone tried to do this?
>
> Is anyone aware of issues that will prevent me from building a 64 bit
> version?
>
> Thanks
>
> James
Re: Building SWT JNI for 64 Bit [message #945678 is a reply to message #938200] Mon, 15 October 2012 14:29 Go to previous messageGo to next message
James Long is currently offline James LongFriend
Messages: 3
Registered: October 2012
Junior Member
Thanks for that... I'm going to take a look now...

actually all i need is the interop dll swt_xulrunner_xxxx.dll

rather than have a dependency on an external component (in this case uncontrolled web browser) we made the decision to embed it as part of the application (and for this we settled on xulrunner) so we need to be able to use the 64 bit version of a web browser (in this case a 64 bit version of xulrunner)and embed it as part of the app. To do this we need the interop dll's (at least thats what im being told) as when we try to use the existing 32 bit version we get an error when it tries to use the 32 bit version of swt_xulrunner_xxxx.dll

I will try downloading the 32 bit sdk and see if i can get it to build...

thanks for your help
Re: Building SWT JNI for 64 Bit [message #972485 is a reply to message #945678] Mon, 05 November 2012 17:11 Go to previous messageGo to next message
Chris Bamford is currently offline Chris BamfordFriend
Messages: 3
Registered: November 2012
Junior Member
Hi James,

Did you have any luck with this? We're trying to do the same thing...

I believe you also need to build a 64bit XulRunner SDK to build the 64 bit swt_xulrunner (mozilla only release a 32bit version apparently)

it seems other people who try this eventually run into build errors.

any ideas?
Re: Building SWT JNI for 64 Bit [message #973817 is a reply to message #945678] Tue, 06 November 2012 16:49 Go to previous messageGo to next message
Chris Bamford is currently offline Chris BamfordFriend
Messages: 3
Registered: November 2012
Junior Member
James,

I've been trying to build the 32 bit version of swt dlls as a confidence exercise also....

I think you are having alot more luck than I am...

I can't seem to get the setenv part to work.

I have Win 7 x64. I have had modified the build.bat in the following way to attempt to get the build to work.

set VSTOOLS=C:\Program Files (x86)\Microsoft Visual Studio 8\Common7\Tools
set JAVA_HOME=C:\Java\jdk1.7.0_09
set MSSDK=C:\Program Files\Microsoft Platform SDK

IF EXIST C:\BUILD\swt-builddir set SWT_BUILDDIR=C:\BUILD\swt-builddir
IF x.%SWT_BUILDDIR%==x. set SWT_BUILDDIR=S:\swt-builddir
echo SWT build dir: %SWT_BUILDDIR%
IF "x.%MSSDK%"=="x." set MSSDK="%SWT_BUILDDIR%\MSSDKs\Windows Server 2003 SP1 SDK"

IF x.%1==x.x86 GOTO X86
IF x.%1==x.x86_64 GOTO X86_64
IF x.%1==x.ia64 GOTO IA64

:X86
IF "x.%OUTPUT_DIR%"=="x." set OUTPUT_DIR=..\..\..\org.eclipse.swt.win32.win32.x86
IF x.%JAVA_HOME%==x. set JAVA_HOME=%SWT_BUILDDIR%\ibm-java2-sdk-50-win-i386
IF x.%BUILD_XULRUNNER%==x.true GOTO XULRUNNER
call "%VSTOOLS%\vsvars32.bat"
call "%MSSDK%\setenv /XP32 /RETAIL"
IF x.%1==x.x86 shift
GOTO MAKE

etc...


the file runs, but the %MSSDK%\setenv line returns with

"The system cannot find the path specified"... or "\Microsoft was unexpected at this point"

depending on how far it gets into the file (whether i put quotes around the %MSSDK%\setenv line or not)

hacing not set the SDK properly it tries to compile using the v7.0a SDK and throws a huge amount of compilation errors.

Any ideas what i am doing wrong?

What does your build.sh look like? what machine / libraries are you compiling with?

Thanks
Re: Building SWT JNI for 64 Bit [message #980894 is a reply to message #973817] Mon, 12 November 2012 02:37 Go to previous messageGo to next message
Andy Huang is currently offline Andy HuangFriend
Messages: 3
Registered: November 2012
Junior Member
Chris,

Which windows SDK do you use? As I know, the build scripts works with "Windows Server 2003 SP1 SDK", but not V7.0a or V7.1.

For the %MSSDK%\setenv, would you try to quote "%MSSDK%\setenv" only? i.e.

call "%MSSDK%\setenv" /XP32 /RETAIL

Thanks,
Andy

[Updated on: Mon, 12 November 2012 02:54]

Report message to a moderator

Re: Building SWT JNI for 64 Bit [message #981279 is a reply to message #980894] Mon, 12 November 2012 09:48 Go to previous message
Chris Bamford is currently offline Chris BamfordFriend
Messages: 3
Registered: November 2012
Junior Member
i have the 2003 SP1 platform SDK as is required to build... nad my MSSDK is pointing to the directory where it is stored....

i also have the 7.0 sdk on here but am not pointing to it.

the set call %MSSDK%/setenv should set the build environment to build from the 2003 SDK directory (not the default 7.0 directory.

Due to the %MSSDK%/setenv line not completing properly, the build defaults to 7.0 SDK.

I tried the following modifications to the setenv lines and get the following behaviour...

call "%MSSDK%\setenv" \XP32 \RELEASE => '\Microsoft was unexpected at this time'

call "%MSSDK%\setenv \XP32 \RELEASE" => 'The system cannot find the path specified' - then continues to attempt building with 7.0 SDK

any other ideas?
Previous Topic:regarding implementation of "Run In BackGround" feature in wizard
Next Topic:Unable to Update/Install new softwaare after migrating to indigo from Galileo
Goto Forum:
  


Current Time: Fri Apr 19 00:04:42 GMT 2024

Powered by FUDForum. Page generated in 0.02680 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top