refactor(libSceShare): build libSceShare.native from the libSceShare sources #1538

Closed
Deses wants to merge 2 commits from upstream-pr/1538 into main
Deses commented 2026-10-08 11:41:43 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by Deses on 2026-10-08T11:41:43Z.


What

Depends on #1544. Until it is merged, this branch carries its commit (cherry-picked, authorship kept); the change of this PR is the last commit, refactor(libSceShare): build libSceShare.native from the libSceShare sources.

libSceShare.native was a copy of libSceShare's Export.cpp built through the fallback in core/libs/CMakeLists.txt. #1544 brings the copy in line with libSceShare by duplicating the function bodies. This PR removes the copy and builds libSceShare.native from libSceShare's sources instead:

  • libSceShare/ShareLibrary.cmake adds add_sce_share_library(target), the pattern of libSceFont/FontLibrary.cmake and libSceAudiodec/AudiodecLibrary.cmake. libSceShare and libSceShare.native both use it.
  • libSceShare.native/Export.cpp is deleted. libSceShare.native now also exports the calls only libSceShare had (sceShareCaptureScreenshotExtended, sceShareCaptureVideoClipExtended, sceShareGetRunningStatus, sceShareSetContentParamForApplicationTitle); none of its previous exports is lost.
  • guest_share_native runs GuestShare.cpp against libSceShare.native.
  • The sceShareGetCurrentStatus entry in TechnicalDebt no longer links the deleted file.

No behaviour changes beyond #1544.

Tested

Windows 11, GCC 15.2.0 (WinLibs), Release, this branch on current upstream/main: full build and libs target, ctest -R guest_share (guest_share and guest_share_native) pass. check_conventions.py and check_test_registration.py clean. No title tested.

CI: the upstream runs for this head are waiting for approval (#1631). The same Build workflow ran on the fork for head 1692363e: https://github.com/Deses/AnyPS5/actions/runs/37804517771, Linux and Windows (full build, libs, ctest) and the relinker jobs (Linux, Windows, macOS) green.

Checklist

  • Based on current main; no other open PR implements the same functions
  • One topic per PR; follow-ups go in a new PR
  • No comments in code except technical debt
  • Unimplemented paths throw (NotImplemented_nid_no_patch); silent stubs are listed in TechnicalDebt
  • No notes, investigation .md files or images added to the repository (attach them to this PR)
  • New third-party code is a submodule built from source
  • Generic behaviour, not specific to one title
  • Depends on: #1544
  • AI-assisted: yes
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:4786211441 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/1538). Originally posted by [Deses](https://github.com/Deses) on 2026-10-08T11:41:43Z. --- ### What Depends on #1544. Until it is merged, this branch carries its commit (cherry-picked, authorship kept); the change of this PR is the last commit, `refactor(libSceShare): build libSceShare.native from the libSceShare sources`. libSceShare.native was a copy of libSceShare's `Export.cpp` built through the fallback in `core/libs/CMakeLists.txt`. #1544 brings the copy in line with libSceShare by duplicating the function bodies. This PR removes the copy and builds libSceShare.native from libSceShare's sources instead: - `libSceShare/ShareLibrary.cmake` adds `add_sce_share_library(target)`, the pattern of `libSceFont/FontLibrary.cmake` and `libSceAudiodec/AudiodecLibrary.cmake`. libSceShare and libSceShare.native both use it. - `libSceShare.native/Export.cpp` is deleted. libSceShare.native now also exports the calls only libSceShare had (`sceShareCaptureScreenshotExtended`, `sceShareCaptureVideoClipExtended`, `sceShareGetRunningStatus`, `sceShareSetContentParamForApplicationTitle`); none of its previous exports is lost. - `guest_share_native` runs `GuestShare.cpp` against libSceShare.native. - The `sceShareGetCurrentStatus` entry in TechnicalDebt no longer links the deleted file. No behaviour changes beyond #1544. ### Tested Windows 11, GCC 15.2.0 (WinLibs), Release, this branch on current upstream/main: full build and `libs` target, `ctest -R guest_share` (`guest_share` and `guest_share_native`) pass. `check_conventions.py` and `check_test_registration.py` clean. No title tested. CI: the upstream runs for this head are waiting for approval (#1631). The same Build workflow ran on the fork for head `1692363e`: https://github.com/Deses/AnyPS5/actions/runs/37804517771, Linux and Windows (full build, `libs`, ctest) and the relinker jobs (Linux, Windows, macOS) green. ### Checklist - [x] Based on current `main`; no other open PR implements the same functions - [x] One topic per PR; follow-ups go in a new PR - [x] No comments in code except [technical debt](https://github.com/boykopovar/AnyPS5/blob/main/docs/dev/CONVENTIONS.md) - [x] Unimplemented paths throw (`NotImplemented_nid_no_patch`); silent stubs are listed in [TechnicalDebt](https://github.com/boykopovar/AnyPS5/blob/main/docs/dev/TechnicalDebt.md#silent-stubs) - [x] No notes, investigation `.md` files or images added to the repository (attach them to this PR) - [x] New third-party code is a submodule built from source - [x] Generic behaviour, not specific to one title - [x] Depends on: #1544 - [x] AI-assisted: yes
Deses commented 2026-10-08 14:08:53 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by Deses on 2026-10-08T14:08:53Z.


Both overlaps come from the cherry-picked #1544 commit (3ecd68d9), not from this PR's own change: #1544 edits the "Share, NpTrophy2, ..." line next to #1468's edit (L158-159) and adds the sceShareCaptureVideoClipExtended, sceShareSetContentParamForApplicationTitle entry where #1584 inserts its own (L225-226); #1544 carries the same #1584 overlap.

This PR's commit (734a63fd) only changes the sceShareGetCurrentStatus line in TechnicalDebt.md, outside both ranges. Neither #1468 nor #1584 is a dependency. Once #1544 is merged this branch is rebased and the overlaps go with its commit.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6061697038 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/1538#issuecomment-6061697038). Originally posted by [Deses](https://github.com/Deses) on 2026-10-08T14:08:53Z. --- Both overlaps come from the cherry-picked #1544 commit (3ecd68d9), not from this PR's own change: #1544 edits the "Share, NpTrophy2, ..." line next to #1468's edit (L158-159) and adds the `sceShareCaptureVideoClipExtended, sceShareSetContentParamForApplicationTitle` entry where #1584 inserts its own (L225-226); #1544 carries the same #1584 overlap. This PR's commit (734a63fd) only changes the `sceShareGetCurrentStatus` line in TechnicalDebt.md, outside both ranges. Neither #1468 nor #1584 is a dependency. Once #1544 is merged this branch is rebased and the overlaps go with its commit.

Pull request closed

Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
boykopovar/AnyPS5!1538
No description provided.