////////////////////////////////////////////////////////////////////////////////
//
//  TargetFolder:
//    This is where the application executable/bundle will be placed:
//      Windows: C:/Program Files/LiveCode 4.5 (dp 5)
//      Mac OS X: /Applications
//      Linux: /opt/livecode/livecode-4.5-dp-5
//
//  SupportFolder:
//    This is where supporting (user-accessible) resources will be placed:
//      Windows: C:/Program Files/LiveCode 4.5 (dp 5)
//      Mac OS X: /Application/LiveCode 4.5 (dp 5).app/Contents/Support
//      Linux: /opt/livecode/livecode-4.5-dp-5
//
//  ToolsFolder:
//    This is where the toolset will be placed:
//      Windows: C:/Program Files/LiveCode 4.5 (dp 5)
//      Mac OS X: /Application/LiveCode 4.5 (dp 5).app/Contents/Tools
//      Linux: /opt/livecode/livecode-4.5-dp-5
//
//  ProductTitle:
//    LiveCode 4.5 (dp 5)
//  ProductTag:
//    livecode_4_5_dp_5
//  ProductName:
//    LiveCode

installer LiveCode
	if BaseEdition is Commercial then
		additional manifest "../Installer/commercial-package.txt"
	include Misc
	include Toolset
	include Plugins
	include Resources
	include Documentation
	include Toolchain.[[TargetPlatform]]
	include Extensions
	include Ext
	codesign
		include Engine.[[TargetPlatform]]
		with TargetFolder as [[ToolsFolder]] do
			include Externals
	with TargetFolder as [[ToolsFolder]]/Runtime/Windows/x86-32 do
		set TargetPlatform to Windows
		include Runtime
		include Externals
	with TargetFolder as [[ToolsFolder]]/Runtime/Linux/x86-32 do
		set TargetPlatform to Linux
		set TargetArchitecture to x86
		include Runtime
		include Externals
	ifnot ProductBranch is 6.7 then
		with TargetFolder as [[ToolsFolder]]/Runtime/Linux/x86-64 do
			set TargetPlatform to Linux
			set TargetArchitecture to x86_64
			include Runtime
			include Externals
//	with TargetFolder as [[ToolsFolder]]/Runtime/Linux/armv6-hf do
//		set TargetPlatform to Linux
//		set TargetArchitecture to armv6-hf
//		include Runtime
//		include Externals
	with TargetFolder as "[[ToolsFolder]]/Runtime/Mac OS X/x86-32" do
		set TargetPlatform to MacOSX
		set TargetArchitectures to i386
		include Runtime
		include Externals
	if TargetPlatform is MacOSX then
		include Mobile.MacOSX
		include Runtime.iOS
		include Runtime.Android
		include Runtime.Emscripten
	if TargetPlatform is Windows then
		include Mobile.Windows
		include Runtime.Android
		include Runtime.Emscripten
		shortcut "Desktop/[[ProductTitle]]" to "[[TargetFolder]]/[[ProductName]].exe"
		shortcut "Programs/LiveCode/[[ProductTitle]]" to "[[TargetFolder]]/[[ProductName]].exe"
	if TargetPlatform is Linux then
		include Mobile.Linux
		include Runtime.Android
		include Runtime.Emscripten
		desktop application "repo:Installer/application.desktop" as "runrev-[[ProductTag]]-[[TargetArchitecture]]"
		if TargetEdition is Community then
			desktop icon "repo:Installer/application.png" as "runrev-[[ProductTag]]-[[TargetArchitecture]]"
		if TargetEdition is CommunityPlus then
			desktop icon "private:engine/rsrc/CommunityPlus/android-notify-icon.png" as "runrev-[[ProductTag]]-[[TargetArchitecture]]"
		if TargetEdition is Indy then
			desktop icon "private:engine/rsrc/Indy/android-notify-icon.png" as "runrev-[[ProductTag]]-[[TargetArchitecture]]"
		if TargetEdition is Business then
			desktop icon "private:engine/rsrc/Business/android-notify-icon.png" as "runrev-[[ProductTag]]-[[TargetArchitecture]]"
	include Uninstaller
	if TargetEdition is CommunityPlus then
		include Commercial.CommunityPlusComponents
	if TargetEdition is Indy then
		include Commercial.IndyComponents
	if TargetEdition is Business then
		include Commercial.BusinessComponents

component Runtime
	include Runtime.[[TargetPlatform]]

component Externals
	include Externals.[[TargetPlatform]]
	if TargetEdition is "Business" then
		include Commercial.BusinessExternals
	if TargetEdition is "Indy" then
		include Commercial.IndyExternals
	if TargetEdition is "CommunityPlus" then
		include Commercial.CommunityPlusExternals
	include Databases.[[TargetPlatform]]
	if TargetEdition is "Business" then
		include Commercial.BusinessDatabases
	if TargetEdition is "Indy" then
		include Commercial.IndyDatabases
	if TargetEdition is "CommunityPlus" then
		include Commercial.CommunityPlusDatabases
	if TargetPlatform is Linux then
		include Externals.CEF.Linux
	if TargetPlatform is Windows then
		include Externals.CEF.Windows
	emit externals to "[[TargetFolder]]/Externals/Externals.txt"
	emit dbdrivers to "[[TargetFolder]]/Externals/Database Drivers/Database Drivers.txt"

component Ext
	into [[ToolsFolder]] place
		rfolder "ext:Ext"

component Uninstaller
	if TargetPlatform is "Windows" then
		place uninstaller at "[[TargetFolder]]/.setup.exe"
		register key "HKLM/Software/Microsoft/Windows/CurrentVersion/Uninstall/[[ProductTitle]]"
		with RegistryRoot as "HKLM/Software/Microsoft/Windows/CurrentVersion/Uninstall/[[ProductTitle]]" do
			register value "DisplayIcon" as path "[[TargetFolder]]/[[ProductName]].exe"
			register value "DisplayName" as "[[ProductTitle]]"
			register value "DisplayVersion" as "[[VersionTag]]"
			register value "InstallDate" as "[[TodaysDate]]"
			register value "InstallLocation" as path "[[TargetFolder]]"
			register value "NoModify" as 1
			register value "NoRepair" as 1
			register value "Publisher" as "LiveCode Ltd."
			register value "Version" as "[[VersionTag]]"
			register value "UninstallString" as path "\q[[TargetFolder]]/.setup.exe\q uninstall"
	if TargetPlatform is "Linux" then
		place uninstaller at "[[TargetFolder]]/setup.[[TargetArchitecture]]"
	if TargetPlatform is "MacOSX" then
		place uninstaller at "[[TargetFolder]]/LiveCode Setup.app"


////////////////////////////////////////////////////////////////////////////////

component Misc
	into [[SupportFolder]] place
		if TargetEdition is "Community" then
			textfile "ide:License Agreement.txt"
			textfile "ide:about.txt"
		if TargetEdition is "CommunityPlus" then
			textfile "private:CommunityPlus License Agreement.txt" as "License Agreement.txt"
			textfile "private:about.txt"
		if TargetEdition is "Indy" then
			textfile "private:License Agreement.txt"
			textfile "private:about.txt"
		if TargetEdition is "Business" then
			textfile "private:License Agreement.txt"
			textfile "private:about.txt"
		textfile "ide:Open Source Licenses.txt"
		file "repo:LiveCodeNotes-[[EscapedVersionTag]].pdf" as "Release Notes.pdf"
		
component Plugins
	into [[ToolsFolder]]/Plugins place
		stack ide:Plugins/Go_LiveNet.livecode
		stack ide:Plugins/Navigator.rev
		stack "ide:Plugins/RegExBuilder 1.6.rev"
		stack ide:Plugins/revapplicationoverview.rev
		stack ide:Plugins/revexample.rev
		stack "ide:Plugins/revSmartProperties 1.2.rev"
		stack "ide:Plugins/revSmartSave 1.1.rev"
		stack "ide:Plugins/revTabRuler 1.2.rev"

