swcarpentry / windows-installer

Software Carpentry installer for Windows.
MIT License
21 stars 17 forks source link

If you uncheck that last box, nano won't be in your PATH #28

Closed kbroman closed 9 years ago

kbroman commented 9 years ago

We had a couple of students using Windows who had used the SWC windows installer but didn't have nano in their PATH.

It seems that they went through the installer but maybe unchecked that last box, "Launch Software Carpentry Windows Installer".

swc_installer_1

It seems innocuous, but then the installer halts without adding the necessary lines to ~/.bash_profile to update the PATH variable.

Maybe change the text that goes with that check box to something that would discourage unchecking?

abought commented 9 years ago

At the risk of sounding snarky... does this mean that the installer has an installer? If so, the checkbox may not be the most confusing part of this.

wking commented 9 years ago

On Wed, Jun 03, 2015 at 08:17:32PM -0700, Karl Broman wrote:

It seems that they went through the installer but maybe unchecked that last box, "Launch Software Carpentry Windows Installer".

In that case, I expect the only change to their system was that they'd downloaded the installer. It's hard for the SWC installer to do anything if you don't run it ;).

Maybe change the text that goes with that check box to something that would discourage unchecking?

I don't know if we control the text, but yeah, ideally the text makes it obvious that you need to actually run the installer to get effects. The current text says that to me, but maybe others have suggestions that would be clear to a larger fraction of learners?

wking commented 9 years ago

On Thu, Jun 04, 2015 at 08:24:53AM -0700, Andy Boughton wrote:

At the risk of sounding snarky... does this mean that the installer has an installer? If so, the checkbox may not be the most confusing part of this.

It's a tricky problem, since the installer is written in Python, Windows doesn't have a system Python, and students at R-based workshops don't even need a post-install Python. So the Python installation script 1 gets wrapped up by InnoSetup 2 into a self-installing package that also contains the Python binaries needed to run the script. A more straightforward approach would be nice, but you probably want to review the earlier discussion before proposing a new approach (see swcarpentry/bc#228, swcarpentry/bc#424, swcarpentry/bc#480).

kbroman commented 9 years ago

In that case, I expect the only change to their system was that they'd downloaded the installer. It's hard for the SWC installer to do anything if you don't run it ;).

If you run the installer but uncheck that box, I think the software gets moved into place (in ~/.swc) but the python script is not run.

If the installer can't be changed, a reasonable solution would be to

I guess as a general rule, if a workshop attendee says, "I did run the installer," one should still respond, "let's try it one more time and see what happens."

wking commented 9 years ago

On Thu, Jun 04, 2015 at 04:14:54PM -0700, Karl Broman wrote:

In that case, I expect the only change to their system was that they'd downloaded the installer. It's hard for the SWC installer to do anything if you don't run it ;).

If you run the installer but uncheck that box, I think the software gets moved into place (in ~/.swc) but the python script is not run.

The Python script is the only thing populating ~/.swc 1.

If the installer can't be changed, a reasonable solution would be to

  • mention that last check box in setup instructions for workshop attendees

It looks like we setup that checkbox here 2. Maybe removing the ‘postinstall’ flag will remove the checkbox and just run the script automatically 3?

kbroman commented 9 years ago

Ah, I see. Thanks, @wking!

ethanwhite commented 9 years ago

Apologies for my slow response, I've been moving across the country.

Yes, in concept we should be able to remove the 'postinstall' flag. Unfortunately in practice the installer doesn't work when we do that (which is why it's there in the first place). I never figure out exactly what the issue was, but I think it's some sort of race condition. I just spent another hour trying to figure out a better workaround, but haven't found one yet.

If we can't figure out a proper fix then I agree that adding a clear note saying not to uncheck this box should help. Yes, the text is under our control.

As for,

At the risk of sounding snarky... does this mean that the installer has an installer? If so, the checkbox may not be the most confusing part of this.

Yes, wrapping the old Python script in Inno Setup is definitely a bit of a hack. It should in concept be possible to have Inno Setup handle all of this for us. We've discussed this and not pursued it due to a lack of time and the fact that the current system is working in the vast majority cases. However, if someone has some time to sink into this they should feel free to give it a go.

ethanwhite commented 9 years ago

Finally tracked down a more functional solution: http://stackoverflow.com/questions/18938788/inno-setup-run-program-without-showing-a-checkbox

29 will grey out the check box and prevent it from being unchecked.