Menu

#407 LogicLib.nsh not usable under Linux

closed-fixed
Scripting (211)
5
2005-10-12
2005-10-09
screenager
No

LogicLib.nsh is not usable under Linux as it tries !
system-calls with specific Windows-syntax.

Using "Switch" will produce something like this:

-----
sh: 0: command not found
sh: $%TMP%/170.7.tmp: No such file or directory
sh: 4: command not found
sh: $%TMP%/170.7.tmp: No such file or directory
----

Where "0" and "4" are case-values from the switch.

As i urgently needed a hotfix i did the following in
LogicLib.nsh:

1.) replaced $%TMP with /tmp - this assumes a user
writeable temporary directory under /tmp as it is
standard. Another fix is setting an environment variable
with something like "env TMP=/tmp makensis scrip.nsi"

2.) changed two lines with system calls by adding linux-
compatible quotes:

!system `echo "# logiclib temp file" > "${${_Switch}Tmp}"`

!system `echo '!insertmacro _== $\`${${_Switch}Var}$\`
$\`${_a}$\` ${_label} ""' >> "${${_Switch}Tmp}"`

3.) replaced the "del" command with linux "rm":

!system `rm "${${_Switch}Tmp}"`

I know these changes do not solve the problem for both
systems. Hope, somebody can melt them. I provided a
patch file that summarizes my changes.

Discussion

  • screenager

    screenager - 2005-10-09

    Logged In: YES
    user_id=1358931

    And here the patch.

     
  • screenager

    screenager - 2005-10-09

    LogicLib.nsh patch for Linux

     
  • Amir Szekely

    Amir Szekely - 2005-10-09
    • assigned_to: nobody --> kichik
     
  • Amir Szekely

    Amir Szekely - 2005-10-12
    • status: open --> closed
     
  • Amir Szekely

    Amir Szekely - 2005-10-12
    • status: closed --> closed-fixed
     

Log in to post a comment.