How about creating .deb and .rpm files in PureBasic?

Linux specific forum
thamarok
Enthusiast
Enthusiast
Posts: 282
Joined: Wed Sep 06, 2006 1:37 pm

How about creating .deb and .rpm files in PureBasic?

Post 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 :P
Maybe the future of PureBasic will be greater for Linux users (no more GNU C Compiler :twisted: )
Num3
PureBasic Expert
PureBasic Expert
Posts: 2812
Joined: Fri Apr 25, 2003 4:51 pm
Location: Portugal, Lisbon
Contact:

Post 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 ...
thamarok
Enthusiast
Enthusiast
Posts: 282
Joined: Wed Sep 06, 2006 1:37 pm

Post 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/
MadMax
Enthusiast
Enthusiast
Posts: 237
Joined: Mon Oct 06, 2003 11:56 am

Post 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 ¿??¿
Trond
Always Here
Always Here
Posts: 7446
Joined: Mon Sep 22, 2003 6:45 pm
Location: Norway

Post by Trond »

Rpm is a binary package.
thamarok
Enthusiast
Enthusiast
Posts: 282
Joined: Wed Sep 06, 2006 1:37 pm

Post 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)
raygr
User
User
Posts: 32
Joined: Fri Mar 17, 2006 8:05 am

Post 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... :P
WishMaster
Enthusiast
Enthusiast
Posts: 277
Joined: Fri Jun 17, 2005 7:13 pm
Location: Franconia
Contact:

Post 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.
Image Image
thamarok
Enthusiast
Enthusiast
Posts: 282
Joined: Wed Sep 06, 2006 1:37 pm

Post 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... :P
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.
MadMax
Enthusiast
Enthusiast
Posts: 237
Joined: Mon Oct 06, 2003 11:56 am

Post 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.
raygr
User
User
Posts: 32
Joined: Fri Mar 17, 2006 8:05 am

Post 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.
walker
Enthusiast
Enthusiast
Posts: 634
Joined: Wed May 05, 2004 4:04 pm
Location: Germany

Post 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.
raygr
User
User
Posts: 32
Joined: Fri Mar 17, 2006 8:05 am

Post by raygr »

walker wrote:Here you'll find an explanation:
http://linuxdevices.com/articles/AT8047723203.html
Good link. Thanks.
Straker
Enthusiast
Enthusiast
Posts: 701
Joined: Wed Apr 13, 2005 10:45 pm
Location: Idaho, USA

Post 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....
Image Image
thamarok
Enthusiast
Enthusiast
Posts: 282
Joined: Wed Sep 06, 2006 1:37 pm

Post 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.
Post Reply