triplea-game / triplea

TripleA is a turn based strategy game and board game engine, similar to Axis & Allies or Risk.
https://triplea-game.org/
GNU General Public License v3.0
1.34k stars 393 forks source link

installer auto-java bundle maybe not working #542

Closed DanVanAtta closed 8 years ago

DanVanAtta commented 8 years ago

From SF: http://tripleadev.1671093.n2.nabble.com/Next-release-1-8-0-11-testers-wanted-tp7590912p7591486.html

@gaborbernat , would you mind taking a look and give us your thoughts?

Installed prerelease on my netbook. It tried to get the appropriate Java automatically, but this didn't work:

ruin@ruin-tiger ~ $ ./triplea_unix_1.8.0.10.1026.sh 
No suitable Java Virtual Machine could be found on your system. 
Downloading JRE with wget ... 
--2016-03-03 09:41:20--  https://raw.githubusercontent.com/triplea-game/assets/master/install4j/macosx-amd64-1.8.0_66.tar.gz
Resolving raw.githubusercontent.com (raw.githubusercontent.com)... 23.235.40.133 
Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|23.235.40.133|:443... connected. 
HTTP request sent, awaiting response... 200 OK 
Length: 36572179 (35M) [application/octet-stream] 
Saving to: ‘jre.tar.gz’ 

100%[======================================>] 36,572,179   237KB/s   in 6m 19s 

2016-03-03 09:47:41 (94.3 KB/s) - ‘jre.tar.gz’ saved [36572179/36572179] 

Unpacking JRE ... 
Starting Installer ... 
./triplea_unix_1.8.0.10.1026.sh: 636: ./triplea_unix_1.8.0.10.1026.sh: /home/ruin/triplea_unix_1.8.0.10.1026.sh.14984.dir/jre/bin/java: not found

So I got it manually. Still had to rename the revised files.

gaborbernat commented 8 years ago

sure will try to do in the days, sorry for the long hiatus was just relocating to London, new job and all that :+1:

RoiEXLab commented 8 years ago

I looked at the problem... It seems, that the JRE is downloaded properly, but deleted just before launching tripleA. I think it's supposed to be deleted after exiting tripleA. is the sh script generated by Install4j?

DanVanAtta commented 8 years ago

Interesting, which sh script in specific?

RoiEXLab commented 8 years ago

The unix sh script distributed in the releases section

gaborbernat commented 8 years ago

it should not delete it at all, it's a script generated by install4j from what I understand

RoiEXLab commented 8 years ago

I did a short Video showing what I mean... Just ignore, that my OS is in german... https://youtu.be/rqyxbmcirG8

gaborbernat commented 8 years ago

That's fine as the extraction removes the download, however it should pick up the extracted version. Will look into this shortly, I've just set up a virtual machine just for this as I am now on WIndows, with new notebook and all that.

gaborbernat commented 8 years ago

for lack of other bundle I went with mac bundle, it turns out this does not run on Linux, hence the error :) will need to create another bundle then.

gaborbernat commented 8 years ago

So I've reached out to the install4j developer team regarding this, here's their take on the story:

It is still possible to create your own JRE bundles on Linux with Project->Create a JRE bundle and the bin/createbundle command line utility.

We have discontinued the official JREs bundles for Linux and Unix. They have created lots of problems for our customers (and consequently for us) since JRE binaries only work for a certain range of distributions. It is not within our abilities to map this parameter space. Also, 64-bit distributions with incomplete 32-bit libraries lead to failures of JRE bundles.

When there is a problem with a JRE bundle, we cannot provide any satisfactory solution. The only safe way is to install the JRE that comes with the distribution. Since Java is open source, it should be easy to install it through the distribution.

Of course it would be desirable if JRE bundles simply worked on Linux, but they don't. I'm sorry for the inconvenience.

Considering this I would argue that anyone who has a Linux installation has the expertise required to install Java on their system, most probably. Therefore I would drop bundling Java with the UNIX installer, and place a such notice on the download page (that is that having a Java 8 is required before installation). It seems doing any level of customization on it will be just a constant source of pain for us to maintain. What do you think @DanVanAtta @ron-murhammer @veqryn ?

DanVanAtta commented 8 years ago

Interesting. There are also not that many linux users. I'm happy leaving off the bundled version for linux.

RoiEXLab commented 8 years ago

I have an idea, which could work eventually. Install4j offers a rpm/deb packaging service. If you could host a PPA on Launchpad or whatever / an equivalent on the redhat/fedora/opensuse side and add the openjdk as a required dependency. This would allow for automatic updating and solve the JRE implementation "issue"

EDIT: the jdk is probably already set as a dependency in the .deb package you could palso just provide the package...

gaborbernat commented 8 years ago

I would advise not to be part of the official ppa, if someone wants to do it, he can especially using the silent installer option. Would not want to use our time on supporting os specific issues . On 12 Apr 2016 20:46, "RoiEX" notifications@github.com wrote:

I have an idea, which could work eventually. Install4j offers a rpm/deb packaging service. If you could host a PPA on Launchpad or whatever / an equivalent on the redhat/fedora/opensuse side and add the openjdk as a required dependency. This would allow for automatic updating and solve the JRE implementation "issue"

— You are receiving this because you were assigned. Reply to this email directly or view it on GitHub https://github.com/triplea-game/triplea/issues/542#issuecomment-209074526

DanVanAtta commented 8 years ago

I would tend to agree with @gaborbernat , interesting idea, but likely not worth it. We are not supporting very many users by doing so as well, linux users can install a JDK8 fairly easily. We'll update the website simply to give some instructions to linux users.

The goal is to have folks go through the github.io website to download, not from github releases.

RoiEXLab commented 8 years ago

The goal is to have folks go through the github.io website to download, not from github releases.

Yeah you're right but what I'm saying is not ruling out the github.io page. What I'm trying to say, is that using a .deb/.rpm package will be a good replacement for the unix installer. The first possibillity would be to include all of the triplea files into the archive and just install it into a fixed location (like /opt/triplea or /home/triplea). Using the GUI version of Install4j I created a package installing triplea into /home/triplea requiring openjdk-8-jre to be installed - auto installing it when not available (if the openjdk is in the official packages). This way TripleA could

could not

You can find my package here: TripleA.deb

I think that the "could not's" wouldn't be a big deal - Linux users generally don't use installers. Everything in linux is installed as a package. Another option involving the package would be more complicated. in this scenario the user would still download a sh file - which would download an empty deb/rpm whatever package "requiring" the openjdk - instantly removing it and after that launching the installer without bundled JRE

Using this method wouldn't be a big advantage - more something like a workaround in order to check if there is a openjdk installed and installing one if not.

What do you think?

DanVanAtta commented 8 years ago

What's the problem that we solve?

The PPA is cool, but I don't think it's necessarily worth it. Not many linux users, most are able to get J8 or have it easily, and we don't do many releases yet. For the moment you also need to control a bit how to upgrade because of the versioning issues.

I would tend to think we can work on other items. For example, there are still gaps in the automated deployment to lobby bots, the script I wrote to do so needs debugging. We have plenty of game features to add in, and last, the CI pipeline we have goes pretty far. So my 2 cents are I think it's interesting, but not necessarily worth it.

gaborbernat commented 8 years ago

For now I think this is done.