99 [Switch ]$InstallGit ,
1010 [Switch ]$InstallDotnetInteractive ,
1111 [Switch ]$InstallNBExtensions ,
12- [Switch ]$InstallNIIExtensions ,
1312 [Switch ]$UsePipKernel ,
1413 [Switch ]$InstallPwsh7ForPipKernel ,
1514 [Switch ]$CleanupDownloadFiles ,
@@ -20,12 +19,6 @@ Push-Location $WorkingFolder
2019chcp 65001
2120$OutputEncoding = [System.Console ]::OutputEncoding = [System.Console ]::InputEncoding = [System.Text.Encoding ]::GetEncoding(' utf-8' )
2221
23- if (($null -eq (Invoke-Command - ScriptBlock {$ErrorActionPreference = " silentlycontinue" ; git -- version} - ErrorAction SilentlyContinue)) -and (-not ($InstallGit ))) {
24- if ($InstallNIIExtensions ) {
25- throw ' You need git command or InstallGit option for InstallNIIExtensions option.'
26- }
27- }
28-
2922$psBoundParameters.Keys | ForEach-Object {
3023 if ($ ($PSBoundParameters .$_.GetType ().Name) -eq ' SwitchParameter' ) {
3124 $paramStrings += " -$_ "
@@ -181,26 +174,6 @@ if ($InstallNBExtensions) {
181174 python - m pip install https:// github.com / ipython- contrib/ jupyter_contrib_nbextensions/ tarball/ master
182175 python - m jupyter contrib nbextension install $pyTypeOpt
183176}
184- if ($InstallNIIExtensions ) {
185- python - m pip install git+ https:// github.com / NII- cloud- operation/ Jupyter- LC_run_through
186- python - m pip install git+ https:// github.com / NII- cloud- operation/ Jupyter- LC_wrapper
187- python - m pip install git+ https:// github.com / NII- cloud- operation/ Jupyter- multi_outputs
188- python - m pip install git+ https:// github.com / NII- cloud- operation/ Jupyter- LC_index
189- python - m pip install git+ https:// github.com / NII- cloud- operation/ Jupyter- LC_notebook_diff
190- python - m pip install git+ https:// github.com / NII- cloud- operation/ sidestickies
191- python - m pip install git+ https:// github.com / NII- cloud- operation/ nbsearch
192- python - m pip install git+ https:// github.com / NII- cloud- operation/ Jupyter- LC_nblineage
193- if ($InstallNBExtensions ) {
194- python - m jupyter nbextension install -- py lc_run_through $pyTypeOpt
195- python - m jupyter nbextension install -- py lc_wrapper $pyTypeOpt
196- python - m jupyter nbextension install -- py lc_multi_outputs $pyTypeOpt
197- python - m jupyter nbextension install -- py notebook_index $pyTypeOpt
198- python - m jupyter nbextension install -- py lc_notebook_diff $pyTypeOpt
199- python - m jupyter nbextension install -- py nbtags $pyTypeOpt
200- python - m jupyter nbextension install -- py nbsearch $pyTypeOpt
201- python - m jupyter nbextension install -- py nblineage $pyTypeOpt
202- }
203- }
204177if ($UsePipKernel ) {
205178 python - m pip install powershell_kernel
206179 python - m powershell_kernel.install $pyTypeOpt
@@ -226,6 +199,12 @@ else {
226199 $installPath = Join-Path $packagePath ' powershell5_kernel'
227200 Expand-Archive - Path (Join-Path $WorkingFolder ' PowerShell5.zip' ) - DestinationPath $installPath - Force
228201 New-Item - ItemType Directory - Path (Join-Path $kernelPath ' \powershell5\' ) - Force
202+ Invoke-WebRequest - UseBasicParsing - Verbose - Uri ' https://raw.githubusercontent.com/PowerShell/PowerShell/master/assets/Powershell_64.png' - OutFile (Join-Path $kernelPath ' \powershell5\logo-64x64.png' )
203+ Add-Type - AssemblyName System.Drawing
204+ $image = [System.Drawing.Image ]::FromFile((Join-Path $kernelPath ' \powershell5\logo-64x64.png' ))
205+ $bitmap32 = New-Object System.Drawing.Bitmap(32 , 32 )
206+ [System.Drawing.Graphics ]::FromImage($bitmap32 ).DrawImage($image , 0 , 0 , 32 , 32 )
207+ $bitmap32.Save ((Join-Path $kernelPath ' \powershell5\logo-32x32.png' ), [System.Drawing.Imaging.ImageFormat ]::Png)
229208@"
230209{
231210 "argv": [
@@ -246,6 +225,12 @@ if ($InstallPwsh7SDK) {
246225 $installPath = Join-Path $packagePath ' powershellSDK_kernel'
247226 Expand-Archive - Path (Join-Path $WorkingFolder ' PowerShellSDK.zip' ) - DestinationPath $installPath - Force
248227 New-Item - ItemType Directory - Path (Join-Path $kernelPath ' \powershellSDK\' ) - Force
228+ Invoke-WebRequest - UseBasicParsing - Verbose - Uri ' https://raw.githubusercontent.com/PowerShell/PowerShell/master/assets/Powershell_black_64.png' - OutFile (Join-Path $kernelPath ' \powershellSDK\logo-64x64.png' )
229+ Add-Type - AssemblyName System.Drawing
230+ $image = [System.Drawing.Image ]::FromFile((Join-Path $kernelPath ' \powershellSDK\logo-64x64.png' ))
231+ $bitmap32 = New-Object System.Drawing.Bitmap(32 , 32 )
232+ [System.Drawing.Graphics ]::FromImage($bitmap32 ).DrawImage($image , 0 , 0 , 32 , 32 )
233+ $bitmap32.Save ((Join-Path $kernelPath ' \powershellSDK\logo-32x32.png' ), [System.Drawing.Imaging.ImageFormat ]::Png)
249234@"
250235{
251236 "argv": [
0 commit comments