PDA

View Full Version : Sencha App Build :: Missing images after build



YomeKitsuma
5 Oct 2012, 5:59 AM
Hi,

i'am using the sencha cmd v3.0.0.188 (also the same with 181 and 144), the process does not copy all the mendatory images in resources :





GET file://localhost/Users/tag-all/Workspace/Enoleo/vegarw/charting/applications/desktop/resources/images/default/form/trigger.gif
GET file://localhost/Users/tag-all/Workspace/Enoleo/vegarw/charting/applications/desktop/resources/images/default/form/exclamation.gif
GET file://localhost/Users/tag-all/Workspace/Enoleo/vegarw/charting/applications/desktop/resources/images/default/form/text-bg.gif
GET file://localhost/Users/tag-all/Workspace/Enoleo/vegarw/charting/applications/desktop/resources/images/default/form/date-trigger.gif
GET file://localhost/Users/tag-all/Workspace/Enoleo/vegarw/charting/applications/desktop/resources/images/default/form/spinner.gif
GET file://localhost/Users/tag-all/Workspace/Enoleo/vegarw/charting/applications/desktop/resources/images/default/button/s-arrow.gif
GET file://localhost/Users/tag-all/Workspace/Enoleo/vegarw/charting/applications/desktop/resources/images/default/grid/grid3-hd-btn.gif



Even if i populate the custom.js file in theme folder



$CustomManifest = {
widgets: [
{
xtype: 'widget.datefield',
ui: 'default'
},
{
xtype: 'widget.timefield',
ui: 'default'
},
{
xtype: 'widget.numberfield',
ui: 'default'
},
{
xtype: 'widget.splitbutton',
ui: 'default'
}

]
};

dongryphon
5 Oct 2012, 9:56 PM
Can you specify which framework you are using?

Thanks.

YomeKitsuma
7 Oct 2012, 10:44 PM
Hi Don,

framework : extjs 4.1.2a
(also tryed with 4.2.0a)

YomeKitsuma
8 Oct 2012, 12:42 AM
I've still have the same "issue" using the lastest release of Sencha Cmd (190):




Failed to load resource file://localhost/Library/ext/resources/themes/images/default/form/trigger.gif
Failed to load resource file://localhost/Library/ext/resources/themes/images/default/form/exclamation.gif
Failed to load resource file://localhost/Library/ext/resources/themes/images/default/form/text-bg.gif
Failed to load resource file://localhost/Library/ext/resources/themes/images/default/form/date-trigger.gif
Failed to load resource file://localhost/Library/ext/resources/themes/images/default/form/spinner.gif
Failed to load resource file://localhost/Library/ext/resources/themes/images/default/button/s-arrow.gif
Failed to load resource file://localhost/Library/ext/resources/themes/images/default/grid/grid3-hd-btn.gif



For example, here is the code in the app.css (in my development folder, i.e myApp)



.x-form-trigger{background-image:url('../../../../../../../../Library/ext/resources/themes/images/default/form/trigger.gif');


And in the app.css after build :



.x-form-trigger{background-image:url('../../../../../../../../Library/ext/resources/themes/images/default/form/trigger.gif');


This is the same "path", so error comes from path access... In build folder it should be :



image:url('resources/themes/images/default/form/trigger.gif');


One another thing, important in this issue : the

resources/themes/images/default/form


resources/themes/images/default/button
folders are NOT COPIED/CREATED !!!!

even if I use the "http://docs.sencha.com/ext-js/4-1/#!/guide/command_theme" procedure :

all subfolders of "images" are copied (i.e btn, btn-group...) excepted "form, button" - and others, but here my application use lot of form widgets !!!!!

Another "strange" thing :

There is a missing image :



http://xxxxx/xxx/xxx/xxx/resources/images/default/grid/grid3-hd-btn.gif


but there is a "grid" folder, which only contains 2 images ;-)
(column-header-bg.gif and column-header-over-bg.gif)

vadimv
8 Oct 2012, 7:11 AM
Yes is clearly that there are some problems here (in theming and SCmd .190 build), less or more had the same, added splitbutton to manifest but the "s-arrow" image still was missing. Solved by
1. modifying utils.rb:


def theme_image(theme, path, without_url = false, relative = false)
path = path.value
theme = theme.value
without_url = (without_url.class == FalseClass) ? without_url : without_url.value

relative_path = "../../images/" # was: relative_path = "../images/"

if relative
if relative.class == Sass::Script::String
relative_path = relative.value
relative = true
elsif relative.class == FalseClass || relative.class == TrueClass
relative = relative
else
relative = relative.value
end
else
relative = false
end

if relative
image_path = File.join(relative_path, theme, path)
else
# was: images_path = File.join($ext_path, 'resources', 'themes', 'images', theme)
images_path = File.join(relative_path, theme) #File.join($ext_path, 'resources', 'themes', 'images', theme)
image_path = File.join(images_path, path)
end

2. copying by myself those missing images, like : /button/s-arrow.gif , /tree/leaf.gif ......

YomeKitsuma
8 Oct 2012, 11:13 PM
Thank for answer,

I'll take a look to modifiy the rb file (i've still doing this, but in a different maner)

I also copying myself the missing folders and/or images (using a bash file ;-)