inckka
Posts: 12
Joined: Thu Feb 11, 2016 4:23 am

How to release a package for RPI

Wed May 04, 2016 2:14 pm

I have no experience with packaging for Linux. :(
I developed a proprietary application with C and GTK+ for RPI. Currently I just compile the C files and having an executable. The user interface is loading through a .glade file.
I'd like to configure my application to be an installation setup file. Which can install on any RPI without any issues. Also I need a way to hide the .glade files from end user.
Please explain which is the correct way to do all of these steps.

Thanks.

User avatar
MarkHaysHarris777
Posts: 1820
Joined: Mon Mar 23, 2015 7:39 am
Location: Rochester, MN
Contact: Website

Re: How to release a package for RPI

Wed May 04, 2016 3:03 pm

Ok, I'll bite...
inckka wrote:I have no experience with packaging for Linux.
Clearly.
inckka wrote: Please explain which is the correct way to do all of these steps.
I reject the premise of the question...
inckka wrote: I developed a proprietary application with C and GTK+ for RPI. Currently I just compile the C files and having an executable.
As a card-carrying member of the FSF I must tell you that proprietary software is not a good thing from a societal perspective, nor is it a beneficial educational front... I would recommend taking a look at the GPLv3 license and making your app free (libre) software and releasing the source of your project so that others may learn from it.
inckka wrote: The user interface is loading through a .glade file.
I'd like to configure my application to be an installation setup file. Which can install on any RPI without any issues. Also I need a way to hide the .glade files from end user.
Deliberate obfuscation in coding is evil, particularly on a platform specifically designed and marketed to be an educational tool for young people so that they will understand how their computer works, and more importantly how to program their computer by themselves. Obfuscation deliberately works against those ends.

marcus
:geek:
marcus
:ugeek:

User avatar
MarkHaysHarris777
Posts: 1820
Joined: Mon Mar 23, 2015 7:39 am
Location: Rochester, MN
Contact: Website

Re: How to release a package for RPI

Wed May 04, 2016 3:17 pm

Oops :oops: I almost forgot to tell you how to release a package for RPi...

... I prefer tarballs. (tape archives produced with the tar command)

Essentially, you create a directory containing all of your source (a configure file, a make file) and then you tar the product-directory like so:

Code: Select all

tar -cvf product.tar.gz -C /home/pi/ product-directory --gzip
Then you place the product somewhere people can download your source from --- GitHub (there are others, but github is good).

Folks then download your tarball, and expand it with:

Code: Select all

tar -xvf product.tar.gz --gunzip
... then they run:

Code: Select all

./configure
make
sudo make install
Within your tarball you should also have a copy of the GPLv3 license info, and any common derivatives stuff (copyleft stuff &c).


That's pretty much it...

:mrgreen:

(libre software helps make a green planet)
marcus
:ugeek:

User avatar
PeterO
Posts: 4942
Joined: Sun Jul 22, 2012 4:14 pm

Re: How to release a package for RPI

Wed May 04, 2016 4:10 pm

To actually answer your question (rather than going off on a political rant)...

Explanation of the Debian package formats etc :
https://www.debian.org/doc/manuals/debi ... cs.en.html

Instructions for making a package :
https://www.debian.org/doc/manuals/main ... ex.en.html

If you are using "gtk_builder_add_from_file", then you could use "gtk_builder_add_from_string", Then you can do what you like to hide the glade files, just read them and "unmangle" them before passing them to gtk_builder_add_from_string.

HTH
PeterO
Discoverer of the PI2 XENON DEATH FLASH!
Interests: C,Python,PIC,Electronics,Ham Radio (G0DZB),1960s British Computers.
"The primary requirement (as we've always seen in your examples) is that the code is readable. " Dougie Lawson

Tzarls
Authorised Reseller
Authorised Reseller
Posts: 224
Joined: Tue Feb 26, 2013 6:59 am

Re: How to release a package for RPI

Wed May 04, 2016 5:15 pm

MarkHaysHarris777 wrote:
(libre software helps make a green planet)
Only if you give the user the posibility of downloading the binary, because building from source uses more power. ;)

But hey, let´s stay on topic.

User avatar
MarkHaysHarris777
Posts: 1820
Joined: Mon Mar 23, 2015 7:39 am
Location: Rochester, MN
Contact: Website

Re: How to release a package for RPI

Wed May 04, 2016 6:01 pm

