1

I have a project written in c++ using codelite IDE. I compiled it windows, Ubuntu and Fedora successfully an I created installers for all of them (for Ubuntu a .deb package and for Fedora a .rpm package).

Recently, I could compile it in my macOS (10.14) an it works perfectly, and want to create a package in macOS (.app or .pkg). It should be noted that my software has a lot of dependencies such as OpenGL frameworks and wxWidgets libraries and many libraries which I installed through brew and Xcode.

As mentioned my project is in codelite which does not generate a framework or .app package. What should I do in this step?

Cœur
  • 37,241
  • 25
  • 195
  • 267

1 Answers1

0

Creating a .app bundle on the Mac is a relatively complex process - amongst other things, it has to be signed and notarised, and to do that you need to enroll in Apple's developer program ($99 per year).

So, because of that, I'd recommend creating an Xcode project to to the job. Once you have that, all the steps are automated. You will also be in a position to submit your app to the App Store, should you wish to.


A good way to build installer packages is to use Stephan Sudré's Packages application, which you can get here:

http://s.sudre.free.fr/Software/Packages/about.html

Don't worry that it isn't signed - it's perfectly safe.

Paul Sanders
  • 24,133
  • 4
  • 26
  • 48
  • I installed Packages application. I added the OpenGL and GLUT fameworks to its payload, but I do not know how to add the other libraries which I installed by brew. All of my paths are: /usr/local/bin /usr/local/opt/llvm/lib /opt/local/lib /usr/local/opt/lapack/lib – Mohammad Nakhaee Nov 16 '19 at 21:44
  • You mean you don't know where they are? Perhaps the search box in the Finder can locate them. I assume they are `.dylib`s rather than `.a` files. If they are `.a` files you don't need to bother - the link will already have pulled them into your app. – Paul Sanders Nov 17 '19 at 00:22
  • I meant that which local folder in payload they should be located that I could resolve this problem using "otool -L" and "install_name_tool" commands. Now I have another problem. "otool -L" shows me that my application is linked to "IOKit.framework, Carbon.framework, Cocoa.framework, AudioToolbox.framework, OpenGL.framework, GLUT.framework and CoreFoundation.framework". Do you know which ones are in a raw macOS and which ones are installed by XCode? I think I should put only some of them in the contents of .app bundle? – Mohammad Nakhaee Nov 17 '19 at 11:43
  • From memory, all except GLUT.framework are part of macOS, but you can check by looking in System/Library/Frameworks. – Paul Sanders Nov 17 '19 at 15:00