PDA

View Full Version : Sencha Windows SDK Tool 2.0 Beta Missing Functionality?



aarondrabeck
23 Feb 2012, 8:34 AM
I am trying to create my custom build of Sencha Touch with the new Windows SDK tools using the following guide http://docs.sencha.com/touch/2-0/#!/guide/building.

It seems the sencha create command is not implemented?

Using
sencha create jsb -a index.html -p app.jsb3

I get no output, on screen or file. In fact if I just issue . "sencha create" I get no output either.

In contrast using "sencha build" I get a nice output of help screen showing what params you need to issue with the cmd.

mitchellsimoens
23 Feb 2012, 8:56 AM
I get an output of available options when I type


sencha create jsb

aarondrabeck
23 Feb 2012, 9:13 AM
You are correct, however I just get blank lines and no jsb3 even when trying to compile the supplied Twitter sample app.

using:
sencha create jsb -a ~/index.html -p ~/myapp.jsb3

Kalel.Wade
23 Feb 2012, 11:51 AM
I am having the same issues as aarondrabeck. No jsb file is outputed. I see the options and everything is installed.

aw1zard2
23 Feb 2012, 12:56 PM
I'll check this out as I just installed sdk 2.0 I had my jsb's getting created with no issues before so will let you know.

Kalel.Wade
23 Feb 2012, 1:11 PM
If you can get a jsb3 file from a mac, you can at least make builds. However, I havent had any luck with creating the jsb3 file on windows. Mac works though.

aw1zard2
23 Feb 2012, 1:58 PM
Yep it isn't working. No file created here.


=)

ipastine
24 Feb 2012, 2:29 PM
I'm so happy to see this thread -- I've been pulling out my hair here. Yes, I have the same problem on Windows.

punchy
26 Feb 2012, 4:48 AM
same issue here (in windows)

burnnat
27 Feb 2012, 2:52 PM
+1

Same thing here on Win7 x64, no error message, no file, no nothing. Boy, is this frustrating! :((

oddz
28 Feb 2012, 1:26 PM
Same issue here.

Maybe I should just re-install 1.2.3 since that seemed to be working perfectly.

ipastine
28 Feb 2012, 1:34 PM
Does that work well with ST 2?

oddz
28 Feb 2012, 2:29 PM
1.2.3 seems to be working fine for me creating builds. Though I haven't researched or tried it but I don't think native builds will function with 1.2.3. I *think* that is one of the major improvements 2 introduced.

ipastine
28 Feb 2012, 3:06 PM
Thanks. I'm working with PhoneGap, so I'll give sdk tools v1 a try.

Dando
1 Mar 2012, 1:39 PM
Same issue here, Win7 x64 also. Command outputs like 3 blank lines in the console and produces nothing.

Really need this for a production build.... is there any alternative (manually create jsb?).

thebread
2 Mar 2012, 10:35 AM
+1 - same issue on Win7 x64 machine. Any word on when the next SDK 2.0 beta release is coming?

Thanks in advance

ykey
2 Mar 2012, 7:02 PM
Yes, similar issue on Win7 x64 here.

Shawn.Zhang
4 Mar 2012, 3:14 AM
sencha package run configAndroid.json

Just no any output, no any message.

aarondrabeck
6 Mar 2012, 8:40 AM
No fix yet with Sencha 2 Final?

steffen.werner
7 Mar 2012, 2:42 AM
When running the latest version on windows in verbose-mode I get:

\hello-sencha-touch> sencha create jsb -verbose -a index.html -p app.jsb3
C:\Devel\SenchaSDKTools-2.0.0-Beta\bin\..\command\\src\CliOptions.js:133 TypeError: this.get is not a function
Execution error in C:\Devel\SenchaSDKTools-2.0.0-Beta\bin\..\command\sencha.js.

burnnat
7 Mar 2012, 5:23 AM
@steffen.werner

That error looks to be because the "verbose" option isn't specified correctly. You can use either "--verbose" or "-v", but I don't think the sencha command recognizes "-verbose". Try using this command instead:

sencha create jsb --verbose -a index.html -p app.jsb3

Although I must say, in any case, it would be nice to have a proper error message for an unrecognized flag instead of the unhelpful "TypeError: this.get is not a function".

steffen.werner
7 Mar 2012, 5:43 AM
@burnnat tnx for spotting the typo.

without this error it just displays several empty lines and doesn't generate the jsb

richgoldmd
8 Mar 2012, 6:58 AM
I am having the same issue on Win7 - the command outputs ~3 blank lines and terminates without any output.

Macy Abbey
8 Mar 2012, 9:36 AM
Same issue here, even including --verbose flag.

ssamuel68
8 Mar 2012, 11:34 AM
Same error here

32521

androme
8 Mar 2012, 12:45 PM
Same problem for me on Seven X64

aarondrabeck
8 Mar 2012, 2:28 PM
I hate to be pushy but can we get this escalated to a bug and notify the dev team? I have been dying to build my Sencha app for 2 weeks now :)

I think we have a sufficient amount of users now confirming the bug.

mitchellsimoens
8 Mar 2012, 2:30 PM
I hate to be pushy but can we get this escalated to a bug and notify the dev team? I have been dying to build my Sencha app for 2 weeks now :)

