Avoid Sencha cmd upgrade while Sencha app build - build

During Sencha build process I always require to upgrade Sencha cmd up-to its latest version.
Can we avoid upgrading Sencha cmd version?
Used command:
sencha app build classic

Find out the version numbers
In your ExtJs workspace folder you could find the file <workspaceDir>/.sencha/app/sencha.cfg.
If you search for the value of app.cmd.version you know which Sencha Cmd version was used to build your app.
Usually this version should match your active Sencha Cmd version. If you execute sencha help on command line you will get the installed version.
Switch between Sencha Cmd versions
If you have multiple ExtJs apps with different Sencha Cmd versions, you also could install multiple Sencha Cmd versions on your machine.
Execute the following command in your terminal:
sencha switch -l
Here you will get a listing of all your installed versions. And with the following command you can switch versions:
sencha switch 6.2.103
With this in mind you can match your active Sencha Cmd version with your app cmd version before you start the build process.

Related

Can't add WSL Node Interpreter to WebStorm

I need to add WSL node interpreter to WebStorm (2020.1) but Linux distribution is not detected by WebStorm, even though I have Alpine WSL install through Windows Store.
I read this question, but no help. Also manually adding entry in wsl.distributions.xml didn't work, did a lot of research but nothing worked.
I was able to use WSL as terminal in WebStorm by adding wsl.exe location to shell path. My objective is to run npm scripts form from Run/Debug configuration.
I solved by reinstalling WebStorm and copying options folder
from C:\Users\me\AppData\Roaming\JetBrains\WebStorm2020.1
to C:\Users\me\AppData\Local\JetBrains\WebStorm2020.1, then WebStorm could detect Linux distribution installed on machine.
But, now when I am trying to run scripts from NPM Tool Window of WebStorm, WebStorm runs C:\Windows\System32\wsl.exe run "/usr/local/bin/node /usr/local/lib/node_modules/npm/bin/npm-cli.js run start --scripts-prepend-node-path=auto" where run is redundant coming after C:\Windows\System32\wsl.exe ...
How can I set WebStorm to not have run in wsl.exe run ...?

Running Sencha Touch app on Java Eclipse & Android Emulator on Windows 8 (without phonegap)

