[izpack-users] Define Install Path in a txt resource WITHOUT TargetPanel appearance

J-Pro joker.pro at gmail.com
Tue Oct 17 16:31:15 CEST 2006


Dear Klaus, I'm using Intellij IDEA 6.0 for compiling your code.
I have changed two src-files and one property file:


========================
-------------
InstallerBase.java (for case of any unwanted exception):
-------------

was:

catch (Exception err)
{
       dpath = new StringBuffer("C:\\Program Files");
}

became:

catch (Exception err)
{
            dpath = new StringBuffer("C:\\Program Files\\Apache Software 
Foundation\\Tomcat 5\\webapps\\myapp");
}

-------------
win32-defaultpaths.properties (as you advised):
-------------

was: en=Program Files
became: en=Program Files\Apache Software Foundation\Tomcat 5\webapps\myapp


-------------
TargetFactory.java (after I tried your advice, I decided to try and this 
variant):
-------------

was: static final String[] INSTALL_PATH_FRAGMENT = { "Program Files" + 
File.separator, "/Applications" + File.separator, "/usr/local" + 
File.separator, File.separator + "apps" + File.separator};

became: static final String[] INSTALL_PATH_FRAGMENT = { "Program Files" + 
File.separator + "Apache Software Foundation" + File.separator + "Tomcat 5" 
+ File.separator + "webapps" + File.separator + "myapp", "/Applications" + 
File.separator, "/usr/local" + File.separator, File.separator + "apps" + 
File.separator};
========================


After correcting these files I rebuilded these files and pached them into 
installer.jar instead of old. Then wrote in cmd: "compile install.xml -b 
. -o myapp.jar -k standard" - and nothing changed. When I use TargetPanel to 
check what do I have as a default path - there is still "C:\Program Files".

What can you advise me as a developer? I suppose I don't understand 
something...

Thank you for your help.



--- Original Message ---

> From: "Bartz, Klaus" <Klaus.Bartz at coi.de>
> Subject: Re: [izpack-users] Define Install Path in a txt resource
> WITHOUTTargetPanel appearance
> To: <izpack-users at lists.berlios.de>
> Message-ID: <591E33C080D2E5449BB1791B70D66B28891739 at coi11.coi.com>
> Content-Type: text/plain; charset="iso-8859-1"
>
> Hi Jurii,
> in the moment there is no standard way to support your
> needs. The resource will only be readed if TargetPanel will
> be involved.
> It seems so you are able to understand our code. If so,
> look into
> InstallerBase.buildWindowsDefaultPath
> There is the code which is used for default. You can see, that
> /com/izforge/izpack/installer/win32-defaultpaths.properties
> contains the locale dependant name of the windows default
> installation directory.
> That you can change in your own version of IzPack. But the
> drive letter is not defined in this properties else in the
> method.
>
> Hope it helps
>
> Klaus
>
>
>>-----Original Message-----
>>From: izpack-users-bounces at lists.berlios.de
>>[mailto:izpack-users-bounces at lists.berlios.de]On Behalf Of J-Pro
>>Sent: Saturday, October 14, 2006 12:22 AM
>>To: izpack-users at lists.berlios.de
>>Subject: [izpack-users] Define Install Path in a txt resource
>>WITHOUTTargetPanel appearance
>>
>>
>>Good afternoon, dear IzPack gurus!
>>
>>I have one question: I want to define my own install path(not
>>C:\Program
>>Files), but supressing the TargetPanel appearance. I know that
>>to not show
>>TargetPanel I can just remove the string "<panel
>>classname="TargetPanel"
>>resid="TargetPanel.dir.windows"/>", but it not enough for me.
>>If I remove
>>that string I can't set the path by myself like I did it
>>before with "<res
>>id="TargetPanel.dir.windows" src="Target.txt"/>".
>>
>>Is there any other way to set my own InstallPath with no
>>possibility for
>>user to change it?



________________________________
With respect,

Yurii Kartsev,
Soft IT 




More information about the izpack-users mailing list