component Resources
	into [[SupportFolder]]/Resources/Examples place
		stack "ide:Resources/Examples/Core Image Sampler.rev"
		stack "ide:Resources/Examples/Deep Mask Sampler.rev"
		stack "ide:Resources/Examples/Relaunch Sampler.rev"
		stack "ide:Resources/Examples/Font Loading Sampler.rev"
		stack "ide:Resources/Examples/Browser Sampler.rev"
		stack "ide:Resources/Examples/SQLite Sampler.rev"
		stack "ide:Resources/Examples/Zip Build Sampler.rev"
		stack "ide:Resources/Examples/Zip Extract Sampler.rev"
		stack "ide:Resources/Examples/Data Grid Tour.livecode"
	into "[[SupportFolder]]/Resources/Sample Projects" place
		stack "ide:Resources/Sample Projects/Bouncy.rev"
		stack "ide:Resources/Sample Projects/Internet Chat.rev"
		stack "ide:Resources/Sample Projects/Simple Calculator.rev"
		stack "ide:Resources/Sample Projects/Video Capture.rev"
	into "[[SupportFolder]]/Resources" place
		file ide:Resources/Sample.mpg
	into "[[SupportFolder]]/Resources/Object Libraries" place
		stack "ide:Resources/Object Libraries/revObjectLibrary.rev"
	into "[[SupportFolder]]/Resources/Start Center/samples/sample_1" place
		stack	"ide:Resources/Start Center/samples/sample_1/Balls.livecode"
		file	"ide:Resources/Start Center/samples/sample_1/icon.png"
		file "ide:Resources/Start Center/samples/sample_1/icon@extra-high.png"
		file	"ide:Resources/Start Center/samples/sample_1/info.txt"
	into "[[SupportFolder]]/Resources/Start Center/samples/sample_2" place
		stack	"ide:Resources/Start Center/samples/sample_2/BookLibrary.livecode"
		file	"ide:Resources/Start Center/samples/sample_2/icon.png"
		file "ide:Resources/Start Center/samples/sample_2/icon@extra-high.png"
		file	"ide:Resources/Start Center/samples/sample_2/info.txt"
	into "[[SupportFolder]]/Resources/Start Center/samples/sample_3" place
		stack	"ide:Resources/Start Center/samples/sample_3/mobileTemplate.livecode"
		file	"ide:Resources/Start Center/samples/sample_3/icon.png"
		file "ide:Resources/Start Center/samples/sample_3/icon@extra-high.png"
		file	"ide:Resources/Start Center/samples/sample_3/info.txt"
	into "[[SupportFolder]]/Resources/Start Center/samples/sample_4" place
		stack	"ide:Resources/Start Center/samples/sample_4/balloon.livecode"
		file	"ide:Resources/Start Center/samples/sample_4/icon.png"
		file "ide:Resources/Start Center/samples/sample_4/icon@extra-high.png"
		file	"ide:Resources/Start Center/samples/sample_4/info.txt"
	into "[[SupportFolder]]/Resources/Start Center/samples/sample_3/images/app-icons" place
		file	"ide:Resources/Start Center/samples/sample_3/images/app-icons/AppIcon29x29.png"
		file	"ide:Resources/Start Center/samples/sample_3/images/app-icons/AppIcon29x29@2x.png"
		file "ide:Resources/Start Center/samples/sample_3/images/app-icons/AppIcon40x40.png"
		file	"ide:Resources/Start Center/samples/sample_3/images/app-icons/AppIcon40x40@2x.png"
		file	"ide:Resources/Start Center/samples/sample_3/images/app-icons/AppIcon60x60.png"
		file	"ide:Resources/Start Center/samples/sample_3/images/app-icons/AppIcon60x60@2x.png"
		file "ide:Resources/Start Center/samples/sample_3/images/app-icons/AppIcon76x76.png"
		file	"ide:Resources/Start Center/samples/sample_3/images/app-icons/AppIcon76x76@2x.png"
		file "ide:Resources/Start Center/samples/sample_3/images/app-icons/iTunesArtwork.png"
		file	"ide:Resources/Start Center/samples/sample_3/images/app-icons/iTunesArtwork@2x.png"
	into "[[SupportFolder]]/Resources/Start Center/samples/sample_3/images/icons" place
		file	"ide:Resources/Start Center/samples/sample_3/images/icons/add.png"
		file	"ide:Resources/Start Center/samples/sample_3/images/icons/battery-low.png"
		file	"ide:Resources/Start Center/samples/sample_3/images/icons/battery-medium.png"
		file	"ide:Resources/Start Center/samples/sample_3/images/icons/battery-zero.png"
		file	"ide:Resources/Start Center/samples/sample_3/images/icons/beaker.png"
		file	"ide:Resources/Start Center/samples/sample_3/images/icons/binoculars.png"
		file	"ide:Resources/Start Center/samples/sample_3/images/icons/bird.png"
		file	"ide:Resources/Start Center/samples/sample_3/images/icons/bookmark.png"
		file	"ide:Resources/Start Center/samples/sample_3/images/icons/bug.png"
		file	"ide:Resources/Start Center/samples/sample_3/images/icons/bulb.png"
		file	"ide:Resources/Start Center/samples/sample_3/images/icons/calculator.png"
		file	"ide:Resources/Start Center/samples/sample_3/images/icons/calendar.png"
		file	"ide:Resources/Start Center/samples/sample_3/images/icons/camera.png"
		file	"ide:Resources/Start Center/samples/sample_3/images/icons/car.png"
		file	"ide:Resources/Start Center/samples/sample_3/images/icons/card.png"
		file	"ide:Resources/Start Center/samples/sample_3/images/icons/cassette.png"
		file	"ide:Resources/Start Center/samples/sample_3/images/icons/cctv.png"
		file	"ide:Resources/Start Center/samples/sample_3/images/icons/center.png"
		file	"ide:Resources/Start Center/samples/sample_3/images/icons/chip.png"
		file	"ide:Resources/Start Center/samples/sample_3/images/icons/clipboard-blank.png"
		file	"ide:Resources/Start Center/samples/sample_3/images/icons/clipboard.png"
		file	"ide:Resources/Start Center/samples/sample_3/images/icons/clock.png"
		file	"ide:Resources/Start Center/samples/sample_3/images/icons/cloud.png"
		file	"ide:Resources/Start Center/samples/sample_3/images/icons/computer.png"
		file	"ide:Resources/Start Center/samples/sample_3/images/icons/cone.png"
		file	"ide:Resources/Start Center/samples/sample_3/images/icons/conversation.png"
		file	"ide:Resources/Start Center/samples/sample_3/images/icons/credit-card.png"
		file	"ide:Resources/Start Center/samples/sample_3/images/icons/cup-coffee.png"
		file	"ide:Resources/Start Center/samples/sample_3/images/icons/cup-martini.png"
		file	"ide:Resources/Start Center/samples/sample_3/images/icons/cup-mug.png"
		file	"ide:Resources/Start Center/samples/sample_3/images/icons/cup-wine.png"
		file	"ide:Resources/Start Center/samples/sample_3/images/icons/delete.png"
		file	"ide:Resources/Start Center/samples/sample_3/images/icons/diary.png"
		file	"ide:Resources/Start Center/samples/sample_3/images/icons/disk-floppy.png"
		file	"ide:Resources/Start Center/samples/sample_3/images/icons/dislike.png"
		file	"ide:Resources/Start Center/samples/sample_3/images/icons/drive-hard.png"
		file	"ide:Resources/Start Center/samples/sample_3/images/icons/dvd.png"
		file	"ide:Resources/Start Center/samples/sample_3/images/icons/envelope.png"
		file	"ide:Resources/Start Center/samples/sample_3/images/icons/expand.png"
		file	"ide:Resources/Start Center/samples/sample_3/images/icons/eye.png"
		file	"ide:Resources/Start Center/samples/sample_3/images/icons/facebook.png"
		file	"ide:Resources/Start Center/samples/sample_3/images/icons/factory.png"
		file	"ide:Resources/Start Center/samples/sample_3/images/icons/female.png"
		file	"ide:Resources/Start Center/samples/sample_3/images/icons/file-new.png"
		file	"ide:Resources/Start Center/samples/sample_3/images/icons/film.png"
		file	"ide:Resources/Start Center/samples/sample_3/images/icons/flag.png"
		file	"ide:Resources/Start Center/samples/sample_3/images/icons/flower.png"
		file	"ide:Resources/Start Center/samples/sample_3/images/icons/folder.png"
		file	"ide:Resources/Start Center/samples/sample_3/images/icons/food.png"
		file	"ide:Resources/Start Center/samples/sample_3/images/icons/gameboy.png"
		file	"ide:Resources/Start Center/samples/sample_3/images/icons/gamepad.png"
		file	"ide:Resources/Start Center/samples/sample_3/images/icons/gift.png"
		file	"ide:Resources/Start Center/samples/sample_3/images/icons/globe.png"
		file	"ide:Resources/Start Center/samples/sample_3/images/icons/headphones.png"
		file	"ide:Resources/Start Center/samples/sample_3/images/icons/heart.png"
		file	"ide:Resources/Start Center/samples/sample_3/images/icons/id.png"
		file	"ide:Resources/Start Center/samples/sample_3/images/icons/image.png"
		file	"ide:Resources/Start Center/samples/sample_3/images/icons/information.png"
		file	"ide:Resources/Start Center/samples/sample_3/images/icons/international.png"
		file	"ide:Resources/Start Center/samples/sample_3/images/icons/ipod.png"
		file	"ide:Resources/Start Center/samples/sample_3/images/icons/key.png"
		file	"ide:Resources/Start Center/samples/sample_3/images/icons/keyboard.png"
		file	"ide:Resources/Start Center/samples/sample_3/images/icons/laptop.png"
		file	"ide:Resources/Start Center/samples/sample_3/images/icons/letter-open.png"
		file	"ide:Resources/Start Center/samples/sample_3/images/icons/lightening.png"
		file	"ide:Resources/Start Center/samples/sample_3/images/icons/like.png"
		file	"ide:Resources/Start Center/samples/sample_3/images/icons/location.png"
		file	"ide:Resources/Start Center/samples/sample_3/images/icons/lock-unlock.png"
		file	"ide:Resources/Start Center/samples/sample_3/images/icons/lock.png"
		file	"ide:Resources/Start Center/samples/sample_3/images/icons/lolly.png"
		file	"ide:Resources/Start Center/samples/sample_3/images/icons/male.png"
		file	"ide:Resources/Start Center/samples/sample_3/images/icons/memory.png"
		file	"ide:Resources/Start Center/samples/sample_3/images/icons/mobile-phone.png"
		file	"ide:Resources/Start Center/samples/sample_3/images/icons/mouse.png"
		file	"ide:Resources/Start Center/samples/sample_3/images/icons/music.png"
		file	"ide:Resources/Start Center/samples/sample_3/images/icons/north-east.png"
		file	"ide:Resources/Start Center/samples/sample_3/images/icons/north-west.png"
		file	"ide:Resources/Start Center/samples/sample_3/images/icons/north.png"
		file	"ide:Resources/Start Center/samples/sample_3/images/icons/old-film.png"
		file	"ide:Resources/Start Center/samples/sample_3/images/icons/outdoors.png"
		file	"ide:Resources/Start Center/samples/sample_3/images/icons/paperclip.png"
		file	"ide:Resources/Start Center/samples/sample_3/images/icons/pencil.png"
		file	"ide:Resources/Start Center/samples/sample_3/images/icons/person.png"
		file	"ide:Resources/Start Center/samples/sample_3/images/icons/petrol.png"
		file	"ide:Resources/Start Center/samples/sample_3/images/icons/pin.png"
		file	"ide:Resources/Start Center/samples/sample_3/images/icons/planet.png"
		file	"ide:Resources/Start Center/samples/sample_3/images/icons/plug.png"
		file	"ide:Resources/Start Center/samples/sample_3/images/icons/printer.png"
		file	"ide:Resources/Start Center/samples/sample_3/images/icons/projector.png"
		file	"ide:Resources/Start Center/samples/sample_3/images/icons/radio.png"		
		file	"ide:Resources/Start Center/samples/sample_3/images/icons/refresh.png"
		file	"ide:Resources/Start Center/samples/sample_3/images/icons/rss.png"
		file	"ide:Resources/Start Center/samples/sample_3/images/icons/satalite.png"
		file	"ide:Resources/Start Center/samples/sample_3/images/icons/scissors.png"
		file	"ide:Resources/Start Center/samples/sample_3/images/icons/search.png"
		file	"ide:Resources/Start Center/samples/sample_3/images/icons/server.png"
		file	"ide:Resources/Start Center/samples/sample_3/images/icons/settings.png"
		file	"ide:Resources/Start Center/samples/sample_3/images/icons/settings2.png"
		file	"ide:Resources/Start Center/samples/sample_3/images/icons/share.png"
		file	"ide:Resources/Start Center/samples/sample_3/images/icons/shield.png"
		file	"ide:Resources/Start Center/samples/sample_3/images/icons/signal.png"
		file	"ide:Resources/Start Center/samples/sample_3/images/icons/signpost.png"
		file	"ide:Resources/Start Center/samples/sample_3/images/icons/smartphone.png"
		file	"ide:Resources/Start Center/samples/sample_3/images/icons/snowflake.png"
		file	"ide:Resources/Start Center/samples/sample_3/images/icons/socket.png"
		file	"ide:Resources/Start Center/samples/sample_3/images/icons/sound-on.png"
		file	"ide:Resources/Start Center/samples/sample_3/images/icons/south-east.png"
		file	"ide:Resources/Start Center/samples/sample_3/images/icons/south.png"
		file	"ide:Resources/Start Center/samples/sample_3/images/icons/speech.png"
		file	"ide:Resources/Start Center/samples/sample_3/images/icons/star.png"
		file	"ide:Resources/Start Center/samples/sample_3/images/icons/stopwatch.png"
		file	"ide:Resources/Start Center/samples/sample_3/images/icons/telephone.png"
		file	"ide:Resources/Start Center/samples/sample_3/images/icons/trophy.png"
		file	"ide:Resources/Start Center/samples/sample_3/images/icons/tv.png"
		file	"ide:Resources/Start Center/samples/sample_3/images/icons/twitter.png"
		file	"ide:Resources/Start Center/samples/sample_3/images/icons/umbrella.png"
		file	"ide:Resources/Start Center/samples/sample_3/images/icons/usb.png"
		file	"ide:Resources/Start Center/samples/sample_3/images/icons/van.png"
		file	"ide:Resources/Start Center/samples/sample_3/images/icons/wallet.png"
		file	"ide:Resources/Start Center/samples/sample_3/images/icons/waterdroplet.png"
		file	"ide:Resources/Start Center/samples/sample_3/images/icons/west.png"
		file	"ide:Resources/Start Center/samples/sample_3/images/icons/zoom-in.png"
		file	"ide:Resources/Start Center/samples/sample_3/images/icons/zoom-out.png"
	into "[[SupportFolder]]/Resources/Start Center/samples/sample_3/images/splash-screens" place
		file	"ide:Resources/Start Center/samples/sample_3/images/splash-screens/splash-iphone.png"
		file	"ide:Resources/Start Center/samples/sample_3/images/splash-screens/splash-iphone-5.png"
		file	"ide:Resources/Start Center/samples/sample_3/images/splash-screens/splash-iphone-retina.png"

