1. #1
    Sencha Premium Member
    Join Date
    Jun 2012
    Posts
    18
    Vote Rating
    2
    HansGroeneveld is on a distinguished road

      3  

    Default Installation nigtmare

    Installation nigtmare


    I tried several times in the past to start with Sencha. Even bought a Complete suite.
    The main problem is that the installation is a real nightmare.
    You have to install dozens of applications, with the correct version number (Sencha Archtitect 2.x, CMD x.x, SASS, Java x.x, etc, etc.) Mostly you have to change a lot of settings and files.
    It is horrible for starting users, like me, to get things to work.

    Do you work on a complete installation that is able to install all you need in one setup? I think you will please a lot of starting (and expert) users.
    A workaround could be to prepare a Virtual Box with a Linux distro that includes all the apps you need. That you can start straight ahead with Sencha Architect, follow a step-by-step create my first app and deploy it without hussles to a device.

    Can that be done. Or is it be done already...

  2. #2
    Sencha - Architect Dev Team Phil.Strong's Avatar
    Join Date
    Mar 2007
    Location
    Olney, MD
    Posts
    1,902
    Vote Rating
    62
    Phil.Strong is just really nice Phil.Strong is just really nice Phil.Strong is just really nice Phil.Strong is just really nice

      0  

    Default


    Hans,

    A great idea regarding the virtualbox, I'll suggest and look into this.

    We have been making strides to making this experience less tedious.

    Cmd now includes SASS and Compass in the installation. It does still require Java and Ruby 1.8+.

    Architect in the next release will include proper version of Cmd and frameworks built in.

    We do have a complete installer that we know leaves a lot to be desired. As far as I know we are working toward improving this experience.
    Phil Strong
    @philstrong
    #SenchaArchitect
    Sencha Architect Development Team

  3. #3
    Ext JS Premium Member tangix's Avatar
    Join Date
    Mar 2010
    Location
    Stockholm, Sweden
    Posts
    550
    Vote Rating
    50
    tangix is a jewel in the rough tangix is a jewel in the rough tangix is a jewel in the rough

      1  

    Default


    Hi!
    I have put together this step-by-step (mainly for internal use as may notice - James Cameron wasn't Director of these screencasts...) that shows the complete way to build a Sencha Ext JS monolithic build using a VM, Sencha Cmd, Ext JS and SA.
    SA runs on my host system (Windows 7 64-bit) and the VM is created with Linux Mint 14 distribution. I make extensive use of the Terminal in Linux and the tab-autocomplete, so being comfortable around the Linux command prompt is recommended.

    Step 1 - Create a VM using Linux Mint
    Download and install Oracle VirtualBox for your host system and install it.
    Download Linux Mint 14 distribution media from http://www.linuxmint.com/
    I strongly recommend 64-bit version, even if you won't allocate more than 2-4GB of RAM.

    Here's a video setting up the VM and doing the configuration. Steps are described below:
    http://screencast.com/t/utbUWVPXQPc

    Create a Virtual Machine ("VM") in VirtualBox, Linux and Debian (64-bit).
    Allocate 8GB of Disk and 2GB of RAM. (Your milage may vary, so change accordingly).
    After creating the VM, don't start it - instead change the settings to use the ISO-image of Linux Mint that you downloaded as CD-ROM.
    Boot the machine and allow the Linux Mint 14 desktop to appear.

    Double-click the CD that is placed on the desktop and run through the installation wizard. The username and password you enter during the installation will be the one you should use for the "sudo" commands when prompted for a password.

    Reboot the machine when prompted - remember to remove the CD-image using the menu.
    When the reboot is done, install the VM guest additions with the following steps:
    1. In the VM menubar - select Devices -> Install Guest Additions
    2. A CD will appear on the desktop, click Cancel in the prompt
    3. Right-click the Desktop background and open a terminal
    4. Type "sudo -s" to become super-user - you are prompted with the password you entered during installation
    5. Type "cd /media/<username>/VBOXADDITIONS_x.y.z_build/" (fill in accordingly, vill be different depending on your version of VirtualBox)
    6. Type "./VBoxLinuxAdditions.run" to start the installer
    7. Answer "yes" when prompted to replace the drivers that are already ionstalled
    8. Finish installation and then reboot ("/sbin/init 6" command) the VM
    Step 2 - Install Sencha Cmd, ruby and Ext JS
    Download Sencha Cmd from Sencha web-site

    http://screencast.com/t/UMIzWE8Mx

    Unzip and change the permissions of the installer:
    1. Open a Terminal
    2. cd to the Download directory
    3. unzip the SenchaCmd installer
    4. Change permissions to 755 of the installer
    5. Run the installer and allow Sencha Cmd to install
    Now it is time to install ruby
    1. Switch to super-user with "sudo -s"
    2. Run "apt-get update"
    3. Install ruby using "apt-get install ruby"
    4. Close the terminal window and open a new one (to get path set correctly)
    5. Verify that Sencha Cmd is working by typing "sencha" - you should see the version number
    Download Ext JS from Sencha web-site (I am using the GPL version for this demo)
    Open a Terminal window and create a working-directory inside ~/Documents with the name sencha-cmd (when you right-click the Desktop to open a Terminal you will have ~/Desktop as working-directory)
    1. cd ../Documents/
    2. mkdir sencha-cmd
    3. cd sencha-cmd
    4. cp ../../Downloads/ext-4.2.0-gpl.zip .
    5. unzip ext-4.2.0-gpl.zip
    Time to create a test Ext JS project:
    1. cd ext-4.2.0.663
    2. sencha generate app demo ../demo-app
    3. cd ../demo-app
    4. sencha app build
    The result of the build is placed in the build directory - we have a sane Sencha Cmd environment!

    Step 3 - Set up integration between VM and your host computer using Shared Folder
    To be able to transfer files between my host computer (where I run Sencha Architect) and the VM (where I run Sencha Cmd) I use VirtualBox's Shared Folder approach.
    I first create a directory on the host system where I will put Sencha Architect's files when publishing.

    Create a new Ext JS project in SA, place a viewport and a panel and then make sure to change the name of the Application (to "HW" in this example).

    http://screencast.com/t/KkpwKhJruuJl

    Set the publish path to the planned shared directory and do a publish to that directory from SA. Make sure not to have any spaces or other strange characters.

    Shutdown the VM and go to VirtualBox manager and edit the settings for the Sencha Cmd VM.

    http://screencast.com/t/1LpDtdd7rFp

    Point to the directory above the one the one you did the publish to and setup this with auto-mount and full access.
    The directory will be available in the VM with the path /media/sf_<name of directory> - we will call it /media/sf_xxx going forward.

    But - we need to change group membership of that user we have created when installing (my username was "msa").

    http://screencast.com/t/cSAWTfNaV9

    Start the VM and then right-click the desktop in the VM to get a Terminal.
    1. "whoami" to get my username
    2. "sudo usermod -a -G vboxsf msa" to set my account to belong to the group vboxsf to get access
    3. "cd /media/sf_xxx"
    4. touch testfile
    5. rm testfile
    Done - we have interaction between the VM and the host system!

    Step 4 - Create a new Sencha Ext JS project with Sencha Cmd
    A new project with the same name as the one in SA ("HW") should be created using Sencha Cmd. Open the VM and change to the Ext JS framework directory and then create a new project, matching the name of the SA project.

    http://screencast.com/t/Oagm4J05r1O
    1. sencha generate app HW ../HW-build
    2. cd ../HW-build
    3. sencha app build

    Step 5 - Merge the stuff from the published SA project
    We have the skeleton project created with Sencha Cmd in step 4.
    To copy our SA project we need to delete the ./app directory and then copy the app/ directory and app.js file from the publish directory.

    http://screencast.com/t/8XPuzmq1zAf

    The steps to make this while in the skeleton directory are:
    1. rm -rf ./app
    2. cp -R /media/sf_xxx/<publish-directory>/app .
    3. cp /media/sf_xxx/<publish-directory>/app.js app
    4. sencha app build

    Open the generated single file and enjoy!
    When making changes in SA - publish and then repeat step 5 to build a new version.

    Hope this helps someone out there!
    /Mattias
    Last edited by tangix; 26 Apr 2013 at 2:35 AM. Reason: typos, typos.... Added sudo info based of feedback.

  4. #4
    Touch Premium Member BostonMerlin's Avatar
    Join Date
    Aug 2010
    Location
    Boston
    Posts
    522
    Vote Rating
    41
    BostonMerlin has a spectacular aura about BostonMerlin has a spectacular aura about BostonMerlin has a spectacular aura about

      0  

    Default


    Good lord that's a checklist from hell! Thanks for sharing, though.
    I love being a dad (5 & 7), flying airplanes (KBED) and writing code (spaghetti).
    BostonMerlin aka John Bond aka JB
    See U @ SenchaCon '13

  5. #5
    Ext JS Premium Member tangix's Avatar
    Join Date
    Mar 2010
    Location
    Stockholm, Sweden
    Posts
    550
    Vote Rating
    50
    tangix is a jewel in the rough tangix is a jewel in the rough tangix is a jewel in the rough

      1  

    Default


    But it's all inclusive - setting up VM, Shared Folders, ruby, Sencha Cmd, Architect and how to create your compiled project - all in 5 "easy" steps (once you know how to do it )
    After struggling with Sencha Cmd on both Mac and Windows, ending up with hosed systems in both cases, I gave up and went the VM route.

  6. #6
    Sencha - Architect Dev Team Phil.Strong's Avatar
    Join Date
    Mar 2007
    Location
    Olney, MD
    Posts
    1,902
    Vote Rating
    62
    Phil.Strong is just really nice Phil.Strong is just really nice Phil.Strong is just really nice Phil.Strong is just really nice

      0  

    Default


    Great share. I've referenced that post in the jira story I created to do something similar shared from Sencha.
    Phil Strong
    @philstrong
    #SenchaArchitect
    Sencha Architect Development Team

  7. #7
    Sencha Premium Member
    Join Date
    Jun 2012
    Posts
    18
    Vote Rating
    2
    HansGroeneveld is on a distinguished road

      0  

    Default


    What do you mean with 'Jira story'. Would you make an ISO that we can download or would you reference to the steps of tangix? (great work tangix!)
    My experience is that the description of tangix would work now, but will fail with a next version. If you prepare a up-to-date ISO that users can download they start right out of the box.
    (Better it would be in the Cloud .

  8. #8
    Sencha User
    Join Date
    Jul 2009
    Posts
    2
    Vote Rating
    0
    kmurph92 is on a distinguished road

      0  

    Default THANK YOU!!!

    THANK YOU!!!


    This post helped me so much! We use a similar (though not exact) VM setup and after struggling with Sencha Cmd for almost TWO DAYS, steps 4 and 5 got me going in the correct direction.

    The only thing I had to do differently (which may help others in the same situation) is in Step 5 part 3, instead of copying app.js to the app directory:

    cp /media/sf_xxx/<publish-directory>/app.js app

    I had to copy the app.js to the publish directory:

    cp /media/sf_xxx/<publish-directory>/app.js .

    Cheers and thanks again!

  9. #9
    Ext JS Premium Member tangix's Avatar
    Join Date
    Mar 2010
    Location
    Stockholm, Sweden
    Posts
    550
    Vote Rating
    50
    tangix is a jewel in the rough tangix is a jewel in the rough tangix is a jewel in the rough

      0  

    Default


    Thanks!SA3 is much more self-contained and easier to set up. However, I never got it to run on my Windows 7 64-bit so I setup another VM and running SA3 and building inside that machine.

  10. #10
    Sencha User
    Join Date
    May 2014
    Posts
    2
    Vote Rating
    0
    hesham is on a distinguished road

      0  

    Default we are now in 2014 and Sencha setup is still nightmare

    we are now in 2014 and Sencha setup is still nightmare


    I have tried several times to get the setup right and failed royally every time. I'm a Mac user and I want do it right without any VMs. I'm ready to pay for someone to set it up for me so I can carry on with my plans of training and projects.. a few months were waisted in trying to setup Sencha and every time it is so frustrating that I leave it for a few weeks.

    Please help!