News:

--

Main Menu

Howto install Avidemux 2.6 on OSX using Homebrew

Started by nibbles, November 05, 2011, 02:57:12 AM

Previous topic - Next topic

Jan Gruuthuse

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

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

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.
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:
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.

mean

What is the output of
python XXXX/cmake/osx_libs.py

where XXX is the path to avidemux source

Shotokan81

Here is the output:

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

Qt is not installed in /opt/local/Library/Framework
The script needs to be modified with the correct path
(cmake/osx_libs.py)

Shotokan81

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:
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

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

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

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

It still does not work when you copy the dmg somewhere else ?

Shotokan81

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

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?

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

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

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

The only things remaining is to have somebody else to test it on another mac