Skip to content

Commit

Permalink
Add steam integration to windows build
Browse files Browse the repository at this point in the history
  • Loading branch information
sjrc6 committed Jan 6, 2025
1 parent 795f489 commit 6af19e5
Show file tree
Hide file tree
Showing 8 changed files with 21 additions and 6 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -141,3 +141,5 @@ tags
*.vcxproj
*.zip
/build

!steam_api.dll
13 changes: 13 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3301,6 +3301,7 @@ set(CPACK_DIRS
set(CPACK_FILES
license.txt
storage.cfg
steam_appid.txt
${COPY_FILES}
)

Expand Down Expand Up @@ -3672,3 +3673,15 @@ foreach(target ${TARGETS_DEP})
target_compile_options(${target} PRIVATE ${OUR_FLAGS_DEP})
endif()
endforeach()

if(TARGET_OS STREQUAL "windows" AND STEAM AND NOT CMAKE_BUILD_TYPE STREQUAL Debug)
add_custom_command(
TARGET game-client POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy_if_different
"${CMAKE_SOURCE_DIR}/steam_api.dll"
"$<TARGET_FILE_DIR:game-client>"
COMMAND ${CMAKE_COMMAND} -E copy_if_different
"${CMAKE_SOURCE_DIR}/steam_appid.txt"
"$<TARGET_FILE_DIR:game-client>"
)
endif()
2 changes: 1 addition & 1 deletion docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ <h3>Plus More</h3>

<footer>
<div class="footer-content">
<p>2024 <a href="https://github.com/sjrc6/TaterClient-ddnet" target="_blank">TaterClient</a></p>
<p>2025 <a href="https://github.com/sjrc6/TaterClient-ddnet" target="_blank">TaterClient</a></p>
<span class="divider"></span>
<p>Website by <a href="https://github.com/noxygalaxy" target="_blank">@noxygalaxy</a></p>
</div>
Expand Down
3 changes: 1 addition & 2 deletions src/engine/shared/storage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -822,8 +822,7 @@ class CStorage : public IStorage

bool CreateFolder(const char *pFoldername, int Type) override
{
if(Type >= TYPE_SAVE && Type < m_NumPaths) // How tf does this do anything, it crashes without this
dbg_assert(Type >= TYPE_SAVE && Type < m_NumPaths, "Type invalid");
dbg_assert(Type >= TYPE_SAVE && Type < m_NumPaths || Type == TYPE_ABSOLUTE, "Type invalid");

char aBuffer[IO_MAX_PATH_LENGTH];
GetPath(Type, pFoldername, aBuffer, sizeof(aBuffer));
Expand Down
4 changes: 2 additions & 2 deletions src/game/client/components/tclient/menus_tclient.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1577,10 +1577,10 @@ void CMenus::RenderSettingsInfo(CUIRect MainView)
{
RightView.HSplitTop(CardSize, &DevCardRect, &RightView);
DevCardRect.VSplitLeft(CardSize, &TeeRect, &Label);
Label.VSplitLeft(TextRender()->TextWidth(LineSize, "Daniel"), &Label, &Button);
Label.VSplitLeft(TextRender()->TextWidth(LineSize, "PeBox"), &Label, &Button);
Button.VSplitLeft(MarginSmall, nullptr, &Button);
Button.w = LineSize, Button.h = LineSize, Button.y = Label.y + (Label.h / 2.0f - Button.h / 2.0f);
Ui()->DoLabel(&Label, "Daniel", LineSize, TEXTALIGN_ML);
Ui()->DoLabel(&Label, "PeBox", LineSize, TEXTALIGN_ML);
if(DoButton_FontIcon(&s_LinkButton2, FONT_ICON_ARROW_UP_RIGHT_FROM_SQUARE, 0, &Button, IGraphics::CORNER_ALL))
Client()->ViewLink("https://github.com/danielkempf");
RenderDevSkin(TeeRect.Center(), 50.0f, "greyfox", "greyfox", true, 0, 0, 2, false, ColorRGBA(0.00f, 0.09f, 1.00f, 1.00f), ColorRGBA(1.00f, 0.92f, 0.00f, 1.00f));
Expand Down
2 changes: 1 addition & 1 deletion src/game/version.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,5 @@
extern const char *GIT_SHORTREV_HASH;
#define GAME_NAME "DDNet"
#define CLIENT_NAME "TClient"
#define TCLIENT_VERSION "10.0.1"
#define TCLIENT_VERSION "10.0.2"
#endif
Binary file added steam_api.dll
Binary file not shown.
1 change: 1 addition & 0 deletions steam_appid.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
412220

0 comments on commit 6af19e5

Please sign in to comment.