Independent engine

1. Introduction

    XWorker is also developed using dynamic models. When the model is enriched to a certain extent, you can directly use XWorker for programming, or you can regard XWorker as an auxiliary platform containing various tools.

2Download XWorker

    XWorker is composed of a series of model libraries. Installing XWorker is actually to download the required model library through Maven (same as Java class library).

2.1. Download script

    You can use the following script to download and install XWorker.

2.1.1.Windows Script

   The following batch command is used to quickly install XWorker. The method is to enter the CMD command console of Windows (not PowerShell), create and enter an installation directory, paste and execute the following script.

    You can copy the necessary parts as needed. For example, if the system has JDK11 or above installed, you can ignore the part about installing java.

echo download java
curl https://download.java.net/openjdk/jdk11.0.0.1/ri/openjdk-11.0.0.1_windows-x64_bin.zip --output openjdk-11.0.0.1_windows-x64_bin.zip
tar -xf openjdk-11.0.0.1_windows-x64_bin.zip
rename jdk-11.0.0.1 jre
del openjdk-11.0.0.1_windows-x64_bin.zip

echo download maven
curl https://dlcdn.apache.org/maven/maven-3/3.8.8/binaries/apache-maven-3.8.8-bin.zip --output apache-maven-3.8.8-bin.zip
tar -xf apache-maven-3.8.8-bin.zip
del apache-maven-3.8.8-bin.zip

echo download xworker
curl https://www.xworker.org/files/xworker-2.0.3-SNAPSHOT.jar --ssl-no-revoke --output xworker-2.0.3-SNAPSHOT.jar

echo setup
"./jre/bin/java" -jar xworker-2.0.3-SNAPSHOT.jar

2.1.2.Linux script

   The following commands are used to download and install XWorker. The method is to enter the Linux terminal, create and enter an installation directory, paste and execute the following script.

    You can copy the necessary parts as needed. For example, if the system has JDK11 or above installed, you can ignore the part about installing java.

echo download java
wget https://download.java.net/openjdk/jdk11.0.0.1/ri/openjdk-11.0.0.1_linux-x64_bin.tar.gz
tar -xvf openjdk-11.0.0.1_linux-x64_bin.tar.gz
mv jdk-11.0.0.1 jre
rm -f openjdk-11.0.0.1_linux-x64_bin.tar.gz

echo download maven
wget https://dlcdn.apache.org/maven/maven-3/3.8.8/binaries/apache-maven-3.8.8-bin.zip
unzip apache-maven-3.8.8-bin.zip -d ./
rm -f apache-maven-3.8.8-bin.zip

echo download xworker
wget https://www.xworker.org/files/xworker-2.0.3-SNAPSHOT.jar

echo setup
./jre/bin/java -jar xworker-2.0.3-SNAPSHOT.jar

2.2. Manually download XWorker

2.2.1. Install Java

    Java requires Jdk11 or above.

    After installation, you can execute java -version in the system console to check whether Java has been installed successfully.

2.2.2. Download XWorker

    Choose to download any jar version of XWorker below and save it to a directory.

2.2.3. Installation command 

  Execute java -jar xworker-x.x.x.jar in the console.

3. Install XWorker

    The last step to download XWorker is to start the installation command, which will lead to the following interface.

    Input the number to select the required XWorker version. These versions are mainly different in the imported class library.

  1. swt
    Contains a basic model library, as well as a SWT-based model manager and WEB server.
  2. explorer
    Contains most of XWorker's model library. Because of the introduction of libraries such as OpenCV, the size is big.
  3. web
    Basically the same as swt, it includes RAP models and can run a SWT-based model editor on the web page.   

    It will take a while to execute after entering the selection, please wait patiently. After the execution is successful, you can see that files such as dml.cmd or dml.sh, swt.cmd or swt.sh are generated in the directory.

3.1. Select model library

    The above will create a pom.xml file, and set the default dependencies according to the selection. You can also modify pom.xml to add or modify dependencies yourself. After modification, re-execute java -jar xworker-x.x.x.jar.

    To view XWorker and those model libraries, you can refer to Model Library Tool.

4. Run the model editor

    Run swt.cmd or swt.sh to open the model editor.

5. Run the example

    Run example.cmd or example.sh to run the example. Alternatively, the examples can be opened through the help menu of the model editor.

 

Copyright ©  2007-2019 XWorker.org  版权所有  沪ICP备08000575号