Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Include Windows 10 Universal C Runtime in the installer#250

Merged
gravyboat merged 1 commit into
streamlink:masterfrom
beardypig:vcredist
Dec 8, 2016
Merged

Include Windows 10 Universal C Runtime in the installer#250
gravyboat merged 1 commit into
streamlink:masterfrom
beardypig:vcredist

Conversation

@beardypig

@beardypig beardypig commented Dec 5, 2016

Copy link
Copy Markdown
Member

As pointed out by @scowalt in #246, the Visual Studio 2015 Runtimes are required for some versions Windows. I have modified the installer to install the VC runtimes if they aren't already installed. The Python Embedded Distribution page also points out that the runtimes are not included and should be installed by the installer. This is possibly an oversight of pynsist, but we can fix it ourselves :)

I tested this out of a vanilla Windows Vista 32bit VM, it would be good if @scowalt could test it out on the Chocolatey test environment and if some other people could test it out :)

I have build a version of the installer that people can use to test this out: streamlink-0.1.0-vcredist-7a50314.exe.

@codecov-io

codecov-io commented Dec 5, 2016

Copy link
Copy Markdown

Current coverage is 33.80% (diff: 100%)

Merging #250 into master will not change coverage

@@             master       #250   diff @@
==========================================
  Files            43         43          
  Lines          5457       5457          
  Methods           0          0          
  Messages          0          0          
  Branches          0          0          
==========================================
  Hits           1845       1845          
  Misses         3612       3612          
  Partials          0          0          

Powered by Codecov. Last update 96a6a95...efbe7f7

@scowalt scowalt left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Ideally, I think we would pull the redistributable from a server upon making the installer rather than checking a binary into source control. However, I think that is fine too put off as a future improvement.

Comment thread script/makeinstaller.sh Outdated
StrCmp \$1 1 installed
\${EndIf}

; If not installed run the installer

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Should we also run the x64 installer on 64-bit systems? Using the vcredist2015 chocolatey package as reference, it looks like we may want to install both x86 and x64 on 64-bit systems

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

As far as I understand it, we use the 32 bit Python and thus only require the x86 version of the VC runtime.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

As for pulling it from a remote server, I considered it but thought it would cause less problems to just include the binary, less chance of it not working :-)

@gravyboat gravyboat added the bug label Dec 6, 2016
@gravyboat gravyboat added this to the 0.1.1 milestone Dec 6, 2016
@gravyboat

Copy link
Copy Markdown
Member

This looks fine to me, have you guys finished all the testing you want to do?

@scowalt

scowalt commented Dec 6, 2016

Copy link
Copy Markdown
Member

Having trouble building the binary for this. If @beardypig could share a the installer built with this script I will test it in the Chocolatey environment.

@beardypig

Copy link
Copy Markdown
Member Author

Sure I'll build one in a bit a link to it in the top post.

@beardypig

Copy link
Copy Markdown
Member Author

@scowalt I have added a link to a build of the installer in the first post :)

@scowalt

scowalt commented Dec 6, 2016

Copy link
Copy Markdown
Member

Looks like I still get the same error after running the executable and restarting the machine:
image
image

My only thought is that the vcredist2015 chocolatey package seems to install some windows updates that could be important in getting everything to run.

Either way, I'm not sure how much you want to block on this. I could always add vcredist2015 to the dependencies in the Chocolatey package. This would potentially cause us to contribute to the VC++ wall of doom, but at least we'll know it's working for everyone:
wall of doom

@beardypig

Copy link
Copy Markdown
Member Author

OK @scowalt, maybe the x64 installer does need to be included as well... I will try some stuff on the chocolatey test env :)

@beardypig

Copy link
Copy Markdown
Member Author

Yeah, sounds like you also need some Windows update for Server 2012 and Windows 8.1 for it to work...

@beardypig

Copy link
Copy Markdown
Member Author

@scowalt I'd go with adding vcredist2015 as a dependency to the Chocolatey package. This could turn in to a bit of rabbit warren, with Windows updates, etc.

It might just be better to tell people they need to install the VC 2015 Runtimes and make sure all the Windows updates are installed.

What about if we give a warning yes/no dialog before the installer if the VC2015 runtimes are not installed? Something like:

