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