1. #1
    Sencha User
    Join Date
    Feb 2012
    Posts
    44
    Answers
    1
    Vote Rating
    3
    dkamins is on a distinguished road

      1  

    Default Answered: App build workflow & packager.json specification

    Answered: App build workflow & packager.json specification


    First of all, is my understanding correct that in order to build a native app, we must:

    1. Build the app itself in native format:
    Code:
    sencha app build native
    2. Package the app:
    Code:
    sencha package build -p my_packager.json
    I'm confused though because it appears that the first step (sencha app build native) is actually using the default packager.json (i.e. this is where the app's name on the simulator home screen comes from). And I'm not sure how to tell it to use a different JSON file, or why it needs the JSON at that step vs. later.

    I've read all the docs (e.g. below), and I'm still having a hard time wrapping my head around the proper build workflow, how to use these tools, and what information is used at what step.
    http://docs.sencha.com/touch/2-0/#!/...tive_packaging
    http://docs.sencha.com/touch/2-0/#!/guide/command

    Can somebody please explain if I understand correctly, and how to specify a custom JSON (and thus app name) for the app build? Thank you.

  2. Code:
    sencha app build native
    Should do everything for you if you are using Sencha Command.

  3. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    36,754
    Answers
    3462
    Vote Rating
    827
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    Code:
    sencha app build native
    Should do everything for you if you are using Sencha Command.
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

  4. #3
    Sencha User
    Join Date
    Feb 2012
    Posts
    44
    Answers
    1
    Vote Rating
    3
    dkamins is on a distinguished road

      0  

    Default


    OK thanks, that makes sense. So how can we specify which packager.JSON file to use for `sencha app build native`? It seems to insist on using packager.json, but what if we want different variants?

    The command line help does not explain this:
    Code:
    Usage:
        sencha app build [arguments...]
    
    
    Description:
        Build the application at the current working directory to the given path
    
    
    Arguments: (*) denotes required parameter
    
    
          -e, --environment  * The build environment, either 'testing', 'package', 'production', or 'native'
                              + 'testing' is meant for QA prior to production. All JavaScript and CSS Files are bundled, but not minified
                              + 'package' creates a self-contained, re-distributable production build that 
                                 normally runs from local file system without the need for a web server
                              + 'production' creates a production build that is normally hosted on a web server and 
                                 serve multiple clients (devices). The build is offline-capable and has built-in 
                                 OTA delta updating feature
                              + 'native' first generates a 'package' build, then packages it as a native 
                                 application, ready to be deployed to native platforms
          -d, --destination   The directory path to build this application to. 
                              If none given, the default path specified inside 'app.json' is used
          -a, --archive       The directory path where all previous builds were stored,
                              needed to generate deltas between updates (for production only). 
                              If none given, the default path specified inside 'app.json' is used
        
    Examples:
        Long:
          sencha app build --environment=production --destination=/path/to/deploy/myapp --archive=/path/to/myapp/archive 
    
    
        Short:
          sencha app build -e production -d /path/to/deploy/myapp -a /path/to/myapp/archive 
    
    
        Shortest (arguments must be in the right order):
          sencha app build production /path/to/deploy/myapp /path/to/myapp/archive
    However for other commands such as `sencha package build`, there is a `-p` argument to specify the JSON file.

  5. #4
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    36,754
    Answers
    3462
    Vote Rating
    827
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    Sencha Command has this set of standards I guess you can call them. So it will always use packager.json. sencha package build is SDK Tools not Sencha Command. We are going to work to distinguish the two to make it more clear on what is what and why there are two.
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

  6. #5
    Sencha User
    Join Date
    Feb 2012
    Posts
    44
    Answers
    1
    Vote Rating
    3
    dkamins is on a distinguished road

      0  

    Default


    I wasn't even aware there were two different things! Is there anywhere I can read to understand more about the differences? It seems that `sencha package build -p` does the same thing but with more flexibility (i.e. specifying which JSON to use).

    So to clarify, you are saying that if I need to make e.g. a Release build vs. Debug build using `sencha app build native`, I must manually edit the packager.json file?

    Thank you.

  7. #6
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    36,754
    Answers
    3462
    Vote Rating
    827
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    Anything we do with Sencha Touch should be using Sencha Command. SDK Tools was something started with Ext JS 4 and to keep things working with Ext JS SDK Tools is sticking around while Sencha Command is used for Sencha Touch 2.

    So yes, you would have to edit packager.json file. I usually build a shell script (I'm on OSX) and to do soemthing like you want I would have a command line option to use which JSON (you have 3 different ones), copy it to packager.json and then do the build.
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

  8. #7
    Sencha User
    Join Date
    Feb 2012
    Posts
    44
    Answers
    1
    Vote Rating
    3
    dkamins is on a distinguished road

      0  

    Default


    Great, thank you for the clarification.

    Because the "sencha" command line utility apparently runs both "Sencha Command" and "Sencha SDK Tools" (if I am understanding you correctly), it's not clear what you're getting when you run it. But I will stick with "sencha app build ..." from now on, which is the newer "Sencha Command". A note on the http://docs.sencha.com/touch/2-0/#!/guide/command page to this effect would probably be helpful.

    Your idea of maintaining multiple JSON files and copying them over packager.json before running "sencha app build native" is a reasonable approach. We'll integrate this into our build script. Thanks!

  9. #8
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    36,754
    Answers
    3462
    Vote Rating
    827
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    if you type 'sencha' you should be able to tell which is being used either by the version or the available commands are redish when using Sencha Command. Here is a screenshot, the one on the right is the Sencha Command one, one on left is SDK Tools 2

    Screen Shot 2012-04-12 at 2.50.22 PM.jpg
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

  10. #9
    Sencha User
    Join Date
    Feb 2012
    Posts
    44
    Answers
    1
    Vote Rating
    3
    dkamins is on a distinguished road

      0  

    Default Maybe I don't understand then...

    Maybe I don't understand then...


    My commands are "reddish" (i.e. I'm using Sencha Command). The sencha command (you can see in your right screenshot) has "package" as an available module, and you can run `sencha package build` with a -p argument to specify the JSON, which is what I was asking about.

    But you said previously:
    Quote Originally Posted by mitchellsimoens View Post
    sencha package build is SDK Tools not Sencha Command.
    Does the reddish sencha command somehow run the SDK tools, or are you saying something else?

  11. #10
    Touch Premium Member
    Join Date
    Jul 2011
    Posts
    25
    Vote Rating
    0
    tareed is on a distinguished road

      0  

    Default


    Quote Originally Posted by mitchellsimoens View Post
    Anything we do with Sencha Touch should be using Sencha Command. SDK Tools was something started with Ext JS 4 and to keep things working with Ext JS SDK Tools is sticking around while Sencha Command is used for Sencha Touch 2.

    So yes, you would have to edit packager.json file. I usually build a shell script (I'm on OSX) and to do soemthing like you want I would have a command line option to use which JSON (you have 3 different ones), copy it to packager.json and then do the build.
    I am now confused. I think installing SenchaSDKTools-2.0.0-beta2-osx.app installs sencha command. It has a package module (shown in red). I am currently using: sencha app build package and then sencha package build packager.json to build native packages because sencha app build native has a bug that includes my .svn folders in the package. This all seems to work and allows one to use multiple package.json files directly.

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi