Linux build

Issue #12 resolved
Lambswool created an issue

I know you said you support Windows only but I was excited to try this out.

It builds with no problems. It doesn't look nice with GTK3 but if you set SWT to use GTK2 it works perfectly.

I have literally no knowledge of Java packaging best practices etc. and have tested this on a single machine.

Are you interested in supporting Linux through a multi-platform build that checks the OS at runtime? Or distributing one for each platform?

Comments (7)

  1. Hottemax repo owner

    That sounds great. The only point is that now my packaged application is 3.9 MB. 2.6 MB is the platform-dependent swt jar. So if I make a multiplatform package, that makes it about 15 MB (depending on whether you add mac-os,solaris,gtk,win, and all of these in 32 and 64 bit. So the codebase/thirdparty relationship would be ~1:10.

    Maybe I am overthinking this, or you have a good solution?

    Not sure about it yet, I think maybe just posting a guide on how to exchange the swt.jar in the actual packaged jar is sufficient? I think, people who use Linux and play EU4 are smart enough to do this - like you :D

  2. Lambswool reporter

    Actually I'm not :D I wasn't even aware you could do that. I was curious about the code so I cloned the repo into my workspace and and built it from there. Thanks!

    You are right about the file size of course...

    Alternatively you could make a build for each platform if it isn't too much of a hassle. If you are using Maven or Ant this should be simple. If you are using Eclipse's export, you could let it generate an Ant file and modify it like the one attached. I made a target for each platform. They differ only in the SWT jar included, and there is a default target that builds them all. This way you would only have to rerun the ant file for each release.

    But of course the potential number of users is probably pretty low. I'm fine with doing it myself like you said.

  3. PiMastah

    @lambswool : FYI, you could just fork this repo and maintain your own repo of a Linux release. Once updates are pushed here you can merge them to your repo and update the Linux build from there.

    Building by script is a nice idea, only I don't know if Hottemax has access to a server with git hook support where he can run stuff. I would be able to support the setup of a CI system if necessary.

  4. Hottemax repo owner

    I switched the project setup to a maven structure. If you like you can set up a CI system (do we need to move to github for that?)

  5. Log in to comment