I am getting trouble in running sencha touch 2 app on android emulator (without using cordova/phonegap) on windows 8 using .
Below is the list of packages installed on DEV machine:
1. JRE v1.7
2. Sencha Touch v2.4.1 SDK
3. Sencha SDK Tools 2.0.0 beta
4. Sencha Cmd 5.1.2
5. Ruby 2.0.0
6. Chrome (Browser)
7. Web Server - Both IIS 8 & XAMPP
8. Android SDK 23.0.6
9. Eclipse IDE (integrated with VJET Library & ExtJSTL 4.2)
10. Android ADT Manager (installed emulator snapshots targeting os2.2 & 5.1)
"MyApp" project runs perfectly on chrome browser when hosted on IIS 8 & XAMPP (apache). But not able to figure out steps to run the same on android emulator. So far followed below mentioned steps, leading to unsuccessful attempts:
sencha app build native [Command Successful]
sencha app build -run native [Command Successful]
sencha app build package [Command Successful]
Started emulator instance from eclipse (avd) and executed command sencha app build -run native, but the app doesn't execute on emulator instance.
Followed steps mentioned in post (http://www.sencha.com/forum/showthread.php?215210-how-to-run-sencha-touch-app-on-android-emulator-on-windows) but still facing issues.
Please help!!
do u want to run it as website for mobile?
as u are saying, you don't want to use cordoav/phonegap.
If u just want to run on Mobile Browser U can use Netbeans. It has a very simple feature to allow a html5 application to be run on Mobile browser
all U have to do is
1. Create HTML5 Project in netbeans
2. Run command "sencha app build native"
3. copy all files & folders form directory cordova->www which exist in your sencha app directory
4. Paste it into your HTML5 Project directory
5. Choose The Browser option in netbeans and run
Thanks Nitish for your suggestions. But this is not what my query was all about. I was trying to figure out a way of running sencha touch app on emulator without compiling it to native app following steps mentioned in post: http://www.sencha.com/forum/showthread.php?215210-how-to-run-sencha-touch-app-on-android-emulator-on-windows.
Anyways, to run sencha touch app on emulator I had to create native android app using cordova/phonegap wrapper. To run sencha touch app (which is mobile web portal equivalent), it is required to be wrapped inside native app (android, ios, etc) followed by app signing and APK / IPA file generation.

sencha app build native without minify JS

I want be able to build a native app, but without minifying the JS so I can debug it later confortably.
Currently I'm executing:
sencha app build native
How can I be able to build without minifying JS files?
Thanks
For native build, you can only have testing option after upgrade to Sencha CMD 5.x, refer to
http://docs.sencha.com/cmd/5.x/cmd_upgrade_guide.html
Under Cordova / PhoneGap
"These build profiles ensure that all of the “sencha app build” command variations are equivalent to previous releases. You will notice, however, that “native” is now a build profile instead of an environment (like “testing” or “production”). This means you can now do “sencha app build native testing” which was previously not possible."
So, the command should be
sencha app build native testing
You need to use this command line instead:
sencha app build testing
That way, all JavaScript source files are bundled but not minified; and you could debug easily.
See Sencha CMD 4 documentation for more details.

Calabash-Android on WIndows 8 issues

We need a quick help. We were trying to automate our Andriod mobile app using calabash. We have grown through all your related tutorials but can't succed in real scenario.
We did following for our app:
Installed Ruby, Android SDK, JDK, Calabash on Windows 8.
jdk - jdk-7u51-windows-x64
RUBY - rubyinstaller-1.9.3-p545
sdk - fOR 64 BIT
Set Environment variables:
ANDROID_HOME - C:\Users\Dinesh\Desktop\Calabash\adt-bundle-windows-x86_64-20131030\adt-bundle-windows-x86_64-20131030\sdk
JAVA_HOME - C:\Program Files\Java\jdk1.7.0_51
Connected Samsung S3 Andriod device to USB (USB Debugging = Checked)
Open eclipse and run Emulator
I can see my connected device by running ADB DEVICES command.
ISSUES:
A. Though we have JDK installed, we always get "JAVA DEVELOPMENT KIT Could not" error message while resigning apk file. How to get rid of this message?
B. Real android device (connected to the USB) is not showing up in the emulator and also in the Android Virtual Device Manager list?
HOW TO INSTALL CALABASH FOR ANDROID IN WINDOWS
Steps to follow:
Download Ruby.exe with version less than 2.0 (In this tutorial I am going to use rubyinstaller-1.9.3-p545.exe)
Download Ruby Development Kit (For use with Ruby 1.8.7 and 1.9.3)
Create a folder called DevKit in C:\DevKit
Extract Ruby Development Kit (DevKit-tdm-32-4.5.2-20111229-1559-sfx.exe) to C:\DevKit
Open command.exe or cmd.exe and type ruby -v to check ruby version(ruby 1.9.3p545 (2014-02-24) [i386-mingw32])
Now type: cd C:\DevKit and press enter
Then type: ruby dk.rb init
Then type: ruby dk.rb install
Then change to Ruby193 directory by typing: cd C:\Ruby193 on cmd
Type: gem install calabash-android
Type: gem install calabash-cucumber
check by typing: calabash-android version
In order to test you *.apk file in calabash you need to re-sign it
So to make it work you can use two options
Option 1:
Type: calabash-android resign *.apk and press enter
Type: calabash-android build *.apk and press enter
or
Option 2:
Use a .jar file called re-sign.jar
Then create a folder called sample in your desktop and place *_debug.apk. Open cmd then change directory where the *_debug.apk file is found and type: calabash-android gen , to generate the feature files and other associated resources.
Last you need to type: calabash-android run *_debug.apk to run the application
Note: To run the application you can use emulator, android device, android screen cast or any related software or devices that allows you to view the process.

Selenium RC: Running browser on another X11 desktop

I'd like not to be disturbed by the browser that is launched by Selenium RC. Is there any way how to force it to run the browser on another X11 desktop? Running Selenuim server on another desktop does not solve the problem.
Vít Šesták 'v6ak'
Yes, on Linux you can start for example Xvfb (X in a virtual framebuffer) to provide an X environment and launch the selenium controlled browser in that.
We are doing that for years on headless server boxes and that work just fine (well from time to time you have to shoot a hanging browser, but that is the same on a desktop).
First install Xvfb:
sudo apt-get install xvfb
Then start selenium server in background via xvfb:
xvfb-run java -jar ~/Downloads/selenium-server-standalone-2.45.0.jar
Finally run your tests as usual (phpunit, or whatever you are using).
You should be able to do this by setting the DISPLAY environment variable to a different display than the one your desktop is using. This must be set when starting up the Selenium server. Selenium will then use this value when starting up the browsers.
I solved this using workspaces/viewports not X using devilspie.
This addon lets you put a custom title on firefox, I installed it on my selenium profile:
https://addons.mozilla.org/en-US/firefox/addon/57/
I replaced Mozilla Firefox in the titlebar with FFSELENIUM
Then use devilspie to pin those windows to firefox:
http://ubuntu-tutorials.com/2007/07/25/how-to-set-default-workspace-size-and-window-effects-in-gnome/ http://foosel.org/linux/devilspie
Then create a file .devilspie/selenium.ds with the contents:
(if
(and
(contains (window_name) "FFSELENIUM")
)
(begin
(set_viewport 3)
)
)
Woot firefox windows in the third viewport!