Skip to content

Instantly share code, notes, and snippets.

@MShrimp4
Last active September 7, 2021 09:32
Show Gist options
  • Save MShrimp4/e7fa42ed404fa6e315a282e51d99a50d to your computer and use it in GitHub Desktop.
Save MShrimp4/e7fa42ed404fa6e315a282e51d99a50d to your computer and use it in GitHub Desktop.
<##
# lab1.pdf 와 https://www.eevblog.com/forum/fpga/guide-getting-xilinx-ise-to-work-with-windows-8-64-bit/?PHPSESSID=5dhfhd60inlobp02ln9t0h8f30
# 참고한 스크립트입니다. lab1.pdf의 1.4.2와 1.4.3 내용을 자동으로 패치합니다
# Windows Powershell (관리자 권한으로 실행) 하고 스크립트 전체를 복사해서 붙여넣기 (화면에 우클릭) 하세요
# 혹시나 몰라 여러 번 스크립트 실행하여도 백업 파일은 남아있도록 만들었습니다.
#
# 사용 시 일어나는 어떤 일에도 책임지지 않습니다만 제 컴퓨터로 실험해봤습니다
#
##>
function Backup-Copy ([String]$Source, [String]$Dest) {
If (-Not (Test-Path -Path ($Dest + ".orig"))){
Copy-Item -Path $Dest -Destination ($Dest + ".orig")
}
Copy-Item -Path $Source -Destination $Dest
}
$ShellPath = Get-Location
$BasePath = "C:\Xilinx\14.7\ISE_DS"
$Path = Join-Path -Path $BasePath -ChildPath "ISE\lib\nt64"
$CommonPath = Join-Path -Path $BasePath -ChildPath "common\lib\nt64"
$PlanPath = Join-Path -Path $BasePath -ChildPath "PlanAhead\bin"
$LibPortabilityDLL = Join-Path -Path $Path -ChildPath "libPortability.dll"
$LibPortabilityDLLNOSH = Join-Path -Path $Path -ChildPath "libPortabilityNOSH.dll"
$LibPortabilityDLLCommon = Join-Path -Path $CommonPath -ChildPath "libPortability.dll"
$rdiArgsBat = Join-Path -Path $PlanPath -ChildPath "rdiArgs.bat"
$PatchZipLink = "https://www.eevblog.com/forum/fpga/guide-getting-xilinx-ise-to-work-with-windows-8-64-bit/?action=dlattach;attach=102040"
$PatchZip = Join-Path -Path $ShellPath -ChildPath "win8planaheadfix.zip"
$rdiArgsBatFix = Join-Path -Path $ShellPath -ChildPath "rdiArgs.bat"
#Download patched rdiArgs.bat
Invoke-WebRequest -Uri $PatchZipLink -OutFile $PatchZip
Expand-Archive -LiteralPath $PatchZip -DestinationPath $ShellPath
#Copy rdiArgs.bat
Backup-Copy -Source $rdiArgsBatFix -Dest $rdiArgsBat
#Cleanup
Remove-Item $rdiArgsBatFix
Remove-Item $PatchZip
#Copy DLLs
Backup-Copy -Source $LibPortabilityDLLNOSH -Dest $LibPortabilityDLL
Backup-Copy -Source $LibPortabilityDLLNOSH -Dest $LibPortabilityDLLCommon
#############
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment