Skip to content

Commit fb55fcf

Browse files
author
livecodeali
committed
Merge remote-tracking branch 'upstream/develop-7.0' into merge-develop_7.0_07.12.15
Conflicts: builder/installer.rev builder/release_notes_builder.livecodescript docs/dictionary/control_st/function.xml docs/dictionary/function/processor.xml docs/dictionary/function/screenDepth.xml docs/dictionary/function/specialFolderPath.xml docs/dictionary/operator/is-a.xml docs/dictionary/operator/is-not-in.xml docs/notes/setup.md engine/src/chunk.cpp engine/src/parseerrors.h tests/lcs/_testlib.livecodescript tests/lcs/_testrunner.livecodescript tests/lcs/core/engine/engine.livecodescript tests/lcs/core/files/files.livecodescript tests/lcs/core/interface/interface.livecodescript version
2 parents 43bfad4 + cf24b54 commit fb55fcf

57 files changed

Lines changed: 3097 additions & 1467 deletions

Some content is hidden

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

Installer/package.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ component Uninstaller
123123
register value "Version" as "[[VersionTag]]"
124124
register value "UninstallString" as path "\q[[TargetFolder]]/.setup.exe\q uninstall"
125125
if TargetPlatform is "Linux" then
126-
place uninstaller at "[[TargetFolder]]/.setup.x86"
126+
place uninstaller at "[[TargetFolder]]/setup.[[TargetArchitecture]]"
127127
if TargetPlatform is "MacOSX" then
128128
place uninstaller at "[[TargetFolder]]/LiveCode Setup.app"
129129

buildbot.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ dist-upload-files.txt sha1sum.txt:
200200
-o -name '*-bin.tar.xz' \
201201
> dist-upload-files.txt; \
202202
if test "${UPLOAD_RELEASE_NOTES}" = "yes"; then \
203-
find "_build/notes" -name 'LiveCodeNotes*.pdf' >> dist-upload-files.txt; \
203+
find . -maxdepth 1 -name 'LiveCodeNotes*.pdf' >> dist-upload-files.txt; \
204204
fi; \
205205
if test "$(UPLOAD_ENABLE_CHECKSUM)" = "yes"; then \
206206
$(SHA1SUM) < dist-upload-files.txt > sha1sum.txt; \

builder/builder_utilities.livecodescript

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ on builderBuild pWhich, pPlatforms, pEdition, pType
7474
end repeat
7575
break
7676
case "Notes"
77-
dispatch "releaseNotesBuilderRun" to stack builderNotesBuilderStack() with pEdition, tVersion
77+
dispatch "releaseNotesBuilderRun" to stack builderNotesBuilderStack() with pEdition, tVersion, pType, builderOutputFolder()
7878
break
7979
case "Docs"
8080
dispatch "docsBuilderRun" to stack builderDocsBuilderStack() with pEdition, tVersion

builder/installer.rev

413 Bytes
Binary file not shown.

builder/installer_utilities.livecodescript

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -716,10 +716,19 @@ private command installCopyUninstaller pTarget
716716
set the itemDel to comma
717717
else
718718
put url ("binfile:" & the effective filename of stack "Installer") into url ("binfile:" & installShortenPath(pTarget))
719+
719720
if the result is not empty then
720721
log "CopyUninstaller: copying failed -" && the result
721722
reportError "Unable to installer uninstaller at '" & pTarget & "'."
722723
end if
724+
725+
// SN-2014-10-28: [[ Bug 16410 ]] The uninstaller needs the execution permission
726+
local tChmodResult
727+
get shell("chmod +x " & quote & installShortenPath(pTarget) & quote)
728+
if it is not empty then
729+
log "CopyUninstaller: setting executable permission failed - " & it
730+
reportError "Unable to install uninstaller at '" & pTarget * "'."
731+
end if
723732
end if
724733
end installCopyUninstaller
725734

builder/release_notes_builder.livecodescript

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ command releaseNotesBuilderFinalize
5252
stop using stack (builderSystemFolder() & slash & "markdown_compiler.livecodescript")
5353
end releaseNotesBuilderFinalize
5454

55-
command releaseNotesBuilderRun pEdition, pVersion, pReleaseType
55+
command releaseNotesBuilderRun pEdition, pVersion, pReleaseType, pOutputDir
5656
builderLog "report", "Building release notes for version" && pVersion
5757

5858
releaseNotesBuilderInitialize
@@ -145,9 +145,16 @@ command releaseNotesBuilderRun pEdition, pVersion, pReleaseType
145145
put tBody & getPastNotes(tTags) into tBody
146146

147147
local tNotesFileURL
148+
148149
local tNotesFile, tHtmlNotesFile
149-
builderEnsureFolder builderRepoFolder() & slash & targetPath()
150-
put builderRepoFolder() & slash & targetPath() & slash & "LiveCodeNotes-" & replaceText(pVersion, "[-,\.]", "_") into tNotesFile
150+
local tOutputDir
151+
if pOutputDir is empty then
152+
put builderRepoFolder() & slash & targetPath() into tOutputDir
153+
else
154+
put pOutputDir into tOutputDir
155+
end if
156+
builderEnsureFolder tOutputDir
157+
put tOutputDir & slash & "LiveCodeNotes-" & replaceText(pVersion, "[-,\.]", "_") into tNotesFile
151158
put tNotesFile & ".html" into tHtmlNotesFile
152159
put "file:" & tHtmlNotesFile into tNotesFileURL
153160