component Documentation
	into [[ToolsFolder]]/Documentation place
		file "ide:Documentation/SearchEngineStandardUrls.txt"
	into [[ToolsFolder]]/Documentation/rev place
		file "ide:Documentation/rev/Color Names Reference.rev"
		file "ide:Documentation/rev/Database Types Reference.rev"
		file "ide:Documentation/rev/Emacs Key Bindings Referenc.rev"
		file "ide:Documentation/rev/Image Types Reference.rev"
		file "ide:Documentation/rev/Memory and Limits Reference.rev"
		file "ide:Documentation/rev/Operator Precedence Referen.rev"
		file "ide:Documentation/rev/projects.rev"
		file "ide:Documentation/rev/Regular Expressions Syntax.rev"
		file "ide:Documentation/rev/scripts.rev"
		file "ide:Documentation/rev/Shortcut Reference.rev"
		file "ide:Documentation/rev/Supported Platforms Referen.rev"
		file "ide:Documentation/rev/videos.rev"

	into [[ToolsFolder]]/Documentation place
		rfolder "repo:docs/guides"
		rfolder "ide:Documentation/guides"
		rfolder "docs:guides"
	
	into [[ToolsFolder]]/Documentation/html_viewer place
		file "ide:Documentation/html_viewer/api.html.template"
		file "ide:Documentation/html_viewer/guide.html.template"
		rfolder "ide:Documentation/html_viewer/css"
		rfolder "ide:Documentation/html_viewer/fonts"
		rfolder "ide:Documentation/html_viewer/js"

	into [[ToolsFolder]]/Documentation/html_viewer/resources place
		rfolder "ide:Documentation/html_viewer/resources/media"

	into [[ToolsFolder]]/Documentation/html_viewer/resources/data place
		rfolder "ide:Documentation/html_viewer/resources/data/api"
		rfolder "ide:Documentation/html_viewer/resources/data/api_livecode_script"
		rfolder "ide:Documentation/html_viewer/resources/data/api_livecode_builder"				
		rfolder "ide:Documentation/html_viewer/resources/data/guide"
	
	into [[ToolsFolder]]/Documentation/pdf place
		file "repo:LiveCodeUserGuide-[[EscapedVersionTag]].pdf" as "LiveCode User Guide.pdf"

