This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Mac version of LightCrafterGUI does not work - Fix

Hi everyone. I'm just posting what I did so that I could run the LightCrafterGUI on my Mac in the hopes that it might help someone else. Note: I have not yet tested if it interfaces with the LightCrafter yet, but it should have no difficulty, as we are simply changing the library paths. Also, to be safe, keep a backup of the original application, just in case things go awry. I am not responsible for any damage to your hardware, software, or person :)

When I unzip the LightCrafterGUI on my Mac, OS 10.6, it fails to launch with the following error:

Process:         LightCrafterGUI [1448]
Path:            /Users/jm/Desktop/DLPLightCrafter_FW_SW_v1.1_2012_08_24/LightCrafterGUI.app/Contents/MacOS/LightCrafterGUI
Identifier:      com.texasinstruments.LightCrafterGUI
Version:         ??? (???)
Code Type:       X86-64 (Native)
Parent Process:  launchd [213]

Exception Type:  EXC_BREAKPOINT (SIGTRAP)
Exception Codes: 0x0000000000000002, 0x0000000000000000
Crashed Thread:  0

Dyld Error Message:
  Library not loaded: /Volumes/Emergency/Applications/QtSDK/Desktop/Qt/4.8.1/gcc/lib/QtGui.framework/Versions/4/QtGui
  Referenced from: /Users/jm/Desktop/DLPLightCrafter_FW_SW_v1.1_2012_08_24/LightCrafterGUI.app/Contents/MacOS/LightCrafterGUI
  Reason: image not found

As you can see, it's looking for the Qt framework, which was not supplied with the program. If you wish to fix this, you need to download the Qt SDK, and install it on your machine. You then need to do the following, as the program is pointing to the incorrect path:

cd into where the LightCrafterGUI application is, then: cd LightCrafterGUI.app/Contents/MacOS/

If you execute the following: otool -L LightCrafterGUI, you will get a full listing of it's dependencies.

otool -L LightCrafterGUILightCrafterGUI:    /Volumes/Emergency/Applications/QtSDK/Desktop/Qt/4.8.1/gcc/lib/QtGui.framework/Versions/4/QtGui (compatibility version 4.8.0, current version 4.8.1)
    /Volumes/Emergency/Applications/QtSDK/Desktop/Qt/4.8.1/gcc/lib/QtCore.framework/Versions/4/QtCore (compatibility version 4.8.0, current version 4.8.1)
    /Volumes/Emergency/Applications/QtSDK/Desktop/Qt/4.8.1/gcc/lib/QtNetwork.framework/Versions/4/QtNetwork (compatibility version 4.8.0, current version 4.8.1)
    /usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current version 52.0.0)
    /usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current version 1094.0.0)
    /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 159.1.0)

To point the libraries to the correct location, you can do the following:

install_name_tool -change "/Volumes/Emergency/Applications/QtSDK/Desktop/Qt/4.8.1/gcc/lib/QtGui.framework/Versions/4/QtGui" "/Users/*user*/QtSDK/Desktop/Qt/4.8.1/gcc/lib/QtGui.framework/Versions/4/QtGui" LightCrafterGUI

install_name_tool -change "/Volumes/Emergency/Applications/QtSDK/Desktop/Qt/4.8.1/gcc/lib/QtCore.framework/Versions/4/QtCore" "/Users/*user*/QtSDK/Desktop/Qt/4.8.1/gcc/lib/QtCore.framework/Versions/4/QtCore" LightCrafterGUI

install_name_tool -change "/Volumes/Emergency/Applications/QtSDK/Desktop/Qt/4.8.1/gcc/lib/QtNetwork.framework/Versions/4/QtNetwork" "/Users/*user*/QtSDK/Desktop/Qt/4.8.1/gcc/lib/QtNetwork.framework/Versions/4/QtNetwork" LightCrafterGUI

Now, try launching the fixed application, and with all luck, it will start.