Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 573575 - Provide JAR with 32x and 64x libraries
Summary: Provide JAR with 32x and 64x libraries
Status: CLOSED WONTFIX
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 4.21   Edit
Hardware: PC Windows 10
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Platform-SWT-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-05-17 04:07 EDT by Christophe MOINE CLA
Modified: 2021-05-17 09:40 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Christophe MOINE CLA 2021-05-17 04:07:57 EDT
Hi, I am releasing a fat JAR for the customer, unfortunately, I always need to flip between swt.jar in 32x, and swt.jar in 64x.
I had a look at the JAR file content, and unfortunately, the DLL are named the same for both 32x and 64x version. Also, it seems that SWT 32x is no more released :-(

I supposed the bug has not much chance (I can provide a PR though...), also because SWT 32x/64x is handled by Eclipse platform (plugin fragment loaded depending on "arch"..), but who knows.
Comment 1 Christophe MOINE CLA 2021-05-17 04:40:57 EDT
I created this workaround class for SWT 4.335 to load additional 32x libraries (in a sibling JAR file containing *_32.dll files):

```
package org.eclipse.swt.internal;

import java.io.File;

public class SwtCompat {
    private SwtCompat() {
    }

    public static void support32x() {
        StringBuffer message=new StringBuffer();
        File dir=new File (System.getProperty ("user.home"), ".swt"); //$NON-NLS-1$
        dir=new File(dir, "lib");
        dir=new File(dir, "win32");
        dir=new File(dir, "x86");
        if(!dir.exists())
            dir.mkdirs();
        Library.extract(new File(dir, "swt-gdip-win32-4335.dll").getPath(), "swt-gdip-win32-4335_32.dll", message);
        Library.extract(new File(dir,"swt-win32-4335.dll").getPath(), "swt-win32-4335_32.dll", message);
    }
}
```
Comment 2 Niraj Modi CLA 2021-05-17 05:31:07 EDT
Eclipse/SWT dropped support for 32bit in 4.10 via bug 536766.
Comment 3 Christophe MOINE CLA 2021-05-17 09:14:16 EDT
Fine, maybe the snippet can help someone else, who knows, thanks for your answer!