Mac package building

eilenthil

New Member
Hi everyone, I am currently messing around with obs-studio trying to create a new output form instead of rtmp, and its so far been going ok. I have managed to compile link and on the development computer run the project. However i have noticed that when i try to create a .DMG install file alot of the needed dependencies are not copied into that file.
Under windows there is the -DCOPY_DEPENDENCIES command line argument which forces a copy of these binaries to the .MSI generated file, however after breaking my head for 2-3 days I have failed to generate in such a manner a .DMG file which does include the ffmpeg/QT libs.

I have noticed that in the offical OBS release for mac these libs are indeed present in the DMG file, I was woundering if anyone can give me a clue about what am I doing wrong.

Thanks in advanced
Roy Jacober
 

alsc

New Member
Hi, did you make any progress on this? I am in the same situation, I have no idea how to copy the dependencies (I have also used some extra QT library)

Could you also tell how you create the MSI with Windows/Visual Studio? Thanks!
 

parket

New Member
[SOLVED]

According to JIM's answer:

[13:14] <Jim-> if you want to create an app package, you have to use the python script. I'll link it
[13:14] <Jim-> https://github.com/kc5nra/obs-studio-utils/blob/master/install/osx/build_app.py
[13:14] <Jim-> says python 3 but might require python 2
[13:15] <Jim-> you create a release build, then do: build_app.py rundir/Release
[13:15] <Jim-> then it builds a functioning .app package

Hot to create dmg:

1) python build_app.py -d rundir/RelWithDebInfo/ -n 1 (this will produce OBS.app dir with all deps in)
2) hdiutil create package.dmg -volname "OBS-Studio" -srcfolder OBS.app/ (this will produce package.dmg with OBS.app in)
 

pengxu

New Member
[SOLVED]

According to JIM's answer:

[13:14] <Jim-> if you want to create an app package, you have to use the python script. I'll link it
[13:14] <Jim-> https://github.com/kc5nra/obs-studio-utils/blob/master/install/osx/build_app.py
[13:14] <Jim-> says python 3 but might require python 2
[13:15] <Jim-> you create a release build, then do: build_app.py rundir/Release
[13:15] <Jim-> then it builds a functioning .app package

Hot to create dmg:

1) python build_app.py -d rundir/RelWithDebInfo/ -n 1 (this will produce OBS.app dir with all deps in)
2) hdiutil create package.dmg -volname "OBS-Studio" -srcfolder OBS.app/ (this will produce package.dmg with OBS.app in)
I tried this script but the ouput app crashes when launch
···
Process: obs [26454]
Path: /Users/USER/Documents/*/OBS.app/Contents/MacOS/OBS
Identifier: com.obsproject.obs-studio
Version: ???
Code Type: X86-64 (Native)
Parent Process: ??? [1]
Responsible: obs [26454]
User ID: 501

Date/Time: 2020-03-20 19:42:41.175 +0800
OS Version: Mac OS X 10.14.6 (18G103)
Report Version: 12
Anonymous UUID: 53CD4B71-824B-0C38-E8EA-E33078D0C034

Sleep/Wake UUID: 7BCB77C8-030C-40C4-830C-C774FF1EA396

Time Awake Since Boot: 14000 seconds
Time Since Wake: 3400 seconds

System Integrity Protection: enabled

Crashed Thread: 0 Dispatch queue: com.apple.main-thread

Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: KERN_INVALID_ADDRESS at 0x0000000000000010
Exception Note: EXC_CORPSE_NOTIFY

Termination Signal: Segmentation fault: 11
Termination Reason: Namespace SIGNAL, Code 0xb
Terminating Process: exc handler [26454]

VM Regions Near 0x10:
-->
Kernel Alloc Once 00000000054a6000-00000000054a8000 [ 8K] rw-/rwx SM=PRV

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0 com.apple.CoreFoundation 0x00007fff3cdafe52 CFBundleCopyBundleURL + 9
1 QtCore 0x00000001080c25a3 QLibraryInfo::location(QLibraryInfo::LibraryLocation) + 2275
2 QtCore 0x00000001080c21e1 QLibraryInfo::location(QLibraryInfo::LibraryLocation) + 1313
3 QtCore 0x000000010829e035 QCoreApplication::libraryPathsLocked() + 1461
4 QtCore 0x000000010829e9f1 QCoreApplication::addLibraryPath(QString const&) + 193
5 obs 0x00000001054b8604 main + 3316 (qstring.h:1263)
6 libdyld.dylib 0x00007fff68cee3d5 start + 1
···
 

C0demnky

New Member
@pengxu go into your generated OBS.app/Contents/Resources folder and delete the bin, data, and obs-plugins folder and replace them with the files in rundir/RelWithDebInfo (or Release, wherever you built it). Should clear up the segmentation fault.
 

Rafferty2000

New Member
Hi All, I am trying to use the scripts in the "CI" folder to build OBS on the Mac. Where should these scripts be run from? I presume the folder that contains CI. So run CI/Install-dependencies-osx.sh , CI/before-script-osx.sh, and CI/before-deploy-osx.sh. I presume they should be run from this folder, because then their path to the project CMakeLists.txt works ok.

Where should I put CEF and Sparkle folders. When I run CI/before-script-osx.sh it can't find SPARKLE.

Many thanks for any help :)
 
Top