Using the Sencha Command to Rebuild Optimized JS code
Background
Get the Sencha Command
-
Select under the Installers without JRE Included the LINUX 64-BIT link and download the latest installer.
As the link states, there is no JRE bundled with the installer, you have to install a JRE on your system for the JRE to work correct.
Install a JRE on Ubuntu 20.04
sudo apt install default-jre
Install the Sencha Command
unzip SenchaCmd-7.4.0.39-linux-64-no-jre.zip
#This is the output
#Archive: SenchaCmd-7.4.0.39-linux-64-no-jre.zip
# inflating: SenchaCmd-7.4.0.39-linux-amd64.sh
./SenchaCmd-7.4.0.39-linux-amd64.sh
#This might be needed (!=== REPLACE '/home/system' with the user you are logged in as===!)
export PATH=$PATH:/home/system/bin/Sencha/Cmd/7.4.0.39
Depending if you are on a system with some desktop (like Xfe) or without one, the installer will ask you some questions about the install. Just select the defaults to complete the install.
After the install, you should be able to run the Sencha command
sencha help
Check out the GPL version of ExtJS
#As an example
cd /home/system/Documents/sencha
git clone https://github.com/tremez/extjs-gpl.git extjs-gpl-7.0
Link it to the JS Code
sudo ln -s /home/system/Documents/sencha/extjs-gpl-7.0 /var/www/rdcore/rd/ext
Change the ownership and make create a dev area
sudo ln -s /var/www/rdcore/rd /var/www/html/rd_dev
sudo chown -R system. /var/www/rdcore
sudo chown -R www-data. /var/www/html/cake3/rd_cake/tmp
sudo chown -R www-data. /var/www/html/cake3/rd_cake/logs
sudo chown -R www-data. /var/www/html/cake3/rd_cake/webroot/img/realms
sudo chown -R www-data. /var/www/html/cake3/rd_cake/webroot/img/dynamic_details
sudo chown -R www-data. /var/www/html/cake3/rd_cake/webroot/img/dynamic_photos
sudo chown -R www-data. /var/www/html/cake3/rd_cake/webroot/img/access_providers
sudo chown -R www-data. /var/www/html/cake3/rd_cake/webroot/img/nas
sudo chown -R www-data. /var/www/html/cake3/rd_cake/webroot/files/imagecache
Confirm everything is working
cd /var/www/rdcore/rd
sencha app build production
#Note there will be some JRE related warnings... thats normal
Making your changes 'LIVE'
sudo cp -R /var/www/html/rd/* /var/www/html/