Skip to content

Commit 661d348

Browse files
committed
Merge remote-tracking branch 'upstream/develop-8.1' into merge-develop-8.1_12.10.2016
2 parents 13406f9 + 926b7c2 commit 661d348

File tree

17 files changed

+165
-60
lines changed

17 files changed

+165
-60
lines changed

builder/tools_builder.livecodescript

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ private command toolsBuilderFilterExternals pFolder, pPlatform
106106
filter tArchiveFiles with "Android/External-*"
107107
revZipCloseArchive pFolder & slash & tLCExt
108108

109-
if tArchiveFiles is not empty then
109+
if tArchiveFiles is empty then
110110
get shell(merge("rm -fv '[[ tLCExt ]]'"))
111111
end if
112112
end repeat

docs/notes/bugfix-18379.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# Don't include incorrectly copied resource forks in standalones

docs/notes/bugfix-18498.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# Ensure bundled Android externals are available on Windows and Linux

docs/notes/bugfix-18542.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# Fix crash on iOS 10 when the app tried to access privacy-sensitive data

docs/notes/bugfix-18566.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# libURL inserts "::" between host and port when creating CONNECT request

docs/notes/bugfix-6506.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# Fix regression to watching global variables
File renamed without changes.

engine/rsrc/mobile-device-template.plist

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,5 +106,19 @@
106106
<array>
107107
${CUSTOM_FONTS}
108108
</array>
109+
<key>NSBluetoothPeripheralUsageDescription</key>
110+
<string>This application requires access to Bluetooth</string>
111+
<key>NSCalendarsUsageDescription</key>
112+
<string>This application requires access to the device's calendar</string>
113+
<key>NSCameraUsageDescription</key>
114+
<string>This application requires access to the device's camera</string>
115+
<key>NSContactsUsageDescription</key>
116+
<string>This application requires access to your Contacts</string>
117+
<key>NSMicrophoneUsageDescription </key>
118+
<string>This application requires access to the device's microphone</string>
119+
<key>NSMotionUsageDescription</key>
120+
<string>This application requires access to the device's accelerometer</string>
121+
<key>NSPhotoLibraryUsageDescription</key>
122+
<string>This application requires access to Photo Library</string>
109123
</dict>
110124
</plist>

engine/rsrc/mobile-template.plist

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,5 +79,19 @@
7979
<array>
8080
${CUSTOM_FONTS}
8181
</array>
82+
<key>NSBluetoothPeripheralUsageDescription</key>
83+
<string>This application requires access to Bluetooth</string>
84+
<key>NSCalendarsUsageDescription</key>
85+
<string>This application requires access to the device's calendar</string>
86+
<key>NSCameraUsageDescription</key>
87+
<string>This application requires access to the device's camera</string>
88+
<key>NSContactsUsageDescription</key>
89+
<string>This application requires access to your Contacts</string>
90+
<key>NSMicrophoneUsageDescription </key>
91+
<string>This application requires access to the device's microphone</string>
92+
<key>NSMotionUsageDescription</key>
93+
<string>This application requires access to the device's accelerometer</string>
94+
<key>NSPhotoLibraryUsageDescription</key>
95+
<string>This application requires access to Photo Library</string>
8296
</dict>
8397
</plist>

engine/src/debug.cpp

Lines changed: 39 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -556,6 +556,10 @@ void MCB_parsewatches(MCExecContext& ctxt, MCStringRef p_input)
556556
uindex_t t_input_length;
557557

558558
t_input_length = MCStringGetLength(p_input);
559+
560+
if (t_input_length == 0)
561+
return;
562+
559563
bool t_found;
560564
t_found = true;
561565

@@ -594,16 +598,12 @@ void MCB_parsewatches(MCExecContext& ctxt, MCStringRef p_input)
594598
if (t_success)
595599
t_success = MCStringDivideAtChar(*t_hname_tail, ',', kMCCompareExact, &t_vname, &t_express);
596600

