Skip to content

Commit

Permalink
Merge branch 'develop' of https://github.com/gameclosure/devkit-priv
Browse files Browse the repository at this point in the history
…into develop

* 'develop' of https://github.com/gameclosure/devkit-priv:
  default to https for addons
  Fixed stylesheets, fixed color on examples tab, fixed column size on examples
  Update README.md
  addonmanager should not submodule update for addons, they should take care of themselves in their index.js init functions
  • Loading branch information
Martin Hunt committed Feb 13, 2013
2 parents d738f8f + b84d0de commit 73e9dbb
Show file tree
Hide file tree
Showing 7 changed files with 76 additions and 58 deletions.
71 changes: 47 additions & 24 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Install the Game Closure DevKitn
# Install the Game Closure DevKit

$ git clone [email protected]:gameclosure/devkit.git
$ cd devkit
Expand All @@ -8,7 +8,8 @@ Type `basil` to begin. At any time, you can update to the latest tag:

$ basil update

This gets the latest version, or `basil update -c (beta, social...)` to update to the latest version of that channel.
This gets the latest version, or `basil update -c (beta, social...)` to update
to the latest version of that channel.

Initialize a new project:

Expand All @@ -20,7 +21,8 @@ And in your application directory:

## Build Android

Set `android.root` in config.json to your [android](https://github.com/gameclosure/native-android) path.
Set `android.root` in config.json to your
[android](https://github.com/gameclosure/native-android) path.

{
"android": {
Expand All @@ -38,7 +40,8 @@ Then run:

## Build iOS

Set `ios.root` in config.json to your [ios](https://github.com/gameclosure/native-ios) path.
Set `ios.root` in config.json to your
[ios](https://github.com/gameclosure/native-ios) path.

{
"ios": { "root": "your/path" }
Expand All @@ -59,7 +62,8 @@ Then run:
basil
|-- bin
| `-- basil # the basil executable
|-- lib # libraries (most of these are submodules). Check the Submodule Overview section below.
|-- lib # libraries (most of these are submodules). Check the
| | # Submodule Overview section below.
| |-- NativeInspector
| |-- gcapi
| |-- js.io
Expand Down Expand Up @@ -112,9 +116,13 @@ Then run:
| `-- simulate # the plugin serving the simulation page
`-- public # base html and some utility classes

The server frontend is built using [jsio](http://github.com/gameclosure/js.io) and [squill](http://github.com/gameclosure/squill). The server itself is built using [express](http://expressjs.com).
The server frontend is built using [jsio](http://github.com/gameclosure/js.io)
and [squill](http://github.com/gameclosure/squill). The server itself is built
using [express](http://expressjs.com).

Each plugin in the `plugins` directory is a pane, and each plugin also has some plain javascript that should set up the express routes and some other functionality.
Each plugin in the `plugins` directory is a pane, and each plugin also has
some plain javascript that should set up the express routes and some other
functionality.

For example, the `about` plugin:

Expand All @@ -125,9 +133,12 @@ For example, the `about` plugin:
|-- Pane.js
`-- style.css

`manifest.json` is a manifest for the pane, including the display name of the pane, version, author, etc.
`plugin.js` contains some javascript to update the DevKit, and as such has the main functionality of this pane.
`static` contains the css (`style.css`) and the javascript (`Pane.js`) that contains the layout of the pane.
* `manifest.json` is a manifest for the pane, including the display name of
the pane, version, author, etc.
* `plugin.js` contains some javascript to update the DevKit, and as such has
the main functionality of this pane.
* `static` contains the css (`style.css`) and the javascript (`Pane.js`) that
contains the layout of the pane.


#### sdk Directory
Expand All @@ -138,7 +149,9 @@ For example, the `about` plugin:
|-- lib -> basil/lib/timestep/lib/
`-- squill -> basil/lib/squill/

The sdk directory points to several jsio modules. These are added to the jsio import path by default, so that you'll be able to import anything inside these directories via jsio.
The sdk directory points to several js.io modules. These are added to the js.io
import path by default, so that you'll be able to import anything inside these
directories via jsio.


### Submodule Overview
Expand All @@ -152,16 +165,19 @@ The sdk directory points to several jsio modules. These are added to the jsio im

#### NativeInspector

NativeInspector is the Webkit Inspector, but for attached android phones running Game Closure DevKit games.
NativeInspector is the Webkit Inspector, but for attached android phones
running Game Closure DevKit games.

#### gcapi

Non-game engine related javascript that is still necessary for projects that don't use timestep.
Non-game engine related javascript that is still necessary for projects that
don't use timestep.

#### js.io

[js.io](http://github.com/gameclosure/js.io) is used for all Game Closure DevKit games, and the DevKit itself.
In particular, js.io gives you import statements
[js.io](http://github.com/gameclosure/js.io) is used for all Game Closure
DevKit games, and the DevKit itself. In particular, js.io gives you import
statements

import ui.View as View;

Expand All @@ -180,28 +196,35 @@ This allows for 'proper' object-oriented programming in javascript.

#### squill

[squill](http://github.com/gameclosure/squill) is a ui library using javascript. The web frontend of the DevKit is built using squill, as are some UI components in timestep.
[squill](http://github.com/gameclosure/squill) is a ui library using
javascript. The web frontend of the DevKit is built using squill, as are some
UI components in timestep.

#### timestep

timestep is the game engine behind Game Closure DevKit games. It includes a view hierarchy, audio, multiple ui components, etc.
timestep is the game engine behind Game Closure DevKit games. It includes a
view hierarchy, audio, multiple ui components, etc.

## Addons

Addons exist under `basil/addons`. In basil they are stored as submodules. When
releasing, harvester will grab the submodule at the commited reference and
tag it with the same version as basil. The install script will look inside
the [`addon-registry`](http://github.com/gameclosure/addon-registry) to determine what type of addon. There are two types of addons.
Addons exist under `basil/addons`. In basil they are stored as submodules.
When releasing, harvester will grab the submodule at the commited reference
and tag it with the same version as basil. The install script will look inside
the [`addon-registry`](http://github.com/gameclosure/addon-registry) to
determine what type of addon. There are two types of addons.

**Core:** Core addons are released with the DevKit so they are always in sync.

**User:** User addons are not as closely tied and need to specify in the registry what version of the DevKit it supports.
**User:** User addons are not as closely tied and need to specify in the
registry what version of the DevKit it supports.

For core addons, the install script will checkout the same version as the DevKit. User addons will checkout the latest version supported.
For core addons, the install script will checkout the same version as the
DevKit. User addons will checkout the latest version supported.

## Ports

Basil uses ports in the range 9200 - 9240. 9200 - 9220 are used for simulating projects, and other utilities and services use the remaining ports.
Basil uses ports in the range 9200 - 9240. 9200 - 9220 are used for simulating
projects, and other utilities and services use the remaining ports.

* 9220 - Native Webkit Inspector
* 9221 - Native Webkit Inspector
Expand Down
5 changes: 0 additions & 5 deletions src/AddonManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -260,8 +260,6 @@ var AddonManager = Class(EventEmitter, function () {
logger.log("URL:", url);
baseGit('clone', url, addonPath, f());
}, function (err) {
addonGit('submodule', 'update', '--init', f());
}, function () {
logger.log("Addon installed!");
this.activateVersion(addon, version, f.wait());
}).error(function (e) {
Expand All @@ -287,9 +285,6 @@ var AddonManager = Class(EventEmitter, function () {
logger.log("Could not find", version.toString(), ". Using master");
addonGit('checkout', 'master', f.slot());
}
}, function () {
//submodule update init just incase
addonGit('submodule', 'update', '--init', '--recursive', f());
}, function () {
var currentPath = path.join(this.getPath(addon), "index.js");
if (!fs.existsSync(currentPath)) {
Expand Down
4 changes: 2 additions & 2 deletions src/install/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ var argv = require('optimist')
.alias('force', 'f')
.default('force', false)
.boolean('ssh')
.describe('ssh', 'Install addon through SSH')
.default('ssh', true);
.describe('ssh', 'Install addon through SSH')
.default('ssh', false);

exports.install = function (addon, version, cb) {
if (!addon) {
Expand Down
10 changes: 5 additions & 5 deletions src/serve/plugins/projects/static/Pane.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@ var ProjectCell = Class(squill.Cell, function() {
className: 'cell projectCell hoverable',
children: [
{
id: 'icon', className: 'project-icon'
id: 'icon', className: 'projectIcon'
},
{
id: 'name', type: 'label', className: 'project-name'
id: 'name', type: 'label', className: 'projectName'
}
]
};
Expand All @@ -56,9 +56,9 @@ var ExampleCell = Class(squill.Cell, function () {
this._def = {
className: 'exampleProjectCell',
children: [
{id: 'name', type: 'label', className: 'project-name'},
{id: 'doc', tag: 'a', className: 'project-doc'},
{id: 'description', type: 'label', className: 'project-description'}
{id: 'name', type: 'label', className: 'projectName'},
{id: 'doc', tag: 'a', className: 'projectDoc'},
{id: 'description', type: 'label', className: 'projectDescription'}
]
};

Expand Down
14 changes: 7 additions & 7 deletions src/serve/plugins/projects/static/projects.styl
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,15 @@ exampleListMargin = 15px
.exampleProjectCell:nth-child(even)
background #133

.exampleProjectCell .project-name
.exampleProjectCell .projectName
color #EEF
text-shadow none
width 200px
font-size 15px
margin 0
text-align left

.exampleProjectCell .project-doc
.exampleProjectCell .projectDoc
display inline-block
color #EEF
text-shadow none
Expand All @@ -44,11 +44,11 @@ exampleListMargin = 15px
// background #4b95e6
// color white

.exampleProjectCell.selected .project-name
.exampleProjectCell.selected .projectName
color #EEF

.exampleProjectCell .project-name
.exampleProjectCell .project-description
.exampleProjectCell .projectName
.exampleProjectCell .projectDescription
display inline-block
text-overflow: ellipsis;

Expand All @@ -73,9 +73,9 @@ exampleListMargin = 15px
border-bottom 1px solid rgba(255, 255, 255, 0.4)
z-index 10

.projectCell.selected .project-name
.projectCell.selected .projectName
color white

.projectCell.selected .project-icon
.projectCell.selected .projectIcon
box-shadow 0px 3px 5px rgba(0, 0, 0, 0.2)
text-shadow 0px 3px 5px rgba(0, 0, 0, 0.2)
10 changes: 5 additions & 5 deletions src/serve/public/Overview.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,12 +79,12 @@ exports = Class(squill.TabbedPane, function(supr) {
tag: 'div',
children: [
{
className: 'project-icon',
className: 'projectIcon',
id: '_overviewProjectIcon',
src: '/images/defaultIcon.png'
},
{
className: 'project-name',
className: 'projectName',
id: '_overviewProjectName',
text: 'no project selected'
},
Expand Down Expand Up @@ -116,7 +116,7 @@ exports = Class(squill.TabbedPane, function(supr) {
} else {
project = this.getProjects().getItemForIndex(0);
}

this._currentProject = project;

this._pluginByTitle = {};
Expand Down Expand Up @@ -276,7 +276,7 @@ exports = Class(squill.TabbedPane, function(supr) {
if (child.lazyPane) {
var paneName = child.lazyPane;
child.lazyPane = false;

// Check that we haven't run this more than once.
Constructor = jsio('import ' + paneName);
child = new Constructor({
Expand Down Expand Up @@ -347,7 +347,7 @@ exports = Class(squill.TabbedPane, function(supr) {
if (!project) { return; }

this._overviewProjectIcon.style.backgroundImage = 'url(' + (project.getIcon(512) || '/images/defaultIcon.png') + ')';

if (project.manifest.icons.renderGloss) {
$.addClass(this._overviewProjectIcon, 'gloss');
} else {
Expand Down
20 changes: 10 additions & 10 deletions src/serve/stylesheets/ui.styl
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ topTabsHeight = 41px
padding-top 20px
cursor pointer

.OverviewPanel #projectSelector:hover .project-name
.OverviewPanel #projectSelector:hover .projectName
text-shadow: 0px 1px 5px rgba(255, 255, 255, 0.5);

.OverviewPanel .OverviewTabs .tabContainer {
Expand Down Expand Up @@ -544,24 +544,24 @@ div::-webkit-scrollbar {
}

div::-webkit-scrollbar-track {
box-shadow: inset 0 0 6px rgba(0,0,0,0.3);
box-shadow: inset 0 0 6px rgba(0,0,0,0.3);
border-radius: 10px;
}

/* Handle */
div::-webkit-scrollbar-thumb {
margin: 1px;
border-radius: 10px;
background: rgba(100,100,120,0.8);
box-shadow: inset 0 0 6px rgba(0,0,0,0.5);
background: rgba(100,100,120,0.8);
box-shadow: inset 0 0 6px rgba(0,0,0,0.5);
}

div::-webkit-scrollbar-thumb:window-inactive {
background: rgba(30,30,40,0.4);
background: rgba(30,30,40,0.4);
}

div::-webkit-scrollbar-corner {
background: rgba(30,30,40,0.4);
background: rgba(30,30,40,0.4);
}

/*** Color settings ***/
Expand Down Expand Up @@ -944,7 +944,7 @@ radius-factor = 5.7 // Apple computes border radius by dividing by 5.7
large-icon-size = 160
large-icon-radius = round(large-icon-size / radius-factor)

.project-icon {
.projectIcon {
center()
width (large-icon-size)px
height (large-icon-size)px
Expand All @@ -955,7 +955,7 @@ large-icon-radius = round(large-icon-size / radius-factor)
background-size: contain;
}

.project-icon.gloss::after {
.projectIcon.gloss::after {
content: "";
position: absolute;
z-index: 10;
Expand All @@ -972,7 +972,7 @@ large-icon-radius = round(large-icon-size / radius-factor)
box-shadow: inset 0px 2px 1px rgba(255, 255, 255, 0.7);
}

.hoverable:hover:not(.selected) .project-icon:before
.hoverable:hover:not(.selected) .projectIcon:before
content ''

position: absolute;
Expand All @@ -985,7 +985,7 @@ large-icon-radius = round(large-icon-size / radius-factor)
border-radius unit(large-icon-radius, px)
z-index: 5;

.project-name {
.projectName {
padding: 0 10px;
color: #eee;
width: 200px;
Expand Down

0 comments on commit 73e9dbb

Please sign in to comment.