mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-03-22 15:19:59 +07:00
External dependencies: better defining target arch on Windows
This commit is contained in:
@@ -26,7 +26,7 @@ project.ext.targetOs = "${System.getProperty("intellij.build.target.os", "all")}
|
||||
|
||||
task downloadJdk18 {
|
||||
def os = org.gradle.internal.os.OperatingSystem.current()
|
||||
def arch = !os.isWindows() || !os.nativePrefix.endsWith('x86') ? 'x64' : 'x86'
|
||||
def arch = !os.isWindows() || System.getenv("ProgramFiles(x86)") != null ? 'x64' : 'x86'
|
||||
def platform = currentPlatformName()
|
||||
|
||||
def artifactName = "jbsdk8${jdkBuild}_${platform}_${arch}.tar.gz"
|
||||
@@ -132,7 +132,7 @@ def intellijProjectDir() {
|
||||
static def jdk16Version() {
|
||||
def os = org.gradle.internal.os.OperatingSystem.current()
|
||||
if (os.isWindows()) {
|
||||
def suffix = os.nativePrefix.endsWith('x86') ? "i586" : "x64"
|
||||
def suffix = System.getenv("ProgramFiles(x86)") != null ? "x64" : "i586"
|
||||
return "6.45:windows_$suffix"
|
||||
}
|
||||
else if (os.isMacOsX()) {
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
import org.apache.tools.ant.BuildException
|
||||
|
||||
target(default: "Unpack JDKs") {
|
||||
def workingDirectory = getDependenciesProjectDir()
|
||||
@@ -24,7 +25,7 @@ target(default: "Unpack JDKs") {
|
||||
process.consumeProcessErrorStream((OutputStream)System.err)
|
||||
process.waitFor()
|
||||
if (process.exitValue() != 0) {
|
||||
projectBuilder.error("Cannot unpack JDK")
|
||||
throw new BuildException("Cannot unpack JDK")
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user