builder/release_notes_css_prefix.txt

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ button,
8989
input,
9090
select,
9191
textarea {
92-
font-family: sans-serif;
92+
font-family: "DejaVu Sans", sans-serif;
9393
}
9494

9595
/**
@@ -227,9 +227,11 @@ code,
227227
kbd,
228228
pre,
229229
samp {
230-
font-family: monospace, serif;
230+
font-family: "Courier New", "DejaVu Sans Mono", monospace;
231231
_font-family: 'courier new', monospace;
232232
font-size: 1em;
233+
background: rgb(240,240,240);
234+
padding: 0.2em;
233235
}
234236

235237
/**
@@ -577,4 +579,4 @@ table{border-spacing:1em 2px;}
577579
.list_content h2{ margin-top:0}
578580
.list_content .button{ margin-top:10px; display:inline-block}
579581

580-
</style>
582+
</style>

docs/dictionary/control_st/function.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
<doc> <legacy_id>1364</legacy_id> <name>function</name> <type>control structure</type> <syntax> <example>function <i>functionName </i>[<i>parametersList</i>] <i>statementList</i> end <i>functionName</i></example> </syntax> <synonyms> </synonyms> <summary>Defines a custom function <glossary tag="handler">handler</glossary>.</summary> <examples><example><p>function myFunctioneturn "test"</p><p>end myFunction</p></example> </examples> <history> <introduced version="1.0">Added.</introduced> <deprecated version=""></deprecated> <removed version=""></removed> <experimental version=""></experimental> <nonexperimental version=""></nonexperimental> </history> <objects> </objects> <platforms> <mac/> <windows/> <linux/> <ios/> <android/> </platforms> <classes> <desktop/> <server/> <web/> <mobile/> </classes> <security> </security> <classification> <category>Writing LiveCode</category> </classification> <references> <function tag="param">param Function</function> <function tag="paramCount">paramCount Function</function> <function tag="functionNames">functionNames Function</function> <keyword tag="private">private Keyword</keyword> <keyword tag="$">$ Keyword</keyword> <keyword tag="end">end Keyword</keyword> <control_st tag="exit">exit Control Structure</control_st> </references> <description>Use the <b>function</b> <glossary tag="control structure">control structure</glossary> to implement a custom function.<p></p><p><b>Form:</b></p><p>The first line of a <b>function</b> <glossary tag="handler">handler</glossary> consists of the word "function" followed by the function's name. If the function has any <glossary tag="parameter">parameters</glossary>, their names come after the function name, separated by commas.</p><p></p><p>The last line of a <b>function</b> <glossary tag="handler">handler</glossary> consists of the word "end" followed by the function's name.</p><p></p><p><b>Parameters:</b></p><p>The <i>functionName</i> is a <keyword tag="string">string</keyword> up to 65,535 <keyword tag="characters">characters</keyword> in length.</p><p></p><p>The <i>parametersList</i> consists of one or more <glossary tag="parameter">parameter</glossary> names, separated by commas.</p><p></p><p>The <i>statementList</i> consists of one or more <glossary tag="LiveCode">LiveCode</glossary> <glossary tag="statement">statements</glossary>.</p><p></p><p><b>Comments:</b></p><p>The purpose of a function is to compute a value and return it to the handler that called the function. The function's value is returned by a <b>return</b> <glossary tag="control structure">control structure</glossary> within the <b>function</b> <glossary tag="handler">handler</glossary>.</p><p></p><p>A function handler can contain any set of LiveCode statements. Most functions contain a <b>return</b> <glossary tag="statement">statement</glossary>, which <glossary tag="return">returns</glossary> the value to the <glossary tag="caller">calling handler</glossary>. This example of a custom function uses two <glossary tag="parameter">parameters</glossary> and <glossary tag="return">returns</glossary> a <keyword tag="string">string</keyword>:</p><p></p><p>function reversedName firstName,lastName</p><p><i>-- firstName and lastName are parameters</i></p><p>put lastName,firstName into constructedName</p><p>return constructedName</p><p>end reversedName</p><p></p><p>You create a custom function by writing a function handler for it. When you use the function in a script, the function call is passed through the message path. When it reaches the object whose script contains the <b>function</b> <glossary tag="handler">handler</glossary>, the <glossary tag="statement">statements</glossary> in the <glossary tag="handler">handler</glossary> are <glossary tag="execute">executed</glossary>.</p><p></p><p>A custom function is called by name, just like a built-in function, as part of an expression. For example, this handler calls the custom function above:</p><p></p><p>on mouseUp</p><p>ask "What is your first name?"</p><p>put it into firstParam</p><p>ask "What is your last name?"</p><p>put it into secondParam</p><p>put reversedName(firstParam,secondParam) into field "Name"</p><p>end mouseUp</p><p></p><p>A function can call itself. The following example calls itself to compute the factorial of an integer:</p><p></p><p>function factorial theNumber</p><p>if theNumber = 1 then return 1</p><p>else return theNumber * factorial(theNumber -1)</p><p>end factorial</p><p></p><p></p><p></p><p></p><note>To declare a function that is local to the script it is contained in, prefix the declaration with <keyword tag="private">private</keyword>. For more information about this see the dictionary entry for the <keyword tag="private">private keyword</keyword>.</note><p></p><p></p><p></p><p></p><note>As the <function tag="result">result</function> is a global property, if you do not explicitly <control_st tag="return">return</control_st> a value, then <function tag="result">the result</function> will not change, but reflect the last engine command, engine function or command or function handler that did return a value.</note><p></p><p></p><p></p><p></p><change></change>The ability to declare private functions using the private keyword was added in LiveCode 2.8.1</description></doc>

docs/dictionary/function/processor.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
<doc> <legacy_id>1543</legacy_id> <name>processor</name> <type>function</type> <syntax> <example>the processor</example> <example>processor()</example> </syntax> <synonyms> </synonyms> <summary><glossary tag="return">Returns</glossary> a <keyword tag="string">string</keyword> describing the system's CPU chip.</summary> <examples><example>the processor</example><example>if the processor is &quot;ARM&quot; then ...</example> </examples> <history> <introduced version="1.0">Added.</introduced> <deprecated version=""></deprecated> <removed version=""></removed> <changed version="4.5.2">iOS support added</changed><changed version="4.6.1">Android support added</changed> </history> <objects> </objects> <platforms> <mac/> <windows/> <ios/> <android/> </platforms> <classes> <desktop/> <server/> <web/> <mobile/> </classes> <security> </security> <classification> <category>The System Environment</category> </classification> <references> <function tag="machine">machine Function</function> <function tag="platform">platform Function</function> </references> <description> <overview>Use the <b>processor</b> function to determine which microprocessor the device has.</overview> <parameters> </parameters> <value>The processor function returns one of the following strings:<p></p><p>* <b>x86</b> - Windows systems (any architecture) and Mac OS X and Linux systems with a 32-bit processor.</p><p>* <b>x86_64</b> - Mac and Linux systems running a 64-bit processor</b></p><p>* <b>i386</b> - iOS Simulator.</p><p>* <b>ARM</b> - iOS and Android Devices and the Android simulator.</p></value> <comments></comments> </description></doc>
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
<doc>
2+
<legacy_id>2016</legacy_id>
3+
<name>screenDepth</name>
4+
<type>function</type>
5+
<syntax>
6+
<example>the screenDepth</example>
7+
<example>screenDepth()</example>
8+
</syntax>
9+
<library></library>
10+
<objects>
11+
</objects>
12+
<synonyms>
13+
</synonyms>
14+
<classification>
15+
<category>The System Environment</category>
16+
</classification>
17+
<references>
18+
<command tag="unlock colorMap">unlock colorMap Command</command>
19+
<function tag="screenType">screenType Function</function>
20+
<property tag="dontDither">dontDither Property</property>
21+
<property tag="colorWorld">colorWorld Property</property>
22+
</references>
23+
<history>
24+
<introduced version="1.0">Added.</introduced>
25+
</history>
26+
<platforms>
27+
<mac/>
28+
<windows/>
29+
<linux/>
30+
</platforms>
31+
<classes>
32+
<desktop/>
33+
<server/>
34+
<web/>
35+
</classes>
36+
<security>
37+
</security>
38+
<summary><glossary tag="return">Returns</glossary> the <glossary tag="bit depth">bit depth</glossary> of the screen.</summary>
39+
<examples>
40+
<example>the screenDepth</example>
41+
<example>if the screenDepth &gt; 8 then show image "Photograph"</example>
42+
</examples>
43+
<description>
44+
<p>Use the <b>screenDepth</b> <control_st tag="function">function</control_st> to determine the color capacity of the screen. For example, you might display different <glossary tag="image">images</glossary> depending on the number of colors available.</p><p/><p><b>Value:</b></p><p>The <b>screenDepth</b> <control_st tag="function">function</control_st> <glossary tag="return">returns</glossary> 0, 1, 2, 4, 8, 16, 24, or 32.</p><p/><p><b>Comments:</b></p><p>If the system has more than one monitor, the <b>screenDepth</b> function <glossary tag="return">returns</glossary> the <glossary tag="bit depth">bit depth</glossary> of the main screen.</p><p/><p>The expression</p><p> 2 ^ (the screenDepth)</p><p>is equal to</p><p> the screenColors</p><p/><p>The value returned by the <b>screenDepth</b> <control_st tag="function">function</control_st> is updated only when you start up the <glossary tag="application">application</glossary>. If you change the screen settings after starting up the <glossary tag="application">application</glossary>, you must quit and restart to update the <b>screenDepth</b>.</p><p><b>Comments:</b></p><p>In <b>noui</b> mode, the screendepth is <b>0</b>.</p>
45+
</description>
46+
</doc>

0 commit comments

Comments
 (0)