Skip to content

Commit

Permalink
Tweaks for Xamarin/UWP build scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
mtehver committed Jun 29, 2021
1 parent 8c6ed1c commit 3c50507
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
3 changes: 2 additions & 1 deletion scripts/build-winphone.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,8 @@ def buildWinPhoneNuget(args):
f.write(nuspecFile)

# A hack to generate non-arch dependent assembly, this is nuget peculiarity
if not copyfile('%s/../winphone_managed10-x86/bin/%s/CartoMobileSDK.WinPhone.dll' % (buildDir, args.configuration), '%s/CartoMobileSDK.WinPhone.dll' % buildDir):
arch = 'x86' if 'x86' in args.winphonearch else args.winphonearch[0]
if not copyfile('%s/../winphone_managed10-%s/bin/%s/CartoMobileSDK.WinPhone.dll' % (buildDir, arch, args.configuration), '%s/CartoMobileSDK.WinPhone.dll' % buildDir):
return False
if not corflags(args, buildDir,
'/32BITREQ-',
Expand Down
15 changes: 10 additions & 5 deletions scripts/build-xamarin.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,8 +138,8 @@ def buildXamarinDLL(args, target):
):
return False
return makedirs(distDir) and \
copyfile('%s/bin/%s/CartoMobileSDK.%s.dll' % (buildDir, args.configuration, target), '%s/CartoMobileSDK.%s.dll' % (distDir, target)) and \
copyfile('%s/bin/%s/CartoMobileSDK.%s.xml' % (buildDir, args.configuration, target), '%s/CartoMobileSDK.%s.xml' % (distDir, target))
copyfile('%s/bin/%s/CartoMobileSDK.%s.dll' % (buildDir, args.configuration, target), '%s/CartoMobileSDK.%s.dll' % (distDir, target)) and \
copyfile('%s/bin/%s/CartoMobileSDK.%s.xml' % (buildDir, args.configuration, target), '%s/CartoMobileSDK.%s.xml' % (distDir, target))

def buildXamarinNuget(args, target):
baseDir = getBaseDir()
Expand Down Expand Up @@ -222,9 +222,14 @@ def buildXamarinNuget(args, target):
print('Failed to find CMake executable. Use --cmake to specify its location')
sys.exit(-1)

if args.target == 'android' and not checkExecutable(args.make, '--help'):
print('Failed to find make executable. Use --make to specify its location')
sys.exit(-1)
if args.target == 'android':
if not checkExecutable(args.make, '--help'):
print('Failed to find make executable. Use --make to specify its location')
sys.exit(-1)
for abi in ANDROID_ABIS:
if not (abi in args.androidabi or os.path.exists('%s/libcarto_mobile_sdk.so' % getBuildDir('xamarin_android', abi))):
print('Android build requires %s in specified list' % abi)
sys.exit(-1)

if not checkExecutable(args.msbuild, '/?'):
print('Failed to find msbuild executable. Use --msbuild to specify its location')
Expand Down

0 comments on commit 3c50507

Please sign in to comment.