Author Topic: Howto install Avidemux 2.6 on OSX using Homebrew  (Read 210646 times)

Jan Gruuthuse

  • Hero Member
  • *****
  • Posts: 6053
Re: Howto build Avidemux on OSX 10.6, 10.7, or 10.8 using Homebrew
« Reply #75 on: May 19, 2013, 11:36:51 AM »
Having no apple experience/access, nothing much I can do/test on this issue.
Just did come across this:
- Applications directory
- Home directory
- Library directory
- Application Support directory
Table 1-1  Key directories for Mac apps
Hope you or developers find a solution.

mean

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 10974
Re: Howto build Avidemux on OSX 10.6, 10.7, or 10.8 using Homebrew
« Reply #76 on: May 19, 2013, 01:31:49 PM »
Why does it have reference to  /Applications/Avidemux2.6/Xxx?

When built from bootstrap it should only have reference to ~/avidemux2.6.app or similar

Shotokan81

  • Newbie
  • *
  • Posts: 38
Re: Howto build Avidemux on OSX 10.6, 10.7, or 10.8 using Homebrew
« Reply #77 on: May 19, 2013, 02:35:25 PM »
Hi

Just to make sure I am not making anyone lose time, the app works for me, I just tried to see if the compiled app could be used by another person. I made two tests:

Test 1:
Deleting everything and installing it to my applications folder from the dmg (which is why it references from the /Applications/Avidemux2.6.app/ folder). The app does not launch, and the following message is displayed, XXXXX being the name of the user who compiled the app in his ~ folder using the bash script.
Code: [Select]
dyld: Library not loaded: /Users/XXXXX/Avidemux2.6.app/Contents/Resources/lib/libADM6avutil.52.dylib
  Referenced from: /Applications/Avidemux2.6.app/Contents/Resources/bin/./../lib/libADM_coreVideoEncoder6.dylib
  Reason: image not found
Trace/BPT trap: 5

Test 2:
I create a new user (below testuser), and I move the app to it's ~ folder, and delete it from XXXXX home folder to make sure I simulate someone who would install avidemux using the compiled binary only. The app does not launch, and I have the below message, similar to the first message:
Code: [Select]
dyld: Library not loaded: /Users/XXXXX/Avidemux2.6.app/Contents/Resources/lib/libADM6avutil.52.dylib
  Referenced from: /Users/testuser/Avidemux2.6.app/Contents/Resources/bin/./../lib/libADM_coreVideoEncoder6.dylib
  Reason: image not found
Trace/BPT trap: 5

I hope it clarifies why the application is not called from the ~ folder of the user who compiled it.

I hope the tests make sense. If there is a way to make the dmg portable, I am happy to test.
« Last Edit: May 19, 2013, 02:46:41 PM by Shotokan81 »

mean

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 10974
Re: Howto build Avidemux on OSX 10.6, 10.7, or 10.8 using Homebrew
« Reply #78 on: May 19, 2013, 06:44:01 PM »
What is the output of
python XXXX/cmake/osx_libs.py

where XXX is the path to avidemux source

Shotokan81

  • Newbie
  • *
  • Posts: 38
Re: Howto build Avidemux on OSX 10.6, 10.7, or 10.8 using Homebrew
« Reply #79 on: May 20, 2013, 01:12:46 PM »
Here is the output:

Code: [Select]
Preparing independant bundle, home=/Users/XXXXX...
Copying Qt framework
QtCore
QtGui
QtOpenGl
QtScript
Copying Qt framework dependencies
Copy deps for QtCore (/opt/local/Library/Frameworks/QtCore.framework/Versions/4/QtCore)
/usr/bin/otool: can't open file: /opt/local/Library/Frameworks/QtCore.framework/Versions/4/QtCore (No such file or directory)
Copy deps for QtGui (/opt/local/Library/Frameworks/QtGui.framework/Versions/4/QtGui)
/usr/bin/otool: can't open file: /opt/local/Library/Frameworks/QtGui.framework/Versions/4/QtGui (No such file or directory)
Copy deps for QtOpenGl (/opt/local/Library/Frameworks/QtOpenGl.framework/Versions/4/QtOpenGl)
/usr/bin/otool: can't open file: /opt/local/Library/Frameworks/QtOpenGl.framework/Versions/4/QtOpenGl (No such file or directory)
Copy deps for QtScript (/opt/local/Library/Frameworks/QtScript.framework/Versions/4/QtScript)
/usr/bin/otool: can't open file: /opt/local/Library/Frameworks/QtScript.framework/Versions/4/QtScript (No such file or directory)
Copying system files
Adjusting dependencies
/usr/bin/install_name_tool: /usr/bin/install_name_tool: /usr/bin/install_name_tool: input file: /Users/XXXXX/Avidemux2.6.app/Contents/Resources/lib/ADM_plugins6/autoScripts/check24fps.py is not a Mach-O fileinput file: /Users/XXXXX/Avidemux2.6.app/Contents/Resources/lib/ADM_plugins6/autoScripts/PSP.py is not a Mach-O file

input file: /Users/XXXXX/Avidemux2.6.app/Contents/Resources/lib/ADM_plugins6/autoScripts/720p.py is not a Mach-O file
/usr/bin/install_name_tool: input file: /Users/XXXXX/Avidemux2.6.app/Contents/Resources/lib/ADM_plugins6/autoScripts/dvd.py is not a Mach-O file
/usr/bin/install_name_tool: input file: /Users/XXXXX/Avidemux2.6.app/Contents/Resources/lib/ADM_plugins6/autoScripts/vcd.py is not a Mach-O file
/usr/bin/install_name_tool: input file: /Users/XXXXX/Avidemux2.6.app/Contents/Resources/lib/ADM_plugins6/autoScripts/svcd.py is not a Mach-O file
/usr/bin/install_name_tool: input file: /Users/XXXXX/Avidemux2.6.app/Contents/Resources/lib/ADM_plugins6/autoScripts/lib/ADM_imageInfo.py is not a Mach-O file
/usr/bin/install_name_tool: input file: /Users/XXXXX/Avidemux2.6.app/Contents/Resources/lib/ADM_plugins6/autoScripts/lib/ADM_image.py is not a Mach-O file
/usr/bin/install_name_tool: input file: /Users/XXXXX/Avidemux2.6.app/Contents/Resources/lib/ADM_plugins6/autoScripts/720p.py is not a Mach-O file
/usr/bin/install_name_tool: input file: /Users/XXXXX/Avidemux2.6.app/Contents/Resources/lib/ADM_plugins6/autoScripts/check24fps.py is not a Mach-O file
/usr/bin/install_name_tool: input file: /Users/XXXXX/Avidemux2.6.app/Contents/Resources/lib/ADM_plugins6/autoScripts/dvd.py is not a Mach-O file
/usr/bin/install_name_tool: input file: /Users/XXXXX/Avidemux2.6.app/Contents/Resources/lib/ADM_plugins6/autoScripts/PSP.py is not a Mach-O file
/usr/bin/install_name_tool: input file: /Users/XXXXX/Avidemux2.6.app/Contents/Resources/lib/ADM_plugins6/autoScripts/svcd.py is not a Mach-O file
/usr/bin/install_name_tool: input file: /Users/XXXXX/Avidemux2.6.app/Contents/Resources/lib/ADM_plugins6/autoScripts/vcd.py is not a Mach-O file
/usr/bin/install_name_tool: input file: /Users/XXXXX/Avidemux2.6.app/Contents/Resources/lib/ADM_plugins6/autoScripts/lib/ADM_image.py is not a Mach-O file
/usr/bin/install_name_tool: input file: /Users/XXXXX/Avidemux2.6.app/Contents/Resources/lib/ADM_plugins6/autoScripts/lib/ADM_imageInfo.py is not a Mach-O file

mean

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 10974
Re: Howto build Avidemux on OSX 10.6, 10.7, or 10.8 using Homebrew
« Reply #80 on: May 20, 2013, 01:22:58 PM »
Qt is not installed in /opt/local/Library/Framework
The script needs to be modified with the correct path
(cmake/osx_libs.py)

Shotokan81

  • Newbie
  • *
  • Posts: 38
