[Share Experiences] Linyaps Introduction Tutorial: Convert Store Apps to Linyaps Format
Experiences and Insight 132 views · 0 replies ·
SuperDavid
Moderator
2024-09-14 14:13
Author
Linyaps Introduction Tutorial: Using Migration Scripts to Convert Store Apps to Linyaps Format
Currently, Linyaps format package migration is divided into two types: deb-to-Linyaps migration and source code build. This tutorial covers the first type—converting from deb to Linyaps format. It's designed to be user-friendly for beginners. For comprehensive Linyaps documentation, please refer to the Linyaps official user manual.
Step 1: Preliminary Preparation
A system environment with deepin V23 or UOS 1070 and installed linglong-bin >= 1.5.0.
Install the linglong-pica conversion tool. The current version available in the group is offline beta 1.1.1-1, which fixes issues with certain version numbers causing conversion failures, optimizes code execution flow, and reduces resource re-downloading. If the version number hasn't been updated, select to reinstall.
Download the migration script, to be used with ll-pica version 1.1.1-1 (includes new version detection, layer generation detection; if layer generation fails, it will not proceed, reducing debugging information interference). Download: linglong-convert.tar.zip
Create a local Linyaps working directory for the conversion process. Decide on the directory location yourself, then copy the absolute path of the directory.
Path copying reference: Open the newly created directory, right-click on the address bar in the file manager, select "Edit Address," and copy the entire path to get the absolute path of the directory.
Note: Ensure the device is connected to the internet throughout the process.
Step 2: Selecting the App to Convert to Linyaps Format
Open the App Store, search for and enter the details page of the app you wish to convert to Linyaps format. Click the switch icon next to "Version" to display the app package name.
Click "Copy Package Name" to copy the app package name to the clipboard.
Step 3: Modify the Script
Click to select the migration script auto_convert.sh, right-click, and open it with a text editor.
Find the LINGLONG_WORK_DIR variable and paste the path of the Linyaps working directory created in Step 1 into the quotes, replacing the existing example path.
Find the PKG_NAME variable and paste the app package name obtained in Step 2 into the quotes, replacing the existing example value.
Note: Do not delete the quotes in Steps 2 and 3.
Save the script file after modification.
Step 4: Execute the Conversion
Run the script: Return to the directory where the script is located, double-click to open it, and choose "Run in Terminal."
Automatic Packing: The terminal will automatically execute the build task. After completion, a Linyaps runtime file with the suffix ".runtime.layer" will be generated in the directory corresponding to the converted app package name created in Step 1 (this layer file is the final Linyaps format package ready for store listing).
Run Debugging: After completing the packing task in Step 2, the terminal will continue with the debugging task. If the app runs normally, it will automatically open the application interface (typically, if the app cannot start within 5 minutes, the migration task is considered failed, and the app is unusable).
Manual Testing: You can manually test the app that successfully ran in Step 3. After testing, simply close the app.
Common Issues
Currently, only apps listed in the App Store can be converted. Support for converting deb installation packages from other sources is still being adapted.
If a Linyaps runtime file with the suffix ".layer" has been generated in the corresponding app package folder but the app still fails to start within 5 minutes or displays error messages in the terminal debug interface, it means the Linyaps app build succeeded but failed to run. If you encounter this issue, please join the “Linyaps Ecosystem Co-Building Group” for feedback and discussion.
The runtime file name generated by this script should be "original_package_name.linyaps.runtime.layer." If the generated Linyaps runtime file name does not meet this standard, please delete the app's working directory, re-convert and build the app, and provide feedback or discuss it in the “Linyaps Ecosystem Co-Building Group.”
Linyaps Introduction Tutorial: Using Migration Scripts to Convert Store Apps to Linyaps Format
Currently, Linyaps format package migration is divided into two types: deb-to-Linyaps migration and source code build. This tutorial covers the first type—converting from deb to Linyaps format. It's designed to be user-friendly for beginners. For comprehensive Linyaps documentation, please refer to the Linyaps official user manual.
Step 1: Preliminary Preparation
linglong-bin >= 1.5.0
.Reference document: https://linglong.space/guide/start/install.html
linglong-pica
conversion tool. The current version available in the group is offline beta 1.1.1-1, which fixes issues with certain version numbers causing conversion failures, optimizes code execution flow, and reduces resource re-downloading. If the version number hasn't been updated, select to reinstall.Reference document: https://www.linglong.space/guide/start/whatis.html
ll-pica
version 1.1.1-1 (includes new version detection, layer generation detection; if layer generation fails, it will not proceed, reducing debugging information interference). Download:linglong-convert.tar.zip
Path copying reference: Open the newly created directory, right-click on the address bar in the file manager, select "Edit Address," and copy the entire path to get the absolute path of the directory.
Note: Ensure the device is connected to the internet throughout the process.
Step 2: Selecting the App to Convert to Linyaps Format
Open the App Store, search for and enter the details page of the app you wish to convert to Linyaps format. Click the switch icon next to "Version" to display the app package name.
Click "Copy Package Name" to copy the app package name to the clipboard.
Step 3: Modify the Script
auto_convert.sh
, right-click, and open it with a text editor.LINGLONG_WORK_DIR
variable and paste the path of the Linyaps working directory created in Step 1 into the quotes, replacing the existing example path.PKG_NAME
variable and paste the app package name obtained in Step 2 into the quotes, replacing the existing example value.Note: Do not delete the quotes in Steps 2 and 3.
Step 4: Execute the Conversion
Common Issues