8000 properly check for already installed NASM executable in the %NASMPATH% by GerHobbelt · Pull Request #21 · ShiftMediaProject/VSNASM · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

properly check for already installed NASM executable in the %NASMPATH% #21

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion install_script.bat
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ setlocal

REM Defined cript variables
set NASMDL=http://www.nasm.us/pub/nasm/releasebuilds
set NASMVERSION=2.16
set NASMVERSION=2.16.01
set VSWHEREDL=https://github.com/Microsoft/vswhere/releases/download
set VSWHEREVERSION=2.8.4

Expand Down Expand Up @@ -314,6 +314,12 @@ if exist "%SCRIPTDIR%\nasm_%NASMVERSION%.zip" (
echo Using existing NASM binary...
goto InstallNASM
)
echo Checking for existing NASM in NASMPATH...
%NASMPATH%\nasm.exe -v
if ERRORLEVEL 0 (
echo Using existing NASM binary from %NASMPATH%...
goto SkipInstallNASM
)
set NASMDOWNLOAD=%NASMDL%/%NASMVERSION%/win%SYSARCH%/nasm-%NASMVERSION%-win%SYSARCH%.zip
echo Downloading required NASM release binary...
powershell.exe -Command (New-Object Net.WebClient).DownloadFile('%NASMDOWNLOAD%', '%SCRIPTDIR%\nasm_%NASMVERSION%.zip') >nul 2>&1
Expand Down Expand Up @@ -342,6 +348,7 @@ if %ERRORLEVEL% neq 0 (
goto Terminate
)
rd /S /Q "%SCRIPTDIR%\TempNASMUnpack" >nul 2>&1
:SkipInstallNASM
echo Finished Successfully
goto Exit

Expand Down
4 changes: 2 additions & 2 deletions nasm.props
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
<ItemDefinitionGroup>
<NASM>
<ObjectFileName>$(IntDir)%(FileName).obj</ObjectFileName>
<CommandLineTemplate Condition="'$(Platform)' == 'Win32'">"$(NasmPath)"nasm.exe -Xvc -f win32 [AllOptions] [AdditionalOptions] "%(FullPath)"</CommandLineTemplate>
<CommandLineTemplate Condition="'$(Platform)' == 'x64'">"$(NasmPath)"nasm.exe -Xvc -f win64 [AllOptions] [AdditionalOptions] "%(FullPath)"</CommandLineTemplate>
<CommandLineTemplate Condition="'$(Platform)' == 'Win32'">"$(NasmPath)nasm.exe" -Xvc -f win32 [AllOptions] [AdditionalOptions] "%(FullPath)"</CommandLineTemplate>
<CommandLineTemplate Condition="'$(Platform)' == 'x64'">"$(NasmPath)nasm.exe" -Xvc -f win64 [AllOptions] [AdditionalOptions] "%(FullPath)"</CommandLineTemplate>
<CommandLineTemplate Condition="'$(Platform)' != 'Win32' and '$(Platform)' != 'x64'">echo NASM not supported on this platform
exit 1</CommandLineTemplate>
<ExecutionDescription>%(Identity)</ExecutionDescription>
Expand Down
0