-
-
Notifications
You must be signed in to change notification settings - Fork 403
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
openjdk: improve download link (#5760)
* openjdk: improve download link * fix mingw download * fix java run * jnipp: only native build * openjdk: improve plat * disable mingw * improve on_fetch * fix arch name * use bindirs * improve bindirs for on_fetch * fix bindirs
- Loading branch information
1 parent
52d80bc
commit 5c4a0af
Showing
3 changed files
with
102 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
function main(package, opt) | ||
if not opt.system then | ||
return | ||
end | ||
|
||
local java = package:find_tool("java", opt) | ||
if not java then | ||
return | ||
end | ||
|
||
local result = {} | ||
result.version = java.version | ||
|
||
if package:is_binary() then | ||
return result | ||
end | ||
|
||
if is_host("windows") then | ||
local sdkdir = os.getenv("JAVA_HOME") | ||
if not os.isdir(sdkdir) then | ||
return | ||
end | ||
|
||
result.includedirs = {path.join(sdkdir, "include"), path.join(sdkdir, "include/win32")} | ||
result.linkdirs = path.join(sdkdir, "lib") | ||
result.links = {"jvm", "jawt"} | ||
result.bindirs = {path.join(sdkdir, "bin"), path.join(sdkdir, "bin/server")} | ||
return result | ||
end | ||
-- TODO: linux, mac | ||
-- ubuntu: /usr/lib/jvm/java-11-openjdk-amd64 | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters