Skip to content

Conversation

@cscd98
Copy link
Contributor

@cscd98 cscd98 commented Nov 26, 2025

Guidelines

  1. Rebase before opening a pull request
  2. If you are sending several unrelated fixes or features, use a branch and a separate pull request for each
  3. If possible try squashing everything in a single commit. This is particularly beneficial in the case of feature merges since it allows easy bisecting when a problem arises

Description

Adds the ability to add act as a samba client. To do so there is new settings under System->Network->SMB Shares to specify IP address, share name, optional username and password etc.

It can connect to a single share, then the user can access that configured shared under "Load Content" to load their ROMs.

It may be needed to load the core first before all related files displayed (e.g. Quake 2 PAK do not get listed until loading core).

  1. Adds libsmb2 as a new optional dependency
  2. Builds RetroArch with libsmb2 by default if library found on build system (under Ubuntu this is libsmb2-dev), otherwise does not
  3. Optionally build deps/libsmb2 per platform, Makefiles require HAVE_BUILTINSMBCLIENT = 1 set. This mode has been tested in 4 and 5.
  4. Tested as a client using Ubuntu
  5. Tested as a client using webOS using HAVE_BUILTINSMBCLIENT
  6. The UWP implementation is untested (I can remove from the PR if required).. I need to spend more time in Windows..

All tests done using a local workgroup, not tested under active directory environment. My server was Ubuntu not Windows.

All code should be protected by HAVE_SMBCLIENT so it should compile cleanly without affecting anything else if disabled.

Portable considerations:

  1. In Makefile.common, I have set necessary CFLAGS for building smbclient.
    Normally to build libsmb2 you would run cmake in deps/libsmb2/build to generate: deps/libsmb2/build/config.h, but that doesn't suit the current build system for RetroArch well

  2. In the root of deps/libsmb2 there are makefiles targetting different platforms e.g. PS2 etc. I have not explored these as I am just targetting Linux.

Related Issues

#11773
#11518
#8653
#8173

Related Pull Requests

Reviewers

@cscd98 cscd98 force-pushed the libsmb2 branch 2 times, most recently from c66fb39 to fa1d4ab Compare November 26, 2025 21:03
@cscd98 cscd98 force-pushed the libsmb2 branch 2 times, most recently from 82c61dd to a7ae67c Compare November 27, 2025 12:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant