Skip to content

Commit a80affc

Browse files
Merge branch 'develop' of https://github.com/runrev/livecode into feature-native_themes
2 parents df85a5c + 645caba commit a80affc

File tree

180 files changed

+1847
-2265
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

180 files changed

+1847
-2265
lines changed

INSTALL-emscripten.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ You will need a 64-bit Linux machine or VM with at least 4 GB of RAM
1616
Unsurprisingly, the Emscripten SDK must be installed in order to build
1717
an Emscripten engine.
1818

19-
1. Download the portable Emscripten SDK from <https://kripken.github.io/emscripten/site>. Put it in `/opt/emsdk_portable`, for example.
19+
1. Download the portable Emscripten SDK from <https://kripken.github.io/emscripten-site>. Put it in `/opt/emsdk_portable`, for example.
2020

2121
2. Check what SDKs are available by running:
2222

Installer/package.txt

Lines changed: 24 additions & 177 deletions
Large diffs are not rendered by default.

buildbot.mk

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -163,11 +163,11 @@ dist-server: dist-server-community
163163

164164
dist-server-community:
165165
$(buildtool_command) --platform mac --platform win --platform linux \
166-
--stage server --edition community
166+
--stage server --edition community --warn-as-error
167167

168168
dist-server-commercial:
169169
$(buildtool_command) --platform mac --platform win --platform linux \
170-
--stage server --edition commercial
170+
--stage server --edition commercial --warn-as-error
171171

172172
ifeq ($(BUILD_EDITION),commercial)
173173
dist-tools: dist-tools-commercial

builder/builder_tool.livecodescript

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -164,14 +164,18 @@ end __loadExternal
164164

165165
command __builderLog pType, pMessage
166166
local tLine
167+
168+
-- Promote builder warnings to errors, if requested
169+
if pType is "warning" and sWarnAsError then
170+
put "error" into pType
171+
end if
167172

168173
put toUpper(char 1 of pType) into char 1 of pType
169174

170175
repeat for each line tLine in pMessage
171176
write ("[" && the internet date && "]" && ":" && pType && ":" && tLine & return) to stderr
172177
end repeat
173-
if pType is "warning" and sWarnAsError or \
174-
pType is "error" then
178+
if pType is "error" then
175179
quit 1
176180
end if
177181
end __builderLog

builder/builder_utilities.livecodescript

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,7 @@ function builderBuiltDocsFolder
304304
end builderBuiltDocsFolder
305305

306306
function builderBuiltNotesFolder
307-
return builderRepoFolder() & slash & "_build/notes"
307+
return builderRepoFolder()
308308
end builderBuiltNotesFolder
309309

310310
function builderCommercialFolder

builder/docs_builder.livecodescript

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2065,9 +2065,10 @@ command docsBuilderGenerateDistributedGuide
20652065
get textDecode(it, "utf-8")
20662066
replace "[toc]" with empty in it
20672067
put tab & "{" & CR after tGuideData
2068-
put tab & escape("name") & ":" & escape(revDocsModifyForURL(tGuideName)) & comma & CR after tGuideData
2069-
put tab & escape("display name") & ":" & escape(tGuideName) & comma & CR after tGuideData
2070-
put tab & escape("data") & ":" & escape(it, true) & CR & tab & "}," after tGuideData
2068+
put tab & escape("name") & ":" & escape(revDocsModifyForURL(tGuideName)) & comma & return after tGuideData
2069+
put tab & escape("display name") & ":" & escape(tGuideName) & comma & return after tGuideData
2070+
put tab & escape("location") & ":" & escape("ide") & comma & return after tGuideData
2071+
put tab & escape("data") & ":" & escape(it, true) & return & tab & "}," after tGuideData
20712072
end if
20722073
end repeat
20732074
end repeat
@@ -2208,6 +2209,8 @@ on docsBuilderPopulateDatabase pLibrariesA
22082209
exit docsBuilderPopulateDatabase
22092210
end if
22102211

2212+
revExecuteSQL tConnection,"BEGIN TRANSACTION"
2213+
22112214
repeat for each key tKey in pLibrariesA
22122215
builderLog "message", "adding library" && pLibrariesA[tKey]["display name"] && "to docs database"
22132216
revDocsUpdateDatabase tConnection, pLibrariesA[tKey]
@@ -2216,6 +2219,9 @@ on docsBuilderPopulateDatabase pLibrariesA
22162219
exit docsBuilderPopulateDatabase
22172220
end if
22182221
end repeat
2222+
2223+
revExecuteSQL tConnection,"COMMIT"
2224+
revCloseDatabase tConnection
22192225
end docsBuilderPopulateDatabase
22202226

22212227
--- LEGACY

builder/release_notes_builder.livecodescript

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -848,19 +848,26 @@ private function ExtensionsGetSectionName pExtPath
848848
end ExtensionsGetSectionName
849849

