Linux build.sh script

  Thread Rating:
  • 1 Votes - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
topfs2 Offline
Team-Kodi Developer
Posts: 4,180
Joined: Dec 2007
Reputation: 13
Post: #46
That's wonderfull! I think that's the only thing holding for a new alpha candidate.

Thx alot!, both of you!

If you have problems please read this before posting

Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.

[Image: badge.gif]

"Well Im gonna download the code and look at it a bit but I'm certainly not a really good C/C++ programer but I'd help as much as I can, I mostly write in C#."
find quote
althekiller Offline
Retired Team-Kodi Member
Posts: 5,002
Joined: May 2004
Reputation: 12
Post: #47
Ok got a hold of d4rk finally to get this OKed. It's in.
find quote
wattazoum Offline
Team-XBMC Linux Packager
Posts: 315
Joined: Mar 2008
Reputation: 1
Location: Antibes, France
Post: #48
Thank you althekiller . That's wonderfull. :-)

There is some modification that are however needed in the Makefile.in .

line 94: @cp tools/Linux/xbmc.sh /usr/bin/xbmc
should be replaced by :
@mkdir -p $(prefix)/bin
@cp tools/Linux/xbmc.sh $(prefix)/bin/xbmc

cause we can't assume that the script will be always in /usr/bin .
find quote
wattazoum Offline
Team-XBMC Linux Packager
Posts: 315
Joined: Mar 2008
Reputation: 1
Location: Antibes, France
Post: #49
I also got a fancy scenario and I don't know if it'll work currently.
Basically, when doing a deb package, I need to create the system structure under a temp directory, then create the different subpackages by selecting the concerned file.
But when one will install them, it'll go under /usr/share/xbmc.

So basically I don't know how to do. and I don't think it's possible using only one parameter. I think the "install" target should take a DESTDIR variable to set the install directory (which can be different from the -prefix value).

This can be done by adding in the Makefile.in (to default to $(prefix) ):
DESTDIR=$(prefix)

and replace everywhere $(prefix) by $(DESTDIR)
find quote
althekiller Offline
Retired Team-Kodi Member
Posts: 5,002
Joined: May 2004
Reputation: 12
Post: #50
One problem I can see with putting the script in $(prefix)/bin/ is that the default $(prefix) is /usr/share and AFAIK no distro has /usr/share/bin in the default PATH. It's fine how it is because WE copy the files so WE know where they SHOULD be. If the end user wants to go mucking around they need to know what they're doing.

As for the second post, I think you're looking at more of a "dist" make target. I'll look into what it is supposed to entail as far as GNU is concerned and see what the devs have to say.
find quote
wattazoum Offline
Team-XBMC Linux Packager
Posts: 315
Joined: Mar 2008
Reputation: 1
Location: Antibes, France
Post: #51
well ,

As far as GNU is concerned : http://www.gnu.org/software/make/manual/...-Variables

