Creating Applications with Mozilla-Chapter 6. Packaging and Installing Applications-P3

Tham khảo tài liệu 'creating applications with mozilla-chapter 6. packaging and installing applications-p3', công nghệ thông tin, kỹ thuật lập trình phục vụ nhu cầu học tập, nghiên cứu và làm việc hiệu quả | Chapter 6. Packaging and Installing Applications-P3 When you have very simple installations -- such as when you want to install a new skin -- you may not need to use the services from the Install object. Besides providing the services necessary for triggering the downloading of a package from a web site the InstallTrigger object offers some simple methods for installing when you do not need to rearrange of the disk register complications or do other install-type preparation see Table 6-2 . Table 6-2. InstallTrigger interface showing the role of the InstallTrigger object in the overall installation process Method Description compareVersion Compares the version of a file or package with the version of an existing file or package. Enabled Indicates whether the Software Installation is enabled for this client machine. getVersionInfo Returns an InstallVersion object representing the version number from the Client Version Registry for the specified software or component. Method Description Install Installs one or more XPI files on the local machine. installChrome Installs new skin or locale packages in Netscape 6 and Mozilla. startSoftwareUpdate Initiates the download and installation of specified software. Note deprecated in favor of install. This web page installation script defines its own install method in which a callback parameter on the InstallTrigger s own install method checks the success of the installation and displays a relevant alert for the user as shown in Example 6-17 . Example 6-17. Install script callback function doneFn name result if result 0 result 999 alert The install didn t seem to work you could maybe try a manual install instead. nFailure code was result . else alert Installation complete please restart your browser. function install packageName fileName var xpi new Object xpi packageName fileName xpi doneFn a href javascript install xFly insta ll a . Installing non-Mozilla software The XPInstall technology

Không thể tạo bản xem trước, hãy bấm tải xuống
TỪ KHÓA LIÊN QUAN
TÀI LIỆU MỚI ĐĂNG
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.