Skip to content

Commit

Permalink
Merge pull request #236 from pec1985/timob-17004-3_3_x
Browse files Browse the repository at this point in the history
[TIMOB-17004] back port Fixed release builds
  • Loading branch information
pec1985 committed May 22, 2014
2 parents 2a9316f + 300c530 commit 1a9940b
Show file tree
Hide file tree
Showing 9 changed files with 22 additions and 19 deletions.
14 changes: 5 additions & 9 deletions build_templates/blackberry/cli/common/bb_cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ function CreateApp(appName, appId, appPath, appVersion, tiSDK) {
}

var fileContent = fs.readFileSync(oldFilePath).toString().trim();
fileContent = fileContent.replace(/APP_NAME/g, appName.replace(/ /g, '_'));
fileContent = fileContent.replace(/_APP_NAME_/g, appName.replace(/ /g, '_'));
fileContent = fileContent.replace(/APP_ID/g, appId);
fileContent = fileContent.replace(/APP_VERSION/g, appVersion);
fileContent = fileContent.replace(/SDK_PATH/g, tiSDK);
Expand Down Expand Up @@ -384,8 +384,8 @@ BlackBerry.prototype.build = function(_onFinish) {
// maybe more?
];

var splashPaths = [];
var splashImageNames = [];
var splashPaths = '';
var splashImageNames = '';
var possibleSplashScreens = [
path.join(this.projectDir, 'Resources', 'Default-720x720.png'),
path.join(this.projectDir, 'Resources', 'Default-768x1280.png'),
Expand All @@ -404,12 +404,8 @@ BlackBerry.prototype.build = function(_onFinish) {
possibleSplashScreens.forEach(function(splash) {
if(fs.existsSync(splash)) {
var splashParts = splash.split('/');
splashPaths.push(
'\t<asset path="' + splash + '">' + splashParts[splashParts.length-1] + '</asset>\n'
);
splashImageNames.push(
'\t\t<image>' + splashParts[splashParts.length-1] + '</image>\n'
);
splashPaths +='\t<asset path="' + splash + '">' + splashParts[splashParts.length-1] + '</asset>\n';
splashImageNames += '\t\t<image>' + splashParts[splashParts.length-1] + '</image>\n';
};
});

Expand Down
2 changes: 1 addition & 1 deletion build_templates/blackberry/templates/app/build/.cproject
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@
</cconfiguration>
</storageModule>
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
<project id="APP_NAME.null.446607458" name="APP_NAME"/>
<project id="_APP_NAME_.null.446607458" name="_APP_NAME_"/>
</storageModule>
<storageModule moduleId="scannerConfiguration">
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="com.qnx.tools.ide.qde.managedbuilder.core.qccScannerInfo"/>
Expand Down
2 changes: 1 addition & 1 deletion build_templates/blackberry/templates/app/build/.project
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>APP_NAME</name>
<name>_APP_NAME_</name>
<comment></comment>
<projects>
</projects>
Expand Down
2 changes: 2 additions & 0 deletions build_templates/blackberry/templates/app/build/APP_NAME.pro
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
APP_NAME = _APP_NAME_

CONFIG += qt warn_off cascades10
BASEDIR = $$quote($$_PRO_FILE_PWD_)

Expand Down
2 changes: 1 addition & 1 deletion build_templates/blackberry/templates/app/build/Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
QMAKE_TARGET = APP_NAME
QMAKE_TARGET = _APP_NAME_
PROJECT_DIR := $(dir $(word $(words $(MAKEFILE_LIST)),$(MAKEFILE_LIST)))

include mk/cs-base.mk
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,15 +74,19 @@ ${splashImageNames}
<asset path="arm/o.le-v7-g/${binname}" entry="true" type="Qnx/Elf">${binname}</asset>
</configuration>
<configuration name="Device-Release">
<entryPointType>Qnx/Cascades</entryPointType>
<entryPointType>Qnx/Cascades</entryPointType>
<platformArchitecture>armle-v7</platformArchitecture>
<asset path="arm/o.le-v7/lib${binname}.so" entry="true" type="Qnx/Elf">${binname}</asset>
<asset path="arm/o.le-v7/${binname}.so" entry="true" type="Qnx/Elf">${binname}.so</asset>
</configuration>
<configuration name="Simulator-Debug">
<platformArchitecture>x86</platformArchitecture>
<asset path="x86/o-g/${binname}" entry="true" type="Qnx/Elf">${binname}</asset>
</configuration>

<configuration name="Device-Profile">
<platformArchitecture>armle-v7</platformArchitecture>
<asset path="arm-p/o.le-v7-g/${binname}" entry="true" type="Qnx/Elf">${binname}</asset>
</configuration>

<!-- Unique author ID assigned by signing authority. Required if using debug tokens. -->
<!-- <authorId>ABC1234YjsnUk235h</authorId> -->

Expand Down
5 changes: 3 additions & 2 deletions build_templates/blackberry/templates/app/build/src/main.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#include "tibb.h"
#include <tibb.h>
#include <QObject>
#include <QFile>
#include <QIODevice>
#include <QDebug>
Expand Down Expand Up @@ -28,7 +29,7 @@ QString readAppJs(QString filePath) {
file.close();
return jsContent;}

int main(int argc, char** argv)
Q_DECL_EXPORT int main(int argc, char** argv)
{
QString js = readAppJs("app/native/assets/blackberry/app.js");
if(js.isEmpty()) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
include (../APP_NAME.pro)
include (../_APP_NAME_.pro)
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
QMAKE_TARGET = APP_NAME
QMAKE_TARGET = _APP_NAME_
LUPDATE = $(QNX_HOST)/usr/bin/lupdate
LRELEASE = $(QNX_HOST)/usr/bin/lrelease

Expand Down

0 comments on commit 1a9940b

Please sign in to comment.