597-
// AL-2015-07-31: [[ Bug 15822 ]] Don't abort parsing if a given line is not correctly formatted
598-
bool t_valid_watch;
599-
t_valid_watch = t_success;
600-
601-
MCObjectPtr t_object;
602-
// SN-2014-09-18: [[ Bug 13453 ]] With an empty string (no watchedVariables anymore), TryToResolveObject fails
603-
if (t_valid_watch)
604-
t_valid_watch = MCInterfaceTryToResolveObject(ctxt, *t_obj, t_object);
601+
MCObjectPtr t_object;
602+
bool t_resolved_object;
603+
if (t_success)
604+
t_resolved_object = MCInterfaceTryToResolveObject(ctxt, *t_obj, t_object);
605605

606-
if (t_valid_watch)
606+
if (t_success)
607607
{
608608
// OK-2010-01-14: [[Bug 6506]] - Allow globals in watchedVariables
609609
// If the object and handler are empty we assume its a global, otherwise
@@ -617,7 +617,11 @@ void MCB_parsewatches(MCExecContext& ctxt, MCStringRef p_input)
617617
if (t_new_watches != nil)
618618
{
619619
MCwatchedvars = t_new_watches;
620-
MCwatchedvars[MCnwatchedvars] . object = t_object . object;
620+
if (t_resolved_object)
621+
MCwatchedvars[MCnwatchedvars] . object = t_object . object;
622+
else
623+
MCwatchedvars[MCnwatchedvars] . object = nil;
624+
621625
if (MCStringGetLength(*t_hname) != 0)
622626
/* UNCHECKED */ MCNameCreate(*t_hname, MCwatchedvars[MCnwatchedvars] . handlername);
623627
else
@@ -645,37 +649,38 @@ bool MCB_unparsewatches(MCStringRef &r_watches)
645649
{
646650
for (uint32_t i = 0 ; i < MCnwatchedvars ; i++)
647651
{
648-
// OK-2010-01-14: [[Bug 6506]] - WatchedVariables support for globals
649-
if (MCwatchedvars[i] . object != NULL)
652+
MCAutoListRef t_watched_var;
653+
t_success = MCListCreateMutable(',', &t_watched_var);
654+
655+
if (t_success)
650656
{
651-
MCAutoListRef t_watched_var;
652-
t_success = MCListCreateMutable(',', &t_watched_var);
653-
654-
if (t_success)
657+
if (MCwatchedvars[i] . object != NULL)
655658
{
656659
MCAutoValueRef t_var_id;
657660
t_success = MCwatchedvars[i] . object -> names(P_LONG_ID, &t_var_id) &&
658-
MCListAppend(*t_watched_var, *t_var_id);
659-
}
660-
661-
if (t_success)
662-
{
663-
if (MCwatchedvars[i] . handlername == NULL)
664-
t_success = MCListAppend(*t_watched_var, kMCEmptyString);
665-
else
666-
t_success = MCListAppend(*t_watched_var, MCwatchedvars[i].handlername);
661+
MCListAppend(*t_watched_var, *t_var_id);
667662
}
668-
669-
if (t_success)
670-
t_success = MCListAppend(*t_watched_var, MCwatchedvars[i].varname);
663+
else
664+
t_success = MCListAppend(*t_watched_var, kMCEmptyString);
665+
}
666+
667+
if (t_success)
668+
{
669+
if (MCwatchedvars[i] . handlername == NULL)
670+
t_success = MCListAppend(*t_watched_var, kMCEmptyString);
671+
else
672+
t_success = MCListAppend(*t_watched_var, MCwatchedvars[i].handlername);
673+
}
674+
675+
if (t_success)
676+
t_success = MCListAppend(*t_watched_var, MCwatchedvars[i].varname);
671677

672-
// SN-2014-09-18: [[ Bug 13453 ]] A watched variable's expression is never nil
673-
if (t_success)
674-
t_success = MCListAppend(*t_watched_var, MCwatchedvars[i].expression);
678+
// SN-2014-09-18: [[ Bug 13453 ]] A watched variable's expression is never nil
679+
if (t_success)
680+
t_success = MCListAppend(*t_watched_var, MCwatchedvars[i].expression);
675681

676-
if (t_success)
677-
t_success = MCListAppend(*t_watches_list, *t_watched_var);
678-
}
682+
if (t_success)
683+
t_success = MCListAppend(*t_watches_list, *t_watched_var);
679684
}
680685
}
681686

0 commit comments

Comments
 (0)