简体   繁体   English

如何为我的开源应用程序打包Linux二进制文件?

[英]How to package a Linux binary for my Open Source application?

I have an Open Source app and I currently only post the binary for the Windows build. 我有一个开源应用程序,我目前只发布Windows版本的二进制文件。 At this point Linux users have to get the source and compile it. 此时,Linux用户必须获取源代码并进行编译。 Is there a standard way for posting a Linux binary? 是否有发布Linux二进制文件的标准方法?

My app is in c / c++ and compiled with gcc, the only external Linux code I use is X Windows and CUPS. 我的应用程序是用c / c ++编写的,用gcc编译,我使用的唯一外部Linux代码是X Windows和CUPS。

最常见的方法是将它打包在.rpm文件中,用于基于RedHat的发行版,如Fedora ,或者.deb文件,用于基于Debian的发行版,如Ubuntu

找一个熟练使用Debian的人,并帮助他们建立一个构建过程来为Debian和Ubuntu构建.deb包。

Of course: take a look at this tutorial from IBM. 当然:看看IBM的这个教程 Its only for RPMs, but it at least would get you going. 它仅适用于RPM,但它至少会让你前进。 DEB files are similar - see this tutorial . DEB文件类似 - 请参阅本教程

Basically, once you've built your binaries, you write a control file describing what files the package ships, and where it puts them. 基本上,一旦你构建了二进制文件,就可以编写一个控制文件来描述包所附带的文件以及它们放在哪里。 Then you build everything into a package using the packaging tools. 然后使用打包工具将所有内容构建到包中。 Its a lot like Windows where you write an installer file, then run it through Wix or Intellishield or whatever to create a .msi file. 它很像Windows,你在其中编写安装程序文件,然后通过Wix或Intellishield运行它或者创建.msi文件。

Don't hesitate to file a Request For Package (RFP) bug on Debian's bug tracking system. 不要犹豫,在Debian的bug跟踪系统上提交Request For Package(RFP)错误。 A debian developer may be interested by your software and package it. debian开发人员可能对您的软件感兴趣并打包它。

http://www.debian.org/Bugs/Reporting http://www.debian.org/Bugs/Reporting

You could provide the packages yourself, but that's not the ideal way to distribute your application. 您可以自己提供包,但这不是分发应用程序的理想方式。 Users won't be able to find your software in their distribution's package repository and will have to hit your website to download the latest version. 用户将无法在其发行版的软件包存储库中找到您的软件,并且必须访问您的网站才能下载最新版本。

IMO the best thing to do is solicit the help of package maintainers for the distributions of your choice. IMO最好的办法是为您选择的发行版寻求软件包维护者的帮助。 Get one of them who is interested in your application to adopt it and bring it in to the distro, then they can take care of the distro-specific details of packaging it. 让其中一个对您的应用程序感兴趣的人采用它并将其带入发行版,然后他们可以处理包装的发行版特定细节。

Your role will be to assist them as much as possible in getting your software to build on their platform and work out any bugs related to interactions with other package versions, etc. 您的角色将是尽可能地帮助他们在您的平台上构建软件,并解决与其他软件包版本交互相关的任何错误等。

I only use precompiled binaries from my distribution - never from other hand. 我只使用来自我的发行版的预编译二进制文件 - 绝不会从另一方面使用。 If you can afford it just roll a tarball and add some buildscript so that people can build your project. 如果你能负担得起它只需滚动tarball并添加一些buildcript,以便人们可以构建你的项目。 To publish it add it to sites like: Freshmeat 要发布它,请将其添加到以下网站: Freshmeat

这是制作便携式Linux二进制文件的好指南。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何强制我的应用程序只打开一个exe? qt,linux - How to force my application to open one exe only? qt, linux 如何使用多个二进制软件包创建linux debian软件包? - How can I create linux debian package with multiple binary packages? 如何在Linux上分析我的C ++应用程序 - How to profile my C++ application on linux 如何为开源uEye应用程序正确安装缺少的库 - How to correctly install missing libs for open source uEye application 如何打开Windows应用程序作为OpenCV的源? - How do you open a windows application as a source for OpenCV? 如何使用gcc-linaro-arm-linux-gnueabihf-objdump取消二进制文件的源代码行和文件名? - how to disassebled binary with source line and file name using gcc-linaro-arm-linux-gnueabihf-objdump? rpcrt4.dll是否为开源/免费库? 我可以将该库捆绑到我的应用程序中吗 - whether rpcrt4.dll is a open source/ free library? can I bundle that library to my application 如何在QT Creator开源版本中交叉编译qt for embedded linux - How to cross compile qt for embedded linux in QT Creator Open Source version 在本机应用程序中打开分离的OLE二进制 - Open detached OLE binary in native application 如何找出我的Linux应用程序的内存占用量? - How to find out the memory footprint of my linux application?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM