Skip to content
This repository was archived by the owner on Aug 31, 2021. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified Toolset/palettes/standalone settings/revstandalonesettings.8.rev
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,9 @@ on preOpenCard
end preOpenCard

on initialize
local tEnableButton
put the long id of button "Emscripten" of group "platforms" into tEnableButton

-- Check whether HTML5 deployment is requested for the target stack
local tStandaloneSettingsA
put getSettings() into tStandaloneSettingsA

set the visible of tEnableButton to revEngineCheck("Emscripten")
set the hilite of tEnableButton to (tStandaloneSettingsA["Emscripten"] is true)
local tSettings
put getSettings() into tSettings
local tEnabled = false

-- Decide whether user is permitted to do HTML5 deployment
local tHaveLicense
Expand All @@ -25,15 +19,59 @@ on initialize
put false into tHaveLicense
end if

-- Disable the checkbox if no license is available
set the enabled of tEnableButton to tHaveLicense
repeat for each item tItem in revSBPlatformArchitectures("Emscripten")
set the hilite of button ("Emscripten" && tItem) of group "platforms" of me to tSettings["Emscripten",tItem] is true
set the visible of button ("Emscripten" && tItem) of group "platforms" of me to revEngineCheck("Emscripten" && tItem)
if tSettings["Emscripten",tItem] then
put true into tEnabled
end if

-- Disable the checkbox if no license is available
set the enabled of button ("Emscripten" && tItem) of group "platforms" of me to tHaveLicense
end repeat

if not tEnabled and tSettings["Emscripten"] is true then
set the hilite of button "Emscripten js" of group "platforms" of me to true
put true into tSettings["Emscripten,js"]
setSettings tSettings
end if


-- Hide the license prompt if a license is available
set the visible of group "emscriptenLicenseTip" to not tHaveLicense

tipDisplayUpdate
end initialize

on updateEmscriptenChecked pChecked
set the visible of button "Emscriptenchecked" to pChecked
set the opaque of button "Emscriptenchecked" to false
end updateEmscriptenChecked

on updateEmscriptenArch pArch, pBuild
local tSettingsA
put getSettings() into tSettingsA

put pBuild into tSettingsA["Emscripten",pArch]

local tEnabled = false
repeat for each item tItem in revSBPlatformArchitectures("Emscripten")
if tSettingsA["Emscripten",tItem] then
put true into tEnabled
exit repeat
end if
end repeat
put tEnabled into tSettingsA["Emscripten"]
setSettings tSettingsA

if tEnabled then
buildForEnabled "emscripten"
end if

revSetEdit
updateEmscriptenChecked tEnabled
end updateEmscriptenArch

on tipDisplayUpdate
set the backColor of graphic "emscriptenNoLicenseBackground" to ideCoreEditionColour()

Expand Down