850850
private function ExtensionsGetName pExtPath
851-
-- Compute the path to the installed widget data
851+
-- Horrible-ish hack for extracting the "real" name of the LiveCode
852+
-- module. See also tools/build-extensions.sh.
852853
local tShortName
853854
set the itemdelimiter to slash
854855
put item -1 of pExtPath into tShortName
855-
856-
local tBuiltPath
857-
put FileGetPath("built-extensions") into tBuiltPath
858-
put "/com.livecode.extensions.livecode." after tBuiltPath
859-
put tShortName after tBuiltPath
860-
861-
-- ...and the path of the manifest file
856+
857+
local tLcbSource, tLine, tModuleName
858+
put FileGetUTF8Contents(merge("[[pExtPath]]/[[tShortName]].lcb")) into tLcbSource
859+
repeat for each line tLine in tLcbSource
860+
get matchText(tLine, "(?i)^\s*(?:module|widget|library)\s+([\w.]*)", tModuleName)
861+
if tModuleName is not empty then
862+
exit repeat
863+
end if
864+
end repeat
865+
866+
-- Try to figure out the path for the compiled manifest file
862867
local tManifestFile
863-
put tBuiltPath & "/manifest.xml" into tManifestFile
868+
put FileGetPath("built-extensions") into tManifestFile
869+
put slash & tModuleName after tManifestFile
870+
put slash & "manifest.xml" after tManifestFile
864871

865872
local tManifest, tXmlId
866873
put FileGetContents(tManifestFile) into tManifest

builder/tools_builder.livecodescript

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,10 @@ private command toolsBuilderMakePackage pVersion, pEdition, pPlatform, pEngineFo
8080
put "Commercial" into tBaseEditionType
8181
break
8282
end switch
83+
84+
-- Escape the version (by replacing all non-alphanumeric characters with "_")
85+
local tVersionEscaped
86+
put replaceText(pVersion,"\W","_") into tVersionEscaped
8387

8488
-- Compute the package temp folder
8589
local tTempFolder
@@ -137,6 +141,7 @@ private command toolsBuilderMakePackage pVersion, pEdition, pPlatform, pEngineFo
137141
end if
138142
packageCompilerConfigureVariable tPackager, "TodaysDate", "[[todaysDate]]"
139143
packageCompilerConfigureVariable tPackager, "VersionTag", pVersion
144+
packageCompilerConfigureVariable tPackager, "EscapedVersionTag", tVersionEscaped
140145
packageCompilerConfigureVariable tPackager, "ProductBranch", char 1 to 3 of pVersion
141146
packageCompilerConfigureVariable tPackager, "TargetArchitectures", "i386"
142147
if pPlatform is "linux-x86" then

docs/dictionary/command/save.lcdoc

Lines changed: 21 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,42 +2,56 @@ Name: save
22

33
Type: command
44

5-
Syntax: save <stack> [as <filePath>]
5+
Syntax: save <stack> [as <filePath>] [with format <stackFormat> | with newest format]
66

77
Summary: Saves a <stack file> on the user's system.
88

99
Introduced: 1.0
1010

11-
OS: mac,windows,linux,ios,android
11+
OS: mac,windows,linux,ios,android,html5
1212

1313
Platforms: desktop,web,mobile
1414

1515
Security: disk
1616

1717
Example:
18-
save stack "project1"
18+
save stack "project1" with newest format
1919

2020
Example:
2121
save this stack as "Backup"
2222

2323
Example:
2424
save stack "project1" as "/Disk/Folder/File"
2525

26+
Example:
27+
save stack "MyOldApp" with format 7.0
28+
2629
Parameters:
2730
stack: Any open stack.
28-
filePath: The filePath specifies the name and location of the file you want to save to. If you specify a name but not a location, LiveCode assumes the file is in the defaultFolder. If the file does not exist, LiveCode creates it.
2931

30-
The result: If the stack cannot be saved (for example, if you try to save it to a nonexistent drive or to a CD-ROM), the result <function> is set to "Can't open stack file".
32+
filePath: The <filePath> specifies the name and location of the file you want to save to. If you specify a name but not a location, LiveCode assumes the file is in the <defaultFolder>. If the file does not exist, LiveCode creates it.
33+
34+
stackFormat: The <stack version|stack file format version> to use when saving.
35+
36+
The result: If the stack cannot be saved (for example, if you try to save it to a nonexistent drive or to a CD-ROM), the <result> will contain an error message. Otherwise, the <result> will be empty.
3137

3238
Description:
3339
Use the <save> <command> to save changes to a <stack> or to save a copy of a <stack> into another <file>.
3440

3541
The <save> <command> saves all <stacks> stored in the same <file> as the specified <stack>. That is, if you save a <main stack>, all <substacks> of that stack are also saved in the same <file>, and if you save a <substack>, its <main stack> and any other <substacks> are also saved.
3642

37-
If the stack has not yet been saved and doesn't have a filename, you must use theform.
43+
If the stack has not yet been saved and doesn't have a filename, you must use the `as` form.
3844

