This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revision Both sides next revision | ||
tutorial:program:install:zh [2023/10/23 08:56] hfsr [Tutorial: The Install Program] |
tutorial:program:install:zh [2023/10/23 09:31] hfsr [Installing Additional Software] |
||
---|---|---|---|
Line 41: | Line 41: | ||
请注意,参数忽略大小写。在同时有多个软件安装软盘可用于安装时,以此方式指定标签可能会使得`install`在不询问用户的情况下减少候选项。 | 请注意,参数忽略大小写。在同时有多个软件安装软盘可用于安装时,以此方式指定标签可能会使得`install`在不询问用户的情况下减少候选项。 | ||
- | Installing Additional Software | + | 安装额外软件 |
------------ | ------------ | ||
- | Besides installing loot disks (such as openos), It is intended that users can take advantage of the `install` program for custom software disks. If you are providing software distributed on a portable filesystem, you can expect `install` to be a useful utility. For this documentation we'll assume you are distributing your software via floppy disk, though `install` does not distinguish between any filesystem component, floppy or hard disk or other. | + | 在安装奖励箱软盘的软件(例如OpenOS)之外,用户还可以将`install`程序用于自制的软件安装软盘。如果你打算以可移动文件系统的形式提供软件,那么可以将`install`作为你的实用工具。在此文档中我们假设你以软盘的形式分发你的软件,尽管`install`不会区分文件系统组件的类型,不论是软盘、硬盘还是其他类型。 |
- | The most basic and default way to use `install` with your software disk is to do nothing, and it'll just sort of work. `install` checks all available filesystems that have any files and considers them candidates for installation. The user is prompted to select what to install, and `install` does a very simple copy of all files in that disk to the selected destination. This is actually how OpenOS itself installs. | + | 要将你的软件安装软盘与`install`配合使用,最基础也是默认的方式其实是什么也不做,安装过程会凑合着进行。`install`会检查所有装有文件的文件系统,将它们全部作为安装来源的候选项。程序会要求用户选择一个以进行安装,之后`install`程序会简单地将所选软盘中的所有文件复制到所选的安装位置。这也就是OpenOS自身的安装过程。 |
- | You have some control over how install behaves by creating a custom .prop and/or a custom .install file at the root of your software distribution disk. The .prop file is expected to be a valid lua table that set optional flags for `install`. For example, the openos .prop file contents are: `{label = "OpenOS", reboot=true, setlabel=true, setboot=true}` | + | 你可以通过在你的软件发行软盘的根目录创建`custom.prop`和/或`custom.install`文件来控制`install`程序的行为。`.prop`文件应当为有效的Lua表,设定了可用于`install`的可选标记 。例如`openos .prop`文件的内容为:`{label = "OpenOS", reboot=true, setlabel=true, setboot=true}` |
- | Note that `install`'s default copy action skips .prop (.prop is not copied). | + | 请注意`install`的默认赋值操作将会跳过`.prop`文件(不复制`.prop`)。 |
- | - You can set a custom label | + | - 你可以设置自定义标签 |
`install` can refer to and label installation options. By default, `install` uses the filesystem label (or the filesystem address if no label is set). This label can be helpful for `install` and the user experience. The user can actually tell `install` what to install from a command line argument before even being prompted about install options. For example, if you type `install openos`, and in the chance there were other installation options -- `install` will only give the openos option for install. It is a way for a user to specifically get what they want before being asked. In addition to this, `install` uses the same labelling logic when listing the install options. | `install` can refer to and label installation options. By default, `install` uses the filesystem label (or the filesystem address if no label is set). This label can be helpful for `install` and the user experience. The user can actually tell `install` what to install from a command line argument before even being prompted about install options. For example, if you type `install openos`, and in the chance there were other installation options -- `install` will only give the openos option for install. It is a way for a user to specifically get what they want before being asked. In addition to this, `install` uses the same labelling logic when listing the install options. | ||
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}} |