Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement console command section property #179

Merged
merged 1 commit into from
Feb 25, 2019

Conversation

bastimeyer
Copy link
Contributor

As described in #169

Adds an optional console property to the command sections with default value true. If set to false, the command's launcher will be built from one of the GUI launchers of simple_launcher and a shebang with pythonw.exe will be included instead of python.exe.

Changes:

  • extend configreader with new console command property
  • copy both launchers as dat-files (launcher_exe.dat and launcher_noconsole_exe.dat)
  • split between command-append.zip and command-append-noconsole.zip, depending on the command's console value
  • rewrite _assemble_launchers.py to reflect these changes and change its argvs so that the shebang can be tested
  • add/rewrite tests
  • add documentation

I haven't actually built any installers with these changes yet, but the updated tests should assure that this is fine. There are also a couple of things which could be improved in the future, like importing file name constants for example.

@bastimeyer bastimeyer force-pushed the feature/commands-console branch from 0a5a7e8 to a626d3a Compare February 19, 2019 03:41
@bastimeyer
Copy link
Contributor Author

Just built a couple of installers and noticed a quotation mistake in NSIS' _assemble_launchers call. That's fixed now.

@bastimeyer
Copy link
Contributor Author

@takluyver Is there a chance for a review this week? I would really love to get this issue out of the way as soon as possible. Thanks!

@takluyver
Copy link
Owner

Sorry for the delay; as I hinted, this isn't part of my day job, and I don't always feel like more work with code after spending the day doing that. Taking a look now.

Copy link
Owner

@takluyver takluyver left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, this looks good overall, just a couple of questions. Thanks for writing thorough tests!


If ``true`` (default), the command will be using the ``py`` launcher, which
opens a console for the process. If ``false``, it will use the ``pyw``
launcher, which doesn't create a console.
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess this was copy/pasted, but we don't actually use the py or pyw launchers any more. They were to do with the way Pynsist 1.x worked. I can change this afterwards, though.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, this was copied from the shortcut section. I'll leave it for you to change afterwards. 😃

@bastimeyer bastimeyer force-pushed the feature/commands-console branch from a626d3a to 070f1c4 Compare February 23, 2019 05:47
@bastimeyer bastimeyer force-pushed the feature/commands-console branch from 070f1c4 to 91f39ef Compare February 23, 2019 20:33
@bastimeyer
Copy link
Contributor Author

Any further changes, or is this good to go? :)

@takluyver takluyver added this to the 2.4 milestone Feb 25, 2019
@takluyver
Copy link
Owner

Thanks! 😃

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants