Skip to content

Commit

Permalink
Merge pull request #233 from codam/master
Browse files Browse the repository at this point in the history
samples and readme updates
  • Loading branch information
codam committed Sep 4, 2012
2 parents 6ea0d14 + d066824 commit a6073c6
Show file tree
Hide file tree
Showing 11 changed files with 117 additions and 173 deletions.
87 changes: 46 additions & 41 deletions readme.txt
@@ -1,3 +1,12 @@
/*
* Cocktail, HTML rendering engine
* http://haxe.org/com/libs/cocktail
*
* Copyright (c) Silex Labs
* Cocktail is available under the MIT license
* http://www.silexlabs.org/labs/cocktail-licensing/
*/

== Cocktail, HTML rendering engine ==

Cocktail is cross-platform, embeddable and native.
Expand All @@ -14,59 +23,55 @@ Native
Cocktail do not require any virtual machine, it is not interpreted.
This has a positive impact on the performances and allows access to native functionnalities and libraries in native language such as objective C, C++, php, ActionScript…

Silex Labs Cocktail library is released under GPL.
Silex Labs Cocktail library is released under MIT.

== Links ==

Articles and demos
Tutorials

* Getting started with Cocktail
=> http://haxe.org/com/libs/cocktail/getting_started_with_cocktail
* Cocktail web app demo
=> http://haxe.org/com/libs/cocktail/cocktail_web_app_demo
* Cocktail v1.0 Sunrise: progress report
=> http://www.silexlabs.org/?p=130892
* Cocktail, for an open bar community !
=> http://www.silexlabs.org/the-blog
* Combining Cocktail Haxe with PhoneGap
=> http://www.blog.elimak.com/2012/07/combining-cocktail-haxe-with-phonegap/
* Getting started with Cocktail
=> http://haxe.org/com/libs/cocktail/getting_started_with_cocktail

Developer resources

* Main wiki on Haxe libs
=> http://haxe.org/com/libs/cocktail
* Forums and working group
=> http://www.silexlabs.org/groups/labs/cocktail/forum/
* Cocktail download and source code
=> https://github.com/silexlabs/Cocktail
* Main wiki on Haxe libs
=> http://haxe.org/com/libs/cocktail
* Forums and working group
=> http://www.silexlabs.org/groups/labs/cocktail/forum/
* Cocktail download and source code
=> https://github.com/silexlabs/Cocktail
* Old Wiki on Git Hub
=> https://github.com/silexlabs/Cocktail/wiki

Other resources

* Cocktail supported platforms
=> http://haxe.org/com/libs/cocktail/supported_platforms
* Cocktail future platforms
=> http://www.silexlabs.org/groups/labs/cocktail/docs/cocktail-future-platforms
* Official Cocktail definition
=> http://www.silexlabs.org/groups/labs/cocktail/docs/official-cocktail-definition
* Cocktail road map
=> https://github.com/silexlabs/Cocktail/wiki/Road-map
* Cocktail GPL license
=> http://www.gnu.org/copyleft/gpl.html
* Cocktail supported platforms
=> http://haxe.org/com/libs/cocktail/supported_platforms
* Cocktail future platforms
=> http://www.silexlabs.org/groups/labs/cocktail/docs/cocktail-future-platforms
* Official Cocktail definition
=> http://www.silexlabs.org/groups/labs/cocktail/docs/official-cocktail-definition
* Cocktail road map
=> http://haxe.org/com/libs/cocktail/cocktail_s_road_map
* Cocktail MIT license
=> http://www.silexlabs.org/labs/cocktail-licensing/
* W3C CSS unit tests
=> http://haxe.org/com/libs/cocktail/w3c_css_unit_tests

Release notes

* Cocktail Release notes - v1.0.0alpha1
=> http://www.silexlabs.org/groups/labs/cocktail/docs/cocktail-release-notes-v1-0-0alpha1
* Cocktail Release notes - v1.0.0alpha2
=> http://www.silexlabs.org/groups/labs/cocktail/docs/cocktail-release-notes-v1-0-0alpha2

* Cocktail Release notes – v1.0.0alpha1
=> http://www.silexlabs.org/groups/labs/cocktail/docs/cocktail-release-notes-v1-0-0alpha1
* Cocktail Release notes – v1.0.0alpha2
=> http://www.silexlabs.org/groups/labs/cocktail/docs/cocktail-release-notes-v1-0-0alpha2

Articles and demos

== license ==

Cocktail, HTML rendering engine
http://haxe.org/com/libs/cocktail

Copyright (c) Silex Labs
Cocktail is available under the MIT license
http://www.silexlabs.org/labs/cocktail-licensing/
* Cocktail web app demo
=> http://haxe.org/com/libs/cocktail/cocktail_web_app_demo
* Cocktail v1.0 Sunrise: progress report
=> http://www.silexlabs.org/?p=130892
* Cocktail, for an open bar community !
=> http://www.silexlabs.org/the-blog* Cocktail, for an open bar community !
* Combining Cocktail with PhoneGap
=> http://www.blog.elimak.com/2012/07/combining-cocktail-haxe-with-phonegap/
30 changes: 15 additions & 15 deletions samples/01-HelloWorld/compile-nme.nmml
@@ -1,23 +1,23 @@
<?xml version="1.0" encoding="utf-8"?>
<project>

<app title="Cocktail" main="Cocktail" package="org.silexlabs.cocktail" version="1.0.0" company="Silex Labs" />
<window width="1024" height="768" fps="30" orientation="portrait" resizable="false" unless="target_flash" />

<set name="BUILD_DIR" value="bin" />
<set name="SWF_VERSION" value="10.2" />
<app main="Cocktail" path="bin" file="Main"/>
<meta title="Cocktail" package="org.silexlabs.cocktail" version="1.0.0" company="Silex Labs" />
<window width="350" height="450" fps="30" orientation="portrait" resizable="true" unless="target_flash" />

<classpath name="../../src" />
<classpath name="src" />
<set name="SWF_VERSION" value="10.2" />

<haxelib name="nme" />
<classpath name="../../src" />
<classpath name="src" />

<ndll name="std" />
<ndll name="regexp" />
<ndll name="zlib" />
<ndll name="nme" haxelib="nme" />

<compilerflag name="--remap js:cocktail" />
<compilerflag name="--macro Cocktail.create('index.html')" />
<haxelib name="nme" />

<ndll name="std" />
<ndll name="regexp" />
<ndll name="zlib" />
<ndll name="nme" haxelib="nme" />

<compilerflag name="--remap js:cocktail" />
<compilerflag name="--macro Cocktail.create('index.html')" />

</project>
40 changes: 20 additions & 20 deletions samples/02-load_picture/compile-nme.nmml
@@ -1,25 +1,25 @@
<?xml version="1.0" encoding="utf-8"?>
<project>

<app title="Cocktail" main="Cocktail" package="org.silexlabs.cocktail" version="1.0.0" company="Silex Labs" />
<window width="1024" height="768" fps="30" orientation="portrait" resizable="false" unless="target_flash" />
<set name="BUILD_DIR" value="bin" />
<set name="SWF_VERSION" value="10.2" />

<classpath name="../../src" />
<classpath name="src" />

<haxelib name="nme" />

<assets path="assets" include="*" ></assets>
<ndll name="std" />
<ndll name="regexp" />
<ndll name="zlib" />
<ndll name="nme" haxelib="nme" />
<compilerflag name="--remap js:cocktail" />
<compilerflag name="--macro Cocktail.create('src/index.html','Main')" />
<app main="Cocktail" path="bin" file="Main"/>
<meta title="Cocktail" package="org.silexlabs.cocktail" version="1.0.0" company="Silex Labs" />
<window width="350" height="350" fps="30" orientation="portrait" resizable="true" unless="target_flash" />

<set name="SWF_VERSION" value="10.2" />

<classpath name="../../src" />
<classpath name="src" />

<haxelib name="nme" />

<assets path="assets"></assets>

<ndll name="std" />
<ndll name="regexp" />
<ndll name="zlib" />
<ndll name="nme" haxelib="nme" />

<compilerflag name="--remap js:cocktail" />
<compilerflag name="--macro Cocktail.create('src/index.html','Main')" />

</project>
6 changes: 3 additions & 3 deletions samples/03-style_text/compile-nme.nmml
@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<project>

<app title="Cocktail" main="Cocktail" package="org.silexlabs.cocktail" version="1.0.0" company="Silex Labs" />
<window width="1024" height="768" fps="30" orientation="portrait" resizable="false" unless="target_flash" />
<app main="Cocktail" path="bin" file="Main"/>
<meta title="Cocktail" package="org.silexlabs.cocktail" version="1.0.0" company="Silex Labs" />
<window width="350" height="750" fps="30" orientation="portrait" resizable="true" unless="target_flash" />

<set name="BUILD_DIR" value="bin" />
<set name="SWF_VERSION" value="10.2" />

<classpath name="../../src" />
Expand Down
6 changes: 3 additions & 3 deletions samples/04-inner_html/compile-nme.nmml
@@ -1,10 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<project>

<app title="Cocktail" main="Cocktail" package="org.silexlabs.cocktail" version="1.0.0" company="Silex Labs" />
<window width="1024" height="768" fps="30" orientation="portrait" resizable="false" unless="target_flash" />
<app main="Cocktail" path="bin" file="Main"/>
<meta title="Cocktail" package="org.silexlabs.cocktail" version="1.0.0" company="Silex Labs" />
<window width="350" height="350" fps="30" orientation="portrait" resizable="true" unless="target_flash" />

<set name="BUILD_DIR" value="bin" />
<set name="SWF_VERSION" value="10.2" />

