Skip to content

Commit

Permalink
Update instal script to delete any existing files.
Browse files Browse the repository at this point in the history
  • Loading branch information
Sibras committed Apr 11, 2017
1 parent c594855 commit 510f890
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions install_script.bat
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@ if not "%CURRDIR%"=="%CD%" (

REM copy the BuildCustomizations to VCTargets folder
echo Installing build customisations...
del /F /Q "%VCTargetsPath%\BuildCustomizations\yasm.*" 1>NUL 2>NUL
copy /B /Y /V "%SCRIPTDIR%\yasm.*" "%VCTargetsPath%\BuildCustomizations\" 1>NUL 2>NUL
if not exist "%VCTargetsPath%\BuildCustomizations\yasm.props" (
echo Error: Failed to copy build customisations!
Expand All @@ -169,6 +170,7 @@ if not exist "%SCRIPTDIR%\yasm\" (

REM copy yasm executable to VC installation folder
echo Installing required YASM release binary...
del /F /Q "%VCINSTALLDIR%\yasm.exe" 1>NUL 2>NUL
move /Y "%SCRIPTDIR%\yasm.exe" "%VCINSTALLDIR%\" 1>NUL 2>NUL
if not exist "%VCINSTALLDIR%\yasm.exe" (
echo Error: Failed to install YASM binary!
Expand Down

3 comments on commit 510f890

@velorom
Copy link

@velorom velorom commented on 510f890 Apr 19, 2017

Choose a reason for hiding this comment

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

The command line:
powershell.exe (Get-Command msbuild.exe)
returns this:

CommandType     Name                            Definition                     
-----------     ----                            ----------                     
Application     MSBuild.exe                     C:\Program Files (x86)\MSBui...
Application     MSBuild.exe                     C:\Windows\Microsoft.NET\Fra...

for me.
So this line:
powershell.exe -Command ((Get-Command msbuild.exe).Path ^| Split-Path -parent) > msbuild.txt
returns error, because,
powershell.exe (Get-Command msbuild.exe).Path
returns NULL.
So, this line works for me:
powershell.exe -Command ((Get-Command msbuild.exe)[0].Path ^| Split-Path -parent) > msbuild.txt

Also this line:
set VCTargetsPath="..\..\..\Microsoft.Cpp\v4.0\V%MSVC_VER%0" is wrong.
The correct line is:
set VCTargetsPath="..\..\Microsoft.Cpp\v4.0\V%MSVC_VER%0"
Because MSBUILDDIR = c:\Program Files (x86)\MSBuild\12.0\Bin
and path to BuildCustomizations is:
c:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\BuildCustomizations\

@Sibras
Copy link
Member Author

@Sibras Sibras commented on 510f890 Apr 19, 2017

Choose a reason for hiding this comment

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

Thats interesting as everywhere else ive seen MSBUILDDIR = c:\Program Files (x86)\MSBuild\12.0\Bin\amd64
as it runs by default in an x64 shell so the current VCTargetsPath works fine.
Ill have to investigate this further.

@Sibras
Copy link
Member Author

@Sibras Sibras commented on 510f890 Apr 19, 2017

Choose a reason for hiding this comment

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

Should be fixed in latest version (although the original worked in every 2013/2015/2017 install ive tested on anyway). But this should help fix your issue. If you have further problems create an issue ticket.

Please sign in to comment.