Skip to content
This repository was archived by the owner on Aug 31, 2021. It is now read-only.

Commit 3eed3bb

Browse files
committed
Merge branch 'develop-8.2' into merge-develop-8.2-17-12-19
2 parents e17abab + e06fa0d commit 3eed3bb

8 files changed

+32
-65
lines changed

engine/rsrc/emscripten-startup-template.livecodescript

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ constant kStartupFolder = "/boot/standalone"
1111
constant kStartupStackFile = "/boot/standalone/__boot.livecode"
1212
-- Directory containing auxiliary stack files
1313
constant kAuxStackFolder = "/boot/auxiliary_stackfiles"
14-
-- Extension list file
14+
-- Auxiliary stack file list
1515
constant kAuxStackListFile = "/boot/auxiliary_stackfiles/auxiliary_stackfiles.txt"
1616
-- Directory containing extensions
1717
constant kExtensionFolder = "/boot/extensions"
@@ -21,7 +21,7 @@ constant kExtensionListFile = "/boot/extensions/extensions.txt"
2121
on startup
2222
local tError, tFolder, tFile, tByteString, tByte
2323
local tStackName, tStackData, tStackHashString
24-
local tModuleList, tModuleName
24+
local tModuleList, tModuleName, tAuxiliaryList
2525
try
2626
----------------------------------------------------------------
2727
-- Create standard filesystem layout

engine/src/dispatch.cpp

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -522,16 +522,10 @@ IO_stat MCDispatch::readstartupstack(IO_handle stream, MCStack*& r_stack)
522522
// crash when searching substacks.
523523
stacks = t_stack;
524524

525-
#ifndef _MOBILE
526-
// Make sure parent script references are up to date.
527-
if (s_loaded_parent_script_reference)
528-
t_stack -> resolveparentscripts();
529-
#else
530525
// Mark the stack as needed parentscript resolution. This is done after
531526
// aux stacks have been loaded.
532527
if (s_loaded_parent_script_reference)
533528
t_stack -> setextendedstate(True, ECS_USES_PARENTSCRIPTS);
534-
#endif
535529

536530
r_stack = t_stack;
537531
return IO_NORMAL;

engine/src/mode_standalone.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -972,6 +972,11 @@ IO_stat MCDispatch::startup(void)
972972

973973
// Now open the main stack.
974974
t_mainstack-> extraopen(false);
975+
976+
// Resolve parent scripts *after* we've loaded aux stacks.
977+
if (t_mainstack -> getextendedstate(ECS_USES_PARENTSCRIPTS))
978+
t_mainstack -> resolveparentscripts();
979+
975980
send_startup_message();
976981
if (!MCquit)
977982
t_mainstack -> open();

ide-support/revsaveasandroidstandalone.livecodescript

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -111,14 +111,6 @@ private command revSaveAsMobileStandaloneMain pStack, pApkFile, pTarget, pSettin
111111
-- Manually remove built-in implementations from detected script library inclusions
112112
revSBRemoveInclusions pStack, "android", tConfirm, pSettings
113113

114-
-- Manually include the common library
115-
revSBAddInclusion "Common", "scriptLibraries", pSettings
116-
117-
-- Include profile library if needed
118-
if pSettings["includeProfiles"] is not empty then
119-
revSBAddInclusion "Profiles", "scriptLibraries", pSettings
120-
end if
121-
122114
-- Make sure old-style keys are retained, and updated with new information
123115
-- from inclusions pane of standalone settings GUI
124116
revSBConvertSettingsForPlatform pSettings, "android"

ide-support/revsaveasemscriptenstandalone.livecodescript

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ command revSaveAsEmscriptenStandalone pStack, pOutputFolder, pSettings
6767
local tDeploy
6868
-- Update the deploy params with script library and extension inclusions
6969
revSBUpdateDeployParams pStack, "emscripten", pSettings, tDeploy
70-
70+
7171
local tError
7272
try
7373
---------- Check deployment entitlement
@@ -486,7 +486,8 @@ private function getPreparedStackAsData pStackFile, pBuildFolder
486486
local tStackData
487487

488488
put the long id of stack pStackFile into tStack
489-
489+
local tName
490+
put the short name of stack pStackFile into tName
490491
try
491492
if revIDEStackNameIsIDEStack(the name of tStack) then
492493
-- Don't manipulate IDE stacks if for some reason someone
@@ -514,22 +515,22 @@ private function getPreparedStackAsData pStackFile, pBuildFolder
514515
end if
515516

516517
-- Save the modified stack to the temporary file
517-
lock messages
518518
lock screen
519519

520520
save tStack as tTempFile with newest format
521521
put the result into tResult
522522
if tResult is not empty then
523523
throw tTempFile & ":" && tResult
524524
end if
525-
set the filename of tStack to pStackFile
525+
526+
set the filename of stack tName to pStackFile
526527

527528
-- Revert to unmodified state
528-
revert tStack
529-
set the defaultStack to the short name of tStack
529+
530+
revert stack tName
531+
set the defaultStack to tName
530532

531533
unlock screen
532-
unlock messages
533534

534535
end if
535536

ide-support/revsaveasiosstandalone.livecodescript

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -99,14 +99,6 @@ private command revSaveAsMobileStandaloneMain pStack, pAppBundle, pTarget, pSett
9999
end if
100100
end if
101101

102-
-- Manually include the common library
103-
revSBAddInclusion "Common", "scriptLibraries", pSettings
104-
105-
-- Include profile library if needed
106-
if pSettings["includeProfiles"] is not empty then
107-
revSBAddInclusion "Profiles", "scriptLibraries", pSettings
108-
end if
109-
110102
-- Get the development root for device builds
111103
-- MM-2012-09-18: Rejiged the SDKs we use. Things are now split up into sim, armv7, armv7,
112104
-- since we now potentially need to use different SDKs for each.