I think we have a sufficient amount of users now confirming the bug.

SDK Tools team is aware of this.

leeby
8 Mar 2012, 5:04 PM
Yes, I got the exactly same problem, can any one help us get through it?

Thanks in advance.


When running the latest version on windows in verbose-mode I get:

\hello-sencha-touch> sencha create jsb -verbose -a index.html -p app.jsb3
C:\Devel\SenchaSDKTools-2.0.0-Beta\bin\..\command\\src\CliOptions.js:133 TypeError: this.get is not a function
Execution error in C:\Devel\SenchaSDKTools-2.0.0-Beta\bin\..\command\sencha.js.

leeby
8 Mar 2012, 5:11 PM
I tried the --verbose thing, it's no error now, but without any jsb3 output neither.

Yes, I got the exactly same problem, can any one help us get through it?

Thanks in advance.

mcaple
8 Mar 2012, 10:17 PM
It's great that there is a Windows SDK tool for us on windows and the Video http://vimeo.com/37974749 shows great usage .
We were hoping to use the generate app command since we have currently created apps from scratch was hoping to generate a "clean" skeleton app to use and be able to learn from .
However.. on installing the tools and doing >sencha there is no generate option ?
Will this be coming out or am I missing something ?
I am loving the tool so far and that improvements and feedback are incorporated so quickly.
Cheers

Kalel.Wade
9 Mar 2012, 8:27 AM
Ok, so after enough hassle of switching between Mac and Windows just to get a jsb, I figured I would look into the issue on windows myself.
First, I am using window 7 (64bit) so I can't verify this works in other versions.
Second, Make sure you have the updated sencha sdk tools. Install in C://. Verify this works. If you can't get past this, see other threads.

A temp fix is to open
C:\SenchaSDKTools-2.0.0-Beta\command\src\modules\GenerateJSB.js
and change

this.cmdIsBatch = true;
to
this.cmdIsBatch = false;

Save, open command prompt
cd /project
sencha create jsb -a index-dev.html -p app.jsb3
sencha build -p app.jsb3 -d ./

The reason is C:\SenchaSDKTools-2.0.0-Beta\command\src\Module.js will add a .bat behind the .js when it runs the command. I assume the .bat is meant for other modules and may not have been meant to be here.

dancorkill
9 Mar 2012, 2:42 PM
Might want to indicate upfront in the docs that the getting started tutorials ain't so simple if you are on windows. Will lead to a lot less confused newbies like me.

mcaple
11 Mar 2012, 3:03 PM
I am mighty confused. The video that I mentioned in my previous reply mentions the use of

sencha generate app GS ../GS

is this the same as "sencha create jsb -a index-dev.html -p app.jsb3". I thought the "generate" command would basically create a blankish project. I am assuming that the "create" command is for deployment. It's just that I have hand built an application but I thought I would go back generate the project correctly and move my manually created stuff into this generated project.


Finally got something generated by going to the root folder of touch2 and running

sencha app create MyApp ..\myapp

