Skip to content

Commit 4c282a8

Browse files
committed
Updates for WinPython
Added downloading PowerShell icon. Removed NII stuff.
1 parent e6ed407 commit 4c282a8

File tree

3 files changed

+20
-11
lines changed

3 files changed

+20
-11
lines changed

WinPython/README-JP.md

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ Using [Powershell](https://github.com/PowerShell/PowerShell) on [Jupyter Noteboo
1111
- [Jupyter Nbextensions](https://github.com/ipython-contrib/jupyter_contrib_nbextensions) (Optional)
1212
- [Jupyter Nbextensions Configurator](https://github.com/Jupyter-contrib/jupyter_nbextensions_configurator) (Optional)
1313
- [PortableGit](https://github.com/git-for-windows/git) (Optional)
14-
- [NII Extensions for Jupyter Notebook](https://github.com/NII-cloud-operation) (Optional)
1514
- [.Net Interactive](https://github.com/dotnet/interactive) (Optional)
1615

1716
## インストール方法
@@ -54,10 +53,6 @@ Using [Powershell](https://github.com/PowerShell/PowerShell) on [Jupyter Noteboo
5453
This switch option will install [Jupyter Nbextensions](https://github.com/ipython-contrib/jupyter_contrib_nbextensions) and [Jupyter Nbextensions Configurator](https://github.com/Jupyter-contrib/jupyter_nbextensions_configurator).
5554
例: .\WinPython.ps1 -InstallNBExtensions
5655

57-
- InstallNIIExtensions
58-
このスイッチオプションを指定すると、 [Jupyter Nbextensions](https://github.com/ipython-contrib/jupyter_contrib_nbextensions)[Jupyter Nbextensions Configurator](https://github.com/Jupyter-contrib/jupyter_nbextensions_configurator)をインストールします。
59-
例: .\WinPython.ps1 -InstallNIIExtensions
60-
6156
- InstallPortableGit
6257
このスイッチオプションを指定すると、 [PortableGit](https://github.com/git-for-windows/git)をインストールします。
6358
例: .\WinPython.ps1 -InstallPortableGit

WinPython/README.md

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ Using [Powershell](https://github.com/PowerShell/PowerShell) on [Jupyter Noteboo
1111
- [Jupyter Nbextensions](https://github.com/ipython-contrib/jupyter_contrib_nbextensions) (Optional)
1212
- [Jupyter Nbextensions Configurator](https://github.com/Jupyter-contrib/jupyter_nbextensions_configurator) (Optional)
1313
- [PortableGit](https://github.com/git-for-windows/git) (Optional)
14-
- [NII Extensions for Jupyter Notebook](https://github.com/NII-cloud-operation) (Optional)
1514
- [.Net Interactive](https://github.com/dotnet/interactive) (Optional)
1615

1716
## Installations
@@ -53,10 +52,6 @@ e.g.: .\WinPython.ps1 -InstallPwsh7ForPipKernel -PowerShell7Path C:\PathTo\WinPy
5352
This switch option will install [Jupyter Nbextensions](https://github.com/ipython-contrib/jupyter_contrib_nbextensions) and [Jupyter Nbextensions Configurator](https://github.com/Jupyter-contrib/jupyter_nbextensions_configurator).
5453
e.g.: .\WinPython.ps1 -InstallNBExtensions
5554

56-
- InstallNIIExtensions
57-
This switch option will install [NII Extensions for Jupyter Notebook](https://github.com/NII-cloud-operation). then requires the git for installation or add "-InstallPortableGit" option.
58-
e.g.: .\WinPython.ps1 -InstallNIIExtensions
59-
6055
- InstallPortableGit
6156
This switch option will install [PortableGit](https://github.com/git-for-windows/git).
6257
e.g.: .\WinPython.ps1 -InstallPortableGit

WinPython/WinPython.ps1

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,12 @@ else {
222222
$installPath = Join-Path $packagePath 'powershell5_kernel'
223223
Expand-Archive -Path (Join-Path $WorkingFolder 'PowerShell5.zip') -DestinationPath $installPath -Force
224224
New-Item -ItemType Directory -Path (Join-Path $kernelPath '\powershell5\') -Force
225-
225+
Invoke-WebRequest -UseBasicParsing -Verbose -Uri 'https://raw.githubusercontent.com/PowerShell/PowerShell/master/assets/Powershell_64.png' -OutFile (Join-Path $kernelPath '\powershell5\logo-64x64.png')
226+
Add-Type -AssemblyName System.Drawing
227+
$image = [System.Drawing.Image]::FromFile((Join-Path $kernelPath '\powershell5\logo-64x64.png'))
228+
$bitmap32 = New-Object System.Drawing.Bitmap(32, 32)
229+
[System.Drawing.Graphics]::FromImage($bitmap32).DrawImage($image, 0, 0, 32, 32)
230+
$bitmap32.Save((Join-Path $kernelPath '\powershell5\logo-32x32.png'), [System.Drawing.Imaging.ImageFormat]::Png)
226231
@"
227232
set PS5KPATH=%WINPYDIR%\Lib\site-packages\powershell5_kernel
228233
echo ";%PATH%;" | %FINDDIR%\find.exe /C /I ";%PS5KPATH%\;" >nul
@@ -253,6 +258,12 @@ if ($InstallPwsh7SDK) {
253258
$installPath = Join-Path $packagePath 'powershellSDK_kernel'
254259
Expand-Archive -Path (Join-Path $WorkingFolder 'PowerShellSDK.zip') -DestinationPath $installPath -Force
255260
New-Item -ItemType Directory -Path (Join-Path $kernelPath '\powershellSDK\') -Force
261+
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')
262+
Add-Type -AssemblyName System.Drawing
263+
$image = [System.Drawing.Image]::FromFile((Join-Path $kernelPath '\powershellSDK\logo-64x64.png'))
264+
$bitmap32 = New-Object System.Drawing.Bitmap(32, 32)
265+
[System.Drawing.Graphics]::FromImage($bitmap32).DrawImage($image, 0, 0, 32, 32)
266+
$bitmap32.Save((Join-Path $kernelPath '\powershellSDK\logo-32x32.png'), [System.Drawing.Imaging.ImageFormat]::Png)
256267
@"
257268
set PS7KPATH=%WINPYDIR%\Lib\site-packages\powershellSDK_kernel
258269
echo ";%PATH%;" | %FINDDIR%\find.exe /C /I ";%PS7KPATH%\;" >nul
@@ -320,5 +331,13 @@ if ($AddStartMenu) {
320331
}
321332
}
322333

334+
@'
335+
@echo off
336+
pushd %~dp0
337+
icacls ..\..\ /grant Everyone:F /T /C
338+
popd
339+
pause
340+
'@ | Set-Content -Path "$wpRoot\scripts\sakaztk-everyonefull.bat"
341+
323342
Pop-Location
324343
Write-Host 'Done, It may require reboot to some function(s).' -ForegroundColor Green

0 commit comments

Comments
 (0)