component Extensions
	into [[ToolsFolder]]/Extensions place
		rfolder macosx:packaged_extensions/com.livecode.widget.native.mac.button
	into [[ToolsFolder]]/Extensions place
		rfolder macosx:packaged_extensions/com.livecode.widget.native.mac.textfield
	into [[ToolsFolder]]/Extensions place
		rfolder macosx:packaged_extensions/com.livecode.widget.native.android.button
	into [[ToolsFolder]]/Extensions place
		rfolder macosx:packaged_extensions/com.livecode.widget.native.android.field
	into [[ToolsFolder]]/Extensions place
		rfolder macosx:packaged_extensions/com.livecode.widget.native.ios.button
	into [[ToolsFolder]]/Extensions place
		rfolder macosx:packaged_extensions/com.livecode.widget.native.emscripten.button
	into [[ToolsFolder]]/Extensions place
		rfolder macosx:packaged_extensions/com.livecode.widget.browser
	into [[ToolsFolder]]/Extensions place
		rfolder macosx:packaged_extensions/com.livecode.widget.clock
	into [[ToolsFolder]]/Extensions place
		rfolder macosx:packaged_extensions/com.livecode.widget.colorswatch
	into [[ToolsFolder]]/Extensions place
		rfolder macosx:packaged_extensions/com.livecode.widget.gradientrampeditor
	into [[ToolsFolder]]/Extensions place
		rfolder macosx:packaged_extensions/com.livecode.widget.linegraph
	into [[ToolsFolder]]/Extensions place
		rfolder macosx:packaged_extensions/com.livecode.widget.headerbar
	into [[ToolsFolder]]/Extensions place
		rfolder macosx:packaged_extensions/com.livecode.widget.iconpicker
	into [[ToolsFolder]]/Extensions place
		rfolder macosx:packaged_extensions/com.livecode.library.androidbgaudio
	into [[ToolsFolder]]/Extensions place
		rfolder macosx:packaged_extensions/com.livecode.library.androidaudiorecorder
	into [[ToolsFolder]]/Extensions place
		rfolder macosx:packaged_extensions/com.livecode.library.androidutils
	into [[ToolsFolder]]/Extensions place
		rfolder macosx:packaged_extensions/com.livecode.library.iconsvg
	into [[ToolsFolder]]/Extensions place
		rfolder macosx:packaged_extensions/com.livecode.library.json
	into [[ToolsFolder]]/Extensions place
		rfolder macosx:packaged_extensions/com.livecode.widget.navbar
	into [[ToolsFolder]]/Extensions place
		rfolder macosx:packaged_extensions/com.livecode.widget.paletteactions
	into [[ToolsFolder]]/Extensions place
		rfolder macosx:packaged_extensions/com.livecode.widget.segmented
	into [[ToolsFolder]]/Extensions place
		rfolder macosx:packaged_extensions/com.livecode.widget.spinner
	into [[ToolsFolder]]/Extensions place
		rfolder macosx:packaged_extensions/com.livecode.widget.svgpath
	into [[ToolsFolder]]/Extensions place
		rfolder macosx:packaged_extensions/com.livecode.widget.switchbutton
	into [[ToolsFolder]]/Extensions place
		rfolder macosx:packaged_extensions/com.livecode.library.toast		
	into [[ToolsFolder]]/Extensions place
		rfolder macosx:packaged_extensions/com.livecode.widget.treeview
	into [[ToolsFolder]]/Extensions place
		rfolder macosx:packaged_extensions/com.livecode.library.widgetutils
	into [[ToolsFolder]]/Extensions place
		rfolder macosx:packaged_extensions/com.livecode.widget.tile
	into [[ToolsFolder]]/Extensions place
		rfolder macosx:packaged_extensions/com.livecode.library.scriptitems

	into [[ToolsFolder]]/Extensions place
		rfolder macosx:packaged_extensions/com.livecode.library.diff
	into [[ToolsFolder]]/Extensions place
		rfolder macosx:packaged_extensions/com.livecode.library.drawing
	into [[ToolsFolder]]/Extensions place
		rfolder macosx:packaged_extensions/com.livecode.library.dropbox
	into [[ToolsFolder]]/Extensions place
		rfolder macosx:packaged_extensions/com.livecode.library.extension-utils		
	into [[ToolsFolder]]/Extensions place
		rfolder macosx:packaged_extensions/com.livecode.library.getopt
	into [[ToolsFolder]]/Extensions place
		rfolder macosx:packaged_extensions/com.livecode.library.httpd
	into [[ToolsFolder]]/Extensions place
		rfolder macosx:packaged_extensions/com.livecode.library.messageauthentication
	into [[ToolsFolder]]/Extensions place
		rfolder macosx:packaged_extensions/com.livecode.library.mime
	into [[ToolsFolder]]/Extensions place
		rfolder macosx:packaged_extensions/com.livecode.library.oauth2
	into [[ToolsFolder]]/Extensions place
		rfolder macosx:packaged_extensions/com.livecode.library.qr
	into [[ToolsFolder]]/Extensions place
		rfolder macosx:packaged_extensions/com.livecode.library.objectrepository

	include TimeZone

component Toolchain.MacOSX
	into [[ToolsFolder]]/Toolchain place
		executable macosx:lc-compile as lc-compile
		executable macosx:lc-run as lc-run
		executable macosx:lc-compile-ffi-java as lc-compile-ffi-java
		rfolder macosx:modules

component Toolchain.Windows
	into [[ToolsFolder]]/Toolchain place
		executable windows:lc-compile.exe as lc-compile.exe
		executable windows:lc-run.exe as lc-run.exe
		executable windows:lc-compile-ffi-java.exe as lc-compile-ffi-java.exe
		rfolder windows:modules

component Toolchain.Linux
	into [[ToolsFolder]]/Toolchain place
		executable linux-[[TargetArchitecture]]:lc-compile as lc-compile
		executable linux-[[TargetArchitecture]]:lc-run as lc-run
		executable linux-[[TargetArchitecture]]:lc-compile-ffi-java as lc-compile-ffi-java
		rfolder linux-[[TargetArchitecture]]:modules

////////////////////////////////////////////////////////////////////////////////

component Engine.Linux
	into [[TargetFolder]] place
		executable linux-[[TargetArchitecture]]:LiveCode[[EditionTagUpper]] as [[ProductName]].[[TargetArchitecture]]
		executable linux-[[TargetArchitecture]]:revpdfprinter.so
		executable linux-[[TargetArchitecture]]:revsecurity.so

component Mobile.Linux
	into "[[ToolsFolder]]/Externals" place
		executable linux-[[TargetArchitecture]]:revandroid.so

//////////

component Engine.Windows
	into [[TargetFolder]] place
		executable windows:LiveCode[[EditionTagUpper]].exe as [[ProductName]].exe
		executable windows:revpdfprinter.dll
		executable windows:revsecurity.dll

component Mobile.Windows
	into "[[ToolsFolder]]/Externals" place
		executable windows:revandroid.dll

//////////

component Mobile.MacOSX
	into "[[ToolsFolder]]/Resources/Mobile Examples" place
		file "ide:Resources/Mobile Examples/Browser Example.livecode"
		file "ide:Resources/Mobile Examples/Orientation Example.livecode"
		file "ide:Resources/Mobile Examples/Scroller Example.livecode"
		file "ide:Resources/Mobile Examples/Sound Example.livecode"
	into "[[ToolsFolder]]/Resources/Mobile Examples/Images" place
		file "ide:Resources/Mobile Examples/Images/Hills.jpg"
		file "ide:Resources/Mobile Examples/Images/Lillies.jpg"
		file "ide:Resources/Mobile Examples/Images/Sunset.jpg"
		file "ide:Resources/Mobile Examples/Images/Winter.jpg"
	into "[[ToolsFolder]]/Resources/Mobile Examples/Sounds" place
		file "ide:Resources/Mobile Examples/Sounds/Brook.mp3"
		file "ide:Resources/Mobile Examples/Sounds/Clap.mp3"
		file "ide:Resources/Mobile Examples/Sounds/Ocean.mp3"
		file "ide:Resources/Mobile Examples/Sounds/Ping.mp3"
		file "ide:Resources/Mobile Examples/Sounds/Pop.mp3"
		file "ide:Resources/Mobile Examples/Sounds/Rattle.mp3"
		file "ide:Resources/Mobile Examples/Sounds/Stream.mp3"
	into "[[ToolsFolder]]/Externals" place
		executable macosx:reviphone.bundle
		executable macosx:revandroid.bundle

component Engine.MacOSX
	executable macosx:LiveCode[[EditionTagUpper]].app as "[[TargetFolder]]"
	executable macosx:revpdfprinter.bundle as "[[TargetFolder]]/Contents/MacOS/revpdfprinter.bundle"
	executable macosx:revsecurity.dylib as "[[TargetFolder]]/Contents/MacOS/revsecurity.dylib"

////////////////////////////////////////////////////////////////////////////////

component Runtime.Linux
	into [[TargetFolder]] place
		executable linux-[[TargetArchitecture]]:standalone[[BaseEditionTagLower]] as Standalone
	into [[TargetFolder]]/Support place
		executable linux-[[TargetArchitecture]]:revpdfprinter.so
		executable linux-[[TargetArchitecture]]:revsecurity.so

//////////

component Runtime.Windows
	into [[TargetFolder]] place
		executable windows:standalone[[BaseEditionTagLower]].exe as Standalone
		file "windows:w32-manifest-template.xml"
		file "windows:w32-manifest-template-dpiaware.xml"
		file "windows:w32-manifest-template-trustinfo.xml"
	into [[TargetFolder]]/Support place
		executable windows:revpdfprinter.dll
		executable windows:revsecurity.dll
	into "[[TargetFolder]]/Support/Sample Icons" place
		file "ide:Resources/Sample Icons/genericapp.ico"
		file "ide:Resources/Sample Icons/genericdoc.ico"

//////////

component Runtime.MacOSX
	into [[TargetFolder]] place
		executable macosx:Standalone[[BaseEditionTagUpper]].app as Standalone.app
	into [[TargetFolder]]/Support place
		executable macosx:revpdfprinter.bundle
		executable macosx:revsecurity.dylib
//////////

component Runtime.Emscripten
	into "[[ToolsFolder]]/Runtime/Emscripten/js" place
		file emscripten:standalone[[BaseEditionTagLower]]-[[VersionTag]].html
		file emscripten:standalone[[BaseEditionTagLower]]-[[VersionTag]].html.mem
		file emscripten:standalone[[BaseEditionTagLower]]-[[VersionTag]].js
		file emscripten:emscripten-startup-template.livecodescript
		rfolder emscripten:emscripten-standalone-template

//////////

component Runtime.Android
	into "[[ToolsFolder]]/Runtime/Android" place
		file android:Classes[[BaseEditionTagUpper]] as Classes
		file android:Manifest.xml
		file android:livecode_inputcontrol.xml
		file android:notify_icon.png
		file android:nfc_tech_filter.xml
		file android:file_provider_paths.xml
		executable android:Standalone[[BaseEditionTagUpper]] as Standalone
		executable android:RevZip
		executable android:RevXml
		executable android:RevDb
		executable android:DbSqlite
		executable android:DbMysql
		executable android:RevSecurity

//////////

