takluyver / pynsist

Build Windows installers for Python applications
https://pynsist.readthedocs.io/
Other
930 stars 123 forks source link

Support variables in installer.cfg #177

Closed SecT0uch closed 5 years ago

SecT0uch commented 5 years ago

I would like to know if installer.cfg support variables.

I would like to name my installer name_version-x86.exe or name_version-x64.exe. I tried installer_name=${Application:name}_${Application:version}-x86.exe with no success. Is there any way to use variables or any workaround ?

takluyver commented 5 years ago

It does not, sorry. You could use the Python API to build your installer from code. Otherwise, see the docs for what to do if you need more flexibility.

SecT0uch commented 5 years ago

I bypassed the issue exploiting NSIS variables using : installer_name=${PRODUCT_NAME}_${PRODUCT_VERSION}-x86.exe

pynsist doesn't interpret the variables and output installer.nsi with this line : !define INSTALLER_NAME "${PRODUCT_NAME}_${PRODUCT_VERSION}-x86.exe"

Just a detail, pynsist output:

Installer written to build/x86/${PRODUCTNAME}${PRODUCT_VERSION}-x86.exe

While makensis replaces the variables properly and output my file as wanted.

Problem solved. :+1: