SYNOPSYS

How to build a slim Steam package for a Godot game that works on Linux, Windows and OSX.

PROCEDURE

First export your game from godot, do not tick ‘Embed Pck’ in Linux or Windows export configurations.

1
2
3
4
[ -d steam ] && rm -fr steam
/usr/bin/godot --no-window --export Linux steam/MyProject.x86_64
/usr/bin/godot --no-window --export Windows steam/MyProject.exe
/usr/bin/godot --no-window --export OSX steam/MyProject.zip

Then unzip the OSX application and remove the top level godot package file.

1
cd steam && unzip -x MyProject.zip && rm MyProject.zip MyProject.pck && cd ..

Now setup a Steam build file : MyProject.vdf ContentBuilder.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
"AppBuild"
{
    "AppID" "APP_ID"
    "Desc" "Working Linux, OSX, Windows build"

    "Preview" "1"                   // set to 0 to publish

    "ContentRoot" "./steam"
    "BuildOutput" "./steam-out"

    "Depots"
    {
        "DEPOT_ID"
        {
            "FileMapping"
            {
                "LocalPath" "*"
                "DepotPath" "."
                "recursive" "1"
            }
            "FileMapping"           // to fix Linux and Windows deleted package
            {
                "LocalPath" "MyProject.app/Contents/Resources/MyProject.pck"
                "DepotPath" "."
            }
        }
    }
}

Last build and upload to steam using steamcmd.

1
steamcmd +login USER PASSWD +run_app_build FULL_PATH_TO_MyProject.vdf +quit