Tzarls wrote:
MarkHaysHarris777 wrote:
(libre software helps make a green planet)
Only if you give the user the posibility of downloading the binary, because building from source uses more power.
[offtopic]
Green is life giving, life preserving... ethical choices (justice) are life giving and life preserving. Unethical choices are life constricting; [unethical] choices are not green (regardless how much power they consume.
[/offtopic]

The main point of my "political rant" as PeterO called it, was not the rant as much as an objection to the OP on-topic question of what is the correct way to distribute obfuscated code for the RPi... and my primary point is that there is no correct way to distribute obfuscated code for the RPi... simply because any correct distribution of code for the RPi would necessarily be in freedom (and for freedom).

Let me ask everyone, does the Raspberry PI Foundation (as a charity) exist to propagate obfuscated proprietary code for the RPi platform? Its an on-topic ethical question, perhaps even a moral question.

Inquiring minds want to know.
marcus
:ugeek:

SopaXorzTaker
Posts: 13
Joined: Tue Dec 01, 2015 5:34 pm

Re: How to release a package for RPI

Wed May 04, 2016 6:06 pm

Yup, Minecraft Pi is very open-source and it is distributed via the official repository. It definitely helps learning! (Sarcasm)

User avatar
MarkHaysHarris777
Posts: 1820
Joined: Mon Mar 23, 2015 7:39 am
Location: Rochester, MN
Contact: Website

Re: How to release a package for RPI

Wed May 04, 2016 6:12 pm

SopaXorzTaker wrote:Yup, Minecraft Pi is very open-source and it is distributed via the official repository. It definitely helps learning! (Sarcasm)
no, no, no... you're 'posed to do it like this:

[sarcasm]
Yup, Minecraft Pi is very open-source and it is distributed via the official repository. It definitely helps learning!
[/sarcasm]

heh heh, Minecraft is what some marketing mucks would call a loss leader. :)

If we're going to teach kids how to program computers, let's teach them how to distribute their code for freedom (because our freedom is at stake)!

peace
marcus
:ugeek:

User avatar
PeterO
Posts: 4942
Joined: Sun Jul 22, 2012 4:14 pm

Re: How to release a package for RPI

Wed May 04, 2016 6:17 pm

MarkHaysHarris777 wrote: Inquiring minds want to know.
Considering that the foundation already include Matematica in Raspbian I think the answer to your question is pretty clear already. Don't forget they care most of all about their educational goals. They obviously depend on lots of free software, but pursuing a Free Software Foundation political agenda is going to be somewhere down their list.
As usual you've taken a thread off topic in the first reply !
PeterO
Discoverer of the PI2 XENON DEATH FLASH!
Interests: C,Python,PIC,Electronics,Ham Radio (G0DZB),1960s British Computers.
"The primary requirement (as we've always seen in your examples) is that the code is readable. " Dougie Lawson

Tzarls
Authorised Reseller
Authorised Reseller
Posts: 224
Joined: Tue Feb 26, 2013 6:59 am

Re: How to release a package for RPI

Wed May 04, 2016 6:32 pm

MarkHaysHarris777 wrote:
Tzarls wrote:
MarkHaysHarris777 wrote:
(libre software helps make a green planet)
Only if you give the user the posibility of downloading the binary, because building from source uses more power.
[offtopic]
Green is life giving, life preserving... ethical choices (justice) are life giving and life preserving. Unethical choices are life constricting; [unethical] choices are not green (regardless how much power they consume.
[/offtopic]
Well. I was taking "green" as "as power-efficient as possible so you don´t contribute to global warming by wasting energy in the form of heat".
MarkHaysHarris777 wrote:The main point of my "political rant" as PeterO called it, was not the rant as much as an objection to the OP on-topic question of what is the correct way to distribute obfuscated code for the RPi... and my primary point is that there is no correct way to distribute obfuscated code for the RPi... simply because any correct distribution of code for the RPi would necessarily be in freedom (and for freedom).

Let me ask everyone, does the Raspberry PI Foundation (as a charity) exist to propagate obfuscated proprietary code for the RPi platform? Its an on-topic ethical question, perhaps even a moral question.

Inquiring minds want to know.
I really don´t feel that what the OP want is to obfuscate his code.... maybe "proprietary" was meant to mean "a software made by himself", and the hiding of his glade file is more to preserve the integrity of his GUI (so the user don´t mess with it accidentally, but if he wants to do it on purpose then all he needs is to locate the file under the /data/whatever folder - not really "obfuscated").

inckka
Posts: 12
Joined: Thu Feb 11, 2016 4:23 am

Re: How to release a package for RPI

Fri May 06, 2016 5:13 pm

Thanks everyone for immediate answers. Really appreciate it.

Also I got to package up my app successfully. And thanks for the tips on gtk_builder_add_from_string ()

And also like to remind, sometimes every software piece can not be FOS. I can give you several reasons. However as an example, I'm developing this for a company which they use this app with industrial machinery. So company decided this app to be proprietary. So what are my choices?

Also some of you are on great misunderstanding about the RPI's usage and educational goals. It's a great tool for learning. However due to its generic universal openness, any one can do anything, from managing my files at home to managing outer space gadgets. So whats wrong if someone making profit of it?

Also when an OP is specifically mentioned About their goal, we can't force him to make it educational and FOS.

End of the day I'm a happy man, that we used to replace several Windows running PCs with RPIs and with my software, low watt hungry RPi reduces carbon footprint and earth friendly. Also great costing reduction for the factory also.

texy
Forum Moderator
Forum Moderator
Posts: 5155
Joined: Sat Mar 03, 2012 10:59 am
Location: Berkshire, England

Re: How to release a package for RPI

Sat May 07, 2016 8:12 am

Veering off topic. OP question has been answered.
Locking.
Various male/female 40- and 26-way GPIO header for sale here ( IDEAL FOR YOUR PiZero ):
https://www.raspberrypi.org/forums/viewtopic.php?f=93&t=147682#p971555

Return to “Beginners”