Pass variables between nsh files
Hi,
I'm using the same things in all my installers,
so I created a script that is used in my nsi files.
Some code of my Installer.nsi:
*******
!include "Common_Lib.nsh" <<THIS IS MY COMMON FILE
...
!define APP_VERSION "1.17.0.0"
!define APP_TITLE "ArgonWare 3"
...
Var FIREBIRD_FULL_TARGETDIR
Var FIREBIRD_FULL_ODBC_TARGETDIR
Var FIREBIRD_TARGETDIR
...
Function xx
!insertmacro FB_1_5_Installa_Server $FIREBIRD_TARGETDIR $FIREBIRD_FULL_TARGETDIR $ODBC_NAME $DATABASE_FILE
FunctionEnd
Function xxx
!insertmacro CREA_CHIAVI_REGISTRO_INSTALLAZIONE $APP_TITLE $APP_VERSION
FunctionEnd
*******
Some code of my Common_Lib.nsh
*******
!macro FB_1_5_Installa_Server FIREBIRD_TARGETDIR FIREBIRD_FULL_TARGETDIR ODBC_NAME DATABASE_FILE
ExecWait '"$INSTDIR\xxxx.exe" xxx /DIR=\"${FIREBIRD_TARGETDIR}\"'
....
!macroend
!macro CREA_CHIAVI_REGISTRO_INSTALLAZIONE APP_TITLE APP_VERSION
....
WriteRegStr HKLM "SOFTWARE\XXX\${APP_TITLE}" "Install_Dir" "$INSTDIR"
....
!macroend
*******
The first macro (FB_1_5_Installa_Server) works fine,
arguments are passed correctly and all goes ok.
The second macro gives errors on compling:
Warning: unknown variable/constant "APP_TITLE" detected, ignoring (macro:CREA_CHIAVI_REGISTRO_INSTALLAZIONE)
Why this?
What is the difference between the 2 macro?
Thanks for the help