Skip to content
This repository was archived by the owner on Apr 18, 2019. It is now read-only.

Commit

Permalink
Adding xpk target to gruntfile, plus signature file.
Browse files Browse the repository at this point in the history
  • Loading branch information
Max Waterman committed Oct 26, 2013
1 parent 0a2588e commit 883777f
Show file tree
Hide file tree
Showing 6 changed files with 134 additions and 51 deletions.
97 changes: 71 additions & 26 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ module.exports = function (grunt) {

grunt.initConfig({
packageInfo: grunt.file.readJSON('package.json'),
chromeInfo: grunt.file.readJSON('data/manifest.json'),
chromeInfo: grunt.file.readJSON('data/chrome-crx/manifest.json'),

clean: ['build'],

Expand All @@ -20,9 +20,9 @@ module.exports = function (grunt) {
// (default: '/tmp')
tizenAppScriptDir: '/home/developer/',

// path to the config.xml file for the Tizen wgt file
// path to the config.xml file for the Tizen wgt file - post templating
// (default: 'config.xml')
configFile: 'data/config.xml',
configFile: 'build/wgt/config.xml',

// path to the sdb command (default: process.env.SDB or 'sdb')
sdbCmd: 'sdb'
Expand All @@ -31,28 +31,18 @@ module.exports = function (grunt) {
// minify JS
uglify: {
dist: {
files: {
'build/app/js/card.js': ['app/js/card.js'],
'build/app/js/curvedtextdrawer.js': ['app/js/curvedtextdrawer.js'],
'build/app/js/help.js': ['app/js/help.js'],
'build/app/js/license.js': ['app/js/license.js'],
'build/app/js/localizer.js': ['app/js/localizer.js'],
'build/app/js/main.js': ['app/js/main.js'],
'build/app/js/scaleBody.js': ['app/js/scaleBody.js'],
'build/app/js/utils.js': ['app/js/utils.js'],
'build/app/js/vec2.js': ['app/js/vec2.js']
}
files: [
{ expand: true, cwd: '.', src: 'app/js/**/*.js', dest: 'build/' }
]
}
},

// minify CSS
cssmin: {
dist: {
files: {
'build/app/css/help.css': ['app/css/help.css'],
'build/app/css/license.css': ['app/css/license.css'],
'build/app/css/main.css': ['app/css/main.css']
}
files: [
{ expand: true, cwd: '.', src: ['app/css/**/*.css'], dest: 'build/' }
]
}
},

Expand All @@ -66,27 +56,80 @@ module.exports = function (grunt) {
{ expand: true, cwd: '.', src: ['app/_locales/**'], dest: 'build/' }
]
},

wgt: {
files: [
{ expand: true, cwd: 'build/app/', src: ['**'], dest: 'build/wgt/' },
{ expand: true, cwd: 'data/', src: ['config.xml'], dest: 'build/wgt/' },
{ expand: true, cwd: '.', src: ['icon_128.png'], dest: 'build/wgt/' }
]
},

wgt_config: {
files: [
{ expand: true, cwd: 'data/tizen-wgt/', src: ['config.xml'], dest: 'build/wgt/' }
],
options:
{
processContent: function(content, srcpath)
{
return grunt.template.process(content);
}
}
},

crx: {
files: [
{ expand: true, cwd: 'build/app/', src: ['**'], dest: 'build/crx/' },
{ expand: true, cwd: '.', src: ['manifest.json'], dest: 'build/crx/' },
{ expand: true, cwd: '.', src: ['icon*.png'], dest: 'build/crx/' }
]
},

crx_manifest:
{
files: [
{ expand: true, cwd: 'data/chrome-crx/', src: ['manifest.json'], dest: 'build/crx/' }
],

options:
{
processContent: function(content, srcpath)
{
return grunt.template.process(content);
}
}

},

xpk: {
files: [
{ expand: true, cwd: 'build/app/', src: ['**'], dest: 'build/xpk/' },
{ expand: true, cwd: '.', src: ['icon*.png'], dest: 'build/xpk/' }
]
},

xpk_manifest:
{
files: [
{ expand: true, cwd: 'data/tizen-xpk/', src: ['manifest.json'], dest: 'build/xpk/' }
],

options:
{
processContent: function(content, srcpath)
{
return grunt.template.process(content);
}
}

},

sdk: {
files: [
{ expand: true, cwd: 'build/app/', src: ['**'], dest: 'build/sdk/' },
{ expand: true, cwd: 'app/', src: ['js/**'], dest: 'build/sdk/' },
{ expand: true, cwd: 'app/', src: ['css/**'], dest: 'build/sdk/' },
{ expand: true, cwd: 'app/', src: ['*.html'], dest: 'build/sdk/' },
{ expand: true, cwd: 'data/', src: ['config.xml'], dest: 'build/sdk/' },
{ expand: true, cwd: 'data/tizen-wgt/', src: ['config.xml'], dest: 'build/sdk/' },
{ expand: true, cwd: '.', src: ['icon*.png'], dest: 'build/sdk/' }
]
}
Expand Down Expand Up @@ -159,7 +202,7 @@ module.exports = function (grunt) {
install: {
action: 'install',
remoteFiles: {
pattern: '/home/developer/MemoryGameOlderKids*.wgt',
pattern: '/home/developer/<%= packageInfo.name %>*.wgt',
filter: 'latest'
}
},
Expand Down Expand Up @@ -196,14 +239,15 @@ module.exports = function (grunt) {
'copy:common'
]);

grunt.registerTask('crx', ['dist', 'copy:crx']);
grunt.registerTask('wgt', ['dist', 'copy:wgt', 'package:wgt']);

grunt.registerTask('crx', ['dist', 'copy:crx', 'copy:crx_manifest']);
grunt.registerTask('wgt', ['dist', 'copy:wgt', 'copy:wgt_config', 'package:wgt']);
grunt.registerTask('xpk', ['dist', 'copy:xpk', 'copy:xpk_manifest']);
grunt.registerTask('sdk', [
'clean',
'imagemin:dist',
'copy:common',
'copy:sdk',
'copy:wgt_config',
'package:sdk'
]);

Expand All @@ -212,6 +256,7 @@ module.exports = function (grunt) {
'uglify:perf',
'inline',
'copy:wgt',
'copy:wgt_config',
'package:wgt'
]);

Expand Down
23 changes: 23 additions & 0 deletions data/chrome-crx/manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"app": {
"launch": {
"container": "panel",
"width":1024,
"height":600,
"local_path": "index.html"
}
},
"default_locale": "en",
"description": "<%= packageInfo.description %>",
"icons": {
"128": "icon_128.png",
"48": "icon_48.png",
"16": "icon_16.png"
},
"key": "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC+BIaBW+xj11Ea9rwawrZ0+06jT68d2h2g5vEOS6AJJGf/N6DRplmlCozqmCkYzZLdS3Hiwaz3baMg0GCQpuG+Ylh4+vyL6Pk7GJTudG8hhkiulSvTCx3/19Kqd/VOHbMFsh8gCZAx28s3fH26USIMbwj6az0OwI30hXUgGun+fQIDAQAB",
"name": "<%= packageInfo.name %>",
"permissions": [ ],
"version": "<%= packageInfo.version %>",
"homepage_url" : "https://01.org/webapps/content/memory-game-older-kids",
"update_url" : "https://01.org/webapps/content/memory-game-older-kids/update.xml"
}
23 changes: 0 additions & 23 deletions data/manifest.json

This file was deleted.

4 changes: 2 additions & 2 deletions data/config.xml → data/tizen-wgt/config.xml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<widget xmlns="http://www.w3.org/ns/widgets" xmlns:tizen="http://tizen.org/ns/widgets" id="https://github.com/01org/webapps-memory-game-older-kids" version="1.1.0" viewmodes="fullscreen">
<widget xmlns="http://www.w3.org/ns/widgets" xmlns:tizen="http://tizen.org/ns/widgets" id="https://github.com/01org/webapps-memory-game-older-kids" version="<%= packageInfo.version %>" viewmodes="fullscreen">
<icon src="icon_128.png"/>
<content src="index.html"/>
<name>memory-game-older-kids</name>
<name><%= packageInfo.name %></name>
<tizen:application id="E4PRo70Ja6.memorygameolderkids" package="E4PRo70Ja6" required_version="2.1"/>
<tizen:setting screen-orientation="landscape" contextmenu="enable"/>
</widget>
23 changes: 23 additions & 0 deletions data/tizen-xpk/manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"app": {
"launch": {
"container": "panel",
"width":1024,
"height":600,
"local_path": "index.html"
}
},
"default_locale": "en",
"description": "<%= packageInfo.description %>",
"icons": {
"128": "icon_128.png",
"48": "icon_48.png",
"16": "icon_16.png"
},
"key": "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC+BIaBW+xj11Ea9rwawrZ0+06jT68d2h2g5vEOS6AJJGf/N6DRplmlCozqmCkYzZLdS3Hiwaz3baMg0GCQpuG+Ylh4+vyL6Pk7GJTudG8hhkiulSvTCx3/19Kqd/VOHbMFsh8gCZAx28s3fH26USIMbwj6az0OwI30hXUgGun+fQIDAQAB",
"name": "<%= packageInfo.name %>",
"permissions": [ ],
"version": "<%= packageInfo.version %>",
"homepage_url" : "https://01.org/webapps/content/memory-game-older-kids",
"update_url" : "https://01.org/webapps/content/memory-game-older-kids/update.xml"
}
15 changes: 15 additions & 0 deletions data/tizen-xpk/signature
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
-----BEGIN RSA PRIVATE KEY-----
MIICXgIBAAKBgQCvXrx/YN40SMBLoFREU0yfS1cM5NfusRlJVf8edGjae+fUExXA
3c/ZdWLeSgrPASfpXMPUvxtXUAwBRdtg9p1gBx1K2sW7HI/klpTZT4xSGBU90aUB
cqEMBnWP794fu6W3efQx8DrzYbm6zE4guTtvO2PhMxX2u1LCmBrLj4IyqQIDAQAB
AoGAcYyDvG46MdxRNiZvqXXODO45RQ3/int9BfD6qPty0NSdfMGGukRkykapZ4jF
itcSwpTf76Z1y4j23PQgYZ4MswgvxWCfyH3UIy7cunNMo8b9UOve8gm/pyhrNyta
Si7FXDjghYqrr+kWCW9JuR+EhEgcpqli2HKz2D3lgjYswIkCQQDOrxYzWEcfoBtF
KKjGstxQcMNAPSzO1RwhycfOyBx6VaxTOQ5nojsR2/HX1g95LbAba0nNcYms+jcr
wR5E5KxzAkEA2TbmES1ggQ2nu6BUfY+1Gne0AY7XAzoUjHfBq61O/FjrAa89SW/Q
O9l5bvEiExMXyunj/ZDR8N4MBaXS0WiZcwJBALLX1EkHmTunahF09l5BRNyiRoGe
rdgnldky5h9rDyFYYu38kBdizOROQr22L9t2ik2fj9Qi67PvK7BDwjJxATsCQQDS
Y+BXxvHwTj+m9laf/6/U4RjTYX1VPM5meCB4nrcgqSeHTCs6lDjHn4+FK75rZ1Tm
T8Fq+vi+KvTOC521A3GNAkEAsAYp30ui/CRmGxi2wNBBxC9eQMmRZB/muRAmjHAK
RA4mMwwDOZ2/htjh+T4uGM2gnEbm3TzJtk8e21gLynuM8w==
-----END RSA PRIVATE KEY-----

0 comments on commit 883777f

Please sign in to comment.