XBMCTex - The Textures.xpr Generator

  Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
SleepyP Offline
Posting Freak
Posts: 2,282
Joined: Nov 2005
Reputation: 4
Location: Portland, Oregon
Post: #11
since i wasted a few hours on it, i figured i ought to post it somewhere to save others the trouble. i wrote a windows batch script which simplified building xpr files, especially themes.
you put the bat file & the xbmctex.exe together in a directory. you can then drag subdirectories in that location onto the bat file and xbmctex will build xprs with the same name as those directories.
example of usage:
i have a "themes" folder where i put the stuff i'm working on.
directory structure looks like this:
<themes>
<themes>\batch.bat
<themes>\xbmctex.exe
say i'm working on a v for vendetta theme. i would put all the files i want that theme to include in a subdirectory:
<themes>\vforvendetta\graphics *.png
then to build the xpr, i simply drag & drop that directory onto the bat file and it'll spit out a vforvendetta.xpr file in the same directory xbmctex.exe is located in.
it has a fork which looks for and deletes the file to be created if it already exists. it's intended to make developing themes a little easier.
Quote:@echo off
set startdir=%cd%
set target=%1
chdir /d %target%
for %%* in (%target%) do set mydir=%%~n*
if not defined mydir set mydir=%cd:\=%
cd..
if exist %mydir%.xpr echo file %mydir%.xpr already exists, deleting old copy...
if exist %mydir%.xpr del /f /q %mydir%.xpr
echo.
xbmctex.exe -input %mydir% -quality max -output %mydir%.xpr
pause

Catchy Signature Here
find quote
smuto Offline
Senior Member
Posts: 240
Joined: Sep 2004
Reputation: 2
Post: #12
Quote: -input <dir> Input directory. Default: current dir
-output <dir> Output directory/filename. Default: Textures.xpr
-quality <qual> Quality setting (min, low, normal, high, max). Default: normal

can i set different quality for subdirectories to build one xpr file?

[Image: 1.png]
find quote
smuto Offline
Senior Member
Posts: 240
Joined: Sep 2004
Reputation: 2
Post: #13
i try to make my own theme with not so big texture.xpr file

directory structure
\skinmedia\graphics *.png
\multiimage\4x3home-myprograms\graphics *.png
\multiimage\4x3home-mymusic\graphics *.png
.
.
\splash\animation\graphics *.png


this is my out of order .bat file

@echo off
xbmctex -input "skinmedia" -quality max -input "multiimage" -quality min -input "splash" -quality normal -output "new"

[Image: 1.png]
find quote
SleepyP Offline
Posting Freak
Posts: 2,282
Joined: Nov 2005
Reputation: 4
Location: Portland, Oregon
Post: #14
wtfConfusedConfused?
find quote
jgawera Offline
Senior Member
Posts: 221
Joined: Oct 2004
Reputation: 0
Location: UK
Post: #15
Has anyone tried building textures.xpr using XBMCTex while in a remote desktop session?
I've a feeling that is the cause of the below error, but I could be wrong.

I'm fairly sure It worked the first time I did it (when I was at the machine)
I needed to do another build and kicked it off remotely, and got the below error.
I'll try another local build tonight when I can get to the machine.

Thanks for any help.
J

Code:
Copying files...
'xbepatch.exe' is not recognized as an internal or external command,
operable program or batch file.
The system cannot find the file specified.
        1 file(s) copied.
19 File(s) copied
*.xml
The system cannot find the file specified.
        0 file(s) copied.
Changelog.txt
copying.txt
keymapping.txt
        3 file(s) copied.
----------------------------------------
Creating Project Mayhem III Build Folder
The system cannot find the file specified.
----------------------------------------
Creating XPR File...
Cannot init D3D device: 8876086a
----------------------------------------
Copying XPR File...
File not found - Textures.xpr
0 File(s) copied
----------------------------------------
Cleaning Up...
Could Not Find D:\Projects\XBMCDBR\XBMCDBR\bin\Debug\XBMC\skin\Project Mayhem
I\media\Textures.xpr
----------------------------------------
XPR Texture Files Created...
Building Skin Directory...
4 File(s) copied
4 File(s) copied
20 File(s) copied
5 File(s) copied
5 File(s) copied
73 File(s) copied
30 File(s) copied
8 File(s) copied
skin.xml
        1 file(s) copied.
Changelog_PM.txt
        1 file(s) copied.
----------------------------------------
find quote
freifuss Offline
Junior Member
Posts: 9
Joined: Sep 2005
Reputation: 0
Post: #16
jgawera Wrote:Has anyone tried building textures.xpr using XBMCTex while in a remote desktop session?

Ohh, I'm not alone. Sounds weird that it seems only to occur in RDP-Session. I tried to build XBMC and had the same problem even though I don't know what XBMCTex is. If I have to go to the maschine to build XBMC, I got a problem Wink

greetz
ff
find quote
jgawera Offline
Senior Member
Posts: 221
Joined: Oct 2004
Reputation: 0
Location: UK
Post: #17
Confirmed:
XBMCTex does not work over a remote desktop connection.
I've tried a local build and it worked just fine.

Does anybody know if this can be fixed?

Thanks
J
find quote
jmarshall Offline
Team-XBMC Developer
Posts: 24,523
Joined: Oct 2003
Reputation: 138
Post: #18
Dunno. I don't have time to investigate. It is failing to init the D3D device. Perhaps googling some info up on it will be helpful?

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]
find quote
cyrilic Offline
Junior Member
Posts: 1
Joined: Feb 2007
Reputation: 0
Post: #19
Can you extract a XPR file with this tool? If not, how can I extract a XPR file? Thanks!
find quote
agathorn Offline
Team-XBMC Developer
Posts: 497
Joined: Nov 2007
Reputation: 2
Post: #20
I'm curious about what criteria this uses to determine how to pack the texture. I have two textures that are 720x128, but for some reason they are being packed at different dimensions, with one of them going way up to 1024 width and wasting a lot of space.

Here is a snip from the log:

Code:
list_bg_128.png:                           720x128  X8R8G8B8->LIN_A8R8G8B8  768x128  ( 6.25% waste)
list_bg_dropdown_128.png:                  720x128  X8R8G8B8->P8       1024x128  (29.69% waste)

And here is the command line for XBMCTex:
XBMCTex -input media -quality high -output media -noprotect >> pack.log
find quote