Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Native Development

Reply
New Developer
Brian-S
Posts: 7
Registered: ‎08-08-2014
My Device: N/A
My Carrier: N/A
Accepted Solution

How can I change my BB10 project to use a makefile?

I recently created a new Blackberry project Momentics, and it runs fine from the IDE, but I need to be able to build it from the command line using a Makefile. I ran 'make' in Terminal, but received an error because the makefile does not exist.

 

I checked the sample apps that I've been looking at, and they all have makefiles. I found some sources that say you can pick whether you use a managed build or a makefile when you create the project, but I found no such option in the latest version of Momentics (2.1). I tried changing this setting in the project properties, but the Builder Settings under C/C++ Build are all greyed out.

 

How can I change my BB10 project to use a makefile? If that isn't possible, how can I require a new project to use a makefile instead of a managed build?

Please use plain text.
New Developer
moonsky219
Posts: 4
Registered: ‎08-06-2014
My Device: Simulator
My Carrier: Unlocked

Re: How can I change my BB10 project to use a makefile?

I know you can pick makefile when you create Core Native project, the wizard gives option of Language (C++ or C) and Build (Managed or Makefile).
I don't see such option when create Cascades project.

 

I might hate you more, but I'll never love you less.
Please use plain text.
Developer
EdFedermeyer
Posts: 31
Registered: ‎02-11-2014
My Device: Q10, Z10, Z30, Passport
My Carrier: None

Re: How can I change my BB10 project to use a makefile?

Not sure if this will be helpful, but if all you want to do is run the build via command line (or via script), you can use commands like this (paraphrased from my automated build script I run on my Mac)...

 

# Clean everything.

mkbuild -ws ~/Documents/workspace_bb10 -project MyProject -target clean

 

# Make a debug build.

mkbuild -ws ~/Documents/workspace_bb10 -project MyProject -target build -variant Device-Debug

blackberry-nativepackager -devMode -package "../Builds/MyProjectDebug.bar" MyProject/bar-descriptor.xml -debugToken MyProjectDebugToken.bar

 

# Make a release build.

mkbuild -ws ~/Documents/workspace_bb10 -project MyProject -target build -variant Device-Release

blackberry-nativepackager -package "../Builds/MyProjectRelease.bar" MyProject/bar-descriptor.xml -debugToken MyProjectDebugToken.bar -configuration Device-Release

blackberry-signer -storepass MyPassword ../Builds/MyProject.bar

 

Ed

 

Please use plain text.
New Developer
Brian-S
Posts: 7
Registered: ‎08-08-2014
My Device: N/A
My Carrier: N/A

Re: How can I change my BB10 project to use a makefile?

I figured out that my problem was a little more specific than I thought, as it only occurs in OSX when trying to use a makefile for a Core Native project.

 

I posted my solution on Stack Overflow, here: http://stackoverflow.com/questions/25192787/how-can-i-change-my-bb10-project-to-use-a-makefile/25333...

Please use plain text.
New Developer
Brian-S
Posts: 7
Registered: ‎08-08-2014
My Device: N/A
My Carrier: N/A

Re: How can I change my BB10 project to use a makefile?

What I didn't think to mention was that I'm using a Mac. It turns out that the option is obvious on Windows, but hidden in OSX.

Please use plain text.
New Developer
Brian-S
Posts: 7
Registered: ‎08-08-2014
My Device: N/A
My Carrier: N/A

Re: How can I change my BB10 project to use a makefile?

Thanks for the information. It doesn't help me with the problem I was having, but it is helpful for what I'm doing overall.

Please use plain text.