<classpath name="../../src" />
Expand Down
4 changes: 2 additions & 2 deletions samples/05-HaxeJS-vs-HTML/Main.hx
Expand Up @@ -52,7 +52,7 @@ class Main

//HTML & semantics
var paragraph = Lib.document.createElement("p");
paragraph.appendChild(Lib.document.createTextNode("Cocktail is a HTML rendering engine. It focuses on UIs and bridges the gap between all the targets supported by haXe."));
paragraph.appendChild(Lib.document.createTextNode("Cocktail is a HTML rendering engine."));
Lib.document.body.appendChild(paragraph);

//CSS text
Expand Down Expand Up @@ -87,7 +87,7 @@ class Main
function buildDomHtml()
{
//HxTML
Lib.document.body.innerHTML = '<div style="width: 50%; margin-right: auto; margin-left: auto; background-color: rgba(255, 255, 255, 0.5);"><h1 style="word-spacing: 10px; color: orange; font-family: arial;">Hello Cocktail</h1><p>Cocktail is a cross-platform library for the haXe programming language. It focuses on UIs and bridges the gap between all the targets supported by haXe.<img id="pic" src="assets/cocktail.png" /></p></div>';
Lib.document.body.innerHTML = '<div style="width: 50%; margin-right: auto; margin-left: auto; background-color: rgba(255, 255, 255, 0.5);"><h1 style="word-spacing: 10px; color: orange; font-family: arial;">Hello Cocktail</h1><p>Cocktail is a HTML rendering engine.<img id="pic" src="assets/cocktail.png" /></p></div>';

}

Expand Down
9 changes: 4 additions & 5 deletions samples/GettingStarted/Main_js.hxproj
Expand Up @@ -2,7 +2,7 @@
<project version="2">
<!-- Output SWF options -->
<output>
<movie outputType="Application" />
<movie outputType="CustomBuild" />
<movie input="" />
<movie path="bin\js\Main.js" />
<movie fps="0" />
Expand All @@ -23,7 +23,7 @@
<option flashStrict="False" />
<option mainClass="Cocktail" />
<option enabledebug="False" />
<option additional="-cmd cp -R assets bin\swf\" />
<option additional="" />
</build>
<!-- haxelib libraries -->
<haxelib>
Expand All @@ -40,13 +40,12 @@
<!-- Executed before build -->
<preBuildCommand />
<!-- Executed after build -->
<postBuildCommand alwaysRun="False">haxe compile-js.hxml
haxe compile-swf.hxml</postBuildCommand>
<postBuildCommand alwaysRun="False" />
<!-- Other project options -->
<options>
<option showHiddenPaths="False" />
<option testMovie="Custom" />
<option testMovieCommand="bin/js/index.html" />
<option testMovieCommand="compile-js.hxml" />
</options>
<!-- Plugin storage -->
<storage />
Expand Down
2 changes: 1 addition & 1 deletion samples/GettingStarted/compile-js.hxml
Expand Up @@ -8,4 +8,4 @@
--macro Cocktail.create('src/index.html','Main')

#copy assets directory
-cmd cp -R assets bin\swf\
-cmd cp -R assets bin\js\
40 changes: 20 additions & 20 deletions samples/GettingStarted/compile-nme.nmml
@@ -1,25 +1,25 @@
<?xml version="1.0" encoding="utf-8"?>
<project>

<app title="Cocktail" main="Cocktail" package="org.silexlabs.cocktail" version="1.0.0" company="Silex Labs" />
<window width="1024" height="768" fps="30" orientation="portrait" resizable="false" unless="target_flash" />
<set name="BUILD_DIR" value="bin" />
<set name="SWF_VERSION" value="10.2" />

<classpath name="../../src" />
<classpath name="src" />

<haxelib name="nme" />

<assets path="assets" include="*" ></assets>
<ndll name="std" />
<ndll name="regexp" />
<ndll name="zlib" />
<ndll name="nme" haxelib="nme" />
<compilerflag name="--remap js:cocktail" />
<compilerflag name="--macro Cocktail.create('src/index.html','Main')" />
<app main="Cocktail" path="bin" file="Main"/>
<meta title="Cocktail" package="org.silexlabs.cocktail" version="1.0.0" company="Silex Labs" />
<window width="350" height="350" fps="30" orientation="portrait" resizable="true" unless="target_flash" />

<set name="SWF_VERSION" value="10.2" />

<classpath name="../../src" />
<classpath name="src" />

<haxelib name="nme" />

<assets path="assets"></assets>

<ndll name="std" />
<ndll name="regexp" />
<ndll name="zlib" />
<ndll name="nme" haxelib="nme" />

<compilerflag name="--remap js:cocktail" />
<compilerflag name="--macro Cocktail.create('src/index.html','Main')" />

</project>

0 comments on commit a6073c6

Please sign in to comment.