Info Panel Text Customizable Per Platform

View: New views
5 Messages — Rating Filter:   Alert me  

Info Panel Text Customizable Per Platform

by Bruce Garrett :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Is there a way to permit different text resources to be displayed in the
Info Panel?  I ask because I would like to provide "quick-start"
instructions for our application in that panel and these are different
for each platform.

On a hunch I tried this in the resources section, but it doesn't work.  
I'm including it here to give you a sense of what I'm trying to do.

<res id="InfoPanel.info.unix" src="unix_readme.txt"/>
<res id="InfoPanel.info.windows" src="windows_readme.txt"/>

---
Bruce Garrett
Systems Software Engineer
The Space Telescope Science Institute
Baltimore, Maryland.  USA




---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email



Re: Info Panel Text Customizable Per Platform

by Kjell Braden-5 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Bruce Garrett schrieb:

> Is there a way to permit different text resources to be displayed in the
> Info Panel?  I ask because I would like to provide "quick-start"
> instructions for our application in that panel and these are different
> for each platform.
>
> On a hunch I tried this in the resources section, but it doesn't work.
> I'm including it here to give you a sense of what I'm trying to do.
>
> <res id="InfoPanel.info.unix" src="unix_readme.txt"/>
> <res id="InfoPanel.info.windows" src="windows_readme.txt"/>
>
> ---
> Bruce Garrett
> Systems Software Engineer
> The Space Telescope Science Institute
> Baltimore, Maryland.  USA
>
Hi,

would creating the panel itself platform-dependent be an acceptable
solution for you?

<resources>
 <res id="InfoPanel.info.windows" src="windows_readme.txt"/>
 <res id="InfoPanel.info.linux" src="unix_readme.txt"/>
</resources>

<panels>
 <panel classname="InfoPanel" condition="izpack.windowsinstall"
id="info.windows" />
 <panel classname="InfoPanel" condition="izpack.linuxinstall"
id="info.linux" />
</panels>




Note that the izpack.unixinstall condition is not pre-defined (but
windows and linux is) and therefore would have to be created:

<conditions>
  <condition type="java" id="izpack.unixinstall">

<java><class>com.izforge.izpack.util.OsVersion</class><field>IS_UNIX</field></java>
    <returnvalue type="boolean">true</returnvalue>
  </condition>
</conditions>


HTH
-Kjell



signature.asc (268 bytes) Download Attachment

Re: Info Panel Text Customizable Per Platform

by Bruce Garrett :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

This looks good...thank you.  I will try it out now.

-Bruce

Kjell Braden wrote:
Bruce Garrett schrieb:
  
Is there a way to permit different text resources to be displayed in the
Info Panel?  I ask because I would like to provide "quick-start"
instructions for our application in that panel and these are different
for each platform.

On a hunch I tried this in the resources section, but it doesn't work. 
I'm including it here to give you a sense of what I'm trying to do.

<res id="InfoPanel.info.unix" src="unix_readme.txt"/>
<res id="InfoPanel.info.windows" src="windows_readme.txt"/>

---
Bruce Garrett
Systems Software Engineer
The Space Telescope Science Institute
Baltimore, Maryland.  USA

    

Hi,

would creating the panel itself platform-dependent be an acceptable
solution for you?

<resources>
 <res id="InfoPanel.info.windows" src="windows_readme.txt"/>
 <res id="InfoPanel.info.linux" src="unix_readme.txt"/>
</resources>

<panels>
 <panel classname="InfoPanel" condition="izpack.windowsinstall"
id="info.windows" />
 <panel classname="InfoPanel" condition="izpack.linuxinstall"
id="info.linux" />
</panels>




Note that the izpack.unixinstall condition is not pre-defined (but
windows and linux is) and therefore would have to be created:

<conditions>
  <condition type="java" id="izpack.unixinstall">

<java><class>com.izforge.izpack.util.OsVersion</class><field>IS_UNIX</field></java>
    <returnvalue type="boolean">true</returnvalue>
  </condition>
</conditions>


HTH
-Kjell

  


Re: Info Panel Text Customizable Per Platform

by Bruce Garrett :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

This seems not to be working.  I get an error message in the Info Panel saying that it cannot load the resource: 

        Error : could not load the info text !

Here's my resource section:

    <resources>
        <res id="Installer.image" src="hubble.png" />
        <res id="Heading.image" src="stgms.png" />
        <res id="CustomLangpack.xml_eng" src="CustomLangpack_eng.xml" />
        <res id="InfoPanel.info.windows" src="windows_readme.txt" />
        <res id="InfoPanel.info.linux" src="unix_readme.txt" />       
        <res id="InfoPanel.info.unix" src="unix_readme.txt" />
        <res id="TargetPanel.dir.unix" src="admin_default_install_dir.txt" />
        <res id="TargetPanel.dir.windows" src="admin_default_windows_install_dir.txt" />
        <res id="shortcutSpec.xml" src="admin_default_shortcut_spec.xml" />
        <res id="Win_shortcutSpec.xml" src="admin_windows_shortcut_specification.xml" />
    </resources>