ide-support/revsaveasstandalone.livecodescript

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -528,8 +528,6 @@ private command revStandaloneCopyInclusions pStack, pStackFileList, pStackSource
528528
-- copy resources (inclusions) to files
529529
revCopyResources pStack, pStackFileList, pDirectory
530530

531-
revCopyScriptLibraries pStack, pTarget
532-
533531
revCopyFiles pTarget, pDirectory, pStackPath
534532

535533
-- copy database drivers
@@ -1152,25 +1150,6 @@ private function revPlatformCount
11521150
return sPlatformCount
11531151
end revPlatformCount
11541152

1155-
# Adds the appropriate script libraries to the standalone settings
1156-
private command revCopyScriptLibraries pStack, pPlatform
1157-
# AL-2015-02-03: [[ Scriptify IDE ]] Ensure revCommonLibrary is always included in a standalone
1158-
revSBAddInclusion "Common", "scriptLibraries", sStandaloneSettingsA
1159-
1160-
-- data grid
1161-
// SN-2015-10-19: [[ Bug 16238 ]] DataGrid can be included on the wish of the user - in case the standalone stack
1162-
// will load stacks using DataGrid, for instance.
1163-
if ("data grid templates" is in the subStacks of stack pStack or "DataGrid" is among the lines of sStandaloneSettingsA["scriptLibraries"]) \
1164-
and there is a stack "revDataGridLibrary" then
1165-
set the mainStack of stack "revDataGridLibrary" to pStack
1166-
end if
1167-
1168-
// AL-2015-04-28: [[ Bug 15244 ]] Include profiles library if needed
1169-
if sStandaloneSettingsA["includeProfiles"] is not empty then
1170-
revSBAddInclusion "Profiles", "scriptLibraries", sStandaloneSettingsA
1171-
end if
1172-
end revCopyScriptLibraries
1173-
11741153
#####################################################################
11751154
# Copies general resources to the standalone stack and then does
11761155
# what it needs to to substacks etc.
@@ -1605,12 +1584,6 @@ command revReset
16051584
set the fileType to sResetA["fileType"]
16061585
unlock messages
16071586
try
1608-
# MW-2009-07-18: Media does not have a datagrid library and so this breaks if we don't
1609-
# double check it exists there first.
1610-
if there is a stack "revDataGridLibrary" then
1611-
set the mainStack of stack "revDataGridLibrary" to "revDataGridLibrary"
1612-
end if
1613-
16141587
# TH-2008-07-08 :: Bug 6444, locking messages around this handler to prevent calling of preopencard handlers
16151588
# in the stacks being built
16161589
local tLineNumber

ide-support/revsblibrary.livecodescript

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2083,6 +2083,12 @@ command revSBUpdateDeployParams pStack, pTarget, pStandaloneSettings, @xDeployPa
20832083
# AL-2015-02-04: [[ Standalone Resources ]] Add (universal) external names to the deploy parameters
20842084
put pStandaloneSettings["externals"] into tExternals
20852085

2086+
revSBAddInclusion "Common", "scriptLibraries", pStandaloneSettings
2087+
2088+
if pStandaloneSettings["includeProfiles"] is not empty then
2089+
revSBAddInclusion "Profiles", "scriptLibraries", pStandaloneSettings
2090+
end if
2091+
20862092
-- auxiliary_stackfiles key might not be empty
20872093
put pStandaloneSettings["auxiliary_stackfiles"] into tAuxiliaryStackfiles
20882094

@@ -2161,13 +2167,7 @@ command revSBUpdateDeployParams pStack, pTarget, pStandaloneSettings, @xDeployPa
21612167

21622168
-- If the datagrid is used, then include the library as an aux stack
21632169
if tIncludeDataGrid or "data grid templates" is in the subStacks of stack pStack and there is a stack "revDataGridLibrary" then
2164-
local tStackFiles
2165-
put the stackFiles of stack "revDataGridLibrary" into tStackFiles
2166-
split tStackFiles by return and comma
2167-
repeat for each key tStack in tStackFiles
2168-
appendToStringList the effective filename of stack tStack, tAuxiliaryStackFiles
2169-
end repeat
2170-
appendToStringList the effective filename of stack "revDataGridLibrary", tAuxiliaryStackFiles
2170+
revSBAddDataGridToAuxiliaryStackFiles tAuxiliaryStackFiles
21712171
end if
21722172

21732173
put tAuxiliaryStackFiles into xDeployParams["auxiliary_stackfiles"]
@@ -2177,6 +2177,16 @@ command revSBUpdateDeployParams pStack, pTarget, pStandaloneSettings, @xDeployPa
21772177
put tLibraryMapping into xDeployParams["library"]
21782178
end revSBUpdateDeployParams
21792179

2180+
command revSBAddDataGridToAuxiliaryStackFiles @xAuxiliaryStackFiles
2181+
local tStackFiles
2182+
put the stackFiles of stack "revDataGridLibrary" into tStackFiles
2183+
split tStackFiles by return and comma
2184+
repeat for each key tStack in tStackFiles
2185+
appendToStringList the effective filename of stack tStack, xAuxiliaryStackFiles
2186+
end repeat
2187+
appendToStringList the effective filename of stack "revDataGridLibrary", xAuxiliaryStackFiles
2188+
end revSBAddDataGridToAuxiliaryStackFiles
2189+
21802190
local sBuiltInInclusions
21812191

21822192
private command __InitialiseBuiltInInclusions

0 commit comments

Comments
 (0)