@@ -26,6 +26,8 @@ function build(args, dependencies) {
2626 console . log ( "Found desktop JS bundle path: " + desktopJSBundlePath ) ;
2727 var desktopFonts = _findDesktopFonts ( args ) ;
2828 console . log ( "Found desktop fonts: " + desktopFonts ) ;
29+ var desktopImages = _findDesktopImages ( args ) ;
30+ console . log ( "Found desktop images: " + desktopImages ) ;
2931
3032 return _findModules ( args ) . then ( ( dependencies ) => {
3133 return new Promise ( ( resolve , reject ) => {
@@ -40,7 +42,7 @@ function build(args, dependencies) {
4042 }
4143 } ) ;
4244 } ) . then ( ( ) => {
43- return _buildApplication ( args , desktopExternalModules , desktopJSBundlePath , desktopFonts ) ;
45+ return _buildApplication ( args , desktopExternalModules , desktopJSBundlePath , desktopFonts , desktopImages ) ;
4446 } ) ;
4547}
4648
@@ -59,6 +61,11 @@ function _findDesktopFonts(args) {
5961 return JSON . parse ( data ) . desktopFonts ;
6062}
6163
64+ function _findDesktopImages ( args ) {
65+ var data = fs . readFileSync ( path . join ( args . root , 'package.json' ) ) ;
66+ return JSON . parse ( data ) . desktopImages ;
67+ }
68+
6269function _findModules ( args ) {
6370 return new Promise ( ( resolve , reject ) => {
6471 fs . readFile ( path . join ( args . root , 'package.json' ) , ( err , data ) => {
@@ -121,7 +128,7 @@ function _buildModules(args, dependencies, resolve, reject) {
121128 } ) ;
122129}
123130
124- function _buildApplication ( args , desktopExternalModules , desktopJSBundlePath , desktopFonts ) {
131+ function _buildApplication ( args , desktopExternalModules , desktopJSBundlePath , desktopFonts , desktopImages ) {
125132 return new Promise ( ( resolve , reject ) => {
126133 console . log ( chalk . bold ( 'Building the app...' ) ) ;
127134
@@ -140,6 +147,10 @@ function _buildApplication(args, desktopExternalModules, desktopJSBundlePath, de
140147 buildArguments . push ( "-f" ) ;
141148 buildArguments . push ( desktopFonts . toString ( ) . replace ( / , / g, ';' ) ) ;
142149 }
150+ if ( typeof desktopImages !== 'undefined' && desktopImages !== null ) {
151+ buildArguments . push ( "-i" ) ;
152+ buildArguments . push ( desktopImages . toString ( ) . replace ( / , / g, ';' ) ) ;
153+ }
143154 if ( process . platform === "win32" ) {
144155 buildArguments . push ( "-g" ) ;
145156 buildArguments . push ( "MinGW Makefiles" ) ;
0 commit comments