forked from livecode/livecode
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathedition_utilities.livecodescript
More file actions
58 lines (51 loc) · 1.33 KB
/
edition_utilities.livecodescript
File metadata and controls
58 lines (51 loc) · 1.33 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
script "EditionUtilities"
constant kEditionNames="community,communityplus,indy,business,commercial"
function editionNames
return kEditionNames
end editionNames
function editionTitleCase pEdition
switch pEdition
case "community"
return "Community"
case "communityplus"
return "CommunityPlus"
case "indy"
return "Indy"
case "business"
return "Business"
case "commercial"
return "Commercial"
end switch
end editionTitleCase
function editionDisplayName pEdition
switch pEdition
case "community"
return "Community"
case "communityplus"
return "Community Plus"
case "indy"
return "Indy"
case "business"
return "Business"
case "commercial"
return "Commercial"
end switch
end editionDisplayName
function editionCompare pA, pB
local tA, tB
put itemOffset(pA, kEditionNames) into tA
put itemOffset(pB, kEditionNames) into tB
return tA - tB
end editionCompare
constant kCommercialBaseEditions="communityplus,indy,business,commercial"
function editionBaseEditionType pEdition
if pEdition is among the items of kCommercialBaseEditions then
return "Commercial"
else
return "Community"
end if
end editionBaseEditionType
constant kPrivateRepoEditions="communityplus,indy,business,commercial"
function editionIsInPrivateRepo pEdition
return pEdition is among the items of kPrivateRepoEditions
end editionIsInPrivateRepo