Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI: Rewrite for OBS 28 and build on Github Actions #27

Closed
wants to merge 24 commits into from
Closed

Conversation

norihiro
Copy link
Owner

@norihiro norihiro commented Aug 11, 2022

Known issues

  • libpng for macOS arm64 is not detected. The libpng is only necessary for libvncserver. Libvncclient does not require libpng.
  • Build flow of libpng for Windows does not produce library. Log said Found PNG: D:\a\obs-vnc\obs-vnc\libvncserver/deps/libpng/RelWithDebInfo/libpng16_static.lib (found version "1.6.37").
  • The commit is reviewed by yourself.
  • The code is tested.
    • macOS on (x86_64) is tested.
  • Document is up to date or not necessary to be changed.
  • The commit is compatible with repository's license.

@norihiro norihiro changed the title CI: Rewrite for both OBS 27 and 28 CI: Rewrite for OBS 28 and build on Github Actions Aug 11, 2022
@norihiro norihiro force-pushed the obs-28 branch 17 times, most recently from da8a10e to 37ba215 Compare August 12, 2022 02:12
@norihiro
Copy link
Owner Author

These selections are listed on macOS, x86_64. It looks same as that on Linux.
Screenshot_2022-08-12_23-14-09

@norihiro
Copy link
Owner Author

norihiro commented Oct 27, 2022

The build flow is similar to norihiro/obs-text-pthread and it was not ok for macOS on Apple Silicon. Maybe this script won't work.
It will be more promising to build lzo, libpng, jpeg-turbo in universal architecture.

@NorseGaud
Copy link

The arm64 issue here is weird. Any way to rewrite the CI to run from a bash wrapper script instead of being so dependent on github actions? That way I can run it locally if need be? More than happy to donate to finalize this support for arm64 OBS.

@norihiro
Copy link
Owner Author

norihiro commented May 21, 2023

Any way to rewrite the CI to run from a bash wrapper script instead of being so dependent on github actions?

Actually I have rewritten some code so that it's less dependent on GitHub Actions than obs-plugintemplate.

Maybe, using env in the workflow file would be a little easier to run the flow in the local machine. In this way, export need to be written manually but rest can be run by just copy and paste from the workflow file. Below is an example code from my another repo.
https://github.com/norihiro/obs-studio-cirun/blob/322d26000bdc918e8fb414e5e90ebd478c759ab6/.github/workflows/cirun.yml#L210-L223

.github/workflows/main.yml is the main workflow to build this plugin. In the workflow for macOS, if you build on your local machine,

  • Setup Environment is unnecessary.
  • Install Apple Developer Certificate is unnecessary.
  • Set Signing Identity is unnecessary.
  • Download obs-studio development environment This is a common step among my all other OBS plugins and doing these things.
  • Install libvncserver
    • This step just runs ci/macos/install-libvncserver-arm64.sh

I tried to hack brew to download ARM64 prebuilt binaries including libvncserver on x86_64 machine because GitHub Actions only provides x86_64.
However, homebrew does not support such usage, they just provide for a local machine usage.
What I should do ideally is not relying on homebrew but build these libraries by myself in the script so that I can provide both x86_64 and arm64 architecture. There is a way to combine two or more different architecture libraries into one file. The best thing would be making just one universal package so that users won't confuse which file to be download.

Currently I tried to support OBS >= 27.2 but I'm thinking it would be ok to drop OBS 27 and just support OBS 28 and later because I originally thinking to support only recent 2 major versions. This would make the build flow simpler than current PR.

@norihiro
Copy link
Owner Author

@NorseGaud The sponsor is also welcome.
Something I'm thinking of is using a build scheme like https://github.com/obsproject/obs-deps/
They build some libraries for both x86_64 and arm64 then merge it.
I recently found a useful tool https://github.com/mxschmitt/action-tmate which would be helpful for me to debug the build flow.
I was originally started to transfer remote macOS screen to OBS running on Linux. However, a few years ago, after replacing the mac, an issue raised that a VNC session viewing macOS screen causes that macOS to be locked and the user on the mac cannot unlock it. That mac is owned by someone else so I didn't have enough time to debug the issue. Later, I started to use obs-ndi instead of obs-vnc. So, the sponsor would be helpful for me to motivate to maintain this plugin.

@norihiro
Copy link
Owner Author

Now succeeded to build gnutls using dependency libraries from the bottle.
Next, I will make the universal library using lipo, adjust rpath, and build libvncserver.

@norihiro
Copy link
Owner Author

norihiro commented Jan 9, 2024

This PR is superseded by another PR #32.

@norihiro norihiro closed this Jan 9, 2024
@norihiro norihiro deleted the obs-28 branch January 9, 2024 11:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants