Build Example Demo
Initialize a Linglong Application Project
ll-builder create org.deepin.demoEdit the linglong.yaml Configuration File
Configure Package Metadata
package:
id: org.deepin.demo
name: demo
kind: app
version: 1.0.0.0
description: |
A simple demo app.Configure Application Startup Command
command:
- demoConfigure Base System and Runtime Environment
base: org.deepin.base/23.1.0
runtime: org.deepin.runtime.dtk/23.1.0Configure Source Code Information
Use Git to Fetch the Source Code
sources:
- kind: git
url: "https://github.com/linuxdeepin/linglong-builder-demo.git"
commit: master
name: linglong-builder-demoConfigure Build Rules
cd /project/linglong/sources/linglong-builder-demo
rm -rf build || true
mkdir build
cd build
qmake ..
make
make installComplete linglong.yaml Configuration File
version: "1"
package:
id: org.deepin.demo
name: demo
kind: app
version: 1.0.0.0
description: |
A simple demo app.
command:
- demo
base: org.deepin.base/23.1.0
runtime: org.deepin.runtime.dtk/23.1.0
sources:
- kind: git
url: "https://github.com/linuxdeepin/linglong-builder-demo.git"
commit: master
name: linglong-builder-demo
build: |
cd /project/linglong/sources/linglong-builder-demo
rm -rf build || true
mkdir build
cd build
qmake ..
make
make installFor more details on configuration file fields, please refer to Configuration File Description
Execute the Build Process
In the root directory of the Linglong project, execute the build command:
ll-builder buildRun the Application
After a successful build, execute the run command in the Linglong project directory. The application can be run directly without installation.
ll-builder runExport Build Artifacts
In the root directory of the Linglong project, execute the export command to check out the build content.
ll-builder export --layerThe directory structure after export is as follows:
├── linglong
├── linglong.yaml
├── org.deepin.demo_1.0.0.0_x86_64_binary.layer
└── org.deepin.demo_1.0.0.0_x86_64_develop.layerMore Reference Examples
qt5 - qt5 application
dtk5 - dtk5 + qmake
dtk5 - dtk5 + cmake
dtkdeclarative5 - dtk5 + qml
electron - electron + vue example
plantuml - a Java application for drawing flowcharts programmatically
org.sumatrapdfreader - a Wine application, a PDF reader
More Complete Examples
Complete Example - a complete example that includes how to build an application, export build content, install, and run.