component Runtime.iOS
	into "[[ToolsFolder]]/Runtime/iOS/Simulator-8_2" place
		executable ios:iphonesimulator8.2/standalone-mobile[[BaseEditionTagLower]].ios-engine as Standalone
		executable ios:iphonesimulator8.2/revsecurity.ios-extension as RevSecurity
		executable ios:iphonesimulator8.2/revpdfprinter.ios-extension as RevPdfPrinter
		executable ios:iphonesimulator8.2/revzip.ios-extension as RevZip
		executable ios:iphonesimulator8.2/revxml.ios-extension as RevXml
		executable ios:iphonesimulator8.2/revdb.ios-extension as RevDb
		executable ios:iphonesimulator8.2/dbsqlite.ios-extension as DbSqlite
		executable ios:iphonesimulator8.2/dbmysql.ios-extension as DbMysql
		file ios:iphonesimulator8.2/mobile-template.plist as "Settings.plist"
		file ios:iphonesimulator8.2/mobile-remote-notification-template.plist as "RemoteNotificationSettings.plist"
		file ios:iphonesimulator8.2/mobile-url-scheme-template.plist as "URLSchemeSettings.plist"
		file ios:iphonesimulator8.2/mobile-splashscreen-template.plist as "SplashscreenSettings.plist"
		file ios:iphonesimulator8.2/mobile-disable-ats-template.plist as "DisableATS.plist"
		file ios:iphonesimulator8.2/Default-568h@2x.png as "Default4InchSplash.png" base ios:Default-568h@2x.png
		file ios:iphonesimulator8.2/fontmap as "fontmap"
	into "[[ToolsFolder]]/Runtime/iOS/Simulator-9_2" place
		executable ios:iphonesimulator9.2/standalone-mobile[[BaseEditionTagLower]].ios-engine as Standalone base ios:iphonesimulator8.2/standalone-mobile[[BaseEditionTagLower]].app/standalone-mobile[[BaseEditionTagLower]]
		executable ios:iphonesimulator9.2/revsecurity.ios-extension as RevSecurity base ios:iphonesimulator8.2/revsecurity.dylib
		executable ios:iphonesimulator9.2/revpdfprinter.ios-extension as RevPdfPrinter base ios:iphonesimulator8.2/revpdfprinter.dylib
		executable ios:iphonesimulator9.2/revzip.ios-extension as RevZip base ios:iphonesimulator8.2/revzip.dylib
		executable ios:iphonesimulator9.2/revxml.ios-extension as RevXml base ios:iphonesimulator8.2/revxml.dylib
		executable ios:iphonesimulator9.2/revdb.ios-extension as RevDb base ios:iphonesimulator8.2/revdb.dylib
		executable ios:iphonesimulator9.2/dbsqlite.ios-extension as DbSqlite base ios:iphonesimulator8.2/dbsqlite.dylib
		executable ios:iphonesimulator9.2/dbmysql.ios-extension as DbMysql base ios:iphonesimulator8.2/dbmysql.dylib
		file ios:iphonesimulator9.2/mobile-template.plist as "Settings.plist"
		file ios:iphonesimulator9.2/mobile-remote-notification-template.plist as "RemoteNotificationSettings.plist"
		file ios:iphonesimulator9.2/mobile-url-scheme-template.plist as "URLSchemeSettings.plist"
		file ios:iphonesimulator9.2/mobile-splashscreen-template.plist as "SplashscreenSettings.plist"
		file ios:iphonesimulator9.2/mobile-disable-ats-template.plist as "DisableATS.plist"
		file ios:iphonesimulator9.2/Default-568h@2x.png as "Default4InchSplash.png" base ios:Default-568h@2x.png
		file ios:iphonesimulator9.2/fontmap as "fontmap"
	into "[[ToolsFolder]]/Runtime/iOS/Simulator-10_2" place
		executable ios:iphonesimulator10.2/standalone-mobile[[BaseEditionTagLower]].ios-engine as Standalone base ios:iphonesimulator8.2/standalone-mobile[[BaseEditionTagLower]].app/standalone-mobile[[BaseEditionTagLower]]
		executable ios:iphonesimulator10.2/revsecurity.ios-extension as RevSecurity base ios:iphonesimulator8.2/revsecurity.dylib
		executable ios:iphonesimulator10.2/revpdfprinter.ios-extension as RevPdfPrinter base ios:iphonesimulator8.2/revpdfprinter.dylib
		executable ios:iphonesimulator10.2/revzip.ios-extension as RevZip base ios:iphonesimulator8.2/revzip.dylib
		executable ios:iphonesimulator10.2/revxml.ios-extension as RevXml base ios:iphonesimulator8.2/revxml.dylib
		executable ios:iphonesimulator10.2/revdb.ios-extension as RevDb base ios:iphonesimulator8.2/revdb.dylib
		executable ios:iphonesimulator10.2/dbsqlite.ios-extension as DbSqlite base ios:iphonesimulator8.2/dbsqlite.dylib
		executable ios:iphonesimulator10.2/dbmysql.ios-extension as DbMysql base ios:iphonesimulator8.2/dbmysql.dylib
		file ios:iphonesimulator10.2/mobile-template.plist as "Settings.plist"
		file ios:iphonesimulator10.2/mobile-remote-notification-template.plist as "RemoteNotificationSettings.plist"
		file ios:iphonesimulator10.2/mobile-url-scheme-template.plist as "URLSchemeSettings.plist"
		file ios:iphonesimulator10.2/mobile-splashscreen-template.plist as "SplashscreenSettings.plist"
		file ios:iphonesimulator10.2/mobile-disable-ats-template.plist as "DisableATS.plist"
		file ios:iphonesimulator10.2/Default-568h@2x.png as "Default4InchSplash.png" base ios:Default-568h@2x.png
		file ios:iphonesimulator10.2/fontmap as "fontmap"
	into "[[ToolsFolder]]/Runtime/iOS/Simulator-11_2" place
		executable ios:iphonesimulator11.2/standalone-mobile[[BaseEditionTagLower]].ios-engine as Standalone base ios:iphonesimulator8.2/standalone-mobile[[BaseEditionTagLower]].app/standalone-mobile[[BaseEditionTagLower]]
		executable ios:iphonesimulator11.2/revsecurity.ios-extension as RevSecurity base ios:iphonesimulator8.2/revsecurity.dylib
		executable ios:iphonesimulator11.2/revpdfprinter.ios-extension as RevPdfPrinter base ios:iphonesimulator8.2/revpdfprinter.dylib
		executable ios:iphonesimulator11.2/revzip.ios-extension as RevZip base ios:iphonesimulator8.2/revzip.dylib
		executable ios:iphonesimulator11.2/revxml.ios-extension as RevXml base ios:iphonesimulator8.2/revxml.dylib
		executable ios:iphonesimulator11.2/revdb.ios-extension as RevDb base ios:iphonesimulator8.2/revdb.dylib
		executable ios:iphonesimulator11.2/dbsqlite.ios-extension as DbSqlite base ios:iphonesimulator8.2/dbsqlite.dylib
		executable ios:iphonesimulator11.2/dbmysql.ios-extension as DbMysql base ios:iphonesimulator8.2/dbmysql.dylib
		file ios:iphonesimulator11.2/mobile-template.plist as "Settings.plist"
		file ios:iphonesimulator11.2/mobile-remote-notification-template.plist as "RemoteNotificationSettings.plist"
		file ios:iphonesimulator11.2/mobile-url-scheme-template.plist as "URLSchemeSettings.plist"
		file ios:iphonesimulator11.2/mobile-splashscreen-template.plist as "SplashscreenSettings.plist"
		file ios:iphonesimulator11.2/mobile-disable-ats-template.plist as "DisableATS.plist"
		file ios:iphonesimulator11.2/Default-568h@2x.png as "Default4InchSplash.png" base ios:Default-568h@2x.png
		file ios:iphonesimulator11.2/fontmap as "fontmap"
	into "[[ToolsFolder]]/Runtime/iOS/Simulator-12_1" place
		executable ios:iphonesimulator12.1/standalone-mobile[[BaseEditionTagLower]].ios-engine as Standalone base ios:iphonesimulator8.2/standalone-mobile[[BaseEditionTagLower]].app/standalone-mobile[[BaseEditionTagLower]]
		executable ios:iphonesimulator12.1/revsecurity.ios-extension as RevSecurity base ios:iphonesimulator8.2/revsecurity.dylib
		executable ios:iphonesimulator12.1/revpdfprinter.ios-extension as RevPdfPrinter base ios:iphonesimulator8.2/revpdfprinter.dylib
		executable ios:iphonesimulator12.1/revzip.ios-extension as RevZip base ios:iphonesimulator8.2/revzip.dylib
		executable ios:iphonesimulator12.1/revxml.ios-extension as RevXml base ios:iphonesimulator8.2/revxml.dylib
		executable ios:iphonesimulator12.1/revdb.ios-extension as RevDb base ios:iphonesimulator8.2/revdb.dylib
		executable ios:iphonesimulator12.1/dbsqlite.ios-extension as DbSqlite base ios:iphonesimulator8.2/dbsqlite.dylib
		executable ios:iphonesimulator12.1/dbmysql.ios-extension as DbMysql base ios:iphonesimulator8.2/dbmysql.dylib
		file ios:iphonesimulator12.1/mobile-template.plist as "Settings.plist"
		file ios:iphonesimulator12.1/mobile-remote-notification-template.plist as "RemoteNotificationSettings.plist"
		file ios:iphonesimulator12.1/mobile-url-scheme-template.plist as "URLSchemeSettings.plist"
		file ios:iphonesimulator12.1/mobile-splashscreen-template.plist as "SplashscreenSettings.plist"
		file ios:iphonesimulator12.1/mobile-disable-ats-template.plist as "DisableATS.plist"
		file ios:iphonesimulator12.1/Default-568h@2x.png as "Default4InchSplash.png" base ios:Default-568h@2x.png
		file ios:iphonesimulator12.1/fontmap as "fontmap"
	into "[[ToolsFolder]]/Runtime/iOS/Device-9_2" place
		executable ios:iphoneos9.2/standalone-mobile[[BaseEditionTagLower]].ios-engine as Standalone
		executable ios:iphoneos9.2/revsecurity.ios-extension as RevSecurity
		executable ios:iphoneos9.2/revpdfprinter.ios-extension as RevPdfPrinter
		executable ios:iphoneos9.2/revzip.ios-extension as RevZip
		executable ios:iphoneos9.2/revxml.ios-extension as RevXml
		executable ios:iphoneos9.2/revdb.ios-extension as RevDb
		executable ios:iphoneos9.2/dbsqlite.ios-extension as DbSqlite
		executable ios:iphoneos9.2/dbmysql.ios-extension as DbMysql
		file ios:iphoneos9.2/mobile-device-template.plist as "Settings.plist"
		file ios:iphoneos9.2/mobile-remote-notification-template.plist as "RemoteNotificationSettings.plist"
		file ios:iphoneos9.2/mobile-url-scheme-template.plist as "URLSchemeSettings.plist"
		file ios:iphoneos9.2/mobile-splashscreen-template.plist as "SplashscreenSettings.plist"
		file ios:iphoneos9.2/template-entitlements.xcent as "Entitlements.xcent"
		file ios:iphoneos9.2/template-beta-report-entitlement.xcent as "BetaReportEntitlement.xcent"
		file ios:iphoneos9.2/template-remote-notification-entitlements.xcent as "RemoteNotificationEntitlements.xcent"
		file ios:iphoneos9.2/template-remote-notification-store-entitlements.xcent as "RemoteNotificationStoreEntitlements.xcent"
		file ios:iphoneos9.2/mobile-disable-ats-template.plist as "DisableATS.plist"
		file ios:iphoneos9.2/Default-568h@2x.png as "Default4InchSplash.png" base ios:Default-568h@2x.png
		file ios:iphoneos9.2/fontmap as "fontmap"
	into "[[ToolsFolder]]/Runtime/iOS/Device-10_2" place
		executable ios:iphoneos10.2/standalone-mobile[[BaseEditionTagLower]].ios-engine as Standalone base ios:iphoneos9.2/standalone-mobile[[BaseEditionTagLower]].ios-engine
		executable ios:iphoneos10.2/revsecurity.ios-extension as RevSecurity base ios:iphoneos9.2/revsecurity.ios-extension
		executable ios:iphoneos10.2/revpdfprinter.ios-extension as RevPdfPrinter base ios:iphoneos9.2/revpdfprinter.ios-extension
		executable ios:iphoneos10.2/revzip.ios-extension as RevZip base ios:iphoneos9.2/revzip.ios-extension
		executable ios:iphoneos10.2/revxml.ios-extension as RevXml base ios:iphoneos9.2/revxml.ios-extension
		executable ios:iphoneos10.2/revdb.ios-extension as RevDb base ios:iphoneos9.2/revdb.ios-extension
		executable ios:iphoneos10.2/dbsqlite.ios-extension as DbSqlite base ios:iphoneos9.2/dbsqlite.ios-extension
		executable ios:iphoneos10.2/dbmysql.ios-extension as DbMysql base ios:iphoneos9.2/dbmysql.ios-extension
		file ios:iphoneos10.2/mobile-device-template.plist as "Settings.plist"
		file ios:iphoneos10.2/mobile-remote-notification-template.plist as "RemoteNotificationSettings.plist"
		file ios:iphoneos10.2/mobile-url-scheme-template.plist as "URLSchemeSettings.plist"
		file ios:iphoneos10.2/mobile-splashscreen-template.plist as "SplashscreenSettings.plist"
		file ios:iphoneos10.2/template-entitlements.xcent as "Entitlements.xcent"
		file ios:iphoneos10.2/template-beta-report-entitlement.xcent as "BetaReportEntitlement.xcent"
		file ios:iphoneos10.2/template-remote-notification-entitlements.xcent as "RemoteNotificationEntitlements.xcent"
		file ios:iphoneos10.2/template-remote-notification-store-entitlements.xcent as "RemoteNotificationStoreEntitlements.xcent"
		file ios:iphoneos10.2/mobile-disable-ats-template.plist as "DisableATS.plist"
		file ios:iphoneos10.2/Default-568h@2x.png as "Default4InchSplash.png" base ios:Default-568h@2x.png
		file ios:iphoneos10.2/fontmap as "fontmap"
	into "[[ToolsFolder]]/Runtime/iOS/Device-11_2" place
		executable ios:iphoneos11.2/standalone-mobile[[BaseEditionTagLower]].ios-engine as Standalone base ios:iphoneos9.2/standalone-mobile[[BaseEditionTagLower]].ios-engine
		executable ios:iphoneos11.2/revsecurity.ios-extension as RevSecurity base ios:iphoneos9.2/revsecurity.ios-extension
		executable ios:iphoneos11.2/revpdfprinter.ios-extension as RevPdfPrinter base ios:iphoneos9.2/revpdfprinter.ios-extension
		executable ios:iphoneos11.2/revzip.ios-extension as RevZip base ios:iphoneos9.2/revzip.ios-extension
		executable ios:iphoneos11.2/revxml.ios-extension as RevXml base ios:iphoneos9.2/revxml.ios-extension
		executable ios:iphoneos11.2/revdb.ios-extension as RevDb base ios:iphoneos9.2/revdb.ios-extension
		executable ios:iphoneos11.2/dbsqlite.ios-extension as DbSqlite base ios:iphoneos9.2/dbsqlite.ios-extension
		executable ios:iphoneos11.2/dbmysql.ios-extension as DbMysql base ios:iphoneos9.2/dbmysql.ios-extension
		file ios:iphoneos11.2/mobile-device-template.plist as "Settings.plist"
		file ios:iphoneos11.2/mobile-remote-notification-template.plist as "RemoteNotificationSettings.plist"
		file ios:iphoneos11.2/mobile-url-scheme-template.plist as "URLSchemeSettings.plist"
		file ios:iphoneos11.2/mobile-splashscreen-template.plist as "SplashscreenSettings.plist"
		file ios:iphoneos11.2/template-entitlements.xcent as "Entitlements.xcent"
		file ios:iphoneos11.2/template-beta-report-entitlement.xcent as "BetaReportEntitlement.xcent"
		file ios:iphoneos11.2/template-remote-notification-entitlements.xcent as "RemoteNotificationEntitlements.xcent"
		file ios:iphoneos11.2/template-remote-notification-store-entitlements.xcent as "RemoteNotificationStoreEntitlements.xcent"
		file ios:iphoneos11.2/mobile-disable-ats-template.plist as "DisableATS.plist"
		file ios:iphoneos11.2/Default-568h@2x.png as "Default4InchSplash.png" base ios:Default-568h@2x.png
		file ios:iphoneos11.2/fontmap as "fontmap"
	into "[[ToolsFolder]]/Runtime/iOS/Device-12_1" place
		executable ios:iphoneos12.1/standalone-mobile[[BaseEditionTagLower]].ios-engine as Standalone base ios:iphoneos9.2/standalone-mobile[[BaseEditionTagLower]].ios-engine
		executable ios:iphoneos12.1/revsecurity.ios-extension as RevSecurity base ios:iphoneos9.2/revsecurity.ios-extension
		executable ios:iphoneos12.1/revpdfprinter.ios-extension as RevPdfPrinter base ios:iphoneos9.2/revpdfprinter.ios-extension
		executable ios:iphoneos12.1/revzip.ios-extension as RevZip base ios:iphoneos9.2/revzip.ios-extension
		executable ios:iphoneos12.1/revxml.ios-extension as RevXml base ios:iphoneos9.2/revxml.ios-extension
		executable ios:iphoneos12.1/revdb.ios-extension as RevDb base ios:iphoneos9.2/revdb.ios-extension
		executable ios:iphoneos12.1/dbsqlite.ios-extension as DbSqlite base ios:iphoneos9.2/dbsqlite.ios-extension
		executable ios:iphoneos12.1/dbmysql.ios-extension as DbMysql base ios:iphoneos9.2/dbmysql.ios-extension
		file ios:iphoneos12.1/mobile-device-template.plist as "Settings.plist"
		file ios:iphoneos12.1/mobile-remote-notification-template.plist as "RemoteNotificationSettings.plist"
		file ios:iphoneos12.1/mobile-url-scheme-template.plist as "URLSchemeSettings.plist"
		file ios:iphoneos12.1/mobile-splashscreen-template.plist as "SplashscreenSettings.plist"
		file ios:iphoneos12.1/template-entitlements.xcent as "Entitlements.xcent"
		file ios:iphoneos12.1/template-beta-report-entitlement.xcent as "BetaReportEntitlement.xcent"
		file ios:iphoneos12.1/template-remote-notification-entitlements.xcent as "RemoteNotificationEntitlements.xcent"
		file ios:iphoneos12.1/template-remote-notification-store-entitlements.xcent as "RemoteNotificationStoreEntitlements.xcent"
		file ios:iphoneos12.1/mobile-disable-ats-template.plist as "DisableATS.plist"
		file ios:iphoneos12.1/Default-568h@2x.png as "Default4InchSplash.png" base ios:Default-568h@2x.png
		file ios:iphoneos12.1/fontmap as "fontmap"

