feat: add csharp/header files generation only mode
This commit is contained in:
parent
80fdf5bd79
commit
a7cd7a824a
2
.gitignore
vendored
2
.gitignore
vendored
@ -737,3 +737,5 @@ Temporary Items
|
||||
MyLib.Generated/Hello.cs
|
||||
MyLib.Generated/Hello.h
|
||||
beyondnetgen.*.config.json
|
||||
libs/
|
||||
*.Generated/
|
||||
|
27
build.sh
27
build.sh
@ -63,17 +63,25 @@ ask_confirmation() {
|
||||
fi
|
||||
}
|
||||
|
||||
# Function to build the Android libraries
|
||||
build_android() {
|
||||
# Generate project
|
||||
generate_project() {
|
||||
cd $script_dir
|
||||
|
||||
# Copy template beyondnetgen.android.config.json
|
||||
# Copy template beyondnetgen.*.config.json
|
||||
cp template.beyondnetgen.android.config.json beyondnetgen.android.config.json
|
||||
replace_project_names beyondnetgen.android.config.json
|
||||
|
||||
cp template.beyondnetgen.ios.config.json beyondnetgen.ios.config.json
|
||||
replace_project_names beyondnetgen.ios.config.json
|
||||
|
||||
# Generate project
|
||||
log "Generating Android project"
|
||||
log "Generating project"
|
||||
run "beyondnetgen beyondnetgen.android.config.json"
|
||||
}
|
||||
|
||||
# Function to build the Android libraries
|
||||
build_android() {
|
||||
generate_project
|
||||
|
||||
# Copy android_fake_clang.* to generated project
|
||||
cp android_fake_clang.* "$generated_project_dir/"
|
||||
@ -130,6 +138,7 @@ build_ios() {
|
||||
# Set default values
|
||||
WANT_TO_BUILD_ANDROID=true
|
||||
WANT_TO_BUILD_IOS=true
|
||||
ONLY_GENERATE=false
|
||||
|
||||
# Check for arguments
|
||||
if [ $# -eq 0 ]; then
|
||||
@ -269,8 +278,9 @@ fi
|
||||
|
||||
# Check if BUILD_IOS or BUILD_ANDROID is true
|
||||
if [ "$BUILD_IOS" = false ] && [ "$BUILD_ANDROID" = false ]; then
|
||||
log "Neither iOS nor Android build is enabled. Aborting."
|
||||
exit 1
|
||||
log "Neither iOS nor Android build is enabled."
|
||||
log "Only generating project."
|
||||
ONLY_GENERATE=true
|
||||
fi
|
||||
|
||||
## CONFIG
|
||||
@ -307,6 +317,11 @@ log "Building input project"
|
||||
cd $input_project_dir
|
||||
run "dotnet publish -v normal -c Release"
|
||||
|
||||
# Only generate project
|
||||
if [ "$ONLY_GENERATE" = true ]; then
|
||||
generate_project
|
||||
fi
|
||||
|
||||
# Build Android libraries
|
||||
if [ "$BUILD_ANDROID" = true ]; then
|
||||
build_android
|
||||
|
@ -144,7 +144,6 @@
|
||||
"System.Action",
|
||||
"System.MulticastDelegate",
|
||||
"System.Delegate",
|
||||
"System.Exception",
|
||||
"System.Reflection.MethodBase",
|
||||
"System.RuntimeMethodHandle",
|
||||
"System.RuntimeTypeHandle",
|
||||
@ -251,7 +250,6 @@
|
||||
"System.Security.SecureString",
|
||||
"System.Runtime.InteropServices.CustomQueryInterfaceMode",
|
||||
"System.NullReferenceException",
|
||||
"System.SystemException",
|
||||
"System.PlatformNotSupportedException",
|
||||
"System.NotSupportedException",
|
||||
"System.UIntPtr",
|
||||
|
Loading…
x
Reference in New Issue
Block a user