Skip to content
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
1 change: 1 addition & 0 deletions setup/FSharp.SDK/component-groups/Compiler_Redist.wxs
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@
</Component>

<Component Id="Compiler_Redist_RegistryKeys_CompilerLocation" Guid="$(fsharp.guid(Compiler_Redist_RegistryKeys_CompilerLocation, $(var.LocaleCode)))">
<Environment Id="Compiler_Redist_FSHARPINSTALLDIR_Environment_Variable" Name="FSHARPINSTALLDIR" Value="[MicrosoftSDKs_FS_4.1_Framework_v4.0]" />
<RegistryKey Root="HKLM" Key="Software\Microsoft\FSharp\4.1\Runtime\v4.0" ForceCreateOnInstall="yes" ForceDeleteOnUninstall="yes">
<RegistryValue Value="[MicrosoftSDKs_FS_4.1_Framework_v4.0]" Type="string" />
</RegistryKey>
Expand Down
3 changes: 3 additions & 0 deletions setup/Swix/Microsoft.FSharp.Dependencies/Files.swr
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,6 @@ folder "InstallDir:Common7\IDE\NewFileItems"
file source="$(BinariesFolder)\setup\resources\NewFileDialog\General\NewFSharpFileItems.vsdir"
file source="$(BinariesFolder)\setup\resources\NewFileDialog\General\File.fs"
file source="$(BinariesFolder)\setup\resources\NewFileDialog\General\Script.fsx"

folder "InstallDir:Common7\Tools\VsDevCmd\Ext"
file source="fsharp.bat"
45 changes: 45 additions & 0 deletions setup/Swix/Microsoft.FSharp.Dependencies/fsharp.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
if "%VSCMD_TEST%" NEQ "" goto :test
if "%VSCMD_ARG_CLEAN_ENV%" NEQ "" goto :clean_env

if "%FSHARPINSTALLDIR%" NEQ "" set "PATH=%FSHARPINSTALLDIR%;%PATH%"

goto :end

:test

set __VSCMD_TEST_FSHARP_STATUS=pass

@REM ******************************************************************
@REM basic environment validation cases go here
@REM ******************************************************************

where fsc.exe
if "%ERRORLEVEL%" NEQ "0" (
@echo [ERROR:%~nx0] Unable to find F# compiler via 'where fsc.exe'.
set __VSCMD_TEST_FSHARP_STATUS=fail
)

where fsi.exe
if "%ERRORLEVEL%" NEQ "0" (
@echo [ERROR:%~nx0] Unable to find F# Interactive via 'where fsi.exe'.
set __VSCMD_TEST_FSHARP_STATUS=fail
)

@REM return value other than 0 if tests failed.
if "%__VSCMD_TEST_FSHARP_STATUS%" NEQ "pass" (
set __VSCMD_TEST_FSHARP_STATUS=
exit /B 1
)

set __VSCMD_TEST_FSHARP_STATUS=
exit /B 0

:clean_env

@REM Script only adds to PATH, no custom action required for -clean_env
@REM vsdevcmd.bat will clean-up this variable.

goto :end
:end

exit /B 0