edvin / fxlauncher

Auto updating launcher for JavaFX Applications
Apache License 2.0
715 stars 107 forks source link

Github repository in <app.url> for development tests #107

Closed TioCoding closed 6 years ago

TioCoding commented 6 years ago

Hello, I am being fascinated by the FXLAUNCHER project, I am just learning how to use it. I would like to know if there is any way to save the .jar in a GITHUB repository and use it as , only for learning and development reasons. If this is possible, how would it be? This would help me a lot to continue learning about FxLauncher.

 <!-- Base URL where you will host the application artifacts -->
<app.url>...(host-github)...</app.url>

<!-- Optional scp target for application artifacts hosted at the above url -->
<app.deploy.target>...(What would go here?)...</app.deploy.target>

Thank you so much :)

edvin commented 6 years ago

Good to hear :) It's possible to create a binary link to a GitHub file using raw.githubusercontent.com, like for example https://github.com/edvin/tornadofx/raw/master/graphics/tornado-fx-logo.png, but I don't think it's a good practice. It might work for your test though.

TioCoding commented 6 years ago

Thank you very much for the answer, when it is necessary to use , if the user wants to connect, does he have a password?And is there a free alternative to do the tests instead of using Github? some free host like the one you use in the example of fxldemo, How could I do this? Thank you

edvin commented 6 years ago

The app.deploy.target setting doesn't have special meaning to the launcher in any way, but can be used as a parameter to scp to upload the artifacts using scp to the destination server. This is used for deployment, not for the end user who is downloading the app. You are however free to upload the files to the web server in any way you want, even manually.

TioCoding commented 6 years ago

So, if I do not specify the app.deploy.target tag, I can not use the command mvn exec:exec@deploy-app to upload the application to the server?

And in your example of fxldemo, do you use a public key and a private key to connect using ssh to your server without asking for a password?

I would like to know exactly how you have configured your server so that the application and its dependencies are automatically loaded into your server.

Any documentation or information on how you have configured your server (ssh, scp, (pub-key, private-key), etc.) will be highly appreciated

Thanks very much ;)

edvin commented 6 years ago

If you look at pom.xml, you'll see that deploy-app is just a target that is defined to run the scp command, and pick up the target location from the app.deploy.target configuration setting. There is no magic here, you can do whatever you want in this step, and it really has nothing to do with FXLauncher. It doesn't know about this at all. All it cares about is that you somehow transfer the files to the http server specified in the manifest url.

To avoid having to type the password every time I run the deploy target, I've installed my public key in the .ssh/authorized_keys file on the target server.

TioCoding commented 6 years ago

Thank you very much for the answers, now I understand everything better. I'm going to test in AWS and try to achieve the same as Fxldemo installing the public key, thanks again for the information :smile:

edvin commented 6 years ago

Great! I know others have used AWS successfully. Good luck :)