diff --git a/pyci/api/package/packager.py b/pyci/api/package/packager.py index aeec616..ea91e0c 100644 --- a/pyci/api/package/packager.py +++ b/pyci/api/package/packager.py @@ -462,6 +462,13 @@ def nsis(self, binary_path, makensis_path = os.path.join(temp_dir, 'nsis-3.04', 'makensis.exe') command = '{} -DVERSION={} {}'.format(makensis_path, version, installer_path) + # The installer expects the binary to be located in the working directory + # and be named {{ name }}.exe. + # See installer.nsi.jinja#L85 + expected_binary_path = os.path.join(temp_dir, '{}.exe'.format(name)) + self._debug('Copying binary to expected location: {}'.format(expected_binary_path)) + shutil.copyfile(src=binary_path, dst=expected_binary_path) + self._debug('Creating installer...') self._runner.run(command, cwd=temp_dir)