Page 1 of 2
How about creating .deb and .rpm files in PureBasic?
Posted: Fri Sep 08, 2006 2:44 pm
by thamarok
Hello!
I have been enjoying using PureBasic very much, it is comfortable easy, very straightforward and it is powerful. But, how about after compiling the program give the user an option to either make an .exe or a .deb or .rpm?
For me, it is better to distribute an application as a .deb instead of an .exe file.
As a advanced Linux user, I know how .deb files are done (haven't used Red Hat so don't know much about .rpm files). But, it would be a GREAT addition to PureBasic if it's possible to do it right from the IDE.
Please add some comments and tell what do you think about this idea
Maybe the future of PureBasic will be greater for Linux users (no more GNU C Compiler

)
Posted: Fri Sep 08, 2006 4:17 pm
by Num3
I had the same problems, i'm not a hardcore linux user, and the easiest way i found to distribute linux apps was gzip them
Maybe we should an universal installer for Purebasic..
Windows, Linux and Mac ...
Posted: Fri Sep 08, 2006 4:41 pm
by thamarok
Yes, I think I need to drop to GZip too

. Too bad.
But, for Windows there is no need to support stuff like .msi because the most common way to distribute applications in Windows is perhaps the .exe file in Zip compressed format. And for Macintosh, I don't know much but found this through Google:
http://www.mindvision.com/
Posted: Sat Sep 09, 2006 2:28 am
by MadMax
I'm not quite sure that it's posible to build a rpm package for a purebasic program, and in case it was, wouldn't the users need to have a PBcompiler? Unless the plan is to convert Purebasic code to C ¿??¿
Posted: Sat Sep 09, 2006 8:35 am
by Trond
Rpm is a binary package.
Posted: Sat Sep 09, 2006 9:31 am
by thamarok
As far as I know, .deb packages are also binary files and they include some shell script and the .exe file in binary format. So, when the user opens a .deb file for example in Debian, the shell script will get executed which mostly is to copy the embedded .exe along with others files to the installation folder (for example /home/myname/theprogram)
Posted: Sat Sep 09, 2006 9:49 am
by raygr
I think it would be a very cool thing. However, given that the Linux version of PB is always trailing behind the Windows version, maybe it's not something the PB guys should spend their time on.
It doesn't really need to run from the IDE, so maybe a user could create a suitable utility. Let's see, we need someone who is a advanced Linux user and knows how .deb files are done...

Posted: Sat Sep 09, 2006 12:48 pm
by WishMaster
MadMax wrote:I'm not quite sure that it's posible to build a rpm package for a purebasic program, and in case it was, wouldn't the users need to have a PBcompiler? Unless the plan is to convert Purebasic code to C ¿??¿
Of course you can also put precompiled binaries into an RPM package.
Look
here for an easy to use GUI.
raygr wrote:I think it would be a very cool thing. However, given that the Linux version of PB is always trailing behind the Windows version, maybe it's not something the PB guys should spend their time on.
Creating RPM packages doesn't need more time than creating ordinary tgz files.
Posted: Sat Sep 09, 2006 1:28 pm
by thamarok
raygr wrote:I think it would be a very cool thing. However, given that the Linux version of PB is always trailing behind the Windows version, maybe it's not something the PB guys should spend their time on.
It doesn't really need to run from the IDE, so maybe a user could create a suitable utility. Let's see, we need someone who is a advanced Linux user and knows how .deb files are done...

I could arrange something. I just have much work now, so maybe I'll try to have a base maybe on Wednesday?
Actually it is pretty easy to make a .deb file. On a Debian based distro (like Ubuntu or Debian itself) you have to execute this command in the terminal:
$ dpkg -b /home/myprogram mydeb.deb
/home/myprogram is the directory where your program resides along with the control file.
mydeb.deb is the name of your .deb package.
Posted: Sat Sep 09, 2006 11:19 pm
by MadMax
I'm not quite sure that it's posible to build a rpm package for a purebasic program, and in case it was, wouldn't the users need to have a PBcompiler? Unless the plan is to convert Purebasic code to C ¿??¿
Of course you can also put precompiled binaries into an RPM package.
Look here for an easy to use GUI.
Ah! didn't know you could put pre-compiled binaries. I'll give it a try later.
Posted: Sat Sep 09, 2006 11:27 pm
by raygr
thamarok wrote:
I could arrange something. I just have much work now, so maybe I'll try to have a base maybe on Wednesday?
Actually it is pretty easy to make a .deb file. On a Debian based distro (like Ubuntu or Debian itself) you have to execute this command in the terminal:
$ dpkg -b /home/myprogram mydeb.deb
/home/myprogram is the directory where your program resides along with the control file.
mydeb.deb is the name of your .deb package.
Is the control file where the dependencies are listed?
I don'y know anything about the structure of .deb files but I always assumed that keeping track of the dependencies was the tricky bit.
Posted: Sun Sep 10, 2006 12:21 am
by walker
Here you'll find an explanation:
http://linuxdevices.com/articles/AT8047723203.html
in short (contents of a control file) :
Code: Select all
Package: acme
Version: 1.0
Section: web
Priority: optional
Architecture: all
Essential: no
Depends: libwww-perl, acme-base (>= 1.2)
Pre-Depends: perl
Recommends: mozilla | netscape
Suggests: docbook
Installed-Size: 1024
Maintainer: Joe Brockmeier [jzb@dissociatedpress.net]
Conflicts: wile-e-coyote
Replaces: sam-sheepdog
Provides: acme
Description: The description can contain free-form text
describing the function of the program, what
kind of features it has, and so on.
.
More descriptive text.
Posted: Sun Sep 10, 2006 2:33 am
by raygr
Posted: Tue Sep 12, 2006 10:30 pm
by Straker
.deb and .rpm are installer packages, .exe is not. This would be the equivilent of the IDE giving the option of creating an .EXE or .MSI file. I think the ide should stay as is and only create executable binaries, and have another tool that creates MSI or DEB or RPM packages.
BTW,
alien converts RPMs into DEB files, so if you can only find the RPM....
Posted: Wed Sep 13, 2006 1:41 pm
by thamarok
Hello Straker!
Sure alien converts RPM packages into DEB packages, but mostly it isn't 100% succesful (own experience when I tried to install those large applications that are only in RPM).
I think you have a good point there; I didn't think about it that way when I posted this topic.