Launcher icon indicating copy to clipboard operation
Launcher copied to clipboard

More Command Line Argument

Open barraIhsan opened this issue 3 years ago • 5 comments

Role

I make software that integrate with MultiMC

Suggestion

More Command Line Argument

Benefit

So that other apps can integrate more with MultiMC

This suggestion is unique

  • [X] I have searched the issue tracker and did not find an issue describing my suggestion, especially not one that has been rejected.

You may use the editor below to elaborate further.

1. Output (MultiMC output still go to the log)

  • Use multimc output --output / -o multimc (default)
  • Use minecraft output instead of multimc output --output / -o minecraft (#3426)
  • No output --output / -o none (With this behaviour, if you close the command prompt / program that call the command, the multimc instance will not close)

2. Open Window

  • Instance Settings Window --window / -w instanceSetting (#3737)
  • Global Settings Window --window / -w globalSetting
  • Add Microsoft account Window --window / -w addAccount
  • Update Window --window / -w update
  • About Window --window / -w about
  • Export Instance Window --window / -w export with some additional argument
    • Instance ID --instance-id <instance-id>
  • Add Instance Window --window / -w addInstance with some additional argument (Still support the old --import / -I for backward compatibility)
    • Set Instance default* name --name <name>
    • Set Instance default* logo --logo <icon file in /icons/ or url>
    • Set Instance default* group --group <group>
    • Set Instance default* source
      • Vanilla --source vanilla [version] (If there is no version, than it will choose the latest snapshot)
      • Import from Zip --source import <url/file>
      • ATLauncher --source atl <packID (atlauncher.com/pack/packID)>
      • CurseForge --source cf <projectID> [fileID] (If there is no fileID, than it will choose the latest file
      • FTB --source ftb <packID>
      • FTB Legacy --source ftbl <packID>
      • Technic --source technic <packID>
      • Its just put value to the box, but not press the OK button yet

3. Launch Instance with Profile

  • Launch Online --launch / -l <instanceID> --online true --profile / -a <username>
  • Launch Offline --launch / -l <instanceID> --online false --profile / -a <offline username> (#3012) (--online is true by default)

~~Or maybe just made a C++ API at this point?~~

barraIhsan avatar Mar 10 '22 02:03 barraIhsan

Not sure if we want this to be honest.

This sounds like making an API and guaranteeing stability for that. MultiMC intentionally does not provide an API in order to not be bound to any stability.

Janrupf avatar May 16 '22 00:05 Janrupf

Well, offline/online is done.

peterix avatar Jun 10 '22 00:06 peterix

Just do an option to disable or reduce logging in stdout when starting instance from commandline. I hate these log of verbosity logs in stdout.

And multimc does not respect parent process stdout. You SHOULD create an new console window and DO NOT attach to parent process.

I attempt redirect all output to NULL and multimc just ignore this.

nathan130200 avatar Aug 16 '22 20:08 nathan130200

See here

You need to redirect stderr to stdout, then both to /dev/null. Please do further research before making such accusations

Janrupf avatar Aug 16 '22 21:08 Janrupf

MultiMC.exe --launch 1.8.9 > nul 2> nul

    0.012 D <> Log initialized.
    0.013 D "MultiMC 5" , (c) 2013-2021  "MultiMC Contributors"
    0.013 D Version                    :  "0.6.16-3431"
    0.014 D Git commit                 :  "c6b60969bb64211927a2514c1eb478fd80f2f250"
    0.014 D Git refspec                :  "refs/heads/stable"
    0.014 D Work dir before adjustment :  "C:/Users/Nathan/Documents/Minecraft/MultiMC"
    0.014 D Work dir after adjustment  :  "C:/Users/Nathan/Documents/Minecraft/MultiMC"
    0.015 D Adjusted by                :  "Fallback to binary path C:/Users/Nathan/Documents/Minecraft/MultiMC"
    0.015 D Binary path                :  "C:/Users/Nathan/Documents/Minecraft/MultiMC"
    0.017 D Application root path      :  "C:/Users/Nathan/Documents/Minecraft/MultiMC"
    0.017 D ID of instance to launch   :  "1.8.9"
    0.017 D <> Paths set.
    0.022 D Detected default console font: "Courier" , substitutions: ""
    0.024 D <> Settings loaded.
    0.025 D Detecting proxy settings...
    0.027 D Using no proxy is an option!
    0.027 D <> Network done.
    0.032 D Your language is "en_US"
    0.032 D <> Translations loaded.
    0.033 D Initializing updater with platform:  "win32"  --  "https://files.multimc.org/update/win32/channels.json"
    0.033 D <> Updater started.
    0.036 D Started watching  "C:/Users/Nathan/Documents/Minecraft/MultiMC/icons"
    0.036 D <> Instance icons intialized.
    0.038 D <> Icon themes initialized.
    0.038 D Determining System Theme...
    0.038 D System theme seems to be: "windowsvista"
    0.039 D Considering theme from theme factory: "windows"
    0.039 D Considering theme from theme factory: "windowsxp"
    0.039 D Considering theme from theme factory: "windowsvista"
    0.039 D System theme has been determined to be: "WindowsVista"
    0.040 D Loading theme "custom"
    0.042 D <> Widget themes initialized.
    0.042 D Instance path              :  "instances"
    0.044 D Loading Instances...
    0.044 D Discovering instances in "C:/Users/Nathan/Documents/Minecraft/MultiMC/instances"
    0.047 D Found instance ID "1.18.2"
    0.047 D Found instance ID "1.19"
    0.048 D Found instance ID "1.19.1-rc2"
    0.049 D Found instance ID "1.19.1-rc2 (1)"
    0.050 D Found instance ID "1.8.9"
    0.050 D Found instance ID "22w13a"
    0.051 D Will load group list now.
    0.052 D Group list loaded.
    0.054 D Loaded instance  "1.18.2"  from  "C:/Users/Nathan/Documents/Minecraft/MultiMC/instances/1.18.2"
    0.056 D Loaded instance  "1.19"  from  "C:/Users/Nathan/Documents/Minecraft/MultiMC/instances/1.19"
    0.058 D Loaded instance  "1.19.1-rc2"  from  "C:/Users/Nathan/Documents/Minecraft/MultiMC/instances/1.19.1-rc2"
    0.060 D Loaded instance  "1.19.1-rc2 (1)"  from  "C:/Users/Nathan/Documents/Minecraft/MultiMC/instances/1.19.1-rc2 (1)"
    0.064 D Loaded instance  "1.8.9"  from  "C:/Users/Nathan/Documents/Minecraft/MultiMC/instances/1.8.9"
    0.076 D Loaded instance  "22w13a"  from  "C:/Users/Nathan/Documents/Minecraft/MultiMC/instances/22w13a"
    0.079 D <> Instances loaded.
    0.079 D Loading accounts...
    0.080 D AccountList: Queued default account with internal ID  "78b22b5f682843a3b5e23fa188560f05"  to refresh first
    0.081 D Task "MSASilent(0x31c9a28)" starting for the first time
    0.081 D AuthFlow: "Logging in with Microsoft account."
    0.081 D DeviceFlow::refresh: Token: ... "z2PfA$$"

    0.528 W QMutex: destroying locked mutex
    0.529 W QMutex: destroying locked mutex

You really think that i didnt made an test before publish the comment.... U should do some tests too in other scenarios before say "work for me, then works for all"

Also,

Not sure if we want this to be honest.

You cannot tell "we" when this is only your opinion about some feature/idea to implement, i don't see any problems with suggestion sent by OP. If YOU don't wanna implement don't tell that "we" don't want this.

nathan130200 avatar Aug 16 '22 21:08 nathan130200