[Share Experiences] Linyaps Introduction Tutorial: Convert Store Apps to Linyaps Format
Tofloor
poster avatar
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

  1. A system environment with deepin V23 or UOS 1070 and installed linglong-bin >= 1.5.0.

Reference document: https://linglong.space/guide/start/install.html

  1. 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.

Reference document: https://www.linglong.space/guide/start/whatis.html

  1. 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
  2. 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

  1. 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.

  2. Click "Copy Package Name" to copy the app package name to the clipboard.

Step 3: Modify the Script

  1. Click to select the migration script auto_convert.sh, right-click, and open it with a text editor.
  2. 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.
  3. 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.

  1. Save the script file after modification.

Step 4: Execute the Conversion

  1. Run the script: Return to the directory where the script is located, double-click to open it, and choose "Run in Terminal."

  1. 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).
  2. 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).
  3. Manual Testing: You can manually test the app that successfully ran in Step 3. After testing, simply close the app.

Common Issues

  1. Currently, only apps listed in the App Store can be converted. Support for converting deb installation packages from other sources is still being adapted.
  2. 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.
  3. 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.”
Reply Favorite View the author
All Replies

No replies yet