Embed .xml-definitions?

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

Embed .xml-definitions?

Post by xz79 » Wed Oct 08, 2014 8:30 pm

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: 2570
Joined: Fri Feb 12, 2010 3:33 pm
Location: Germany
Contact:

Re: Embed .xml-definitions?

Post by airsoftsoftwair » Wed Oct 08, 2014 10:44 pm

Sure, just link the file using the @FILE preprocessor command or use the [[ ]] operator to embed the XML from your script.

zylesea
Posts: 169
Joined: Tue Feb 16, 2010 1:50 am
Location: Westfalen/Germany
Contact:

Re: Embed .xml-definitions?

Post by zylesea » Wed Nov 11, 2015 1:21 am

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: 2570
Joined: Fri Feb 12, 2010 3:33 pm
Location: Germany
Contact:

Re: Embed .xml-definitions?

Post by airsoftsoftwair » Wed Nov 11, 2015 6:19 pm

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

Code: Select all

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

Post Reply