• Increase font size
  • Default font size
  • Decrease font size

wxMac sample codeblock project app bundle

When developing application for MAC platform, you have to create application bundle.

Using wxWidgets under MAC (wxMac) involves some specific topics. You can find many of them described here. My sample code block package creates MAC application bundle when building project. You can download it here, or you can follow this steps to incorporate app bundle creation into your code block project. Follow this steps:

1. Copy sample.app bundle into your 'root' directory of the project. You may change the name of the bundle (e.g. mySample.app or whatever else), but you have to do it NOW.

2. Open package (click the right button of the mouse and choose 'Show Package Contents') and navigate into directory 'Contents'.

3. With text editor open file called 'PkgInfo'. It should containt string 'APPL????'. Do not change it and close the file.

4. Open file Info.plist (by pure text editor or by application called 'Property List Editor') and change values as you need. Probably you will have to change Icon file, Bundle name, Bundle version, Copyright, ... . Save and close the file.

5. Place your icon file into 'Resource' directory. It have to be in '.icns' format. Now you can use 512x512 icons. To create icon as you wish follow this article: How to Make Mac Icons and use this programm: img2icns.

6. Open directory 'MacOS'. Here compilator will place your application and a file 'libfmodex.dylib' have to be here.

7. Open directory 'data'. Here you can place any external files you need to compile your application - pdfs, images, ... . Your application has to use this files from inside of the application bundle (sample.app). For example, look at row number 71 in wxMac_codeblock_sampleMain.cpp file. Object 'StaticBitmap1' is using picture 100x200.png in directory 'sample.app/Contents/data/'

8. In Code Block go to Project -> Build options, choose Debug, Release or 'both' focus (left menu) and tab 'Pre/post build steps'.

9. Into input for Post-build steps fill following commands:

install_name_tool -change ./libfmodex.dylib @executable_path/libfmodex.dylib $(TARGET_OUTPUT_FILE)
cp -f $(TARGET_OUTPUT_FILE) "sample.app/Contents/MacOS/sample"

It changes internal setting of your application to use 'libfmodex.dylib' library from the same directory as the application is and copies application into sample.app bundle.

10. Check 'Always execute, even if taget is up-to-date.

11. And that's it. Now just recompile your project and you can run your application from inside the Code Block or by double click on the application bundle.

You download sample wxMac CodeBlock application bundle project here.

 

Comments  

 
0 #6 healthraport.sk 2015-09-15 18:06
V tejto otázke mi autor vlastne otvoril oči,
musím si nanovo premyslieť tému
Quote
 
 
0 #5 www.vitall.sk 2015-07-17 12:04
Téma je dobre napísaná, hoci s niektorými vecami nesúhlasím úplne.
Quote
 
 
0 #4 healthraport.sk 2015-07-16 16:28
Treba písať viac, lebo sa to dobre číta a to je najdôležitejšie , lebo
kto už má rád maslové maslo... hádam nikto. Pozdravujem
Quote
 
 
0 #3 http://www.vitall. 2015-07-16 13:45
Čo si budeme hovoriť, text je dobre napísaný a čo je dôležité, k veci a konkrétne.
Quote
 
 
0 #2 We-Vibe 4 Plus soria 2015-06-25 10:32
Hi there! Quick question that's totally off topic. Do you know how to make your site mobile friendly?
My web site looks weird when browsing from my iphone.
I'm trying to find a template or plugin that might be able to resolve
this problem. If you have any suggestions, please share.
Appreciate it!

Look at my web-site We-Vibe 4 Plus soria: http://lolatoys.com/es/we-vibe-4-plus.html
Quote
 
 
0 #1 buy here 2014-11-13 21:42
Greetings from Los angeles! I'm bored to death at work so I decided
to browse your website on my iphone during lunch break.
I really like the information you provide here and can't wait to
take a look when I get home. I'm shocked at how fast your blog loaded
on my cell phone .. I'm not even using WIFI, just 3G ..
Anyhow, great blog!

My homepage: buy here: http://gadgetsjr.com/china-brand-watches
Quote
 

Add comment

No bad words.


Security code
Refresh


New articles

Differential Equations - Simple spring model Machine Learning and Robotics
Read More 1696 Hits
Kalman Filter implementation Machine Learning and Robotics
Read More 2476 Hits
Inverse kinematics Machine Learning and Robotics
Read More 3026 Hits
gpsim tutorial Machine Learning and Robotics
Read More 6092 Hits

New articles

Differential Equations - Simple spring model Machine Learning and Robotics
Read More 1696 Hits
Kalman Filter implementation Machine Learning and Robotics
Read More 2476 Hits
Inverse kinematics Machine Learning and Robotics
Read More 3026 Hits
gpsim tutorial Machine Learning and Robotics
Read More 6092 Hits
Design by i-cons.ch / etosha-namibia.ch