Visual C++ Runtime x86 is required! Streamlink will not work without it. Do you still wish to continue?

@scowalt

scowalt commented Dec 6, 2016

Copy link
Copy Markdown
Member

I'll add vcredist2015 as a Chocolatey dependency.

I'm fine with a pre-install warning. Maybe a link to the runtime if we're not going to bundle it? Also, listing it as a requirement in the README would be nice.

I would just confirm that whatever warning you add will still allow the installation to run silently. I'm running the installer silently using the command <installer>.exe /S. See https://github.com/streamlink/streamlink-chocolatey/blob/master/Streamlink/tools/chocolateyinstall.ps1#L19

@scottbernstein-zz

scottbernstein-zz commented Dec 6, 2016 via email

Copy link
Copy Markdown

@beardypig

Copy link
Copy Markdown
Member Author

I feel pretty dumb as pynsist actually supports this ... 😓

I have updated the installer script, and also the docs to say that XP is not supported 😃

@bastimeyer

Copy link
Copy Markdown
Member

Wouldn't it be better to use [% extends "pyapp_msvcrt.nsi" %] at the head of our custom template instead of [% extends "pyapp.nsi" %]?
https://github.com/streamlink/streamlink/blob/0.1.0/script/makeinstaller.sh#L58
https://github.com/takluyver/pynsist/blob/1.9/nsist/pyapp_msvcrt.nsi#L1
This way you don't need to copy its content.

@beardypig

Copy link
Copy Markdown
Member Author

@bastimeyer didn't work when I tried it...

@beardypig

Copy link
Copy Markdown
Member Author

Must have been a temporal anomaly, cos it works fine now .... :|

@beardypig

Copy link
Copy Markdown
Member Author

@scowalt I've updated the installer in the top post, and I tested it on the Chocolatey vagrant machine and it worked as expected. Do you want to give it a go.

I think this is good to merge unless anyone has any objections :-)

@gravyboat

Copy link
Copy Markdown
Member

@beardypig I'm fine with it, I'll leave it unmerged for a bit in case there are any other comments, if not I'll merge it tonight.

@beardypig

Copy link
Copy Markdown
Member Author

No objections? It seems to work, see #255 and #267.

@gravyboat gravyboat merged commit 2bd3ef9 into streamlink:master Dec 8, 2016
@gravyboat

Copy link
Copy Markdown
Member

Thanks @beardypig!

@thinkpad4

thinkpad4 commented Dec 9, 2016

Copy link
Copy Markdown

@beardypig Is Visual Studio 2015 Runtime included in the nightly builds?

@scowalt

scowalt commented Dec 9, 2016

Copy link
Copy Markdown
Member

Thanks for getting this done @beardypig!

This will get picked up in Chocolatey when the executable gets built for the next release (0.1.1 or 0.2.0 😄). Until then, I have a Chocolatey package in the moderation queue that adds vcredist2015 as a dependency.

@beardypig

Copy link
Copy Markdown
Member Author

@thinkpad4 sure is, did you have a problem with it?

@thinkpad4

Copy link
Copy Markdown

@beardypig Nope just making sure. Thanks

@beardypig

Copy link
Copy Markdown
Member Author

@Rosadintv for your portable installer, you might need to add the UCRT DLLs (if you don't already, I'm not sure if you do), so that users don't run in to the same problem when they don't have KB2999226 (Windows 10 Universal C Runtime) installed.

@beardypig beardypig changed the title Include Visual Studio 2015 Runtime in the installer Include Windows 10 Universal C Runtime in the installer Dec 11, 2016
@ghost

ghost commented Dec 12, 2016

Copy link
Copy Markdown

@beardypig If i use your "streamlink\python" folder is right? (I see it contains api-ms-xx dll's)

@beardypig

beardypig commented Dec 12, 2016

Copy link
Copy Markdown
Member Author

@Rosadintv there are two zip files in the repo that you can use, an x86 one and an x64 one, it might be cleaner for you to use those :-)

@ghost

ghost commented Dec 12, 2016

Copy link
Copy Markdown

@beardypig I will use the x86 one, thanks ❤️

@beardypig beardypig deleted the vcredist branch December 16, 2016 00:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants