Double click on the jar = open UI

Issue #432 resolved
Benjamin Cordes created an issue

double clicking the jar should open the UI with a default config.

CLI run should be kept as is.

Comments (9)

  1. Benjamin Cordes reporter

    not too sure on this. don't we just want to leave the CLI command and add the runui flag? Because the default config is not very helpful. So the user would have to define a new config in any case, and that might be confusing.

  2. Desrever Nu

    I am exploring an alternative way of achieving this.

    Along with the NuBot.jar, distribute another executables (NuBotUI) which does nothing but calling

    java - jar NuBot.jar UI=true 
    

    *not sure about the syntax, but you get the concept

  3. Desrever Nu

    Update :

    executing launch.jar with double click will prompt the user and ask "Do you want to load an existing config?" case a) the user selects a file [/path/to/config.json]  . then it will launch this CLI line

    $ java -jar NuBot.jar /path/to/config.json --ui=true
    

    case b) the user select no file . then it will launch this CLI line

    $ java -jar NuBot.jar config.json --ui=true
    

    config.json being the default empty file seemless for the user, tbd

  4. Desrever Nu

    Adapted to new Syntax

    java - jar NuBot -cfg=<pathTo/options.json> -GUI
    

    where <pathTo/options.json>, is defined in Settings.DEFAULT_CONFIG_FILENAME in case the user doesn't select it

  5. Log in to comment