Re: Howto build Avidemux on OSX 10.6, 10.7, or 10.8 using Homebrew
« Reply #81 on: May 20, 2013, 03:25:27 PM »
Sorry I am confused.
Does the fact that Avidemux runs implies that Qt is installed?
If so, how do I find where it is installed?
For instance, I cannot find the QtCore.framework folder anywhere.

When I find the path, should I only update the two rows below:
Code: [Select]
absPath='/opt/local/Library/Frameworks/'+modul+'.framework/Versions/4/'+modul
src='/opt/local/Library/Frameworks/'+q+'.framework'
These are the only two results when I CTRL+F "/opt/local/Library/Frameworks/"

mean

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 10974
Re: Howto build Avidemux on OSX 10.6, 10.7, or 10.8 using Homebrew
« Reply #82 on: May 20, 2013, 08:54:41 PM »
yes, it is installed, but apparently not where the osx_lib.py script expects it to be
otool -L bin/avidemux
 will tell you, maybe in /Applications
Yes, just updating these 2 lines should make it standalone, unless there is another issue


Shotokan81

  • Newbie
  • *
  • Posts: 38
Re: Howto build Avidemux on OSX 10.6, 10.7, or 10.8 using Homebrew
« Reply #83 on: May 21, 2013, 12:52:08 PM »
Hi

Indeed you are right.
It was in OSX hidden folders.

I have made the changes in the script file and run it again, below is the output.

What is the next step?
Regards

Code: [Select]
Preparing independant bundle, home=/Users/XXXXX...
Copying Qt framework
QtCore
QtGui
QtOpenGl
QtScript
Copying Qt framework dependencies
Copy deps for QtCore (/usr/local/lib/QtCore.framework/Versions/4/QtCore)
Copy deps for QtGui (/usr/local/lib/QtGui.framework/Versions/4/QtGui)
Copy deps for QtOpenGl (/usr/local/lib/QtOpenGl.framework/Versions/4/QtOpenGl)
Copy deps for QtScript (/usr/local/lib/QtScript.framework/Versions/4/QtScript)
Copying system files
Adjusting dependencies
/usr/bin/install_name_tool: input file: /Users/XXXXX/Avidemux2.6.app/Contents/Resources/lib/ADM_plugins6/autoScripts/720p.py is not a Mach-O file
/usr/bin/install_name_tool: input file: /Users/XXXXX/Avidemux2.6.app/Contents/Resources/lib/ADM_plugins6/autoScripts/check24fps.py is not a Mach-O file
/usr/bin/install_name_tool: input file: /Users/XXXXX/Avidemux2.6.app/Contents/Resources/lib/ADM_plugins6/autoScripts/dvd.py is not a Mach-O file
/usr/bin/install_name_tool: input file: /Users/XXXXX/Avidemux2.6.app/Contents/Resources/lib/ADM_plugins6/autoScripts/PSP.py is not a Mach-O file
/usr/bin/install_name_tool: input file: /Users/XXXXX/Avidemux2.6.app/Contents/Resources/lib/ADM_plugins6/autoScripts/svcd.py is not a Mach-O file
/usr/bin/install_name_tool: input file: /Users/XXXXX/Avidemux2.6.app/Contents/Resources/lib/ADM_plugins6/autoScripts/vcd.py is not a Mach-O file
/usr/bin/install_name_tool: input file: /Users/XXXXX/Avidemux2.6.app/Contents/Resources/lib/ADM_plugins6/autoScripts/lib/ADM_image.py is not a Mach-O file
/usr/bin/install_name_tool: input file: /Users/XXXXX/Avidemux2.6.app/Contents/Resources/lib/ADM_plugins6/autoScripts/lib/ADM_imageInfo.py is not a Mach-O file
/usr/bin/install_name_tool: input file: /Users/XXXXX/Avidemux2.6.app/Contents/Resources/lib/ADM_plugins6/autoScripts/720p.py is not a Mach-O file
/usr/bin/install_name_tool: input file: /Users/XXXXX/Avidemux2.6.app/Contents/Resources/lib/ADM_plugins6/autoScripts/check24fps.py is not a Mach-O file
/usr/bin/install_name_tool: input file: /Users/XXXXX/Avidemux2.6.app/Contents/Resources/lib/ADM_plugins6/autoScripts/dvd.py is not a Mach-O file
/usr/bin/install_name_tool: input file: /Users/XXXXX/Avidemux2.6.app/Contents/Resources/lib/ADM_plugins6/autoScripts/PSP.py is not a Mach-O file
/usr/bin/install_name_tool: input file: /Users/XXXXX/Avidemux2.6.app/Contents/Resources/lib/ADM_plugins6/autoScripts/svcd.py is not a Mach-O file
/usr/bin/install_name_tool: input file: /Users/XXXXX/Avidemux2.6.app/Contents/Resources/lib/ADM_plugins6/autoScripts/vcd.py is not a Mach-O file
/usr/bin/install_name_tool: input file: /Users/XXXXX/Avidemux2.6.app/Contents/Resources/lib/ADM_plugins6/autoScripts/lib/ADM_image.py is not a Mach-O file
/usr/bin/install_name_tool: input file: /Users/XXXXX/Avidemux2.6.app/Contents/Resources/lib/ADM_plugins6/autoScripts/lib/ADM_imageInfo.py is not a Mach-O file

