기본 콘텐츠로 건너뛰기

[Sencha Touch] How to install Sencha Touch Cmd on Ubuntu, Linux

source: http://www.icodeya.com/2012/12/installing-sencha-touch-201-on-ubuntu.html

I change a few confusing and wrong parts. (Thanks anyway, you-who-wrote-this-great-post)

For this tutorial, I used the following 
Be sure to download the Sencha Touch SDK and the Sencha Touch CMD, and be sure to download the ones for linux! According to some sources, Sencha Touch 2.1 is no longer using Sencha SDK Tools but using Sencha CMD instead as of writing time. You might want to read about it! :D 

After downloading the 2 files. They're gonna look something like the screenshot below. The Sencha Touch SDK is a simple zip file, while the CMD is a runnable zip file.


Step 1 
Unzip Sencha Touch 2.0.1-gpl.war to /var/www/ folder. If you get a permission error, simply unzip it in it's current folder and do a sudo cp like the one below: 
sudo cp -r sencha-touch-2.1.0-gpl /var/www/sencha-touch-2.0.1-gpl
Step 2 
After copying/unzipping Sencha Touch 2.0.1-gpl.war to the /var/www folder, next, we have to run the Sencha CMD file thingy. To run the file simply type the following on the terminal. If it asks for a password, give it your password! 
sudo ./SenchaCmd-3.0.0.250-linux.run
#DO NOT use sudo in the above command. Sudo messies up with the files and directories installed, which leads to failing on building your first app. Just emit the sudo and type as follow
./SenchaCmd-3.0.0.250-linux.run
Of course, extract it on folder for which you have permission, such as, /home/yourname/Application/
A window similar to the one below should appear. Just keep on clicking next until the setup is complete. You can point the app to any directory that you want, but I personally like to keep my apps inside my ~/home/icodeya/Applications folder. 


Step 3 
Once the setup is done, it will add a path to your .bashrc profile similar to the one below.

If you test the command "sencha" at this point, there is a big possibility that you will receive this error message: 
icodeya@Mephisto:~$ sencha
sencha: command not found
This is because we need to restart or logout of the pc after an installation has been done. To avoid doing this, simply go to your terminal and make sure you're inside the folder where .bashrc is kept. Most typically it's located in the "home/yourUserName" folder. Type the following on the terminal. 
icodeya@Mephisto:~$ source .bashrc
After that try typing "sencha" on the terminal and it should work as shown below: 

Step 4 
For permission:
icodeya@Mephisto:/var/www$ sudo chown -R icodeya:www-data sencha-touch-2.0.1-gpl

Step 5 
To make your first App simply type: 
icodeya@Mephisto:/var/www/sencha-touch-2.0.1-gpl$ sencha generate app GS ./GS
Tada! If everything went well, the result should look something like this. 
To see the fruit of your work, simply open the browser and navigate to "http://localhost/sencha-touch-2.0.1-gpl/GS/". It should look something like this: 

댓글

  1. Hey buddy!! What amazing and useful information you are sharing here, thanks for sharing. I would love to share this information on mine post also so that the visitors of my blog also get a chance to become familiar with this information.

    Sencha Touch Development Company
    Hire Sencha Touch Developer

    답글삭제

댓글 쓰기