Add initial Flash support
This commit is contained in:
42
templates/flash/haxe/ApplicationMain.hx
Normal file
42
templates/flash/haxe/ApplicationMain.hx
Normal file
@@ -0,0 +1,42 @@
|
||||
import ::APP_MAIN::;
|
||||
|
||||
|
||||
class ApplicationMain {
|
||||
|
||||
|
||||
private var app:lime.app.Application;
|
||||
|
||||
|
||||
public static function main () {
|
||||
|
||||
var app = new ::APP_MAIN:: ();
|
||||
|
||||
var config:lime.app.Config = {
|
||||
|
||||
antialiasing: Std.int (::WIN_ANTIALIASING::),
|
||||
borderless: ::WIN_BORDERLESS::,
|
||||
depthBuffer: ::WIN_DEPTH_BUFFER::,
|
||||
fps: Std.int (::WIN_FPS::),
|
||||
fullscreen: ::WIN_FULLSCREEN::,
|
||||
height: Std.int (::WIN_HEIGHT::),
|
||||
orientation: "::WIN_ORIENTATION::",
|
||||
resizable: ::WIN_RESIZABLE::,
|
||||
stencilBuffer: ::WIN_STENCIL_BUFFER::,
|
||||
title: "::APP_TITLE::",
|
||||
vsync: ::WIN_VSYNC::,
|
||||
width: Std.int (::WIN_WIDTH::),
|
||||
|
||||
}
|
||||
|
||||
app.create (config);
|
||||
|
||||
var result = app.exec ();
|
||||
|
||||
#if sys
|
||||
Sys.exit (result);
|
||||
#end
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
6
templates/flash/hxml/debug.hxml
Normal file
6
templates/flash/hxml/debug.hxml
Normal file
@@ -0,0 +1,6 @@
|
||||
-main ApplicationMain ::HAXE_FLAGS::
|
||||
-swf-version ::SWF_VERSION::
|
||||
-swf ::BUILD_DIR::/flash/bin/::APP_FILE::.swf
|
||||
-swf-header ::if (WIN_WIDTH == "0")::800::else::::WIN_WIDTH::::end:::::if (WIN_HEIGHT == "0")::500::else::::WIN_HEIGHT::::end:::::WIN_FPS:::::WIN_FLASHBACKGROUND::
|
||||
-cp ::BUILD_DIR::/flash/haxe
|
||||
-debug
|
||||
6
templates/flash/hxml/final.hxml
Normal file
6
templates/flash/hxml/final.hxml
Normal file
@@ -0,0 +1,6 @@
|
||||
-main ApplicationMain ::HAXE_FLAGS::
|
||||
-swf-version ::SWF_VERSION::
|
||||
-swf ::BUILD_DIR::/flash/bin/::APP_FILE::.swf
|
||||
-swf-header ::if (WIN_WIDTH == "0")::800::else::::WIN_WIDTH::::end:::::if (WIN_HEIGHT == "0")::500::else::::WIN_HEIGHT::::end:::::WIN_FPS:::::WIN_FLASHBACKGROUND::
|
||||
-cp ::BUILD_DIR::/flash/haxe
|
||||
-D final
|
||||
5
templates/flash/hxml/release.hxml
Normal file
5
templates/flash/hxml/release.hxml
Normal file
@@ -0,0 +1,5 @@
|
||||
-main ApplicationMain ::HAXE_FLAGS::
|
||||
-swf-version ::SWF_VERSION::
|
||||
-swf ::BUILD_DIR::/flash/bin/::APP_FILE::.swf
|
||||
-swf-header ::if (WIN_WIDTH == "0")::800::else::::WIN_WIDTH::::end:::::if (WIN_HEIGHT == "0")::500::else::::WIN_HEIGHT::::end:::::WIN_FPS:::::WIN_FLASHBACKGROUND::
|
||||
-cp ::BUILD_DIR::/flash/haxe
|
||||
59
templates/flash/templates/air/application.xml
Normal file
59
templates/flash/templates/air/application.xml
Normal file
@@ -0,0 +1,59 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<application xmlns="http://ns.adobe.com/air/application/3.3">
|
||||
<id>::APP_PACKAGE::</id>
|
||||
<versionNumber>::APP_VERSION::</versionNumber>
|
||||
<filename>::APP_FILE::</filename>
|
||||
<name>::APP_TITLE::</name>
|
||||
<description>::APP_DESCRIPTION::</description>
|
||||
<!-- <copyright>????</copyright> -->
|
||||
<initialWindow>
|
||||
<title>::APP_TITLE::</title>
|
||||
<content>::APP_FILE::.swf</content>
|
||||
<systemChrome>standard</systemChrome>
|
||||
<transparent>false</transparent>
|
||||
<visible>true</visible>
|
||||
<minimizable>true</minimizable>
|
||||
<maximizable>false</maximizable>
|
||||
<resizable>::WIN_RESIZABLE::</resizable>
|
||||
<!-- <width>::WIN_WIDTH::</width>
|
||||
<height>::WIN_HEIGHT::</height>
|
||||
<minSize>320 240</minSize>
|
||||
<maxSize>1280 960</maxSize> -->
|
||||
</initialWindow>
|
||||
<installFolder>::APP_COMPANY::/::APP_TITLE::</installFolder>
|
||||
<programMenuFolder>::APP_TITLE::</programMenuFolder>
|
||||
<!-- <icon>
|
||||
<image16x16>icon_16.png</image16x16>
|
||||
<image32x32>icon_32.png</image32x32>
|
||||
<image48x48>icon_48.png</image48x48>
|
||||
<image128x128>icon_128.png</image128x128>
|
||||
</icon> -->
|
||||
<customUpdateUI>false</customUpdateUI>
|
||||
<allowBrowserInvocation>false</allowBrowserInvocation>
|
||||
<!-- <fileTypes>
|
||||
<fileType>
|
||||
<name>adobe.VideoFile</name>
|
||||
<extension>avf</extension>
|
||||
<description>Adobe Video File</description>
|
||||
<contentType>application/vnd.adobe.video-file</contentType>
|
||||
<icon>
|
||||
<image16x16>icons/avfIcon_16.png</image16x16>
|
||||
<image32x32>icons/avfIcon_32.png</image32x32>
|
||||
<image48x48>icons/avfIcon_48.png</image48x48>
|
||||
<image128x128>icons/avfIcon_128.png</image128x128>
|
||||
</icon>
|
||||
</fileType>
|
||||
</fileTypes> -->
|
||||
<android>
|
||||
<manifestAdditions>
|
||||
<![CDATA[
|
||||
<manifest>
|
||||
<uses-permission android:name="android.permission.WAKE_LOCK" />
|
||||
<uses-permission android:name="android.permission.INTERNET" />
|
||||
<uses-permission android:name="android.permission.VIBRATE" />
|
||||
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
|
||||
</manifest>
|
||||
]]>
|
||||
</manifestAdditions>
|
||||
</android>
|
||||
</application>
|
||||
BIN
templates/flash/templates/chrome/expressInstall.swf
Normal file
BIN
templates/flash/templates/chrome/expressInstall.swf
Normal file
Binary file not shown.
28
templates/flash/templates/chrome/index.html
Normal file
28
templates/flash/templates/chrome/index.html
Normal file
@@ -0,0 +1,28 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
|
||||
<title>::APP_TITLE::</title>
|
||||
|
||||
<script type="text/javascript" src="swfobject.js"></script>
|
||||
<script type="text/javascript">
|
||||
|
||||
swfobject.embedSWF ("::APP_FILE::.swf", "nme-application", "::if (WIN_WIDTH == "0")::800::else::::WIN_WIDTH::::end::", "::if (WIN_HEIGHT == "0")::500::else::::WIN_HEIGHT::::end::", "::SWF_VERSION::", "expressInstall.swf", ::WIN_PARAMETERS::);
|
||||
</script>
|
||||
|
||||
<style>
|
||||
html, body, #nme-application { width:::if (WIN_WIDTH == "0")::100%::else::::WIN_WIDTH::px::end::; height:::if (WIN_HEIGHT == "0")::100%::else::::WIN_HEIGHT::px::end::; }
|
||||
body { margin:0; padding:0; overflow:hidden; }
|
||||
|
||||
</style>
|
||||
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<div id="nme-application"></div>
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
14
templates/flash/templates/chrome/manifest.json
Normal file
14
templates/flash/templates/chrome/manifest.json
Normal file
@@ -0,0 +1,14 @@
|
||||
{
|
||||
"name": "::APP_TITLE::",
|
||||
"description": "::APP_DESCRIPTION::",
|
||||
"version": "::APP_VERSION::",
|
||||
"app": {
|
||||
"launch": {
|
||||
"local_path": "index.html"
|
||||
}
|
||||
},
|
||||
"icons": {
|
||||
"16": "icon_16.png",
|
||||
"128": "icon_128.png"
|
||||
}
|
||||
}
|
||||
4
templates/flash/templates/chrome/swfobject.js
Normal file
4
templates/flash/templates/chrome/swfobject.js
Normal file
File diff suppressed because one or more lines are too long
21
templates/flash/templates/opera/config.xml
Normal file
21
templates/flash/templates/opera/config.xml
Normal file
@@ -0,0 +1,21 @@
|
||||
<widget defaultmode="application">
|
||||
<widgetname>::APP_TITLE::</widgetname>
|
||||
<description>::APP_DESCRIPTION::</description>
|
||||
<width>::if (WIN_WIDTH == "0")::800::else::::WIN_WIDTH::::end::</width>
|
||||
<height>::if (WIN_HEIGHT == "0")::500::else::::WIN_HEIGHT::::end::</height>
|
||||
<author>
|
||||
<name>::APP_COMPANY::</name>
|
||||
<!-- <email></email> -->
|
||||
<organization>::APP_COMPANY::</organization>
|
||||
<!-- <link></link> -->
|
||||
</author>
|
||||
<icon width="128" height="128">icon_128.png</icon>
|
||||
<icon width="64" height="64">icon_64.png</icon>
|
||||
<icon width="32" height="32">icon_32.png</icon>
|
||||
<icon width="16" height="16">icon_16.png</icon>
|
||||
<id>
|
||||
<host>::APP_PACKAGE_HOST::</host>
|
||||
<name>::APP_PACKAGE_NAME::</name>
|
||||
<revised>::REVISION_DATE::</revised>
|
||||
</id>
|
||||
</widget>
|
||||
BIN
templates/flash/templates/opera/expressInstall.swf
Normal file
BIN
templates/flash/templates/opera/expressInstall.swf
Normal file
Binary file not shown.
28
templates/flash/templates/opera/index.html
Normal file
28
templates/flash/templates/opera/index.html
Normal file
@@ -0,0 +1,28 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
|
||||
<title>::APP_TITLE::</title>
|
||||
|
||||
<script type="text/javascript" src="swfobject.js"></script>
|
||||
<script type="text/javascript">
|
||||
|
||||
swfobject.embedSWF ("::APP_FILE::.swf", "nme-application", "::if (WIN_WIDTH == "0")::800::else::::WIN_WIDTH::::end::", "::if (WIN_HEIGHT == "0")::500::else::::WIN_HEIGHT::::end::", "::SWF_VERSION::", "expressInstall.swf", ::WIN_PARAMETERS::);
|
||||
</script>
|
||||
|
||||
<style>
|
||||
html, body, #nme-application { width:::if (WIN_WIDTH == "0")::100%::else::::WIN_WIDTH::px::end::; height:::if (WIN_HEIGHT == "0")::100%::else::::WIN_HEIGHT::px::end::; }
|
||||
body { margin:0; padding:0; overflow:hidden; }
|
||||
|
||||
</style>
|
||||
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<div id="nme-application"></div>
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
4
templates/flash/templates/opera/swfobject.js
Normal file
4
templates/flash/templates/opera/swfobject.js
Normal file
File diff suppressed because one or more lines are too long
BIN
templates/flash/templates/web/expressInstall.swf
Normal file
BIN
templates/flash/templates/web/expressInstall.swf
Normal file
Binary file not shown.
28
templates/flash/templates/web/index.html
Normal file
28
templates/flash/templates/web/index.html
Normal file
@@ -0,0 +1,28 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
|
||||
<title>::APP_TITLE::</title>
|
||||
|
||||
<script type="text/javascript" src="swfobject.js"></script>
|
||||
<script type="text/javascript">
|
||||
|
||||
swfobject.embedSWF ("::APP_FILE::.swf", "nme-application", "::if (WIN_WIDTH == 0)::800::else::::WIN_WIDTH::::end::", "::if (WIN_HEIGHT == 0)::500::else::::WIN_HEIGHT::::end::", "::SWF_VERSION::", "expressInstall.swf", ::WIN_PARAMETERS::);
|
||||
</script>
|
||||
|
||||
<style>
|
||||
html, body, #nme-application { width:::if (WIN_WIDTH == 0)::100%::else::::WIN_WIDTH::px::end::; height:::if (WIN_HEIGHT == 0)::100%::else::::WIN_HEIGHT::px::end::; }
|
||||
body { margin:0; padding:0; overflow:hidden; }
|
||||
|
||||
</style>
|
||||
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<div id="nme-application" />
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
4
templates/flash/templates/web/swfobject.js
Normal file
4
templates/flash/templates/web/swfobject.js
Normal file
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user