Skip to content

Develop on linux

i0gan edited this page Apr 9, 2024 · 4 revisions

Intro

You can choose your preferred development method and open the CMake project using Qt or Ridder. The following provides a script compilation method.

The default compilation is the debug version. If you want to compile to the debug version, please open {project_path}/common.sh and change the build_version value to Debug. During compilation, a cache folder will be created in the project root directory to store temporary intermediate files produced during compilation.

Recommended linux distrubutions for squick dev

Ubuntu 22.04

Arch Linux

Step 1. Prepare for the squick development

git clone https://github.com/pwnsky/squick.git
cd squick/tools
bash install_dev_env.sh

The install_dev_env.sh script will automatically download and install the development tool. If the download and installation fails, it may be due to missing dependencies. The Linux dependency package is as follows:

git cmake unzip automake make g++ libtool libreadline-dev libncurses-dev pkg-config libssl-dev

Step 2. Compile the squick project

Compile third-party libraries

bash build_third_party.sh

Compile sqkctl tool

bash build_sqkctl.sh

Compile squick project

bash build_squick.sh

After compilation, the compiled binary file will appear under {project_path}/bin. The files as follows

bin/
β”œβ”€β”€ core.so
...
β”œβ”€β”€ plugin
β”‚   β”œβ”€β”€ core
β”‚   β”‚   β”œβ”€β”€ actor.so
...
β”‚   └── node
...
└── squick

Step 3. Start the squick

In the {project_path}/script directory, a single process starts all server commands as follows:

bash ./squick.sh

Seeing the interface for starting each server indicates that you have completed the compilation and startup.

Step 4. Package the squick project

Package to mini program for others to testing or docker images uses.

Just run generate_deploy.sh in {project_path}/tools directory.

After running, all packaged files will be saved under {project_path}/deploy directory.

Clone this wiki locally