GoogleCodeArchive / piccolo2d

Automatically exported from code.google.com/p/piccolo2d
0 stars 0 forks source link

Missing maven profile for Windows x86_64 #203

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Email from piccolo2d-dev@

---------- Forwarded message ----------
From: Michael Heuer <heuer...>
Date: Thu, Dec 23, 2010 at 12:15 PM
Subject: Re: [piccolo2d-dev] Re: problem building branches\release-1.3\swt on 
win 7 64bit
To: piccolo2d-dev@googlegroups.com

atdixon <atdix...> wrote:

> I don't have an immediate 64-bit Windows install to try this out, but
> I have a few notes for you.
>
> The fastest route to get you up & running is to install a 32-bit JDK
> on your machine, point your path to that, and then run the piccolo2d
> build (w/o any modifications) and that should work.
>
> Otherwise...
>
> * I'm not sure why Piccolo is pegged to 3.3.0 of SWT, but looking at
> the "older releases" download section on http://www.eclipse.org/swt/,
> I don't see a 64-bit version of SWT 3.3.0, there may not be one. This
> is why I suggest your fastest route is to just use the 32-bit
> environment.

We're pegged to that version since there are not more recent versions
in the Maven central repository.  If we want to be mirrored in the
Maven central repository (which we are) then all of our dependencies
must come from there.

