Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Create a MacOS Build Using Steamworks SDK

Discussion in 'macOS' started by Treasureman, Nov 15, 2020.

  1. Treasureman

    Treasureman

    Joined:
    Jul 5, 2014
    Posts:
    563
    Hello! I'm currently preparing to release my game on the Steam store, and I'm struggling with my Mac build. I have a functioning build of the game, but I'm not sure exactly how to implement it into my Mac Depot.

    For reference, here's my game contents depot (I'm not quite sure how private certain info is, so I'm blocking out build and depot IDs:
    Code (CSharp):
    1. "DepotBuildConfig"
    2. {
    3.     // Set your assigned depot ID here
    4.     "DepotID" "#######"
    5.  
    6.     // Set a root for all content.
    7.     // All relative paths specified below (LocalPath in FileMapping entries, and FileExclusion paths)
    8.     // will be resolved relative to this root.
    9.     // If you don't define ContentRoot, then it will be assumed to be
    10.     // the location of this script file, which probably isn't what you want
    11.     "ContentRoot"    "D:\steamworks_sdk_150\sdk\tools\ContentBuilder\content"
    12.  
    13.     // include all files recursivley
    14.   "FileMapping"
    15.   {
    16.       // This can be a full path, or a path relative to ContentRoot
    17.     "LocalPath" ".\Game Folder\*"
    18.    
    19.     // This is a path relative to the install folder of your game
    20.     "DepotPath" "."
    21.    
    22.     // If LocalPath contains wildcards, setting this means that all
    23.     // matching files within subdirectories of LocalPath will also
    24.     // be included.
    25.     "recursive" "1"
    26.   }
    27.  
    28.     // but exclude all symbol files
    29.     // This can be a full path, or a path relative to ContentRoot
    30.   "FileExclusion" "*.pdb"
    31.   "FileExclusion" "*.exe"
    32.   "FileExclusion" "*.app"
    33.   "FileExclusion" "*.dll"
    34. }
    35.  
    And here's my Windows depot script:
    Code (CSharp):
    1. "DepotBuildConfig"
    2. {
    3.     // Set your assigned depot ID here
    4.     "DepotID" "#######"
    5.  
    6.     // Set a root for all content.
    7.     // All relative paths specified below (LocalPath in FileMapping entries, and FileExclusion paths)
    8.     // will be resolved relative to this root.
    9.     // If you don't define ContentRoot, then it will be assumed to be
    10.     // the location of this script file, which probably isn't what you want
    11.     "ContentRoot"    "D:\steamworks_sdk_150\sdk\tools\ContentBuilder\content"
    12.  
    13.     // include all files recursivley
    14.  
    15.   "FileMapping"
    16.   {
    17.       // This can be a full path, or a path relative to ContentRoot
    18.     "LocalPath" ".\Game Folder\*.exe"
    19.    
    20.     // This is a path relative to the install folder of your game
    21.     "DepotPath" "."
    22.    
    23.     // If LocalPath contains wildcards, setting this means that all
    24.     // matching files within subdirectories of LocalPath will also
    25.     // be included.
    26.     "recursive" "1"
    27.   }
    28.  
    29.  
    30.   "FileMapping"
    31.   {
    32.       // This can be a full path, or a path relative to ContentRoot
    33.     "LocalPath" ".\Game Folder\*.dll"
    34.    
    35.     // This is a path relative to the install folder of your game
    36.     "DepotPath" "."
    37.    
    38.     // If LocalPath contains wildcards, setting this means that all
    39.     // matching files within subdirectories of LocalPath will also
    40.     // be included.
    41.     "recursive" "1"
    42.   }
    43.  
    44.  
    45.     // but exclude all symbol files
    46.     // This can be a full path, or a path relative to ContentRoot
    47.   "FileExclusion" "*.pdb"
    48.   "FileExclusion" "*.app"
    49. }
    50.  
    I'm not very familiar with how Mac builds are structured, so I'm not really sure what to files need included / excluded. Please let me know if you're able to help! Thank you!
     
  2. ryanmillerca

    ryanmillerca

    Joined:
    Aug 12, 2012
    Posts:
    141
    Hey Treasureman, I've launched two games on Steam for MacOS and used Steamworks.NET for each of them. It works well. It's a C# wrapper for the API. With just a little tweaking it takes care of most things for you. I recommend you try it instead of integrating the Steam API directly. Cheers.
     
  3. Full_Tilt

    Full_Tilt

    Joined:
    Apr 25, 2018
    Posts:
    16
    @ryanmillerca according to the official documentation you referenced,
    You still need the official Steamworks SDK to get the ContentBuilder tool to upload your game.

    So, how did you upload your MacOS build? I'm curious because I'm also trying to solve this issue. Thanks.

    @Treasureman did you ever find a solution that worked for you? Care to share the resolution? Thank you.
     
  4. ryanmillerca

    ryanmillerca

    Joined:
    Aug 12, 2012
    Posts:
    141
    You can upload ZIPs of your builds directly to Steam via the Steamworks website, though this is only available if your build is less than 2gb
    Code (CSharp):
    1. https://partner.steamgames.com/apps/depotuploads/[yourAppIdHere]
    I use SteamPipeGUI on Windows to upload my builds.
     
  5. Davide1104

    Davide1104

    Joined:
    Jun 12, 2013
    Posts:
    38
  6. Xelnath

    Xelnath

    Joined:
    Jan 31, 2015
    Posts:
    400
    Hi Treasureman,

    You will need to create a separate depot, where you upload the YourProject.app file and include that depot in mac builds only, just like the executables and data folders are windows only.

    Best practice is to create 2 folders in content:

    content_windows
    content_mac

    And create two depot (VDF) configurations which point to the depots separately.
     
  7. Xelnath

    Xelnath

    Joined:
    Jan 31, 2015
    Posts:
    400
    This answer wasn't resolved in this thread, so posting it here.

    There's a great resource on this topic:



    Timestamp: 10:53