////////////////////////////////////////////////////////////////////////////////

component Externals.Linux
	into [[TargetFolder]]/Externals place
		executable linux-[[TargetArchitecture]]:revxml.so
		executable linux-[[TargetArchitecture]]:revzip.so
		executable linux-[[TargetArchitecture]]:revbrowser.so
	declare external "XML" using revxml.so
	declare external "Revolution Zip" using revzip.so
	declare external "Browser" using revbrowser.so

//////////

component Externals.Windows
	into [[TargetFolder]]/Externals place
		executable windows:revspeech.dll
		executable windows:revxml.dll
		executable windows:revbrowser.dll
		executable windows:revzip.dll
	declare external "Speech" using revspeech.dll
	declare external "XML" using revxml.dll
	declare external "Browser" using revbrowser.dll
	declare external "Revolution Zip" using revzip.dll

//////////

component Externals.MacOSX
	into [[TargetFolder]]/Externals place
		executable macosx:revspeech.bundle
		executable macosx:revxml.bundle
		executable macosx:revbrowser.bundle
		executable macosx:revzip.bundle
	declare external "Speech" using revspeech.bundle
	declare external "XML" using revxml.bundle
	declare external "Browser" using revbrowser.bundle
	declare external "Revolution Zip" using revzip.bundle

