Deprecated: Creation of dynamic property AIO_WP_Security_Simba_Two_Factor_Authentication_Plugin::$version is deprecated in /home/nickhardeman/nickhardeman.com/blog/wp-content/plugins/all-in-one-wp-security-and-firewall/classes/wp-security-two-factor-login.php on line 32

Deprecated: Creation of dynamic property wpdbBackup::$backup_dir is deprecated in /home/nickhardeman/nickhardeman.com/blog/wp-content/plugins/wp-db-backup/wp-db-backup.php on line 128

Warning: Cannot modify header information - headers already sent by (output started at /home/nickhardeman/nickhardeman.com/blog/wp-content/plugins/all-in-one-wp-security-and-firewall/classes/wp-security-two-factor-login.php:32) in /home/nickhardeman/nickhardeman.com/blog/wp-includes/rest-api/class-wp-rest-server.php on line 1758

Warning: Cannot modify header information - headers already sent by (output started at /home/nickhardeman/nickhardeman.com/blog/wp-content/plugins/all-in-one-wp-security-and-firewall/classes/wp-security-two-factor-login.php:32) in /home/nickhardeman/nickhardeman.com/blog/wp-includes/rest-api/class-wp-rest-server.php on line 1758

Warning: Cannot modify header information - headers already sent by (output started at /home/nickhardeman/nickhardeman.com/blog/wp-content/plugins/all-in-one-wp-security-and-firewall/classes/wp-security-two-factor-login.php:32) in /home/nickhardeman/nickhardeman.com/blog/wp-includes/rest-api/class-wp-rest-server.php on line 1758

Warning: Cannot modify header information - headers already sent by (output started at /home/nickhardeman/nickhardeman.com/blog/wp-content/plugins/all-in-one-wp-security-and-firewall/classes/wp-security-two-factor-login.php:32) in /home/nickhardeman/nickhardeman.com/blog/wp-includes/rest-api/class-wp-rest-server.php on line 1758

Warning: Cannot modify header information - headers already sent by (output started at /home/nickhardeman/nickhardeman.com/blog/wp-content/plugins/all-in-one-wp-security-and-firewall/classes/wp-security-two-factor-login.php:32) in /home/nickhardeman/nickhardeman.com/blog/wp-includes/rest-api/class-wp-rest-server.php on line 1758

Warning: Cannot modify header information - headers already sent by (output started at /home/nickhardeman/nickhardeman.com/blog/wp-content/plugins/all-in-one-wp-security-and-firewall/classes/wp-security-two-factor-login.php:32) in /home/nickhardeman/nickhardeman.com/blog/wp-includes/rest-api/class-wp-rest-server.php on line 1758

Warning: Cannot modify header information - headers already sent by (output started at /home/nickhardeman/nickhardeman.com/blog/wp-content/plugins/all-in-one-wp-security-and-firewall/classes/wp-security-two-factor-login.php:32) in /home/nickhardeman/nickhardeman.com/blog/wp-includes/rest-api/class-wp-rest-server.php on line 1758

Warning: Cannot modify header information - headers already sent by (output started at /home/nickhardeman/nickhardeman.com/blog/wp-content/plugins/all-in-one-wp-security-and-firewall/classes/wp-security-two-factor-login.php:32) in /home/nickhardeman/nickhardeman.com/blog/wp-includes/rest-api/class-wp-rest-server.php on line 1758
{"id":506,"date":"2012-03-16T10:27:47","date_gmt":"2012-03-16T17:27:47","guid":{"rendered":"http:\/\/nickhardeman.com\/?p=506"},"modified":"2013-10-07T07:36:46","modified_gmt":"2013-10-07T14:36:46","slug":"stand-alone-application-in-openframeworks","status":"publish","type":"post","link":"https:\/\/nickhardeman.com\/506\/stand-alone-application-in-openframeworks\/","title":{"rendered":"Stand-Alone Application in OpenFrameworks"},"content":{"rendered":"

Include data folder inside application<\/h3>\n

OpenFrameworks<\/a> is great for developing applications quickly and the data folder is easy and convenient when you are developing. But after the application is complete and you are ready to distribute\/move it around, it can become problematic. For example, if you have more than one OF application in the same folder and they both need a data folder, you have a problem. The best solution I have found is by mazbox<\/a> in his of64 screensaver example<\/a>. He used a command that will copy your entire data folder into your resources folder relative to your application:
\n
\ncp -r bin\/data \"$TARGET_BUILD_DIR\/$PRODUCT_NAME.app\/Contents\/Resources\";
\n<\/code><\/p>\n

This needs to be added to the Run Script command found in the application target. See image below.
\n
\"\"<\/a><\/p>\n

You can check that it have been moved successfully by right clicking on the application and choosing “Show Package Contents” and it will be in Contents \/ Resources \/ data. <\/p>\n

Now that your data folder is being copied over, we need to tell OF where to look. So we need to set the path root by calling ofSetDataPathRoot();<\/code> in the setup function.
\nEdit<\/strong> (Thanks for pointing this out Jeff \ud83d\ude42<\/em>
\nFor OF < 0.8 call ofSetDataPathRoot(“..\/Resources\/”);<\/code>
\nand for OF >= 0.8 call ofSetDataPathRoot(\"..\/Resources\/data\/\");<\/code><\/p>\n

Now you can move the application around and not worry about its relation to the data folder.<\/p>\n

<\/p>\n

Rename your Application<\/h3>\n

This may be pretty straight-forward, but in Xcode 4 things changed. It is fairly easy to do so, just click once on the application, pause a second and then click again to bring up the text input. In the image below, the project is named “emptyExample”, which can be changed to anything you desire. Click on rename and create a snapshot.
\n
\"\"<\/a><\/p>\n

While you are building the application in Debug mode, it will say {MyApplication}Debug. To get rid of this you need to switch it to Release mode. To do this, click on the current scheme > Edit Scheme and set Build Configuration to Release. See images below.
\n
\"\"<\/a>
\n
\"\"<\/a><\/p>\n

Setting an Icon for the Application<\/h3>\n

I created an empty xcode project that switches icons dynamically based on the build configuration. Download the xcode 4 project<\/a>. You can use Icon Composer on OSX to create icons, the largest being 512×512 and the smallest being 16×16.\u00a0I created some icon files using the OF logo. Download the icons here: of-icons<\/a> (~3MB). Put the icon.icns and icon-debug.icns files into your data folder and do a Product > Clean to let xcode know that you have new assets. Build the project and Bam; new icons.<\/p>\n","protected":false},"excerpt":{"rendered":"

Include data folder inside application OpenFrameworks is great for developing applications quickly and the data folder is easy and convenient when you are developing. But after the application is complete and you are ready to distribute\/move it around, it can become problematic. For example, if you have more than one OF application in the same […]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[26],"tags":[],"_links":{"self":[{"href":"https:\/\/nickhardeman.com\/wp-json\/wp\/v2\/posts\/506"}],"collection":[{"href":"https:\/\/nickhardeman.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/nickhardeman.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/nickhardeman.com\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/nickhardeman.com\/wp-json\/wp\/v2\/comments?post=506"}],"version-history":[{"count":0,"href":"https:\/\/nickhardeman.com\/wp-json\/wp\/v2\/posts\/506\/revisions"}],"wp:attachment":[{"href":"https:\/\/nickhardeman.com\/wp-json\/wp\/v2\/media?parent=506"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/nickhardeman.com\/wp-json\/wp\/v2\/categories?post=506"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/nickhardeman.com\/wp-json\/wp\/v2\/tags?post=506"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}