Embed .xml-definitions?

Discuss GUI programming with the MUI Royale plugin here
Post Reply
xz79
Posts: 18
Joined: Thu Mar 14, 2013 10:12 am

Embed .xml-definitions?

Post by xz79 »

Is ist possible to embed the xml-file with the GUI definitions into a compiled hollywood project?
Or do you always have to deliver it to the end user as a separate file?
User avatar
airsoftsoftwair
Posts: 5443
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: Embed .xml-definitions?

Post by airsoftsoftwair »

Sure, just link the file using the @FILE preprocessor command or use the [[ ]] operator to embed the XML from your script.
zylesea
Posts: 227
Joined: Tue Feb 16, 2010 12:50 am
Location: Westfalen/Germany
Contact:

Re: Embed .xml-definitions?

Post by zylesea »

airsoftsoftwair wrote:Sure, just link the file using the @FILE preprocessor command or use the [[ ]] operator to embed the XML from your script.
Sometimes I feel stupid, but how to access the included file?

Code: Select all

(...)
@FILE 1, "muidef.xml"     
(...)
mui.createGUI(FileToString(1)) 
(...)
I mean the blunt "1" as handler is not working (Kann Datei 1 nicht öffnen).
User avatar
airsoftsoftwair
Posts: 5443
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: Embed .xml-definitions?

Post by airsoftsoftwair »

FileToString() requires a filename, not a handle. Try:

Code: Select all

mui.CreateGUI(ReadString(1, FileLength(1)))
Post Reply