Skip to content
This repository has been archived by the owner on Sep 4, 2019. It is now read-only.

Commit

Permalink
Updates Makefile to push app build into sample assets
Browse files Browse the repository at this point in the history
  • Loading branch information
timwindsor committed Jun 25, 2014
1 parent b911124 commit e446bd9
Show file tree
Hide file tree
Showing 3 changed files with 53 additions and 3 deletions.
52 changes: 51 additions & 1 deletion HeadlessSample/sample/MessageService/Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,56 @@
QMAKE_TARGET = MessageService
PROJECT_DIR := $(dir $(word $(words $(MAKEFILE_LIST)),$(MAKEFILE_LIST)))
I18N_DIR := $(PROJECT_DIR)/translations
QMAKE = $(QNX_HOST)/usr/bin/qmake
PACKAGER = $(QNX_HOST)/usr/bin/blackberry-nativepackager
I18N_DIR ?= ./translations

ifdef NUMBER_OF_PROCESSORS
MAKEFLAGS += -j${NUMBER_OF_PROCESSORS}
endif

default: Device-Release

.PHONY: FORCE

Makefile-all: arm/Makefile arm-p/Makefile x86/Makefile translations/Makefile

arm/Makefile: $(QMAKE_TARGET).pro
@mkdir -p arm
cd arm && $(QMAKE) -spec blackberry-armv7le-qcc ../$(QMAKE_TARGET).pro CONFIG+=debug_and_release CONFIG+=device

arm-p/Makefile: $(QMAKE_TARGET).pro
@mkdir -p arm-p
cd arm-p && $(QMAKE) -spec blackberry-armv7le-qcc ../$(QMAKE_TARGET).pro CONFIG+=debug_and_release CONFIG+=device CONFIG+=profile

x86/Makefile: $(QMAKE_TARGET).pro
@mkdir -p x86
cd x86 && $(QMAKE) -spec blackberry-x86-qcc ../$(QMAKE_TARGET).pro CONFIG+=debug_and_release CONFIG+=simulator

Device-Release: arm/Makefile translate FORCE
$(MAKE) -C ./arm -f Makefile release
@cp ./arm/$(QMAKE_TARGET) ../www/assets/ 2>/dev/null || :

Device-Debug: arm/Makefile translate FORCE
$(MAKE) -C ./arm -f Makefile debug
@cp ./arm/$(QMAKE_TARGET) ../www/assets/ 2>/dev/null || :

Device-Profile: arm-p/Makefile translate FORCE
$(MAKE) -C ./arm-p -f Makefile debug
@cp ./arm-p/$(QMAKE_TARGET) ../www/assets/ 2>/dev/null || :

Simulator-Debug: x86/Makefile translate FORCE
$(MAKE) -C ./x86 -f Makefile debug
@cp ./x86/$(QMAKE_TARGET) ../www/assets/ 2>/dev/null || :

include mk/cs-base.mk
translate: FORCE
$(MAKE) -C $(I18N_DIR) -f Makefile update
$(MAKE) -C $(I18N_DIR) -f Makefile release

clean: FORCE
rm -rf arm arm-p x86
rm -f $(I18N_DIR)/*.qm

package: Device-Release FORCE
$(PACKAGER) -package $(QMAKE_TARGET).bar -configuration Device-Release bar-descriptor.xml

4 changes: 2 additions & 2 deletions HeadlessSample/sample/config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
specific language governing permissions and limitations
under the License.
-->
<widget id="com.example.MessageUI" version="0.0.1" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0" xmlns:rim="http://www.blackberry.com/ns/widgets">
<widget id="com.example.headless.MessageUI" version="0.0.1" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0" xmlns:rim="http://www.blackberry.com/ns/widgets">
<name>Headless WebWorks Application</name>
<author>Tim Windsor</author>
<description>A sample headless WebWorks application which reads a file created by the headless portion</description>
Expand All @@ -44,7 +44,7 @@
</entryPoint>

<!-- see https://developer.blackberry.com/native/documentation/cascades/device_platform/headless_apps/create_headless_app.html#addinvocationframeworksupportfortriggers -->
<invoke-target id="com.example.MessageService">
<invoke-target id="com.example.headless.MessageService">
<invoke-target-type>application.headless</invoke-target-type>
<invoke-target-name>Message Service</invoke-target-name>
<entry-point-id>MessageService</entry-point-id>
Expand Down
Binary file modified HeadlessSample/sample/www/assets/MessageService
Binary file not shown.

0 comments on commit e446bd9

Please sign in to comment.