This shows you the differences between two versions of the page.
Next revision | Previous revision Next revision Both sides next revision | ||
tutorial:program:install:zh [2023/10/23 08:22] hfsr created |
tutorial:program:install:zh [2023/10/23 08:57] hfsr [Contents] |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | Tutorial: The Install Program | + | 教程:Install软件安装程序 |
============================================ | ============================================ | ||
- | `install` is an application that comes shipped with [[:openos|OpenOS]]. For most users and in most computer configurations it is expected that the primary method of installing OpenOS is by using this very same `install` application. `install` is also designed to install the software, libraries, and help scripts that come bundled with all the craftable mod-provided [[item:loot_disks|loot disks]]. | + | `install`是一个随[[:openos:zh|OpenOS]]附送的软件。对于大多数用户以及大多数电脑而言,安装OpenOS的首选方法便是使用这个`install`应用。`install`的功能还包括安装软件、运行库以及本mod提供的所有[[item:loot_disks:zh|奖励箱软盘]]的帮助脚本。 |
- | To understand more about command line options for `install`, it is recommended to read its man pages by running `man install`, or by reading the man page online [[https://raw.githubusercontent.com/MightyPirates/OpenComputers/master-MC1.7.10/src/main/resources/assets/opencomputers/loot/openos/usr/man/install|here]]. | + | 要了解有关`install`的命令行选项的更多信息,我们推荐通过执行`man install`以阅读其man页面,也可以在[[https://raw.githubusercontent.com/MightyPirates/OpenComputers/master-MC1.7.10/src/main/resources/assets/opencomputers/loot/openos/usr/man/install|此处]]阅读在线版。 |
- | `install` takes the following actions | + | `install`按以下步骤运行: |
- | - Step One: Scan for Software to Install | + | - 第一步:扫描要安装的软件 |
- | First it scans for candidate source filesystems. These are filesystems, such as [[:item:loot disks|loot disks]], that can be used as a software package for installation. If more than one candidate source filesystem is found, it prompts the user, asking | + | 首先它会扫描可供候选的安装来源文件系统,即可以被当作安装用软件包的文件系统,例如[[:item:loot disks:zh|奖励箱软盘]]。如果找到了多个候选安装来源,它将会提问用户: |
`What do you want to install?` | `What do you want to install?` | ||
- | Followed by a list of disks it found that can be installed. | + | 下面跟着它找到的可供安装的软盘列表。 |
- | - Step Two: Scan for Hard Drives | + | - 第二步:扫描硬盘 |
- | The next step is a scan for candidate target filesystems. These are filesystems, such as hard drives, that can be the target of an install. In the example of installing OpenOS from a loot disk to the hard drive, the hard drive is the target filesystem. Like candidate sources, if `install` finds multiple candidate targets, it asks the user to select one: | + | 下一步是扫描可供候选的安装目标文件系统,即可以作为安装的目标的文件系统,如硬盘。以从奖励箱软盘中向硬盘中安装OpenOS为例,此时的硬盘即为目标文件系统。就像候选安装来源一样,如果`install`找到了多个候选安装目标,它也会要求用户选择其中一个: |
`Where do you want to install to?` | `Where do you want to install to?` | ||
- | Followed by a list of disks it found that can be installed **to**. | + | 下面跟着它找到的可以安装**进**的硬盘列表。 |
- | - Step Three: Installation | + | - 第三步:安装 |
- | Before continuing with the install, the user is asked for confirmation to install | + | 在继续安装之前,用户会被要求确认安装: |
`Install OpenOS to /mnt/e03/? [Y/n]` | `Install OpenOS to /mnt/e03/? [Y/n]` | ||
- | Confirming this step will copy the files from the (e.g.) loot disk to the target filesystem. Software installs may have an optional `.prop` file which can tell `install` whether or not to set the default filesystem the computer should boot to, what label if any to set, and whether the system should reboot when installation is complete. | + | 在确认了此步骤后,程序会将奖励箱软盘(对于此样例)中的文件复制到目标文件系统中。要安装的软件中可能会有一个可选的`.prop`文件,此文件可以告知`install`是否要设定电脑的默认启动文件系统、将其设定为什么标签(若有)以及在安装完成后是否要重启系统。 |
- | There is also the option for software disks to provide a fully custom install experience by creating an `.install` file at the root of the disk's filesystem. After confirming the source and target, `install` will invoke `.install` if it exists in the source filesystem. | + | 软件安装软盘还可以提供完全自定义的安装过程,只需在软盘文件系统的根目录下创建一个`.install`文件。在确认安装来源与安装目标后,只要`.install`文件存在于安装来源文件系统,`install`程序就会唤起它。 |
- | - Optional Arguments | + | - 可选参数 |
- | It is recommend to review the `install` man page for greater details and a full list of supported arguments. But I considered it interesting to mention here that the label of the loot disk can be used as a command line argument for install -- which will refine the candidate search to disks matching that label. | + | 推荐你查看`install`的man页面以获取更详细的细节以及支持参数的完整列表。但是我考虑到有一点最好在这里提一下,奖励箱软盘的标签可以被用于`install`的参数——这样可以让搜索候选软盘时仅搜索标签一致的软盘。 |
`install openos` | `install openos` | ||
- | Note that the argument is case insensitive. In a scenario where there would have been multiple software disks available to install, specifying the label in this manner may allow `install` to reduce the candidate selection without prompting the user. | + | 请注意,参数忽略大小写。在同时有多个软件安装软盘可用于安装时,以此方式指定标签可能会使得`install`在不询问用户的情况下减少候选项。 |
Installing Additional Software | Installing Additional Software | ||
Line 90: | Line 90: | ||
The user could have also optionally used some command line args, such as: `install foo --noreboot --nosetlabel`. In which case I would see those values passed to my installer script. | The user could have also optionally used some command line args, such as: `install foo --noreboot --nosetlabel`. In which case I would see those values passed to my installer script. | ||
- | Contents | + | 目录 |
------------ | ------------ | ||
- | {{page>tutorial:contents&noheader&noeditbutton&nouser&nofooter}} | + | {{page>tutorial:contents:zh&noheader&noeditbutton&nouser&nofooter}} |