Command Line Launch / Move CG Directory?

All discussion about the Commander Genius project (a Keen interpreter + more).
Post Reply
Bighead
Meep
Posts: 2
Joined: Fri Nov 04, 2022 3:21

Command Line Launch / Move CG Directory?

Post by Bighead »

Hey everyone, love Commander Genius. I was wondering, is it possible to launch specific games with the command line? Is there some kind of argument I can provide to launch specific games?

I would like to add the Commander Keen games to my LaunchBox setup, creating a tile for each game. Unfortunately, I can only create one that launches Commander Genius and then I need to select a game from the list. I really want to be able to launch each game individually through LaunchBox. If this can be accomplished via command line, I can create a batch script to act as the gateway to the exe.

So that's the important question, the other one is I was wondering if it's possible to change where Commander Genius looks for the games. Currently its the "Commander Genius" folder in "Documents". I'd prefer to have the games within the working directory of the launcher. Any help would be appreciated!
gerstrong
Vorticon Elite
Posts: 1244
Joined: Wed Dec 31, 2008 14:44
Location: Frankfurt - Germany
Contact:

Re: Command Line Launch / Move CG Directory?

Post by gerstrong »

Hallo Bighead,

Commander Genius is built the way you can access mixed read-only and read-write partitions. For that we use a system called search paths.

Just open the

Code: Select all

cgenius.cfg
file and look for the

Code: Select all

FileHandling
Section. For one of the

Code: Select all

SearchPathX
just add the path where you have installed the games.

Now launching Commander Genius you just pass as argument the relative path with

Code: Select all

dir=
to your game like this:

Code: Select all

./CGenius dir="games/keen4"
and it should launch your game directly. Let me know if it works for you.
Having fun developing stuff...
Bighead
Meep
Posts: 2
Joined: Fri Nov 04, 2022 3:21

Re: Command Line Launch / Move CG Directory?

Post by Bighead »

Sorry for the late replay (3 months later). I forgot all about this topic until I decided to play some Commander Keen today and thought to myself.. "I wish I could link each game individually into LaunchBox". Then I remembered I made this post, and was excited to see I got a reply! So I tried your suggestions and everything worked! I now have the Keen games in Launchbox, individually accessible with double click of the box art. Thank you so much!!! I am finally able to add the definitive versions of the Keen games to my own little playable personal video game museum.

:lol :lol :lol :lol :lol

Image
Post Reply