DEB file packaging for iPhone Development

Source: Internet
Author: User

IPhone DevelopmentOfPackage the DEB FileIs the content to be introduced in this article,DEBI don't know how to say this thing... endless sorrow, Nima. It hurts me to white the apple many times. Due to the cost of service, the superior decided to let me focus on the repair system next week. I don't have any idea at all. Well, I don't want to complain about it.

DEB PackagingA lot of online tutorials .. but I have a PDF, which is very detailed .. this PDF is the web site green coffee, but before he gave me, I have found the source URL of PDF (http://wendang.baidu.com/view/419583c689eb172ded63b7c4.html here worship the selfless developers .). of course, this PDF is for thoseDEB FileThere are already some basic students .. otherwise a little .. what .. you know .. however, don't be discouraged. believe in the power of google and baidu. I personally worship google. The same technology development keyword, baidu can be up to 108,000 miles .. try again and again .. nima .) so it is good for you to touch it yourself.

Here I want to say that the installation of Cydia can basically be attributed to copy. in addition to DEBIAN files and other directory files, cydia copies the files to the corresponding directory of the iPhone while retaining the file permissions and attributes. For example, take tmp in PDF as an example. In the tmp directory, the file Library you created corresponds to/Root/Library in iPhone OS. therefore, if you want to add some executable files to the system directory of the iPhone OS, create the corresponding directory under the tmp directory ..

Do not understand: OK, for example:

Root/iPhoneOSFile/... (this directory is the iPhone OS directory)

Tmp/iPhoneOSFile/DynamicLibraryFile (this directory is the directory of your DEB package, DynamicLibraryFile is the file you want to copy ). If you still don't understand it, feel it yourself ..

Today is 2011-6-2 Haha. I finally restarted the SpringBoard using the script! I have been here for a long time! The last time I tried to write a script, I gave it to the white apple ..

First, Literacy:

In the DEB file, there are four types of script files in DEBIAN:

1. preinst scripts executed before copying files.

2. The script that postinst executes after copying the file.

3. The script executed by prerm before uninstallation.

4. The script executed after postrm is uninstalled.

Our installation script is preinst:

The Code is as follows (for reference only ):

 
 
  1. #! /Bin/sh-e
  2. # This script can be called in the following ways:
  3. #
  4. # Before the package is installed:
  5. # <New-preinst> install
  6. #
  7. # Before removed package is upgraded:
  8. # <New-preinst> install <old-version>
  9. #
  10. # Before the package is upgraded:
  11. # <New-preinst> upgrade <old-version>
  12. #
  13. #
  14. # If postrm fails during upgrade or fails on failed upgrade:
  15. # <Old-preinst> abort-upgrade <new-version>
  16. Remove_doc_symlink (){
  17. If [-L/usr/share/doc/dpkg-dev]; then
  18. Rm/usr/share/doc/dpkg-dev
  19. Fi
  20. }
  21. Case "$1" in
  22. Install)
  23. ;;
  24. Upgrade)
  25. Remove_doc_symlink
  26. ;;
  27. Abort-upgrade)
  28. ;;
  29. *)
  30. Echo "$0 called with unknown argument '$ 1'" 1> & 2
  31. Exit 1
  32. ;;
  33. Esac
  34. Exit 0
  35.  
  36. Another postinst:
  37.  
  38. #! /Bin/bash
  39. # This script can be called in the following ways:
  40. #
  41. # Before the package is installed:
  42. # <New-preinst> install
  43. #
  44. # Before removed package is upgraded:
  45. # <New-preinst> install <old-version>
  46. #
  47. # Before the package is upgraded:
  48. # <New-preinst> upgrade <old-version>
  49. #
  50. #
  51. # If postrm fails during upgrade or fails on failed upgrade:
  52. # <Old-preinst> abort-upgrade <new-version>
  53.  
  54. If [[$1 = configure]
  55. Then
  56. Declare-a cydia
  57. Cydia = ($ CYDIA)
  58. If [[$ {CYDIA + @}]; then
  59. Eval "echo 'finish: reload' >&$ {cydia [0]}"
  60. Else
  61. Echo "Please respring your device ."
  62. Fi
  63. Fi

Summary:IPhone DevelopmentOfPackage the DEB FileThe introduction is complete, and the rest will be updated later. Please try it one by one! Finally, I hope this article will help you.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.