I assume this equivalent to 'generate'. Not sure if I should be using the sencha.bat from touch2 or the sencha.bat from the sencha sdk tools folder. :(

UnicornCG
11 Mar 2012, 11:09 PM
Me too, I'm a bit confused!

"Build" command is part of the SDK tools.
But I can only access the SDK tools commands after I cd to the SDK folder, not the Project folder, what Walel has done.

So one question to Walel: does this mean you have access to Sencha SDK commands wherever you cd?
Because if I type sencha anywhere outside the SDK folder, it says "Can not find ..\command\sencha"

Kalel.Wade
12 Mar 2012, 6:08 AM
So Sencha Touch provides a few ways to get your application ready for deployment. What I prefer is the guide here
http://docs.sencha.com/touch/2-0/#!/guide/building
I (http://docs.sencha.com/touch/2-0/#!/guide/building) prefer to just get the compiled and compressed version and then use with eclipse or xcode to actually create the application.
(the way I use/understand it)
"sencha create jsb" creates the jsb file which is basically just a template of what classes will be included and compiled/compressed into what.
"sencha build" will take the jsb and create what is specified in it.


This
http://docs.sencha.com/touch/2-0/#!/guide/command
will explain the other way but I am not familiar with it.

mcaple
12 Mar 2012, 1:55 PM
Thanks Kalel. I think one of the problems is with naming of the two packages. It is very confusing to decide whether you use what I think should be called "the tools" and what should be called "sencha touch" or "sencha sdk". Throughout the document there appears to be reference to one but it means the other. I think we should drop the "sdk" word when describing "the tools" or "sencha tools". A good exemple is the second reference you gave, it says

Step 1: Setup an HTTP server on your computer if you don't have one running. This guide assumes that the host name is localhost, and the document root is at /path/to/www

Step 2: Download and install the latest SDK Tools (http://www.sencha.com/products/sdk-tools) on your development machine. The latest version as of this writing is 2.0.0 beta.
Step 3: Download the latest Sencha Touch 2 SDK (http://www.sencha.com/products/touch/). Extract the SDK to a local directory.
Step 4: Verify that Sencha Command is working properly on your machine:
Open a command line terminal, and run the following commands. Replace /path/to/sencha-touch-2-sdk with the actual path to the SDK that you extracted to previously, as mentioned in Step 2.


Notice that it says replace /path/to/sencha-touch-2-sdk as mentioned in step 2. Step 2 talks about the latest SDK tools and not the touch 2 sdk. I vote for dropping the acronym SDK from anything that refers to "the tools" and everyone will be a little clearer.
Even after re-reading this explanation it is confusing to me. Drop SDK!, please.

UnicornCG
12 Mar 2012, 2:17 PM
I second that!

chapkin
13 Mar 2012, 9:27 AM
SDK Tools team is aware of this.

Hello Mitchell,
does "SDK Tools Team is aware of this" mean that there is absolutely no way as of now to build an android app? and that we have to wait until this is fixed?

or is there a workaround, even if it would cost more work to build? if there exists a workaround, please post it here.

Thanks in advance.

rolfdaddy
13 Mar 2012, 10:09 AM
I second this as well - mcaple is 100% right. The fact that there are 2 "sencha" commands (one for the SDK Tools, one for the Sencha Touch 2 SDK) caused me some horrible headaches until I came across this thread. It would be smart for the team to rename one of them to avoid this collision since the SDK Tools installation updates your PATH variable and thus you're likely to get that one, even if you want the other...

UnicornCG
13 Mar 2012, 11:15 AM
Yup, I'm finally understanding the two "Sencha commands", what they do, only to find out that it just won't output an app.
I've searched across dozens of threads, they all have similar problems, and few have a solution.

So Sencha touch 2 is absolutely GREAT!!!
But I'll be back in several months, I'm kinda' done with this, I hope that there will be updates by then! I'm glad that making apps isn't my job, just a passion...

Good luck!

sraz786
15 Mar 2012, 12:33 PM
What is the final resolution to this? Is Sencha working on a fix? I tried all of the mentioned workarounds mentioned in this post to no avail. Im on Win x64. I absolutely need this to work as soon as possible. Is there a timeframe for a fix?

Kalel.Wade
15 Mar 2012, 12:41 PM
Check my post earlier. That is working for me. However I did notice one thing I had to do when trying to execute commands. I couldn't execute 'sencha create jsb...' or anything without first typing 'sencha' and then entering it again.

Other than that, I'm sure they are looking into it. If you want more help than that, then you need to provide the steps your trying and what results your getting.

ipastine
19 Mar 2012, 1:46 AM
I got it running on win xp using Kalel.Wade (http://www.sencha.com/forum/member.php?384364-Kalel.Wade)'s method. Thank you!

A couple of issues. It is important that it is installed to C: rather than to "Program Files". I'm guessing that the scripts don't like spaces in the directory name. There are several "sencha" files in the distribution. You want to be running the one in the "bin" subdirectory. After a zillion attempts at this my path is a mess so I had no idea which was being run. What I did in the end was to make a copy of the "bin" subdirectory called "bin-working-copy" and copied both the files in bin over to it. Then I copied my whole web site over to that directory and ran the sencha commands from there so that everything was in the same directory and there would be no confusion. The exact commands I'm running are:

sencha create jsb -a index.html -p app.jsb3
sencha build -p C:\SenchaSDKTools-2.0.0-Beta\bin-working-copy\app.jsb3 -d ./

Again this these are being run from the "C:\SenchaSDKTools-2.0.0-Beta\bin-working-copy" directory. I had tried to get it to run pointing to another directory for the site without luck. Probably some error on my part but this works so I'm happy.

aw1zard2
21 Mar 2012, 10:46 AM
OK got sencha create jsb working for me on Win 7.
As the sticky thread says don't install the tools in Program Files (x86).
I reinstalled mine to SenchaSDKTools-2.0.0-beta on c:\ and now the sencha create jsb is working fine for me.

I didn't read all the posts in this thread so I might be repeating info.

I'm testing the create jsb command against my existing Ext JS 4.0.7 mvc app I had which was working fine with Sencha SDK Tools 1.2.3.

maneljn
2 Apr 2012, 9:16 AM
for me same problem with

windows 7 x32 home
sencha extjs 4.0.7
sencha sdk tools 2.0.0 beta

This does nothing

sencha create jsb -a ./index.php -p ./app.jsb3

westy
3 Apr 2012, 3:27 AM
Also need to build JSB's once finally get an SDK that can also slice themes...

If this has not been escalated, please do so, if it has then it has not gone high enough.
Heads should be rolling, and people should be all over this!

As is people cannot use Ext 4.1.0 if they require support for old IE's, and Touch developers cannot package their apps (if I understand correctly).

Two serious showstoppers right there...

vadimv
8 Apr 2012, 2:35 AM
Also need to build JSB's once finally get an SDK that can also slice themes...

If this has not been escalated, please do so, if it has then it has not gone high enough.
Heads should be rolling, and people should be all over this!

As is people cannot use Ext 4.1.0 if they require support for old IE's, and Touch developers cannot package their apps (if I understand correctly).

Two serious showstoppers right there...
100% agree.

westy
8 Apr 2012, 2:53 AM
I've tried posting many times, hinting in other threads, and finally raising a support ticket; even asking if someone with a working slicer can slice my images for me if I send my CSS. No success yet.

I find it odd, given that the main goal of Ext 4.1.0 is to increase performance, and specifically in older browsers.

Guess we'll have to wait.
We're going to potentially have to delay a release due to having no slicer; annoying...

bax1989
9 Apr 2012, 12:57 AM
I installed the application in C:\Sencha;
First disappointment was when I should firstly deploy te application, start the application server and only then the command 'sencha create jsb -a http://localhost/app/index.html -p app.jsb3'
Having the app.jsb3 file generated I run the second command 'sencha build -p app.jsb3 -d .'
Now I get the app-all.js file. But this file does not change anything, the application continue to download js files from web server (that's a screenshot from Chrome) :
33760

As I understand it should not do this, it shoud load only the last 3 files, app-all, ext.js. config.js is a file wich declare some constants :

Ext.define('ApplicationConfig', {
singleton: true,


elements: {
FIRST_ELEMENT: '1',
SECOND_ELEMENT: '2',
},


FIRST_PARAM: 'param1',


SECOND_PARAM: 'param2',
....
});

aw1zard2
9 Apr 2012, 6:24 AM
@bax1989

Confirm that the ext js components are in the app-all.js.
If so don't load ext.js.
app-all.js should have everything.
ext.js has dynamic loading turned on so it will still download things if you have it in there.

Let me know if you run into anything else.

Also if you edit the jsb3 file before you build and put in your config.js to be included in the app-all.js you would only need 1 file.

bax1989
10 Apr 2012, 12:38 AM
If I don't load ext.js I get "Ext is not defined".
I see in resources AbstractCard, I can't find out AbstractCard in app-all.js neither in all-classes.js.
For example Observable.js is declared in app-all.js and Ext does not download it.
Having this, I think the porblem is in resolving all dependencies when building all-classes.js and not in runtime.

aw1zard2
10 Apr 2012, 6:30 AM
The easiest way I used the build tools was remove all the ext components and just have it bundle my own js files.
Then just used ext-all.js and my own app-all.js.
Try instead of ext.js using ext-core.js.

See if everything comes up with that if so can add that into the all-classes.js to bundle everything into one.

westy
10 Apr 2012, 7:02 AM
I use ext.js for my built version, ext-dev.js for my version to build against, and ext-all-debug.js for development.

Some simplified snippets from my HTML...

index_dev.html:


<!-- Ext includes -->
<script type="text/javascript" src="lib/Ext/extjs-4.1.0-rc2/ext-all-debug.js"></script>


<script type="text/javascript">
// Set up dynamic class loader
Ext.Loader.setConfig({
enabled: true,
disableCaching: false
});
</script>


<!-- Application.js includes -->


index_build.html:


<!-- Ext includes -->
<script type="text/javascript" src="lib/Ext/extjs-4.1.0-rc2/ext-dev.js"></script>


<script type="text/javascript">
// Set up dynamic class loader
Ext.Loader.setConfig({
enabled: true,
disableCaching: false
});
</script>

<!-- Application.js includes -->



index.html:


<!-- Ext includes -->
<script type="text/javascript" src="lib/Ext/extjs-4.1.0-rc2/ext.js"></script>


<script type="text/javascript">
// Set up dynamic class loader
Ext.Loader.setConfig({
enabled: false,
disableCaching: false
});
</script>

<!-- Include our built JS -->
<script type="text/javascript" src="app-all.js"></script>


I've written my own bootstrapping process to pull in CSS etc, but that's essentially what's going on.

aw1zard2
10 Apr 2012, 8:08 AM
Yeah sorry I cant give details into what I'm working on.
I can give a simple description though.
Currently we have an Architecture app that is our own extends on Ext components which loads first.
Then we have a Common Architecture app that loads using the Architecture app components to create common "screen layouts".
Then we get into loading individual zone app's (think of zones as departments so Billing, Purchasing, Inventory, and etc.) which loads and unloads depending on where the end user brings up based on a common menu.

Right now we have 4 zones finished with about 683 zone apps created. In the end we will have around 2700 zone apps when we get everything finished.

We also have a common hold area for data needing to be passed between zone apps.

I can go on for days but I will stop there. :)

bax1989
11 Apr 2012, 2:12 AM
I put all my ext js files inside one file(allClasses.js) and imported this file and ext-all js, ext-all js script gives me error that it does not find some classes, but they are all present.

bax1989
11 Apr 2012, 3:05 AM
The error occurs because of "requires" statements, it is safe to delete all "requires" statements (I garantee that I'll have all class defined but not in the order that classes which depends on other are defined last) ?

bax1989
11 Apr 2012, 4:23 AM
Oh.... and not only the "requires" statement, when some controller reference some view, the view should be declared first ...

aw1zard2
11 Apr 2012, 6:46 AM
Yeah the order does matter a lot.
Below is the link discussing the kind of structure I'm following for our MVC.

http://www.sencha.com/forum/showthread.php?185101-Dependencies-are-Out-of-Order&p=747688&viewfull=1#post747688

My arch app is nothing but requires in order I want.
Then common app handles the rest.

ericwdunn
11 Apr 2012, 10:37 AM
I am not having fun...

I moved (uninstalled/reinstalled) the tools 2.0.0 beta to c:\ instead of c:\program files.
I changed the GenerateJSB.js file as instructed.
Next cmd line to project .
ran the create command: sencha create jsb -a index.html -p app.jsb3
got error:
[ERROR] Jsb generation failed.
TypeError: 'null' is not a constructor

the JS is this (same as in getting Started Guide):
Ext.application (http://www.sencha.com/forum/#!/api/Ext-method-application)({
name: 'HelloExt',
launch: function() {
Ext.create (http://www.sencha.com/forum/#!/api/Ext-method-create)('Ext.container.Viewport (http://www.sencha.com/forum/#!/api/Ext.container.Viewport)', {
layout: 'fit',
items: [
{
title: 'Hello Ext',
html : 'Hello! Welcome to Ext JS.'
}
]
});
}
});

What am I missing?

NEVERMIND - I figured it out...

GeneralPatten
11 Apr 2012, 11:33 AM
@ericwdunn - would you mind detailing the issue and your resolution?