How to install Appzard offline

Hello everyone,

In this topic, I would be explaining how to install and run appzard offline version on your device.
First, please check that your device is compatible to run appzard:

Prerequisites

1- Your device must have at least 700 MB free, in order to be able to have all the required files for appzard downloaded correctly.
2- Your device OS must be either Linux or Windows, or macOS.
3- Your device architecture must be:

  • For Windows: 64bit
  • For Linux: x64_86 or aarch64

4- Your device must have the following softwares:

  • Java: Java is required in order to run appzard workspace locally, a JDK must be installed in your device.
    To check if java is already installed on your computer, you can run java -version to verify the installation, if it reports java isn’t recognized, so you will need to install java on your device.
    To install Java, you can either download the compressed JavaSE 8 for your platform officially from the oracle downloads, extract the files in the directory you prefer, or use the installer.
    Then, create a new system environment variable named JAVA_HOME, with the value of the place where you installed the Java JDK (i.e: C:\ProgramData\Oracle\Java\javapath ), then add an entry in the environment PATH variable with the value %JAVA_HOME%/bin to point to the JDK binaries. Now restart your terminal, or start a new terminal, and run java -version to verify the version.
    Note: You must install Java 8, or otherwise the buildserver will not work correctly.

If your system is compatible with the above Prerequisites, you are good to go on and install Appzard!

Installation

To install Appzard offline CLI, appzard offers a simple install script to run, in order to install Appzard offline, you can execute this script by running the following command:
curl -s https://raw.githubusercontent.com/AppZard1/AppzardOffline/main/scripts/install.sh | bash
In a gitbash/linux terminal, if everything goes correctly, you should get a similar output:

$ curl -s https://raw.githubusercontent.com/AppZard1/AppzardOffline/main/scripts/install.sh | bash
Starting Appzard installation..
Downloading Appzard executable..
######################################################################## 100.0%
Done!
Downloading Appengine java SDK..
######################################################################## 100.0%
Done!
Downloading Build files..
######################################################################## 100.0%
Done!
Downloading Buildserver files..
######################################################################## 100.0%
Done!
Downloading Upgrade Script..
######################################################################## 100.0%
Done!
Unpacking files..
Done!
Appzard has been successfully installed on your device! Please add this path: /c/Users/Username/.appzard/bin to your PATH environment variable, then run appzard -v to verify the installation.

As adviced in the last promot:
Appzard has been successfully installed on your device! Please add this path: /c/Users/Username/.appzard/bin to your PATH environment variable, then run appzard -v to verify the installation., you will need to add appzard’s binaries path to your PATH variable.
In order for the appzard command to work, You might need to do some changes if you are a windows user in the path, to make it possible to add as a PATH variable entry, for example, this path: /c/Users/Username/.appzard/bin, would be c:\Users\Username\.appzard\bin, so in fact, you would need to hange slashes, to windows back slashes (\), and change the disk name from a normal directory /c/ to a file scheme, i.e: C:\. Or manually find the ~/.appzard/bin directory, and copy its path from your file explorer.
After you modify the environment variable, run appzard -v, if it reports the latest version, so you are all done, you have installed Appzard Offline CLI :grinning_face_with_smiling_eyes:
Note: You must have an internet connection when installing appzard, to be able to download the files from the cloud, or otherwise it won’t work.

Starting the local server

After you have successfully installed appzard on your computer, you can cause appzard CLI to establish a new appzard local server, start a new terminal, then run:

$ appzard start

Starting the server should take <1/2 minutes, depending on your machine’s specs, when it reports: You are being redirected to appzard's local instance url, in case it doesn't start, please navigate manually to http://localhost:8888, so appzard has started successfully! You should already been redirected to your browser on the http://localhost:8888, the appzard’s local server url.

Diagnosing Problems

  • An appzard instance is already running!
    Appzard’s CLI might have reported you an error when starting appzard local server, by running appzard start, this means either:
    1- Another program is using the 8888 port on the localhost host, and subsequently failing to establish a connection from appzard offline to a used port.

    2- You have started, but didn’t kill a previous appzard instance, in another terminal.

    If there is another program using the 8888 port on your local network

    To check the processes using the 8888 port, please run:

    netstat -ano | findstr :8888
    

    In your prefered terminal, you will get a simmilar output:

     TCP    0.0.0.0:8888           0.0.0.0:0              LISTENING       17692
     TCP    YOUR_LOCAL_IP:60121        127.0.0.1:8888         TIME_WAIT       0
     TCP    YOUR_LOCAL_IP:63783        127.0.0.1:8888         TIME_WAIT       0
     ...
    

    The last item in each line is the process PID, for example 17692, we will use this to kill the process.
    Now, run:

    # On windows CMD
    taskkill /PID 17692 /F
    # On gitbash terminal
    tskill 17692
    

    To kill the process, now you should be able to start an appzard instance.

    If another appzard instance is running

    In case you had another appzard instance running, you have to options to do:

    1- If you have the instance of appzard which is serving the previous appzard instance running on a terminal, use CTRL + C to kill this terminal and it’s attached processes.

    2- If you don’t have it running on a terminal, either follow the example above to kill the process, or, if you are on windows, use CRTL + R then, write taskmgr, and kill the java processes, that should be sufficient for the instance to stop using the localhost port.

  • Either a previous buildserver is running or the buildserver port is unavailable, please kill the process using the buildserver port and try again.
    The above applies for this error message too, with a change that it’s port is 9990.

  • A blank screen appears when starting appzard
    You could try to hard reload and clear the cache for this page, this has proven to work for multiple users.

  • If you have found another problem, please report it to us, by opening a new topic in either the #discuss or #feedback:bugs categories.

Performing Upgrades

Upgrades are periodically released for appzard offline, to upgrade appzard to the latest version, please run:

#Windows:
bash $APPDATA/appzard/scripts/upgrade.sh
#Linux/Mac:
bash $HOME/.appzard/scripts/upgrade.sh

The community is updated whenever a new update is released, you can also use appzard doctor, or run the upgrade script to check if you are up to date ( Please see The Doctor section ).

Forced upgrades

Sometimes, it’s useful to force an update to download all the required files by appzard offline, even though you are up to date, or the update didn’t require all files to be downloaded, possibly because some files haven’t been downloaded successfully ( you can check this by running appzard doctor.). To force an upgrade, you just need to add the -f flag, for example:

#Windows:
bash $APPDATA/appzard/scripts/upgrade.sh -f
#Linux/Mac:
bash $HOME/.appzard/scripts/upgrade.sh -f

The Doctor

Appzard doctor is a tool helps in diagnosing errors with Appzard, you can use it by running:
appzard doctor, it will check for potential problems which could result in miss-function for appzard.

Potential Errors

  • A JDK installation wasn't found on your device
    Looks like you haven’t installed a JDK on your device, or you have one, but didn’t set the JAVA_HOME variable, please check the Prerequisites section for more information about installing the JDK.
  • This appzard offline version is mis-installed. The ... directory for appzard was not found on your device.
    Looks like some files hasn’t arrived when installing, please check the Performing Upgrades>Force Upgrades section for more information.
  • Port PORT_NAME is used by another program or appzard instance!
    Please check the Starting the local server> Diagnosing Problems > If there is another program using the PORT_NAME port on your local network section.
  • An appzard update is available.
    Please check the Performing Upgrades section.

I hope this guide makes it easier to install appzard offline, in case you have problem with installation, feel free to ask about it, thank you!
-Mohamed Tamer

14 Likes