3945
You cannot save to a standalone application's file; <standalone application|standalones> are read-only.
4046

41-
References: stackFileVersion (property), substacks (property), stack (object), as (keyword), file (keyword), substack (glossary), stack file (glossary), command (glossary), standalone application (glossary), main stack (glossary), stacks (function), create stack (command), function (control_st)
47+
The <save> command can save the <stack> in several different versions of the LiveCode stack file format.
48+
49+
* If you use the `with newest format` form of the <save> command, the <stack> is saved using the newest <stack version>
50+
* If you use the `with format` form of the <save> command, the <stackFormat> should be the particular <stack version> you want the stack to be saved as.
51+
* If you do not specify a format to use, the current value of the <stackFileFormat> property is used.
52+
53+
**Warning:** If you save in an older <stack version> that doesn't support all of the features used in the stack, then some of contents of the stack may be lost. In general, you are recommended to use the `with newest format` form of the <save> command.
54+
55+
References: substacks (property), stack (object), as (keyword), file (keyword), substack (glossary), stack file (glossary), command (glossary), standalone application (glossary), main stack (glossary), stacks (function), create stack (command), function (control_st), stack version (glossary), defaultFolder (property), stackFileFormat (property)
4256

4357
Tags: file system

docs/dictionary/function/systemVersion.lcdoc

Lines changed: 13 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,15 @@ Summary: <return|Returns> the version number of the operating system.
1010

1111
Introduced: 1.0
1212

13-
OS: mac,windows,linux,ios,android
13+
OS: mac,windows,linux,ios,android,html5
1414

1515
Platforms: desktop,server,web,mobile
1616

1717
Example:
1818
the systemVersion
1919

2020
Example:
21-
if the systemVersion is "8.6.0" then set the OSVersion to "8.6"
21+
if the systemVersion begins with "10.11." then set the OSVersion to "10.11"
2222

2323
Returns: The <systemVersion> <function> <return|returns> a <string>.
2424

@@ -27,29 +27,22 @@ Use the <systemVersion> <function> to determine whether the current version of t
2727

2828
The exact format of the <systemVersion> varies, depending on the operating system.
2929

30-
On Mac OS and OS X systems, the <systemVersion> returns three integers separated by decimal points. For example, on Mac OS 8.6, the <systemVersion> <return|returns> "8.6.0".
30+
On Mac OS X systems, the <systemVersion> returns three integers separated by decimal points. For example, on Mac OS X "El Capitan", the <systemVersion> <return|returns> "10.11.0".
3131

3232
On Windows systems, the <systemVersion> returns the internal Windows version designation. The internal designations for several Windows versions are as follows:
3333

34-
* Windows 95 - Windows 4.0
35-
* Windows 98 - Windows 4.10 (may return other numbers)
36-
* Windows Me - Windows 4.90 (may return other numbers)
37-
* Windows NT 4 - NT 4.0
38-
* Windows 2000 - NT 5.0
39-
* Windows XP - NT 5.1
40-
* Windows Vista - NT 6.0
41-
* Windows 7 - NT 6.1
34+
* Windows XP: "NT 5.1"
35+
* Windows Vista: "NT 6.0"
36+
* Windows 7: "NT 6.1"
37+
* Windows 8: "NT 6.2"
38+
* Windows 8.1: "NT 6.3"
39+
* Windows 10: "NT 10.0"
4240

43-
Because certain sub-versions of Windows 98 and Windows Me return slightly different values for the <systemVersion>, you can check for these versions by testing whether the number is in a range, as in the following example:
41+
On iOS the <systemVersion> will return the iOS version number. For example, if the device has iOS 4.3 installed, this property returns "4.3"; if the device has iOS 3.1.3 installed, this property will return "3.1.3".
4442

45-
get word 2 of the systemVersion
46-
if it &gt;= 4.1 and it &lt; 4.9 then answer "Windows 98!"
43+
On Android the <systemVersion> will return the Android OS version number. For example, if the device has Android 2.2 installed, this property returns "2.2"; if the device has
44+
Android 2.3.1 installed, this property will return "2.3.1".
4745

48-
On iOS the <systemVersion> will return the iOS version number. For example, if the device has iOS 4.3 installed, this property returns 4.3; if the device has iOS 3.1.3 installed, this property will return 3.1.3.
49-
50-
On Android the <systemVersion> will return the Android OS version number. For example, if the device has Android 2.2 installed, this property returns 2.2; if the device has
51-
Android 2.3.1 installed, this property will return 2.3.1.
52-
53-
>*Note:* When running a Mac OS application in the Classic box on an OS X system, the <systemVersion> function returns the version number of the Classic system folder.
46+
On HTML5 the <systemVersion> is empty.
5447

5548
References: string (keyword), function (control_st), environment (function), buildNumber (function), libURLVersion (function), QTVersion (function), return (glossary)

0 commit comments

Comments
 (0)