mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2026-07-30 07:18:37 -09:00
GP-1209: Support for building natives from a release.
This commit is contained in:
@@ -1,3 +0,0 @@
|
||||
/* ###
|
||||
* IP: Public Domain
|
||||
*/
|
||||
@@ -1,3 +0,0 @@
|
||||
/* ###
|
||||
* IP: Public Domain
|
||||
*/
|
||||
@@ -108,17 +108,27 @@ def shouldSkipNative(task) {
|
||||
}
|
||||
|
||||
/*******************************************************************************************
|
||||
* Task Rule : builds all the natives in this module for a given platform.
|
||||
* Task Rule : buildNatives[_PlatformName]
|
||||
*
|
||||
* Example : gradle buildNatives_win_x86_64 will build all win_x86_64 native executables and shared libraries.
|
||||
* Summary: Builds all the natives in this module for a given platform.
|
||||
*
|
||||
* Args: PlatformName - The name of the platform. If not specified, the current platform is used.
|
||||
*
|
||||
* Example: gradle buildNatives_win_x86_64 will build all win_x86_64 native executables and shared libraries.
|
||||
*
|
||||
* NOTE: you must be on the appropriate platform for this to work.
|
||||
*
|
||||
* NOTE: you must be on the appropriate platform for this to work.
|
||||
******************************************************************************************/
|
||||
tasks.addRule("Pattern: buildNatives_<platform name>]: build all natives for given platform") { String taskName ->
|
||||
tasks.addRule("Pattern: buildNatives[_PlatformName]: build all natives for given platform") { String taskName ->
|
||||
|
||||
if (taskName.startsWith("buildNatives_")) {
|
||||
String platform = taskName - "buildNatives_"
|
||||
if (taskName.startsWith("buildNatives")) {
|
||||
String currentPlatform = getCurrentPlatformName()
|
||||
String platform = taskName - "buildNatives"
|
||||
if (platform.length() == 0) {
|
||||
platform = currentPlatform
|
||||
}
|
||||
if (platform.startsWith("_")) {
|
||||
platform = platform - "_"
|
||||
}
|
||||
|
||||
task(taskName) { myTask ->
|
||||
|
||||
@@ -157,20 +167,30 @@ tasks.addRule("Pattern: buildNatives_<platform name>]: build all natives for giv
|
||||
}
|
||||
}
|
||||
|
||||
/*******************************************************************************************
|
||||
* Task Rule : builds all the natives in this module for a given platform and copies the
|
||||
* results to the bin repo.
|
||||
/*******************************************************************************************
|
||||
* Task Rule : prebuildNatives[_PlatformName]
|
||||
*
|
||||
* Example : gradle prebuildNatives_win_x86_64 will build all win_x86_64 native executables and shared
|
||||
* libraries and copy the results to the appropriate project/os directory in the bin
|
||||
* repo.
|
||||
*
|
||||
* NOTE: you must be on the appropriate platform for this to work.
|
||||
* Summary: Builds all the natives in this module for a given platform and copies the results
|
||||
* to the bin repo.
|
||||
*
|
||||
* Args: PlatformName - The name of the platform. If not specified, the current platform is used.
|
||||
*
|
||||
* Example: gradle prebuildNatives_win_x86_64 will build all win_x86_64 native executables and
|
||||
* shared libraries and copy the results to the appropriate project/os directory in
|
||||
* the bin repo.
|
||||
*
|
||||
* NOTE: you must be on the appropriate platform for this to work.
|
||||
******************************************************************************************/
|
||||
tasks.addRule("Pattern: prebuildNatives_<platform name>]: build all natives for given platform") { String taskName ->
|
||||
if (taskName.startsWith("prebuildNatives_")) {
|
||||
String platform = taskName - "prebuildNatives_"
|
||||
tasks.addRule("Pattern: prebuildNatives<_platform name>]: build all natives for given platform") { String taskName ->
|
||||
if (taskName.startsWith("prebuildNatives")) {
|
||||
def currentPlatform = getCurrentPlatformName()
|
||||
def platform = taskName - "prebuildNatives"
|
||||
if (platform.length() == 0) {
|
||||
platform = currentPlatform
|
||||
}
|
||||
if (platform.startsWith("_")) {
|
||||
platform = platform - "_"
|
||||
}
|
||||
|
||||
task(taskName) { myTask ->
|
||||
dependsOn "buildNatives_$platform"
|
||||
@@ -214,8 +234,7 @@ gradle.taskGraph.whenReady {
|
||||
}
|
||||
|
||||
/*****************************************************************************************
|
||||
* The following block of code ensures that the buildNatives_<platform> task is used
|
||||
* during assembly to ensure that missing toolchain generates an appropriate error
|
||||
* The following block of code ensures that the buildNatives (for current plaform) task is
|
||||
* used during assembly to ensure that missing toolchain generates an appropriate error
|
||||
****************************************************************************************/
|
||||
def currentPlatform = getCurrentPlatformName()
|
||||
assemble.dependsOn "buildNatives_$currentPlatform"
|
||||
assemble.dependsOn "buildNatives"
|
||||
|
||||
12
GPL/settings.gradle
Normal file
12
GPL/settings.gradle
Normal file
@@ -0,0 +1,12 @@
|
||||
/* ###
|
||||
* IP: Public Domain
|
||||
*/
|
||||
// Recurse root project subdirectories and include all discovered projects
|
||||
// (directories containing a build.gradle file)
|
||||
fileTree(rootProject.projectDir) {
|
||||
exclude 'build.gradle' // exclude root project
|
||||
include '**/build.gradle'
|
||||
}.each {
|
||||
include it.parentFile.name;
|
||||
project(":$it.parentFile.name").projectDir = it.parentFile;
|
||||
}
|
||||
@@ -1,17 +1,5 @@
|
||||
/* ###
|
||||
* IP: GHIDRA
|
||||
*
|
||||
* 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.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
* IP: Public Domain
|
||||
*/
|
||||
/****************************************************************************
|
||||
* Establish Visual Studio configuration environment for Windows native builds
|
||||
|
||||
Reference in New Issue
Block a user