Giter Club home page Giter Club logo

starter4j's Introduction

desktop-desktop.starter

Russian version
Status: beta
We want to create java desktop starter which can help to run java app faster and better. There is functionality to update your default application with low traffic and check the environment (memory amount, correct temp directory, etc.). We have detailed instructions to create installers for Windows, Linux, MacOS that will let you install java if your computer doesn't have it.
Allows you to easily change your application configs on the server side.
This solution is created on our 6-year experience in this area.

It works for: Linux, MacOS, Windows.

The project has the following life cycle:
You need to prepare files from your desktop application:

  1. Preparing files using config-generator
  2. Uploading files to your server

To run your desktop app will have next steps:

  1. Collects environment data
  2. Performs checks (availability of free space, correctness of the temp directory, access rights to the working directory, problems with display fonts)
  3. Downloads files (images, .jar, .zip, dependencies)
  4. Checks the correctness of files by hash (for example, java files)
  5. If necessary, updates your application to the user's choice (a selection window appears)
  6. fork this repository
  7. Launch your application

Additional features of the starter:
Solves the problem of changing the encoding if the username is in russian language, usually in this case it is impossible to run the application, we change the working directory to C:\program_name and display a message to the user about this.

You can check how the test desktop application installers work by downloading ready-made for:

  1. Windows Installer
  2. Linux
    Installation is done through the terminal, to do this, open the terminal and run the following command
wget https://github.com/gdevby/starter-app/blob/master/example-compiled-app/os_installer/installDebPackage.sh -O - | sh
  1. MacOs
    Installation is carried out through the terminal and from the browser. To run from a browser, you need to sign code signing your installer. In this example, we'll show you how to run it from the terminal. Open a terminal and run the command
curl --remote-name https://raw.githubusercontent.com/gdevby/starter-app/master/example-compiled-app/os_installer/starter-1.0.dmg && chmod +x ./starter-1.0.dmg && open -W ./starter-1.0.dmg 

These modules can help you develop desktop applications:

  1. Java paths, OS identification, user directories, in details desktop-common-util
  2. Multi-threaded download files and cache configs for desktop application, in detail http-download
  3. Get information on GPU, downtime and system activity, in detail desktop-common-util-additional

This project solves similar problems as launch4j, but it solves differently:

  1. Doesn't pack jar into exe. An installer is created that will download the launcher and run your jar file
  2. There is an update functionality, therefore it suits better for projects with a large audience
  3. It also provides ready-made functionality for desktop applications (validation)
  4. Solves some bugs with java

link to the next instruction

starter4j's People

Contributors

emanual014 avatar paylek avatar robertmakrytski avatar vento-off avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

starter4j's Issues

Problem

Задавать не как директорию, а как архив для java. Нужно добавить дополнительныю модификацию, чтобы оно качало и архивы и конфинурационные файлы.

some doc chagnes

statter-core - not proper name
add description about parameter prod

download

When it need to download one file. It show 200 megabytes.

Ветка для java17

Сделать ветку 1.8 до внедрения Java 17 для 2 проектов (для приложения и для пускателя)

:sparkles: **Welcome to GitHub Projects** :sparkles:

We're so excited that you've decided to create a new project! Now that you're here, let's make sure you know how to get the most out of GitHub Projects.

  • Create a new project
  • Give your project a name
  • Press the ? key to see available keyboard shortcuts
  • Add a new column
  • Drag and drop this card to the new column
  • Search for and add issues or PRs to your project
  • Manage automation on columns
  • Archive a card or archive all cards in a column

Address already in use

Exception while binding MockServer to port 6794�[m: Address already in use
When start on eclipse

Проблемы с JRE

При удалении вручную jre_default и cache и запуске лаунчера возникает ошибка
java.nio.file.NoSuchFileException: /home/pavel/testDirectory6/desktop-starter-launch-update-bootstrap/starter-core/target/starter/jre_default
at java.base/sun.nio.fs.UnixException.translateToIOException(UnixException.java:92)
at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:106)
at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:111)
at java.base/sun.nio.fs.UnixFileAttributeViews$Basic.readAttributes(UnixFileAttributeViews.java:55)
at java.base/sun.nio.fs.UnixFileSystemProvider.readAttributes(UnixFileSystemProvider.java:148)
at java.base/sun.nio.fs.LinuxFileSystemProvider.readAttributes(LinuxFileSystemProvider.java:99)
at java.base/java.nio.file.Files.readAttributes(Files.java:1851)
at java.base/java.nio.file.FileTreeWalker.getAttributes(FileTreeWalker.java:220)
at java.base/java.nio.file.FileTreeWalker.visit(FileTreeWalker.java:277)
at java.base/java.nio.file.FileTreeWalker.walk(FileTreeWalker.java:323)
at java.base/java.nio.file.FileTreeIterator.(FileTreeIterator.java:71)
at java.base/java.nio.file.Files.walk(Files.java:3918)
at java.base/java.nio.file.Files.walk(Files.java:3973)
at by.gdev.util.DesktopUtil.getJavaRun(DesktopUtil.java:233)
at by.gdev.component.Starter.runApp(Starter.java:267)
at by.gdev.Main.main(Main.java:45)

Главный класс

Для дальнейшей корректной вашего приложения вам рекомендуется изменить следующие аргументы:

Необходимо добавить главный класс.

improved translation

Change word upload on download. It is means when you send data from local machine on remote.

Any resources can upload from several sources(domains)

jvm
uriAppConfig

dependencis = gsonService.getObjectByUrls(remoteAppConfig.getAppDependencies().getRepositories(), remoteAppConfig.getAppDependencies().getResources().get(0).getRelativeUrl(), Repo.class, false); resources = gsonService.getObjectByUrls(remoteAppConfig.getAppResources().getRepositories(), remoteAppConfig.getAppResources().getResources().get(0).getRelativeUrl(), Repo.class, false); jvm = gsonService.getObjectByUrls(remoteAppConfig.getJavaRepo().getRepositories(), remoteAppConfig.getJavaRepo().getResources().get(0).getRelativeUrl(), JVMConfig.class, false); } else {

@Subscribe public void downloadedFile(DownloadElement element) { File file = new File(element.getPathToDownload() + element.getMetadata().getPath()); HttpGet httpGet = new HttpGet( element.getRepo().getRepositories().get(0) + element.getMetadata().getRelativeUrl()); log.trace("downloaded file: " + httpGet.getURI() + " -> " + file); }

``

Improve code

Class ProcessMonitor, have strange method isRunning. Could we use except while (isRunning()) { ->
while (process.isAlive()) { ???

При обновлении текущее значение больше, чем надо загрузить

:59:05 b.g.h.u.d.d.DownloaderContainer WARN - The hash sum of the file is not equal. File /home/robert/git/desktop-starter-launch-update-bootstrap/starter-core/starter/dependencies/desktop-common-util-1.11.jar will be deleted. Size = 0
17:59:05 b.g.h.u.d.d.DownloaderContainer WARN - The hash sum of the file is not equal. File /home/robert/git/desktop-starter-launch-update-bootstrap/starter-core/starter/dependencies/http-download-1.11.jar will be deleted. Size = 0
17:59:07 b.g.s.ConsoleSubscriber INFO - Download speed NaN MB/s. Download file: 3, from 3. Downloaded 194 MB from 194 MB
17:59:07 b.g.s.ConsoleSubscriber INFO - downloaded file: https://test-repo.tlauncher.org/tlauncher-sources/test/beta/tlauncher/2.898133/dependencies/desktop-common-util-1.11.jar -> /home/robert/git/desktop-starter-launch-update-bootstrap/starter-core/starter/dependencies/desktop-common-util-1.11.jar
17:59:07 b.g.s.ConsoleSubscriber INFO - downloaded file: https://test-repo.tlauncher.org/tlauncher-sources/test/beta/tlauncher/2.898133/dependencies/http-download-1.11.jar -> /home/robert/git/desktop-starter-launch-update-bootstrap/starter-core/starter/dependencies/http-download-1.11.jar
17:59:08 b.g.s.ConsoleSubscriber INFO - downloaded file: https://test-repo.tlauncher.org/tlauncher-sources/test/beta/tlauncher/2.898133/original-TLauncher-2.898133.jar -> /home/robert/git/desktop-starter-launch-update-bootstrap/starter-core/starter/original-TLauncher-2.898133.jar
17:59:08 b.g.s.ConsoleSubscriber INFO - Download speed Infinity MB/s. Download file: 3, from 3. Downloaded 197 MB from 194 MB

Удаленный сервер

Скопировать директорию jres_configuration_default в starter-app
Скопировать директорию jres_default в starter-app c starter-app/example-compiled-app/jres_default

Нужно добавить в конец удаленный сервер.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.