diff --git a/Makefile b/Makefile index fbfa04579240f..3c35d0943012a 100644 --- a/Makefile +++ b/Makefile @@ -169,10 +169,6 @@ $(build_man1dir)/julia.1: $(JULIAHOME)/doc/man/julia.1 | $(build_man1dir) $(build_sysconfdir)/julia/juliarc.jl: $(JULIAHOME)/etc/juliarc.jl | $(build_sysconfdir)/julia @echo Creating usr/etc/julia/juliarc.jl @cp $< $@ -ifeq ($(OS), WINNT) - @cat $(JULIAHOME)/contrib/windows/juliarc.jl >> $(build_sysconfdir)/julia/juliarc.jl -$(build_sysconfdir)/julia/juliarc.jl: $(JULIAHOME)/contrib/windows/juliarc.jl -endif $(build_datarootdir)/julia/julia-config.jl : $(JULIAHOME)/contrib/julia-config.jl | $(build_datarootdir)/julia $(INSTALL_M) $< $(dir $@) diff --git a/NEWS.md b/NEWS.md index ade5947627d89..f63a898f702dc 100644 --- a/NEWS.md +++ b/NEWS.md @@ -175,6 +175,9 @@ Deprecated or removed * The forms of `read`, `readstring`, and `eachline` that accepted both a `Cmd` object and an input stream are deprecated. Use e.g. `read(pipeline(stdin, cmd))` instead ([#22762]). + * The default `juliarc.jl` file on Windows has been removed. Now must explicitly include the + file if you need access to executables or libraries in the `JULIA_HOME` directory, e.g. + `joinpath(JULIA_HOME, "7z.exe")` for `7z.exe` ([#21540]). Julia v0.6.0 Release Notes ========================== diff --git a/contrib/add_license_to_files.jl b/contrib/add_license_to_files.jl index 5a523ba6edb91..14d6ac3d80ff7 100644 --- a/contrib/add_license_to_files.jl +++ b/contrib/add_license_to_files.jl @@ -30,7 +30,6 @@ const excludedirs = [ const skipfiles = [ "../contrib/add_license_to_files.jl", - "../contrib/windows/juliarc.jl", # files to check - already copyright # see: https://github.com/JuliaLang/julia/pull/11073#issuecomment-98099389 "../base/special/trig.jl", diff --git a/contrib/windows/juliarc.jl b/contrib/windows/juliarc.jl deleted file mode 100644 index cfa10a98d7111..0000000000000 --- a/contrib/windows/juliarc.jl +++ /dev/null @@ -1,2 +0,0 @@ -# Set up environment for Julia Windows binary distribution -ENV["PATH"] = JULIA_HOME*";"*ENV["PATH"] diff --git a/examples/embedding/embedding-test.jl b/examples/embedding/embedding-test.jl index 336169085db4c..6a0228695ff69 100644 --- a/examples/embedding/embedding-test.jl +++ b/examples/embedding/embedding-test.jl @@ -3,6 +3,11 @@ # tests the output of the embedding example is correct using Base.Test +if Sys.iswindows() + # libjulia needs to be in the same directory as the embedding executable or in path + ENV["PATH"] = string(JULIA_HOME, ";", ENV["PATH"]) +end + @test length(ARGS) == 1 let stdout = Pipe() diff --git a/test/cmdlineargs.jl b/test/cmdlineargs.jl index a70a494f51b69..57ef73f32e8b7 100644 --- a/test/cmdlineargs.jl +++ b/test/cmdlineargs.jl @@ -2,9 +2,10 @@ catcmd = `cat` if Sys.iswindows() + busybox = joinpath(JULIA_HOME, "busybox.exe") try # use busybox-w32 on windows - success(`busybox`) - catcmd = `busybox cat` + success(`$busybox`) + catcmd = `$busybox cat` end end diff --git a/test/spawn.jl b/test/spawn.jl index f053b5c4bb95a..013b3e4521d12 100644 --- a/test/spawn.jl +++ b/test/spawn.jl @@ -17,18 +17,19 @@ shcmd = `sh` sleepcmd = `sleep` lscmd = `ls` if Sys.iswindows() + busybox = joinpath(JULIA_HOME, "busybox.exe") try # use busybox-w32 on windows - success(`busybox`) - yescmd = `busybox yes` - echocmd = `busybox echo` - sortcmd = `busybox sort` - printfcmd = `busybox printf` - truecmd = `busybox true` - falsecmd = `busybox false` - catcmd = `busybox cat` - shcmd = `busybox sh` - sleepcmd = `busybox sleep` - lscmd = `busybox ls` + success(`$busybox`) + yescmd = `$busybox yes` + echocmd = `$busybox echo` + sortcmd = `$busybox sort` + printfcmd = `$busybox printf` + truecmd = `$busybox true` + falsecmd = `$busybox false` + catcmd = `$busybox cat` + shcmd = `$busybox sh` + sleepcmd = `$busybox sleep` + lscmd = `$busybox ls` end end @@ -343,8 +344,9 @@ let fname = tempname() cmd = pipeline(`echo asdf`,`cat`) if Sys.iswindows() try - success(`busybox`) - cmd = pipeline(`busybox echo asdf`,`busybox cat`) + busybox = joinpath(JULIA_HOME, "busybox.exe") + success(`\$busybox`) + cmd = pipeline(`\$busybox echo asdf`,`\$busybox cat`) end end for line in eachline(STDIN)