//////////

component Externals.CEF.Linux
	into [[TargetFolder]]/Externals/CEF place
		executable linux-[[TargetArchitecture]]:Externals/CEF/libcef.so
		rfolder linux-[[TargetArchitecture]]:Externals/CEF/locales
		file linux-[[TargetArchitecture]]:Externals/CEF/cef.pak
		file linux-[[TargetArchitecture]]:Externals/CEF/cef_100_percent.pak
		file linux-[[TargetArchitecture]]:Externals/CEF/cef_200_percent.pak
		file linux-[[TargetArchitecture]]:Externals/CEF/cef_extensions.pak

	// Horrible workaround for a libCEF bug
	into [[TargetFolder]] place
		file linux-[[TargetArchitecture]]:icudtl.dat
		file linux-[[TargetArchitecture]]:natives_blob.bin
		file linux-[[TargetArchitecture]]:snapshot_blob.bin
		file linux-[[TargetArchitecture]]:v8_context_snapshot.bin
		executable linux-[[TargetArchitecture]]:revbrowser-cefprocess
		executable linux-[[TargetArchitecture]]:libbrowser-cefprocess

component Externals.CEF.Windows
	into [[TargetFolder]]/Externals/CEF place
		executable windows:libbrowser-cefprocess.exe
		executable windows:revbrowser-cefprocess.exe
		executable windows:Externals/CEF/libcef.dll
		executable windows:Externals/CEF/d3dcompiler_43.dll
		executable windows:Externals/CEF/d3dcompiler_47.dll
		executable windows:Externals/CEF/libEGL.dll
		executable windows:Externals/CEF/libGLESv2.dll
		executable windows:Externals/CEF/chrome_elf.dll
		rfolder windows:Externals/CEF/locales
		file windows:Externals/CEF/cef.pak
		file windows:Externals/CEF/cef_100_percent.pak
		file windows:Externals/CEF/cef_200_percent.pak
		file windows:Externals/CEF/cef_extensions.pak
		file windows:Externals/CEF/icudtl.dat
		file windows:Externals/CEF/natives_blob.bin
		file windows:Externals/CEF/snapshot_blob.bin
		file windows:Externals/CEF/v8_context_snapshot.bin
	into [[TargetFolder]]/Externals/CEF/swiftshader place
		executable windows:Externals/CEF/swiftshader/libEGL.dll
		executable windows:Externals/CEF/swiftshader/libGLESv2.dll

////////////////////////////////////////////////////////////////////////////////

component Databases.Linux
	into "[[TargetFolder]]/Externals" place
		executable linux-[[TargetArchitecture]]:revdb.so
	into "[[TargetFolder]]/Externals/Database Drivers" place
		executable linux-[[TargetArchitecture]]:dbmysql.so
		executable linux-[[TargetArchitecture]]:dbodbc.so
		executable linux-[[TargetArchitecture]]:dbpostgresql.so
		executable linux-[[TargetArchitecture]]:dbsqlite.so
	declare external "Database" using revdb.so
	declare dbdriver "MySQL" using dbmysql.so
	declare dbdriver "ODBC" using dbodbc.so
	declare dbdriver "PostgreSQL" using dbpostgresql.so
	declare dbdriver "SqLite" using dbsqlite.so

//////////

component Databases.Windows
	into "[[TargetFolder]]/Externals" place
		executable windows:revdb.dll
	into "[[TargetFolder]]/Externals/Database Drivers" place
		executable windows:dbmysql.dll
		executable windows:dbodbc.dll
		executable windows:dbpostgresql.dll
		executable windows:dbsqlite.dll
	declare external "Database" using revdb.dll
	declare dbdriver "MySQL" using dbmysql.dll
	declare dbdriver "ODBC" using dbodbc.dll
	declare dbdriver "PostgreSQL" using dbpostgresql.dll
	declare dbdriver "SqLite" using dbsqlite.dll
	
//////////

component Databases.MacOSX
	into "[[TargetFolder]]/Externals" place
		executable macosx:revdb.bundle
	into "[[TargetFolder]]/Externals/Database Drivers" place
		executable macosx:dbmysql.bundle
		executable macosx:dbodbc.bundle
		executable macosx:dbpostgresql.bundle
		executable macosx:dbsqlite.bundle
	declare external "Database" using revdb.bundle
	declare dbdriver "MySQL" using dbmysql.bundle
	declare dbdriver "ODBC" using dbodbc.bundle
	declare dbdriver "PostgreSQL" using dbpostgresql.bundle
	declare dbdriver "SqLite" using dbsqlite.bundle

////////////////////////////////////////////////////////////////////////////////

component Toolset
	into [[ToolsFolder]] place
		rfolder ide:Toolset
	emit variable TargetEdition to "[[ToolsFolder]]/edition.txt"
	into [[ToolsFolder]]/Toolset/libraries place
		stack ide-support:revdeploylibraryandroid.livecodescript
		stack ide-support:revdeploylibraryios.livecodescript
		stack ide-support:revdeploylibraryemscripten.livecodescript
		stack ide-support:revliburl.livecodescript
		stack ide-support:revsaveasandroidstandalone.livecodescript
		stack ide-support:revsaveasemscriptenstandalone.livecodescript
		stack ide-support:revsaveasiosstandalone.livecodescript
		stack ide-support:revsaveasstandalone.livecodescript
		stack ide-support:revsblibrary.livecodescript
		stack ide-support:revhtml5urllibrary.livecodescript
		file ide-support:revdocsparser.livecodescript
		file ide-support:revliburl.livecodescript

////////////////////////////////////////////////////////////////////////////////

component TimeZone
	into [[ToolsFolder]]/Extensions place
		rfolder macosx:packaged_extensions/com.livecode.library.timezone
	into [[ToolsFolder]]/Extensions/com.livecode.library.timezone place
		rfolder android:packaged_extensions/com.livecode.library.timezone/code
	into [[ToolsFolder]]/Extensions/com.livecode.library.timezone place
		rfolder ios:iphonesimulator8.2/packaged_extensions/com.livecode.library.timezone/code
	into [[ToolsFolder]]/Extensions/com.livecode.library.timezone place
		rfolder ios:iphonesimulator9.2/packaged_extensions/com.livecode.library.timezone/code
	into [[ToolsFolder]]/Extensions/com.livecode.library.timezone place
		rfolder ios:iphonesimulator10.2/packaged_extensions/com.livecode.library.timezone/code
	into [[ToolsFolder]]/Extensions/com.livecode.library.timezone place
		rfolder ios:iphonesimulator11.2/packaged_extensions/com.livecode.library.timezone/code
	into [[ToolsFolder]]/Extensions/com.livecode.library.timezone place
		rfolder ios:iphonesimulator12.1/packaged_extensions/com.livecode.library.timezone/code
	into [[ToolsFolder]]/Extensions/com.livecode.library.timezone place
		rfolder ios:iphoneos9.2/packaged_extensions/com.livecode.library.timezone/code
	into [[ToolsFolder]]/Extensions/com.livecode.library.timezone place
		rfolder ios:iphoneos10.2/packaged_extensions/com.livecode.library.timezone/code
	into [[ToolsFolder]]/Extensions/com.livecode.library.timezone place
		rfolder ios:iphoneos11.2/packaged_extensions/com.livecode.library.timezone/code
	into [[ToolsFolder]]/Extensions/com.livecode.library.timezone place
		rfolder ios:iphoneos12.1/packaged_extensions/com.livecode.library.timezone/code
	into [[ToolsFolder]]/Extensions/com.livecode.library.timezone place
		rfolder windows:packaged_extensions/com.livecode.library.timezone/code
	into [[ToolsFolder]]/Extensions/com.livecode.library.timezone place
		rfolder linux-x86_64:packaged_extensions/com.livecode.library.timezone/code
	into [[ToolsFolder]]/Extensions/com.livecode.library.timezone place
		rfolder linux-x86:packaged_extensions/com.livecode.library.timezone/code