> * If you want to try 64-bit then the SWT site *does* have 64-bit
> binaries of its latest stable release (SWT 3.6.1). You should get this
> 64-bit version into your local maven repository and try to build
> against that. It's possible/likely that SWT3.6.1 is not yet in a maven
> public repo, so to get it into your local Maven repo, you'll want to
> download it straight from the SWT website and then do a mvn
> install:install-file to get it into your local repo. (For more on mvn
> install:install-file, 
http://maven.apache.org/plugins/maven-install-plugin/usage.html).
> * Once you get SWT 64-bit into your local repo, then you'll need to
> update the Piccolo2D swt pom to point to that. Not the parent pom, but
> the *swt* pom. You'll see a dependency there that looks like this:
>
>    <dependency>
>      <groupId>${swt.groupId}</groupId>
>      <artifactId>${swt.artifactId}</artifactId>
>      <version>[3.3.0-v3346,)</version>
>      <scope>compile</scope>
>    </dependency>
>
> You can update this directly, replacing the two ${swt.*}s with the
> groupId and artifactId you specified when you did the mvn
> install:install-file. Then you should be able to build, assuming
> Piccolo2D works nicely on SWT 3.6.1. (You don't really need to mess
> with the profiles just yet, they are a way to set swt.groupId and
> swt.artifactId based on your system.)

ok, I see now that there are not separate 32-bit and 64-bit profiles
for windows.  The swt pom.xml should contain two profiles

   <profile>
     <id>windows</id>
     <activation>
       <os>
         <family>windows</family>
         <arch>x86</arch>
       </os>
     </activation>
     <properties>
       <swt.groupId>org.eclipse.swt.win32.win32</swt.groupId>
       <swt.artifactId>x86</swt.artifactId>
     </properties>
   </profile>
   <profile>
     <id>windows</id>
     <activation>
       <os>
         <family>windows</family>
         <arch>x86_64</arch>
       </os>
     </activation>
     <properties>
       <swt.groupId>org.eclipse.swt.win32.win32</swt.groupId>
       <swt.artifactId>x86_64</swt.artifactId>
     </properties>
   </profile>

And depending on how arch is reported to maven, we might also need

   <profile>
     <id>windows</id>
     <activation>
       <os>
         <family>windows</family>
         <arch>amd64</arch>
       </os>
     </activation>
     <properties>
       <swt.groupId>org.eclipse.swt.win32.win32</swt.groupId>
       <swt.artifactId>x86_64</swt.artifactId>
     </properties>
   </profile>

Then download a 64-bit SWT binary and extract its swt.jar artifact.

http://download.eclipse.org/eclipse/downloads/drops/R-3.6.1-201009090800/downloa
d.php?dropFile=swt-3.6.1-win32-win32-x86_64.zip

Use

$ mvn install:install-file -Dfile=./swt.jar \
 -DgroupId=org.eclipse.swt.win32.win32\
 -DartifactId=x86_64 \
 -Dversion=3.6.1 \
 -Dpackaging=jar

to install to your local Maven repository.  Then run your build.

Will create an issue for this shortly.

> <snip>

  michael

Original issue reported on code.google.com by heue...@gmail.com on 23 Dec 2010 at 6:17

GoogleCodeExporter commented 9 years ago

Original comment by heue...@gmail.com on 23 Dec 2010 at 6:19

GoogleCodeExporter commented 9 years ago
Added profiles on svn trunk

$ svn commit -m "Issue 203 ; adding separate profiles for windows_x86, 
windows_amd64, and windows_x86_64"
Committed revision 1098.

and branches/release-1.3

$ svn commit -m "Issue 203 ; adding separate profiles for windows_x86, 
windows_amd64, and windows_x86_64"
Committed revision 1099.

Original comment by heue...@gmail.com on 23 Dec 2010 at 6:24

GoogleCodeExporter commented 9 years ago
Marking as fixed, but I don't have access to amd64 or x86_64 versions of 
Windows.  Please verify.

Original comment by heue...@gmail.com on 23 Dec 2010 at 6:25

GoogleCodeExporter commented 9 years ago
Oops, missed a _64

svn trunk

$ svn commit -m "Issue 203 ; fix typo with windows_x86_64 profile" pom.xml
Committed revision 1101.

branches/release-1.3

$ svn commit -m "Issue 203 ; fix typo with windows_x86_64 profile" pom.xml
Committed revision 1100.

Original comment by heue...@gmail.com on 23 Dec 2010 at 6:38

GoogleCodeExporter commented 9 years ago
Please verify.

Original comment by heue...@gmail.com on 23 Dec 2010 at 6:38

GoogleCodeExporter commented 9 years ago
I've an Intel i7 920 and it is reported as amd64. I think that's the only x86 
64bit architecture java reports. (btw: can I reply to issues from my mailer, or 
I have to use the web interface?)

Original comment by carlo.sa...@gmail.com on 23 Dec 2010 at 6:42

GoogleCodeExporter commented 9 years ago
I don't think so, but you never know, new features appear in this hosting 
platform all the time.

So with the latest revision,

$ mvn help:active-profiles

should report

The following profiles are active:

 - windows_amd64 (source: pom)

and the build should complain about a missing dependency

groupId: org.eclipse.swt.win32.win32
artifactId: x86_64

which you can install manually as described above.

Original comment by heue...@gmail.com on 23 Dec 2010 at 6:51

GoogleCodeExporter commented 9 years ago
Verified, works on windows 7 64bit with intel cpu and oracle 64bit jvm.

(I think you can safely delete profile windows_x86_64.
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6378452)

On second thought though I think this can break the build of someone using 
win64 with a 32bit vm, since I'm not sure what getProperty("os.arch") would 
return then. I'll make some tests and post the results.

Original comment by carlo.sa...@gmail.com on 23 Dec 2010 at 8:06

GoogleCodeExporter commented 9 years ago
Ok, the 32bit-vm/64bit-win is handled correctly.

For the record, I attach the mvn -version result. The OS is win 7 64bit.

Original comment by carlo.sa...@gmail.com on 23 Dec 2010 at 10:21

Attachments:

GoogleCodeExporter commented 9 years ago
Moving issue to Verified per previous comments.

Original comment by atdi...@gmail.com on 20 Mar 2011 at 7:47

GoogleCodeExporter commented 9 years ago
Moving issue to Verified per previous comments.

Original comment by atdi...@gmail.com on 20 Mar 2011 at 7:47