We don’t allow questions seeking recommendations for software libraries, tutorials, tools, books, or other off-site resources. You can edit the question so it can be answered with facts and citations.
Closed 9 years ago.
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
接受
或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
发布评论
评论(5)
*nix 系统(且不仅如此)上的标准通用安装程序是 Autotools 。
您还可以提供特定于发行版的安装程序,例如 RedHat 或 CentOS 上的 RPM 或 deb 适用于 Debian、Ubuntu,不过一旦你有了 Autotools 生成的 Makefile,制作这些文件就轻而易举了。
Autotools也被称为“GNU构建系统”,乍一看有点吓人,而新用户在遇到诸如古老的m4宏系统和M4宏系统之类的东西时会感到困惑。公司但nota bene这是大多数人的做法,一旦掌握了窍门,就会很容易。
学习资源
The standard all mighty universally available installer on *nix systems (and not only) is Autotools.
You can also provide distribution specific installers like a RPM on RedHat or CentOS or deb for Debian, Ubuntu, although once you have the Makefile spitted by Autotools, making these is a breeze.
Autotools also known as "the GNU build system" is a little scary on the first sight, and the new user is puzzled when meeting things like the ancient m4 macro system & co. but nota bene this is the way most people do it and is pretty easy once you get the hang of it.
Learning resources
如果可能,选择不需要安装程序,而是使用简单的提取并运行方法。这将允许用户将文件放在他们想要的任何地方并运行它。
但是,您确实还有其他选择,例如:
If possible, opt for not requiring an installer but using a simple extract-and-run approach. This will allow the user to put the file(s) anywhere they want and run it.
But, you do have other options, such as:
查看InstallJammer。您可以为 Windows 和 Linux 安装程序编写一个项目,Mac 支持很快就会推出。
Take a look at InstallJammer. You can write a single project for both your Windows and your Linux installer, and the Mac support is coming very soon.
编写一个非常强大的 makefile!或使用 CMake
Write a really robust makefile! or use CMake
我开始编写 unistall 来应对必须在各种发行版上安装二进制包的情况。
它尝试做一些事情:
apt-get install libncurses5-dev
,如果使用RHEL/Fedora/CentOS,它会知道使用yum install libncurses-devel
我将存储库保留下来,因为它充满了有用的位,但是我很快放弃了为 Linux 发行版安装
安装屏蔽
类型程序的想法。您会发现为 .deb 、 .rpm 和(可能)slackware .tgz 格式生成可安装包要好得多。可以使用 checkinstall 等工具将其集成到您的构建系统中。请注意,根据 Debian 和其他人制定的严格的 lint 指南,checkinstall 生成的软件包并不总是完美的,但是这些软件包工作得很好。
您可以为用户提供的最佳安装体验是允许他们使用其本机包管理器安装(和更新)您的软件。
I started writing unistall for situations when you had to install binary packages on a variety of distros.
It attempts to do a few things:
apt-get install libncurses5-dev
if using debian/ubuntu,yum install libncurses-devel
if using RHEL/Fedora/CentOSI leave the repo up because its full of useful bits, however I quickly gave up on the idea of an
install sheild
type program for Linux distributions. You'll find that its much, much better to produce installable packages for .deb , .rpm and (possibly) slackware .tgz formats.This can be integrated into your build system using a tool like checkinstall. Note, the packages that checkinstall generates are not always perfect, according to strict lint guidelines set out by Debian and others, however the packages work just fine.
The best installation experience you can provide a user is allowing them to install (and update) your software using their native package manager.