My panels section:

    <panels>
        <panel classname="HelloPanel" />
        <panel classname="TargetPanel" />
        <panel classname="SummaryPanel" />
        <panel classname="InstallPanel" />
        <panel classname="ShortcutPanel" />
        <panel classname="InfoPanel" condition="izpack.windowsinstall" id="info.windows" />
        <panel classname="InfoPanel" condition="izpack.linuxinstall" id="info.linux" />
        <panel classname="InfoPanel" condition="izpack.unixinstall" id="info.unix" />
        <panel classname="SimpleFinishPanel" />
    </panels>

And the conditions section I added for unix support:

    <conditions>
        <condition type="java" id="izpack.unixinstall">
            <java><class>com.izforge.izpack.util.OsVersion</class><field>IS_UNIX</field></java>
            <returnvalue type="boolean">true</returnvalue>
        </condition>
    </conditions>

These should be, unless I made a spelling mistake I can't find, what you gave me to use.  The compiler doesn't complain about any of this.  The text files are there in the directory I am compiling from, and when I look inside the finished jar file I can see them and view them.  However they're listed in the jar file as:

InfoPanel.info.info.windows
InfoPanel.info.info.linux
InfoPanel.info.info.unix

I've tried experimenting with naming the resources similarly and that does not help.  Is there something else I am missing here?

-Bruce

Kjell Braden wrote:
Bruce Garrett schrieb:
  
Is there a way to permit different text resources to be displayed in the
Info Panel?  I ask because I would like to provide "quick-start"
instructions for our application in that panel and these are different
for each platform.

On a hunch I tried this in the resources section, but it doesn't work. 
I'm including it here to give you a sense of what I'm trying to do.

<res id="InfoPanel.info.unix" src="unix_readme.txt"/>
<res id="InfoPanel.info.windows" src="windows_readme.txt"/>

---
Bruce Garrett
Systems Software Engineer
The Space Telescope Science Institute
Baltimore, Maryland.  USA

    

Hi,

would creating the panel itself platform-dependent be an acceptable
solution for you?

<resources>
 <res id="InfoPanel.info.windows" src="windows_readme.txt"/>
 <res id="InfoPanel.info.linux" src="unix_readme.txt"/>
</resources>

<panels>
 <panel classname="InfoPanel" condition="izpack.windowsinstall"
id="info.windows" />
 <panel classname="InfoPanel" condition="izpack.linuxinstall"
id="info.linux" />
</panels>




Note that the izpack.unixinstall condition is not pre-defined (but
windows and linux is) and therefore would have to be created:

<conditions>
  <condition type="java" id="izpack.unixinstall">

<java><class>com.izforge.izpack.util.OsVersion</class><field>IS_UNIX</field></java>
    <returnvalue type="boolean">true</returnvalue>
  </condition>
</conditions>


HTH
-Kjell

  


Re: Info Panel Text Customizable Per Platform

by Bruce Garrett :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

I have it working now, but with the HTMLInfoPanel.  That panel works
with your suggested code for the InfoPanel just fine.  I simply changed
the references from InfoPanel to HTMLInfoPanel and it worked.  So I have
my solution.

Thank you for your help.

-Bruce


> Kjell Braden wrote:
>> Bruce Garrett schrieb:
>>  
>>> Is there a way to permit different text resources to be displayed in the
>>> Info Panel?  I ask because I would like to provide "quick-start"
>>> instructions for our application in that panel and these are different
>>> for each platform.
>>>
>>> On a hunch I tried this in the resources section, but it doesn't work.
>>> I'm including it here to give you a sense of what I'm trying to do.
>>>
>>> <res id="InfoPanel.info.unix" src="unix_readme.txt"/>
>>> <res id="InfoPanel.info.windows" src="windows_readme.txt"/>
>>>
>>> ---
>>> Bruce Garrett
>>> Systems Software Engineer
>>> The Space Telescope Science Institute
>>> Baltimore, Maryland.  USA
>>>
>>>    
>>
>> Hi,
>>
>> would creating the panel itself platform-dependent be an acceptable
>> solution for you?
>>
>> <resources>
>>  <res id="InfoPanel.info.windows" src="windows_readme.txt"/>
>>  <res id="InfoPanel.info.linux" src="unix_readme.txt"/>
>> </resources>
>>
>> <panels>
>>  <panel classname="InfoPanel" condition="izpack.windowsinstall"
>> id="info.windows" />
>>  <panel classname="InfoPanel" condition="izpack.linuxinstall"
>> id="info.linux" />
>> </panels>
>>
>>
>>
>>
>> Note that the izpack.unixinstall condition is not pre-defined (but
>> windows and linux is) and therefore would have to be created:
>>
>> <conditions>
>>   <condition type="java" id="izpack.unixinstall">
>>
>> <java><class>com.izforge.izpack.util.OsVersion</class><field>IS_UNIX</field></java>
>>     <returnvalue type="boolean">true</returnvalue>
>>   </condition>
>> </conditions>
>>
>>
>> HTH
>> -Kjell
>>
>>  
>



---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email