-
Notifications
You must be signed in to change notification settings - Fork 144
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Document building SWT natives from command line #1642
Comments
Hi @HannesWell , could you take a look here? Also, how do I actually compile SWT natives from command line? I've tried different things, the Do you have an idea, what options do we have to recompile SWT natives during the Eclipse Best regards and thanks, |
Note: we've built SWT natives before (latest with 4.30) from command line locally, and that worked (after SWT native source code changes) via
So we need instructions how to perform something similar that doesn't need m2e / UI at all with the "new" SWT build in 4.35. |
The short answer is that you can do what is done in the vicinity of eclipse.platform.swt/Jenkinsfile Line 220 in 2ece1af
binaries/pom.xml .
I can look into providing more explicit instructions for CLI builds in the next days, but IIRC the last time the doc was enhanced we agreed that just looking at the build scripts avoids documentation that might become outdated respectively is not correctly maintained. |
When I try to run that script (as mentioned above) there are errors:
I don't know what the working directory of the Jenkins task is? After copying everything from the common directory, to the Linux directory, the make complains about a missing "c.o" target, that seems to be present in the Windows and MacOS build files, but not in the Linux one. The Maven for Eclipse launch does work fine (I see the expected GTK+ compile outputs), aside from trying to compile for GTK4 when there is no GTK4 installed. It would be nice to know what this launch calls on command line, so that we can call it from command line. |
Alright, I see. There is a program that collect sources to a folder, from that folder the Thanks @HannesWell for pointing me to the Jenkins file! I'll document my findings once we have something running; generally we are interested in rebuilding SWT natives from scratch whenever we build the SDK (for our target OS and architecture). |
What exactly is not working with that? e.g. we also have the github actions that compile the natives as well as part of the build: https://github.com/eclipse-platform/eclipse.platform.swt/blob/master/.github/workflows/maven.yml if you use |
I tried the |
Essentially you have to do, what is done in eclipse.platform.swt/binaries/pom.xml Lines 123 to 146 in e8452d8
I.e.
with all the required working- and output-directories variables as well as os/ws/arch and java-home (env) variables being set to the corresponding values. What you have to call and set exactly depends on your OS and ARCH, but the snippet above explains it best. And as it was said, you can also just call the mentioned Build-SWT-native-binaries-for-running-platform launch configuration. Doing this just requires you to set
Just for completes, as you have found it before: |
Thank you for all the infos @HannesWell ! I'll see what we can document without too much risk of having outdated info, when I get to it. Right now we bump the revisions in SWT as done by the Jenkins file, we rename all the SWT binaries that already exist (from git LFS) to the new revision (since we can't compile most of them), then we run the source collection program and then the |
What (if anything) is planned to be done here? |
We are still testing if the steps we do actually work; unfortunately its taking a while. After we are sure the build works as expected, I'll document our steps in the wiki. Then we can close this ticket. |
The https://github.com/eclipse-platform/eclipse.platform.swt/blob/master/bundles/org.eclipse.swt/Readme.md points to: https://github.com/eclipse-platform/eclipse.platform.swt/blob/master/bundles/org.eclipse.swt/Build-SWT-native-binaries-for-running-platform.launch
Previously there was a build script (that still exists, but no idea how to use it) that could be ran for the rebuild. The README described how to call this script.
Please document how to build SWT natives from command line too.
The text was updated successfully, but these errors were encountered: