in answer to a question on a youtube video I made with the AsciiVideo example…
“Hello. I went through this tutorial and everything worked great, but when I sent the app to a friend, the ascii doesn’t work. How would I make this a standalone app that can be downloaded and played? I am working with Xcode on Mojave. Sorry if this is an obvious newbie question, and thank you for this tutorial!”
Hi Tracy - really happy to hear you are following the videos and finding them helpful. When you compile this app on Mac OSX you will find the compiled binary executable file (the app) in the ‘bin’ folder in your project folder - the app also looks into the ‘data’ folder there to find the font it loads. If you send the data folder and it’s contents with the app (you could duplicate and rename the ‘bin’ folder with all it’s contents and then compress it as a zip file to send to friends) so when your app starts it can still find the things it needs inside the ‘data’ folder - hope this works and I’m very happy for any questions ! (and feedback!) try this and let me know how you get on - i’m very happy to do a quick video walk thru on sharing what you make with your friends !
@dan buzzo Thank you so much for your quick response! I just tried this, but the app still doesn’t do the ascii effect on my friend’s computer. Maybe I’m doing something wrong. Is compiling the binary the same as choosing “Run” from the menu? Is that a very stupid question? Thank you again for your generosity!
answer 2 :
Hi Tracy, Yes - the ‘run’ button in xcode is badly named - it compiles your c++ code to create a binary application (and saves the new app in your project’s ‘Bin’ folder) and then it open or ‘runs’ it. when you compile your app Xcode has loads of settings for things like what version of OSX it will run on and so on - depending on your OSX version and your friends version there are sometimes some differences to bear in mind about how the OS (and Apple) want you to be allowed to share programs - some of this may be the new security measures apple have put in place - what happens when your friend runs the app ? does it run and not show the ascii or not show the video? maybe post a thread in the openframeworks forum
back from @tracyblack
@dan buzzo Hi, and thank you again! It runs and shows the video, as well as reacts to the mouse movement when he runs it. The ascii effect is the only thing that doesn’t seem to work. i just tried running it on another computer today, and everything worked perfectly. The computer does have OF installed, whereas my friend’s does not. Could that be the problem? Will others that i send the application to need to have OF installed on their computers?
Hi Tracy, if all the rest of it works OK then that is a great start to debugging it - it sounds like it is not being able to load the truetype font being used for the ascii letters in the setup where it says
font.load("Courier New Bold.ttf", 9);
check if this font file is in the app/bin/data folder when you send it to your friend (you might be using a different named font in here) (BTW I saw your reply on openframeworks forum - thanks !) - i’ll start a thread there and then I can post screenshots etc to you