$(prefix) should default to "/usr/local" and
Quote:Installers are expected to override these values when calling make (e.g., make prefix=/usr install or configure (e.g., configure --prefix=/usr)
.
That's why in my first post I had put "$(prefix)/bin" (I didn't noticed that the prefix was set to /usr/share which doesn't follow GNU specification)
As for my second post, maybe i can achieve what I want by
Code:
./configure --prefix=/usr
make
make prefix=debian/tmp/usr install
But this still means that we need to have the change $(prefix)/bin/ but this time $(prefix) as in GNU specification
find quote
althekiller Offline
Retired Team-Kodi Member
Posts: 5,002
Joined: May 2004
Reputation: 12
Post: #52
update and be happy Smile
find quote
wattazoum Offline
Team-XBMC Linux Packager
Posts: 315
Joined: Mar 2008
Reputation: 1
Location: Antibes, France
Post: #53
Thank you Big Grin

I don't want you to think that I am difficult but ... Laugh it still need an update.
Currently the install script installs to /usr/xbmc and not /usr/share/xbmc . The file that is well installed is the xbmc script under /usr/bin/xbmc

Here is the files that need to be modified (so that you see what I mean )
http://www.mediafire.com/?uxf29um09rm

Thank a lot for your help and support
Regards
find quote
wattazoum Offline
Team-XBMC Linux Packager
Posts: 315
Joined: Mar 2008
Reputation: 1
Location: Antibes, France
Post: #54
oops ! I forgot this file : Makefile.include.in

Code:
DEFINES+=-D_LINUX -D_FILE_DEFINED -D_REENTRANT -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 @SDL_DEFINES@ -DINSTALL_PATH="\"$(prefix)/share/xbmc\""
find quote
althekiller Offline
Retired Team-Kodi Member
Posts: 5,002
Joined: May 2004
Reputation: 12
Post: #55
Is there really a need to install to /usr/share? The app isn't really in a state where it can properly be split as per GNU and likely won't be until much closer to a supported public beta. I'd say just work with what we have now (it works) and we can worry about making it "proper" later.
find quote
wattazoum Offline
Team-XBMC Linux Packager
Posts: 315
Joined: Mar 2008
Reputation: 1
Location: Antibes, France
Post: #56
well, as Topfs2 said, it seems to be what is holding the new RC back.

BTW the only think to change right now to support the GNU standard is the 3 files I mentioned early. The application will be installed in $(prefix)/share/xbmc and the launcher under $(prefix)/bin .
Those modification are the last step.

Anyway, as of now, you're right, XBMC will work but it will install under /usr/local/xbmc ( which is fine but a little bit messy :-p ) .
find quote
typhoe Offline
Donor
Posts: 41
Joined: Jun 2008
Reputation: 0
Question  Patch for foreign languages support
Post: #57
Hi althekiller,

I would like to submit a little patch to your script for the svn revision detection in other languages than english.

I'm french and my locale is set in french. So when I try to check the svn revision of xbmc, here is what I get:
$ svn info "XBMC" -r HEAD

Chemin : XBMC
URL : https://xbmc.svn.sourceforge.net/svnroot...xport/XBMC
Racine du dépôt : https://xbmc.svn.sourceforge.net/svnroot/xbmc
UUID du dépôt : 568bbfeb-2a22-0410-94d2-cc84cf5bfa90
Révision : 13531
Type de noeud : répertoire
Auteur de la dernière modification : malloc64
Révision de la dernière modification : 13528
Date de la dernière modification: 2008-06-11 11:40:55 +0200 (mer, 11 jun 2008)

As you can see, in french Revision is spelled "Révision" (with an accent).

So your script can detect the revision because you do a grep on "Revision".

The change I suggest is simply to add in your script the use of the environmental setting "LANG" like this:
$ echo "Init lang is $LANG" ; LANG_old=${LANG} ; LANG="" ; echo "New lang is $LANG" ; svn info "XBMC" -r HEAD ; LANG=${LANG_old} ; echo "Lang is again $LANG"

Init lang is fr_FR.UTF-8
New lang is
Path: XBMC
URL: https://xbmc.svn.sourceforge.net/svnroot...xport/XBMC
Repository Root: https://xbmc.svn.sourceforge.net/svnroot/xbmc
Repository UUID: 568bbfeb-2a22-0410-94d2-cc84cf5bfa90
Revision: 13532
Node Kind: directory
Last Changed Author: malloc64
Last Changed Rev: 13528
Last Changed Date: 2008-06-11 11:40:55 +0200 (Wed, 11 Jun 2008)

Lang is again fr_FR.UTF-8

Using this method, the ouput of the svn command is defaulted to english and we have no problem to grep.

So the result:

$ diff build_new.sh build.sh
497,500d496
< # Read the actual value of the environmental setting LANG
< LANG_SYSTEM=$LANG
< # Default its value
< LANG=""
679,681d674
< # Restore LANG value (done there because I often do ctrl+c to bypass the log view Tongue )
< LANG=$LANG_SYSTEM
<

Thank you for your work,
hope this will help others,
regards,

Typhoe
find quote
althekiller Offline
Retired Team-Kodi Member
Posts: 5,002
Joined: May 2004
Reputation: 12
Post: #58
@typhoe, thanks, committed.

I've updated build.sh to use XBMCTex since the texture bundle is no longer in SVN. If you get a black screen with labels make sure you update and rebuild.
find quote
Haohmaru Offline
Senior Member
Posts: 193
Joined: Sep 2005
Reputation: 0
Post: #59
althekiller Wrote:@typhoe, thanks, committed.

I've updated build.sh to use XBMCTex since the texture bundle is no longer in SVN. If you get a black screen with labels make sure you update and rebuild.

I've 2 minutes ago compiled the latest SVN and after starting XBMC I can't see anything but a black background with the menu letters. Can someone please tell me why I doesn't see the skin properly and how can I fix it ?
find quote
althekiller Offline
Retired Team-Kodi Member
Posts: 5,002
Joined: May 2004
Reputation: 12
Post: #60
Are you using any options or just ./build.sh?
You can't honestly expect help with the amount of info you gave.

EDIT: I just ran it again and it worked fine...
(This post was last modified: 2008-06-25 21:54 by althekiller.)
find quote
Post Reply