'File is locked' object is not working in MAC OS X

Answered

Comments

2 comments

  • Avatar
    jesus

    Hi Manoj_Ram,

    Unfortunately, the <isfilelocked> rule is only supported on Windows and Linux. Our recommendation is to use a runProgram that executes the ps command to check if a given path is presented or not.

    <setInstallerVariableFromScriptOutput>
        <name>ps_output</name>
        <exec>ps</exec>
        <execArgs>aux | grep ${installdir}/launch.app</execArgs>
    </setInstallerVariableFromScriptOutput>
    <actionGroup>
            <actionList>
            ...
            </actionList>
            <ruleList>
                <stringTest>
                        <text>${ps_output}</text>
                        <type>empty</type>
                </stringTest>
            </ruleList>
    </actionGroup>
    
  • Avatar
    Manoj_Ram

    Thanks you for your help.

    It worked but the 'STRING TEST' in the 'ruleList' is incorrect. Because the output of the command 'ps aux | grep ${installdir}/launch.app' will never be an empty string. We modified the 'ruleList' as below and it worked perfectly

                    <ruleList>
                        <compareText>
                            <logic>contains</logic>
                            <text>${ps_output}</text>
                            <value>${installdir}/launch.app/Contents/</value>
                        </compareText>
                    </ruleList>
    

    Thanks once again..

Please sign in to leave a comment.