Compiling from command line on Mac - Help
BlitzMax Forums/BlitzMax Beginners Area/Compiling from command line on Mac - Help
| ||
Hi Guys I am having a major newbie experience here. I do not know how to compile the final executable on my Mac from the command line. There seems to be very little on this despite vigorous searching on the forums and on the web. 1. I have the .bmk project open (although I have tried it with the project closed) 2. I go to the top menu and select "Program" then "Command Line". 3. In the window that opens I type, "bmk makeapp myapp.bmx" - where 'myapp.bmk' is the name of my project file. 4. I then click the 'OK' button and lo and behold, nothing happens. The command line window doesn't seem to allow the ability to navigate to specific directories like Terminal does. I am clueless. Please help. Regards Dave |
| ||
The command line dialog is there to set parameters which are used when you run your app from within the editor. |
| ||
Thanks for the reply. I guess what I am essentially wanting to do is compile a file application with all of the resource files included in it. I put in the commands into the command line, such as: bmk makeapp -r myapp.bmx I understand the '-r' makes it a release build. Does that mean it contains all the png files etc? When I click the image of the rocket to build it just builds it as a small application that references the images where they are saved. It isn't a self contained application. Is there a dummies guide somewhere that takes a newbie through it step by step? |
| ||
Some additional info. The file size might be right, I only thought it was small, but when I move the application to a folder other than the one it was compiled in, it won't run, which is why I assumed it was trying to reference the original .png files. Any suggestions would be appreciated. Thanks. |
| ||
I understand the '-r' makes it a release build. Does that mean it contains all the png files etc? Nope, you need to use incbin to make the media inbedded into the application... http://en.wikibooks.org/wiki/BlitzMax/Modules/BASIC/BlitzMax_runtime#Incbin Unless you are talking about data in app bundle, which you would need to do something like this: prefix = ExtractDir(AppFile)+"/../Resources/" LoadImage(prefix + "image.png") But you need to compile the app first, then open it up and add your media into the resource folder. |
| ||
I have already been using incbin. The application runs when I double click on it, but when I move it to another directory it refuses to. It just opens the graphics screen, spins the beachball and then crashes. Am I doing the right thing.. is it meant to be as simple as 1. typing "bmk makeapp -r myapp.bmx' in the command line screen 2. pressing the build and run button Cheers |
| ||
If you are using the IDE it should be as easy as no. 2. You only really need to use BMK if you are using another tool to write you application. Can you post some code you are having issue with and the folder structure? Last edited 2012 |
| ||
Hi therevills The opening code is below. There is a whole lot of other Incbin lines to include a lot of other images. Strict Graphics 1280,800 SetBlend ALPHABLEND Incbin "data/Titlescreen.png" Global Titlescreen:TImage=LoadImage("data/Titlescreen.png") Incbin "data/youDied.png" Global youDied:TImage=LoadImage("data/youDied.png") |
| ||
The file structure is: main folder = "game" within it is : - the project file game.bmk - subfolder "data" within the data folder are further folders, which are referenced in the incbin lines. In the two incbins mentioned above, the png files are just in the main folder, so the paths are correct. Thanks |
| ||
Your loading operations don't call up the incbin'd files. Change to.. Global youDied:TImage=LoadImage("incbin::data/youDied.png") |
| ||
Thank you so much. That has fixed the issue. |
| ||
Cool! This is what I thought what was happening :) When I use IncBin I normally do something this: Global incbinPrefix:String ?Not Debug incbinPrefix = "incbin::" ? Incbin "data/Titlescreen.png" Global titleScreen:TImage = LoadImage(incbinPrefix + "data/Titlescreen.png") |
| ||
That's a good idea. It looks a bit more plain english. I just may adopt your technique. Thanks again. |