mean

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 10974
Re: Howto build Avidemux on OSX 10.6, 10.7, or 10.8 using Homebrew
« Reply #84 on: May 21, 2013, 12:58:45 PM »
It still does not work when you copy the dmg somewhere else ?

Shotokan81

  • Newbie
  • *
  • Posts: 38
Re: Howto build Avidemux on OSX 10.6, 10.7, or 10.8 using Homebrew
« Reply #85 on: May 21, 2013, 01:06:50 PM »
Sure, will test and report.
Will use the dmg in the source folder.
However it has not been modified today according to the tag in Finder.

Shotokan81

  • Newbie
  • *
  • Posts: 38
Re: Howto build Avidemux on OSX 10.6, 10.7, or 10.8 using Homebrew
« Reply #86 on: May 21, 2013, 03:09:13 PM »
YES! It seems to work.

It took me some time to figure out, but this is not the dmg file that has been updated by the python script, but the files under the Avidemux2.6.app folder in ~.

The dmg is unchanged and as expected it gives the same error message as before, recompiling does not help.
However, the .app file is now portable to another folder and user after my tests.

What I would be interested to know is the following:
 - Would the application launch on someone computer if the Qt framework is not installed at all (which should be the case of 99% of average user am I correct?). Is it a requisite for compiling or running the app?
 - Can I make a new dmg out of the app (I guess the answer is in google, just not familiar with it)
 - I can see the below messages of things that do not seem to launch. is it normal/fine or some work remains to be done?

Code: [Select]
Unable to load [copyADM]: dlopen(copyADM, 6): image not found
[ADM_vd6_plugin] Cannot parse plugin
[ADM_ad_plugin] Cannot parse plugin
[ADM_vf_plugin] Cannot parse plugin
Device not found :ALSA
[UI_RunApp]  OpenGL not activated, not initialized
[ADM_ae_plugin] Cannot parse plugin

Regards


mean

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 10974
Re: Howto build Avidemux on OSX 10.6, 10.7, or 10.8 using Homebrew
« Reply #87 on: May 21, 2013, 04:05:47 PM »
if you run the boostrapOsx again you should end up with a working dmg
The script takes care of copying the needed Qt files inside the dmg/app

Regarding the error, no necessarily a problem

Shotokan81

  • Newbie
  • *
  • Posts: 38
Re: Howto build Avidemux on OSX 10.6, 10.7, or 10.8 using Homebrew
« Reply #88 on: May 22, 2013, 02:14:00 PM »
Hi,

According to my tests it worked:
 - The app got 17MB larger as the Frameworks subfolders contain some Qt related files. I trust this corresponds to what you said: "The script takes care of copying the needed Qt files inside the dmg/app".
 - The app launches from any folder via the terminal.
 - Any user can install and launch the app by drag and drop from the dmg into the Applications folder.

This is as much as I can do/test.

Regards

mean

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 10974
Re: Howto build Avidemux on OSX 10.6, 10.7, or 10.8 using Homebrew
« Reply #89 on: May 22, 2013, 02:24:32 PM »
The only things remaining is to have somebody else to test it on another mac