Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Upload to Steam?

Discussion in 'Unity Build Automation' started by any_user, Sep 22, 2015.

  1. any_user

    any_user

    Joined:
    Oct 19, 2008
    Posts:
    374
    It's great to hear that Standalone builds are now supported! Is there any plans to integrate this with Steam, so we could push new builds to Steam directly? If not, what would be the recommended way to do it? Via Post Export Method?
     
    MrLucid72 likes this.
  2. LaneFox

    LaneFox

    Joined:
    Jun 29, 2011
    Posts:
    7,462
    Wouldn't you want to QA the build before pushing directly to Steam?
     
  3. any_user

    any_user

    Joined:
    Oct 19, 2008
    Posts:
    374
    No, I have a private dev branch/channel on Steam for exactly that. It's easier to deploy it for testing through Steam.
     
    MrLucid72 likes this.
  4. dcarrigg

    dcarrigg

    Joined:
    May 21, 2014
    Posts:
    24
    +1

    It's very common to use steam to distribute builds during pre-production.
     
  5. khan-amil

    khan-amil

    Joined:
    Mar 29, 2012
    Posts:
    206
    Would be very useful indeed. But not only for cloud build, could be good to have it in the build settings.
     
  6. patrickc

    patrickc

    Unity Technologies

    Joined:
    Jan 23, 2015
    Posts:
    67
  7. any_user

    any_user

    Joined:
    Oct 19, 2008
    Posts:
    374
  8. Grzauka

    Grzauka

    Joined:
    May 12, 2015
    Posts:
    3
    Yes please! Make an option to automaticaly deploy a build to a Steam branch!!!
    That would allow the testers to try nightly build!
     
  9. MrLucid72

    MrLucid72

    Joined:
    Jan 12, 2016
    Posts:
    962
    +1!! I was about to post just this and saw it was already posted. This would be epic. I recently started looking into cloud build after offering Mac/Linux support, and we sorta have regrets because it's a burden to build each time. However, there's hope with cloud builds and Steam workflows!

    Has anyone, in the meantime, thought of something clever to chain the builds while waiting for official support?

    Are there webhooks for cloud builds after a build is complete? I have some ideas in my head.

    If a webhook is sent when finished, could hook to your API with download link and info, use script to download the file and upload directly to steam!

    If Unity had native integration, they could do the same thing -- just ask us for Steamworks info (with permission from Valve to do it, of course)
     
    Last edited: Jun 28, 2017
  10. BernsteinA

    BernsteinA

    Joined:
    Jun 26, 2013
    Posts:
    13
    Yup. I'm doing exactly this.
     
    MrLucid72 likes this.
  11. MrLucid72

    MrLucid72

    Joined:
    Jan 12, 2016
    Posts:
    962
    Are you using a GitLab runner to do this? I read that they're sorta made for this. I just got a server running, but it's taking me a long time to setup (just doing it a little at a time). I'm curious if you could give some details about your pipeline~
     
  12. BernsteinA

    BernsteinA

    Joined:
    Jun 26, 2013
    Posts:
    13
    I'm running a linux server on cloud.google.com with a python script that receives POST requests and then calls steambuilder.sh
     
    MrLucid72 likes this.
  13. alan-lawrance

    alan-lawrance

    Joined:
    Feb 1, 2013
    Posts:
    360
    4 years later... is this on the roadmap at all?
     
  14. victorw

    victorw

    Joined:
    Sep 14, 2016
    Posts:
    459
  15. MrLucid72

    MrLucid72

    Joined:
    Jan 12, 2016
    Posts:
    962
    Whew, I thought Steam would be the #1 - never heard of the 4 available in there -- sorta fluffy/indie looking.

    I generate batch files via Unity's post process editor script to get mine uploaded -- here's a headstart for how Steam works for uploading. Mine may have extras like launching websites upon completion - edit to your own then practice autogenerating the same working script.

    steamUpload.bat:
    Code (CSharp):
    1. @ECHO OFF
    2. @ECHO OFF
    3. ECHO.
    4. ECHO !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    5. ECHO  ^^ False positive errors for UTF-8 (Unicode Support). Ignore this ^^
    6. ECHO !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    7. ECHO.
    8. chcp 65001
    9. REM ##############################################################################################
    10. REM #
    11. REM # C:/Repos/ToL/tol-game-win/i42-tol-win64/Assets/../BuildSteam-Xbladepc-win-x64.bat
    12. REM #
    13. REM # by Imperium42 Game Studio @ https://www.imperium42.com
    14. REM #
    15. REM # This file is automatically generated and will replace itself each time you build (compile).
    16. REM # Incorrect config can be changed in PostProcessBuildInfo.cs (or PostProcessBuild.cs for core)
    17. REM #
    18. REM # 1 - Delete the old \windows_content\ contents
    19. REM # 2 - Copy steam ./build/ contents to /<steam>/tools/ContentBuilder/content/windows_content/
    20. REM # 3 - Set the <SteamWorks>/ContentBuilder/scripts/app_build_123456-win
    21. REM # 4 - Launch Steam upload batch file
    22. REM # 5 - Launch Steamworks build page on default browser
    23. REM #
    24. REM ##############################################################################################
    25. SET PROJECT_PATH=C:/Repos/ToL/tol-game-win/i42-tol-win64/Assets/../
    26. CD /d %PROJECT_PATH%
    27. ECHO #################################################################
    28. ECHO.
    29. ECHO * Starting @
    30. ECHO.
    31. ECHO '%CD%'
    32. ECHO.
    33. ECHO * STARTING copy + upload to Steam in 10 seconds (click to pause)...
    34. ECHO.
    35. ECHO #################################################################
    36. timeout /t 10
    37. REM ___________________________________________________________
    38. ECHO.
    39. ECHO #################################################################
    40. ECHO.
    41. ECHO * [INIT] Setting INIT var paths...
    42. REM https://stackoverflow.com/questions/672693/windows-batch-file-starting-directory-when-run-as-admin
    43. REM *Includes trailing slash\
    44. ECHO.
    45. SET BUILD_PATH=C:/Repos/ToL/tol-game-win/i42-tol-win64/Assets/../build
    46. SET CONTENT_BUILDER_PATH=F:\GameDev\SDKs\Steamworks_SDK_139\tools\ContentBuilder
    47. SET WWW_BUILD=https://path-to-your-builds.com
    48. ECHO.
    49. ECHO * BUILD_PATH @
    50. ECHO.
    51. ECHO %BUILD_PATH%
    52. ECHO.
    53. ECHO * CONTENT_BUILDER_PATH @
    54. ECHO.
    55. ECHO %CONTENT_BUILDER_PATH%
    56. REM ___________________________________________________________
    57. ECHO.
    58. ECHO #################################################################
    59. ECHO.
    60. ECHO * [INIT] Setting other paths from variable...
    61. ECHO.
    62. SET CONTENT_PATH=%CONTENT_BUILDER_PATH%\content\windows_content
    63. SET EMPTY=%CONTENT_PATH%\empty
    64. SET SCRIPTS_DIR=%CONTENT_BUILDER_PATH%\scripts\
    65. SET LOCAL_VDF=%CD%\app_build_123456-win.vdf
    66. ECHO.
    67. ECHO EMPTY @
    68. ECHO.
    69. ECHO %EMPTY%
    70. ECHO.
    71. ECHO SCRIPTS_DIR @
    72. ECHO.
    73. ECHO %SCRIPTS_DIR%
    74. ECHO.
    75. ECHO LOCAL_VDF @
    76. ECHO.
    77. ECHO %LOCAL_VDF%
    78. REM ___________________________________________________________
    79. ECHO.
    80. ECHO #################################################################
    81. ECHO.
    82. ECHO * [#1] Deleting old \windows_content\* ...
    83. mkdir "%EMPTY%"
    84. ROBOCOPY /mir "%EMPTY%" "%CONTENT_PATH%"
    85. REM ___________________________________________________________
    86. ECHO.
    87. ECHO #################################################################
    88. ECHO.
    89. ECHO * [#2] Copying new files FROM...
    90. ECHO.
    91. ECHO '%BUILD_PATH'
    92. ECHO.
    93. ECHO TO...
    94. ECHO.
    95. ECHO '%CONTENT_PATH%'
    96. ROBOCOPY /COPYALL /E "%BUILD_PATH%" "%CONTENT_PATH%"
    97. REM ___________________________________________________________
    98. ECHO.
    99. ECHO #################################################################
    100. ECHO.
    101. ECHO * [#3] Copy VDF file for precise descriptions FROM...
    102. ECHO.
    103. ECHO '%LOCAL_VDF%'
    104. ECHO.
    105. ECHO TO...
    106. ECHO.
    107. ECHO '%SCRIPTS_DIR%'
    108. ECHO.
    109. xcopy /y "%LOCAL_VDF%" "%SCRIPTS_DIR%"
    110. REM ___________________________________________________________
    111. ECHO.
    112. ECHO #################################################################
    113. ECHO.
    114. ECHO * [#4] Launch Steam upload batch file @
    115. ECHO.
    116. ECHO '%CONTENT_BUILDER_PATH%\run_build_win.bat
    117. CD /d "%CONTENT_BUILDER_PATH%"
    118. cmd.exe /c CALL "run_build_windows.bat"
    119. REM ___________________________________________________________
    120. ECHO.
    121. ECHO #################################################################
    122. ECHO.
    123. ECHO * [#5] Launch Steamworks build page on default browser
    124. ECHO.
    125. START % WWW_BUILD %
    126. REM ___________________________________________________________
    127. ECHO.
    128. ECHO #################################################################
    129. ECHO.
    130. ECHO Done.
    131. ECHO.
    132. PAUSE
    133. REM EXIT
    You'll also need to use your post process script to generate a VDF file and whatever that other build file for Steam is called that contains metadata.
     
    Last edited: Jun 14, 2019
    Hosnkobf and Novack like this.
  16. victorw

    victorw

    Joined:
    Sep 14, 2016
    Posts:
    459
    As I understand it, it's not really a matter of just writing the code, it's more an issue of negotiating contracts and API access rules. Those providers are supported by the UDP because those were the providers who were most interested in working with us.
     
  17. Deleted User

    Deleted User

    Guest

    I wish Aptoide wasn't one of the supported platforms on UDP because that's pretty sketchy, and by that I mean it's a big pirate site (and besides googling for it, I know that from the experience of having my apps pirated there and trying unsuccessfully to get them taken down)
     
  18. MrLucid72

    MrLucid72

    Joined:
    Jan 12, 2016
    Posts:
    962
    Steam's pipeline is publicly available to use commercially, if I recall? It doesn't do anything if you don't have a Steamworks username/password (that the end-user, not Unity, would enter). You shouldn't even need a secret for a pipeline - just some info entered by the user.

    The same goes for Discord, but even-more open.

    I wouldn't say it's a matter of code for Steam or Discord :p can't speak for other platforms, though.
     
    Last edited: Jun 18, 2019
    Hosnkobf and Novack like this.
  19. Hosnkobf

    Hosnkobf

    Joined:
    Aug 23, 2016
    Posts:
    1,096
    two years later and Unity still doesn't think Steam is important...
     
    JustJunuh and IOU_RAY like this.
  20. darthdeus

    darthdeus

    Joined:
    Oct 13, 2013
    Posts:
    76