mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2026-06-01 05:45:06 +08:00
GP-5179: Improvements to pyghidra_launcher.py
* Specifying supported Python versions in application.properties so other things can get access to it (similar to how we do it for Java and Gradle supported versions) * Only try to launch PyGhidra with a supported version of Python
This commit is contained in:
@@ -49,7 +49,7 @@ task buildPyPackage {
|
||||
|
||||
doLast {
|
||||
if (rootProject.PYTHON3 == null) {
|
||||
throw new GradleException("A supported version of Python ${SUPPORTED_PY_VERSIONS} was not found!")
|
||||
throw new GradleException("A supported version of Python [${PYTHON_SUPPORTED}] was not found!")
|
||||
}
|
||||
|
||||
File setuptools = project(":Debugger-rmi-trace").findPyDep(".")
|
||||
|
||||
@@ -271,7 +271,7 @@ task createGhidraStubsWheel {
|
||||
File setuptools = project(":Debugger-rmi-trace").findPyDep(".")
|
||||
|
||||
if (PYTHON3 == null) {
|
||||
throw new GradleException("A supported version of Python ${SUPPORTED_PY_VERSIONS} was not found!")
|
||||
throw new GradleException("A supported version of Python [${PYTHON_SUPPORTED}] was not found!")
|
||||
}
|
||||
|
||||
exec {
|
||||
|
||||
@@ -27,7 +27,7 @@ task createPythonVirtualEnvironment(type: Exec) {
|
||||
|
||||
doFirst {
|
||||
if (rootProject.PYTHON3 == null) {
|
||||
throw new GradleException("A supported version of Python ${SUPPORTED_PY_VERSIONS} was not found!")
|
||||
throw new GradleException("A supported version of Python [${PYTHON_SUPPORTED}] was not found!")
|
||||
}
|
||||
|
||||
commandLine rootProject.PYTHON3
|
||||
|
||||
@@ -4,9 +4,9 @@
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
@@ -28,6 +28,7 @@ file("Ghidra/application.properties").withReader { reader ->
|
||||
project.ext.JAVA_COMPILER = ghidraProps.getProperty('application.java.compiler')
|
||||
project.ext.GRADLE_MIN = ghidraProps.getProperty('application.gradle.min')
|
||||
project.ext.GRADLE_MAX = ghidraProps.getProperty('application.gradle.max')
|
||||
project.ext.PYTHON_SUPPORTED = ghidraProps.getProperty('application.python.supported')
|
||||
project.ext.DISTRO_PREFIX = "ghidra_${version}_${RELEASE_NAME}"
|
||||
|
||||
// Build dates may or may not be already present in the application.properties file.
|
||||
|
||||
Reference in New Issue
Block a user