Giter Club home page Giter Club logo

basis's Introduction

Basis

Haxe Native UI Development

The goal of Basis is to provide access to native UI components. For example, in ios one would use UIView and in android one would use android.View along with layout xml.

Basis is the core haxelib which works with other haxlibs.

Current haxelibs in development:

Installation

run command (make sure Basis has a capital "B"):

haxelib install Basis

Install haxelibs for platforms you wish to build

haxelib install BasisApple
haxelib install BasisAndroid	
  • You will also need tools specific to the platform you are building (android sdk, xcode...). See specific platform for more instruction.

Examples

There are examples for each target. See the other Basis haxelib targets bellow for examples.

Building From Source

  1. Download each haxelib source (Basis, BasisApple, BasisAndroid)
  2. Run command "ant testlib" from the root of the Basis directory
  3. Run command "ant testlib" from both BasisApple and BasisAndroid

If your working on the core Basis code you will need to build Basis then the other haxelibs before using them.

Build xml format

Example

<target name="main">
	<appName value="Example" />
	<source path="src" />
	<builddir path="build" />
	<target name="apple" type="Apple">
		<framework name="UIKit" />
		<framework name="Foundation" />
		<framework name="CoreGraphics" />
		<framework name="QuartzCore" />
		<target name="ipad">
			<device type="ios" />
			<simulator use="true" type="ipad"/>
			<main classpath="example.ApplicationMain" />
			<debug value="true" />
			<runWhenFinished value="true" />
		</target>
	</target>
</target>

The build files work similar to CSS in that all tags apply to child targets. In the example above the appName node would apply to the apple target and ipad target. When a target is built each sub target (if any) will also be built.

Build xml Node Reference

See platform specific haxelib for nodes specific to that haxelib

Attributes are optional unless marked otherwise.

  • target
    • Attributes
      • name (required)
        • The name of the target. This is what you will call from the command line. For example if you want to build the apple target: haxelib run basis build.xml apple
      • type
        • The haxelib that will build the target "apple" for BasisApple and "android" for BasisAndroid
  • appName
    • Attributes
      • value
        • The name of the application
  • source
    • Attributes
      • path
        • A directory with haxe source to be included
  • builddir
    • Attributes
      • path
        • where the build output will go
  • haxelib
    • Attributes
      • name
        • the name of a haxelib to include
  • main
    • Attributes
      • classpath
        • the fill class path to the main class
  • debug
    • Attributes
      • value
        • if "true" build debug build
  • haxeArg
    • Attributes
      • value
        • haxe compiler arg. Example <haxeArg value="-D spod_macro" />
  • runWhenFinished
    • Attributes
      • value
        • if true the app will be run after it is built
  • asset
    • Attributes
      • path
        • path to an asset directory

License:

Copyright (c) 2013 Basis Contributors
Unless indicated otherwise, this code is provided under a MIT-style license. 

Permission is hereby granted, free of charge, to any person obtaining a 
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included
in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

basis's People

Contributors

randonee avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.