Publish Vulpes Preview 15 sources for desktop, Android and Tundra
Share Gaia assets and adapters, keep private profiles and development documents local, and update both public READMEs.
68
gaia/apps/wallpaper/build/build.js
Executable file
|
|
@ -0,0 +1,68 @@
|
|||
'use strict';
|
||||
|
||||
/* jshint node: true */
|
||||
|
||||
var utils = require('utils');
|
||||
|
||||
var WallPaperAppBuilder = function(options) {
|
||||
};
|
||||
|
||||
WallPaperAppBuilder.prototype.APP_DIR = 'apps/wallpaper';
|
||||
WallPaperAppBuilder.prototype.BUILD_DIR = 'build_stage/wallpaper';
|
||||
WallPaperAppBuilder.prototype.WALLPAPER_PATH = 'resources/';
|
||||
|
||||
// set options
|
||||
WallPaperAppBuilder.prototype.setOptions = function(options) {
|
||||
var wallpaperDirPath =
|
||||
[options.STAGE_APP_DIR].concat(this.WALLPAPER_PATH.split('/'));
|
||||
this.wallpaperDir = utils.getFile.apply(utils, wallpaperDirPath);
|
||||
|
||||
this.gaia = utils.gaia.getInstance(options);
|
||||
this.configPath =
|
||||
utils.joinPath(options.APP_DIR, 'build', options.GAIA_DEVICE_TYPE);
|
||||
};
|
||||
|
||||
// XXX This inherits the behavior of what's done before in bug 838110
|
||||
// It did not remove file unlisted in list.json, and the dir name is wrong.
|
||||
WallPaperAppBuilder.prototype.copyDistributionWallpapers = function() {
|
||||
if (!this.gaia.distributionDir) {
|
||||
return;
|
||||
}
|
||||
|
||||
var dir = utils.getFile(this.gaia.distributionDir, 'wallpapers');
|
||||
if (!dir.exists()) {
|
||||
return;
|
||||
}
|
||||
|
||||
utils.log('Include wallpapers in distribution directory ...\n');
|
||||
|
||||
var dirParent = utils.getFile(this.wallpaperDir.path, '..');
|
||||
utils.copyDirTo(dir.path, dirParent.path, this.wallpaperDir.leafName);
|
||||
};
|
||||
|
||||
WallPaperAppBuilder.prototype.copyWallpapers = function() {
|
||||
if (!this.configPath) {
|
||||
throw new Error('device config path not found');
|
||||
}
|
||||
|
||||
var dir = utils.getFile(this.configPath, 'wallpapers');
|
||||
if (!dir.exists()) {
|
||||
return;
|
||||
}
|
||||
|
||||
utils.log('Include wallpapers in app configuration directory ...\n');
|
||||
|
||||
var dirParent = utils.getFile(this.wallpaperDir.path, '..');
|
||||
utils.copyDirTo(dir.path, dirParent.path, this.wallpaperDir.leafName);
|
||||
};
|
||||
|
||||
WallPaperAppBuilder.prototype.execute = function(options) {
|
||||
utils.copyToStage(options);
|
||||
this.setOptions(options);
|
||||
this.copyWallpapers();
|
||||
this.copyDistributionWallpapers();
|
||||
};
|
||||
|
||||
exports.execute = function(options) {
|
||||
(new WallPaperAppBuilder()).execute(options);
|
||||
};
|
||||
BIN
gaia/apps/wallpaper/build/tablet/wallpapers/FXOS_Calm_Beach_L.jpg
Executable file
|
After Width: | Height: | Size: 197 KiB |
BIN
gaia/apps/wallpaper/build/tablet/wallpapers/FXOS_Dynamic_Sunset_L.jpg
Executable file
|
After Width: | Height: | Size: 251 KiB |
BIN
gaia/apps/wallpaper/build/tablet/wallpapers/FXOS_Mysterious_Seascape_L.jpg
Executable file
|
After Width: | Height: | Size: 205 KiB |
BIN
gaia/apps/wallpaper/build/tablet/wallpapers/FXOS_Rocky_Hills_L.jpg
Executable file
|
After Width: | Height: | Size: 338 KiB |
BIN
gaia/apps/wallpaper/build/tablet/wallpapers/FXOS_Violet_Daisy_L.jpg
Executable file
|
After Width: | Height: | Size: 189 KiB |
BIN
gaia/apps/wallpaper/build/tablet/wallpapers/FXOS_bolt.jpg
Executable file
|
After Width: | Height: | Size: 428 KiB |
BIN
gaia/apps/wallpaper/build/tablet/wallpapers/FXOS_leap.jpg
Executable file
|
After Width: | Height: | Size: 469 KiB |
BIN
gaia/apps/wallpaper/build/tablet/wallpapers/FXOS_stance.jpg
Executable file
|
After Width: | Height: | Size: 405 KiB |
BIN
gaia/apps/wallpaper/build/tablet/wallpapers/default.jpg
Executable file
|
After Width: | Height: | Size: 206 KiB |
11
gaia/apps/wallpaper/build/tablet/wallpapers/list.json
Executable file
|
|
@ -0,0 +1,11 @@
|
|||
[
|
||||
"default.jpg",
|
||||
"FXOS_Rocky_Hills_L.jpg",
|
||||
"FXOS_Violet_Daisy_L.jpg",
|
||||
"FXOS_Calm_Beach_L.jpg",
|
||||
"FXOS_Dynamic_Sunset_L.jpg",
|
||||
"FXOS_Mysterious_Seascape_L.jpg",
|
||||
"FXOS_leap.jpg",
|
||||
"FXOS_stance.jpg",
|
||||
"FXOS_bolt.jpg"
|
||||
]
|
||||