Skip to content

Commit

Permalink
Copy the executable to the path expected by the installer before runn…
Browse files Browse the repository at this point in the history
…ing it
  • Loading branch information
iliapolo committed Dec 7, 2019
1 parent 6536429 commit 3fcc4d3
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions pyci/api/package/packager.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down

0 comments on commit 3fcc4d3

Please # to comment.