Skip to content

Launcher utility to handle custom game URL protocols supported on joinme.click

License

Notifications You must be signed in to change notification settings

cetteup/joinme.click-launcher

Repository files navigation

joinme.click-launcher

ci Go Report Card License Last commit Discord

Launcher utility to handle custom game URL protocols supported on joinme.click.

joinme click-launcher

Supported games

Game URL protocol Minimum launcher version¹ Supported mods
Battlefield 1942 bf1942://{ip}:{port} v0.1.7-alpha The Road to Rome², Secret Weapons of WWII², Battlefield 1918, Desert Combat (0.7), Desert Combat Final, Pirates
Battlefield Vietnam bfvietnam://{ip}:{port} v0.1.7-alpha Battlegroup 42
Battlefield 2 bf2://{ip}:{port} v0.2.0 Special Forces², Allied Intent Xtended, Pirates (Yarr2), Point of Existence 2, Arctic Warfare
Battlefield 4 bf4://{gameid} v0.2.2
Battlefield 1 bf1://{gameid} v0.2.2
Call of Duty cod://{ip}:{port} v0.2.0
Call of Duty: United Offensive coduo://{ip}:{port} v0.2.0
Call of Duty 2 cod2://{ip}:{port} v0.2.0
Call of Duty 4: Modern Warfare cod4://{ip}:{port} v0.2.0
Call of Duty: World at War codwaw://{ip}:{port} v0.2.0
F.E.A.R./F.E.A.R. Combat fear://{ip}:{port} v0.2.0
F.E.A.R. Combat (SEC2) fearsec2://{ip}:{port} v0.1.3-alpha
ParaWorld paraworld://{ip}:{port} v0.1.7-alpha
SWAT 4 swat4://{ip}:{port} v0.1.3-alpha
SWAT 4: The Stetchkov Syndicate³ swat4x://{ip}:{port} v0.1.3-alpha
Unreal unreal://{ip}:{port} v0.2.0
Unreal Tournament ut://{ip}:{port} v0.2.0
Unreal Tournament 2003 ut2003://{ip}:{port} v0.2.0
Unreal Tournament 2004 ut2004://{ip}:{port} v0.2.0
Vietcong vietcong://{ip}:{port} v0.1.3-alpha

¹ refers to the minimum launcher version supporting all features relevant to the game

² these addons are considered mods for technical reasons, since they use the same game executable which is launched with different parameters

³ while technically an addon, it uses a separate game executable and is thus considered a different game

Usage

Registering URL handlers

Before you can launch games based on URLs, the launcher needs to register as a URL handler for the supported URL protocols. The installer will automatically do this during the setup. If you are using the portable launcher, simply run the launcher once after download. It will check which of the supported games are installed and register itself as a URL handler for each one it finds. After registering, the launcher shows the result for each supported game.

10: 37AM INF Checked status for game="Battlefield 1" result="launcher registered successfully"
10: 37AM INF Checked status for game="Battlefield 1942" result="not installed"
10: 37AM INF Checked status for game="Battlefield 2" result="launcher registered successfully"
10: 37AM INF Checked status for game="Battlefield 4" result="launcher registered successfully"
10: 37AM INF Checked status for game="Battlefield Vietnam" result="launcher registered successfully"
10: 37AM INF Checked status for game="Call of Duty" result="launcher registered successfully"
10: 37AM INF Checked status for game="Call of Duty 2" result="launcher registered successfully"
10: 37AM INF Checked status for game="Call of Duty 4: Modern Warfare" result="launcher registered successfully"
10: 37AM INF Checked status for game="Call of Duty: United Offensive" result="launcher registered successfully"
10: 37AM INF Checked status for game="Call of Duty: World at War" result="launcher registered successfully"
10: 37AM INF Checked status for game="F.E.A.R. Combat (SEC2)" result="not installed"
10: 37AM INF Checked status for game=ParaWorld result="launcher registered successfully"
10: 37AM INF Checked status for game="SWAT 4" result="launcher registered successfully"
10: 37AM INF Checked status for game="SWAT 4: The Stetchkov Syndicate" result="launcher registered successfully"
10: 37AM INF Checked status for game=Vietcong result="not installed"
10: 37AM INF Window will close in 15 seconds

Launching a game based on a URL

No extra steps are required to launch a game based on one of the supported URL protocols. If you click a link to bf2://95.172.92.116:16567 for example, the launcher will start Battlefield 2 and join 2F4Y.com - Best Maps No Rules!. If the game is already running and cannot join a server from a running state, the launcher will close any existing game instance automatically before launching a new one (only supported by launcher v0.1.8-alpha and newer).

10: 40AM INF Killing existing game process executable=BF2.exe pid=3916
10: 40AM INF Successfully launched game url=bf2://95.172.92.116:16567/
10: 40AM INF Window will close in 15 seconds

Depending on your browser and settings, you may need to confirm that you want to allow the launcher to start after clicking the link.

Browser URL protocol launch confirmation prompt

Advanced configuration

You can customize some elements of how the launcher starts your games. For example, you can provide additional command line arguments on a per-game basis. The config needs to be placed in the same folder as the launcher executable as config.yaml.

General configuration options

Option name Type Description Default value
quiet_launch boolean do not leave the window open any longer than required false
debug_logging boolean show lots of information relevant for debugging any issues with the launcher false

Per-game configuration options

These options can be configured (differently) on a per-game basis. They need to be placed in the config.yaml under games and then keyed by the game URL protocol (e.g. bf2). These options do not have any default values. Instead, they override dynamic values the launcher usually determines on its own (e.g. the game's install path). Some options also pass additional details to the launcher.

Option name Type Description
executable_name string name of the game executable (usually statically defined per game)
executable_path string relative path from the game's install path to folder containing the game executable (usually statically defined per game)
install_path string path where the game is installed (usually determined via the Windows registry)
args string[] array of additional arguments to pass the game when launching
hooks object[] array of hook configurations for the game

Hook configuration options

Hooks allow you to customize how games are launched. You can, for example, use the purge-server-history hook for Battlefield 2 to remove all server history items from your default profile and thus speed up the game launch.

Options can be configured differently for each hook and game. It is also possible to provide two configurations for the same hook, e.g. to run it with different arguments before and after launching a game.

Option name Type Description Default value
handler string Hook handler function to execute
when string When to run the hook (pre-launch, post-launch, always or never)
exit_on_error boolean Whether to exit if the hook returns an error false
args object Arguments to pass to the handler (keys and values must be strings)

Example configuration

This example configuration would cause the launcher to not leave the launcher window open after performing any actions (meaning you will not see any output it printed). Also, Battlefield 2 would be launched in windowed mode with C:\Games\Battlefield 2\bin\BF2.playbf2.exe being started in C:\Games\Battlefield 2.

With the hooks configured like this, the launcher will:

  1. set profile "0010" as the default profile for Battlefield 2 before launching the game
  2. purge the server history before launching the game
  3. purge the shader cache before launching the game
  4. purge the logo cache before launching the game

Debug logging is disabled by default, meaning that option does not change any default behaviour.

quiet_launch: true
debug_logging: false
games:
    bf2:
        executable_name: BF2.playbf2.exe
        executable_path: bin
        install_path: C:\Games\Battlefield 2
        args: ["+fullscreen", "0", "+szx", "1600", "+szy", "900"]
        hooks:
          - handler: set-default-profile
            when: pre-launch
            args:
              profile: "0010"
          - handler: purge-server-history
            when: pre-launch
          - handler: purge-shader-cache
            when: pre-launch
          - handler: purge-logo-cache
            when: pre-launch

You can also find the example configuration as a file: config.example.yaml.

Downloads

License

This is free software under the terms of the MIT license.