usePropertiesFile

Comments

7 comments

  • Avatar
    michiel

    <propertiesFileSet> creates the file if it does not yet exists. If you want it to be created in the same folder as the binary, which I assume is the installation directory you can use the installdir variable in the path:

    <postInstallationActionList>  
       ...

      <propertiesFileSet>
        <file>${installdir}/app.properties</file>
        <key>preferred_java_binary</key>
        <value>..\\..\\JREDIRNAME\bin\java.exe</value>
      </propertiesFileSet>
       ...
    </postInstallationActionList>
    0
    Comment actions Permalink
  • Avatar
    scout

    Thank you for your feedback.

    That it is what I have right now.  My issue is if I move my binary to other folder then it looks properties in old location e.g. originally installed path:

    1. C:\users\user\myapp\app.exe

     If I copy only binary (launcher) to new folder "myapp2"

    => C:\users\user\myapp2\app.exe
    It seems it is  looking for  app.properties in old folder i.e. myapp, and I expect it will look it the new folder location.

    0
    Comment actions Permalink
  • Avatar
    scout

    The problem is more serious. I will be glad to get solution. If I installed app to some location i.e. C:\users\user\myapp

    and renaming folder to myapp2 it wont work and will show error pop "Unable to change directory".

    For us it is critical that directory can be changed/renamed and it should not impact on the application functionality.

     

     

    How can I address new installdir (cd to new_dir ) property in *.properties file

    Can installdir be relative path and not hard-coded in launcher binary so renaming won't impact?

    0
    Comment actions Permalink
  • Avatar
    michiel

    Could you send your project.xml file to support@bitrock.com so we can investigate this issue further?

    0
    Comment actions Permalink
  • Avatar
    scout

    I found solution :

    FROM

    <workingDirectory>${installdir}</workingDirectory>

     

    TO

    <workingDirectory>.</workingDirectory>

     

    Thanks!

    0
    Comment actions Permalink
  • Avatar
    scout

    From debugs as far as I understand before even app.properties are loaded it is hard-coded to 'cd' to path that was specified in  'workingDirectory' param in time of build, and if I moved/rename app folder then this path  become incorrect /broken 

    So now the path is relative , meaning it is cd to folder of launcher, and you can move/rename folder etc, and all app.properties that overrides a default properties are relative as well 

    0
    Comment actions Permalink
  • Avatar
    michiel

    Hi Scout,

     

    Thanks for sharing. I'm glad you have found a solution for this issue.

    Regards,

    Michiel

     

    0
    Comment actions Permalink

Please sign in to leave a comment.