Skip to content

Commit

Permalink
Merge pull request #33 from entrylabs/feature/new-blocks
Browse files Browse the repository at this point in the history
Feature/new blocks
  • Loading branch information
kimorkim committed Jun 9, 2016
2 parents ea3e4a2 + 56ab4bd commit 1bdd02c
Show file tree
Hide file tree
Showing 22 changed files with 4,619 additions and 1,497 deletions.
3 changes: 2 additions & 1 deletion app/bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"node"
],
"dependencies": {
"entryjs": "https://github.com/entrylabs/entryjs.git#1.2.1",
"entryjs": "https://github.com/entrylabs/entryjs.git#1.3.1",
"entry-hw": "https://github.com/entrylabs/entry-hw.git#master",
"jquery": "~1.11.3",
"jquery-ui": "~1.11.x",
Expand All @@ -15,6 +15,7 @@
"EaselJS": "https://github.com/boolgom/EaselJS.git",
"SoundJS": "0.6.0",
"webfontloader": "1.5.18",
"velocity": "~1.2.3",
"angular": "angularjs#~1.4.7",
"angular-cookies": "~1.4.3",
"angular-filters": "~1.1.2",
Expand Down
18 changes: 5 additions & 13 deletions app/entry_offline.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,11 @@
<html ng-app="workspace">
<head>
<meta charset="utf-8">
<!--
<link rel='stylesheet' href='./bower_components/entryjs/dist/entry.css' />
<link rel='stylesheet' href='./css/nanumbarungothic.css' />
<link rel='stylesheet' href='./css/header.css' />
<link rel='stylesheet' href='./css/workspace_header.css' />
<link rel='stylesheet' href='./css/workspace.css' />
<link rel='stylesheet' href='./css/modal.css' />
<link rel='stylesheet' href='./bower_components/bootstrap/dist/css/bootstrap.css' />
-->
<link rel='stylesheet' href='./css/fonts.css' />
<link rel='stylesheet' href='./css/developer.css' />
<script type="text/javascript" src="./src/main.js"></script>
<script type="text/javascript" src="./src/ws.js"></script>
<script type="text/javascript" src="./src/require.js"></script>
<!-- <script type='text/javascript' src='./node_modules/socket.io-client/socket.io.js'></script> -->
<script type='text/javascript' src='./bower_components/jquery/dist/jquery.min.js'></script>
<script type='text/javascript' src='./bower_components/jquery-ui/jquery-ui.min.js'></script>
<script type='text/javascript' src='./bower_components/angular/angular.min.js'></script>
Expand All @@ -34,21 +24,23 @@
<script type='text/javascript' src='./bower_components/SoundJS/lib/soundjs-0.6.0.combined.js'></script>
<script type='text/javascript' src='./bower_components/SoundJS/lib/flashaudioplugin-0.6.0.combined.js'></script>
<script type='text/javascript' src='./bower_components/webfontloader/webfontloader.js'></script>
<script type='text/javascript' src='./bower_components/velocity/velocity.min.js'></script>
<script type='text/javascript' src='./src/app.js'></script>
<script type='text/javascript' src='./bower_components/entryjs/extern/blockly/blockly_compressed.js'></script>
<script type='text/javascript' src='./bower_components/entryjs/extern/util/static.js'></script>
<script type='text/javascript' src='./bower_components/entryjs/extern/util/CanvasInput.js'></script>
<script type='text/javascript' src='./bower_components/entryjs/extern/util/handle.js'></script>
<script type='text/javascript' src='./bower_components/entryjs/extern/util/ndgmr.Collision.js'></script>
<script type='text/javascript' src='./bower_components/entryjs/dist/entry.js'></script>

<script type='text/javascript'>
Entry.isOffline = true;
</script>
<script type='text/javascript' src='./bower_components/entryjs/src/workspace/block_entry.js'></script>
<script type='text/javascript' src='./src/context.js'></script>
<script type="text/javascript" src="./src/filters.js"></script>
<script type="text/javascript" src="./lang/pictures.js"></script>
<script type="text/javascript" src="./lang/sounds.js"></script>
<script type="text/javascript" src="./lang/sprites.js"></script>
<!--
<script type="text/javascript" src="./src/native_menu.js"></script> -->
<script type="text/javascript" src="./src/native_controll.js"></script>
<script type="text/javascript" src="./src/native_menu.js"></script>

Expand Down
50 changes: 26 additions & 24 deletions app/entry_offline.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
'use strict';

const electron = require('electron');
const ipcMain = electron.ipcMain;
const app = electron.app; // 어플리케이션 기반을 조작 하는 모듈.
const BrowserWindow = electron.BrowserWindow; // 네이티브 브라우저 창을 만드는 모듈.
const {app, BrowserWindow, Menu, globalShortcut, ipcMain} = electron;
const path = require('path');
const fs = require('fs');
const Menu = electron.Menu;
const packageJson = require('./package.json');
const ChildProcess = require('child_process');

Expand Down Expand Up @@ -258,7 +255,6 @@ var handleStartupEvent = function() {
}
};


var mainWindow = null;
var hardwareWindow = null;
var isClose = true;
Expand All @@ -269,12 +265,17 @@ app.on('window-all-closed', function() {
});

var shouldQuit = app.makeSingleInstance(function(commandLine, workingDirectory) {
// 어플리케이션을 중복 실행했습니다. 주 어플리케이션 인스턴스를 활성화 합니다.
// 어플리케이션을 중복 실행했습니다. 주 어플리케이션 인스턴스를 활성화 합니다.
if (mainWindow) {
if (mainWindow.isMinimized())
mainWindow.restore();
mainWindow.focus();

if(Array.isArray(commandLine) && commandLine[1]) {
mainWindow.webContents.send('loadProject', commandLine[1]);
}
}

return true;
});

Expand Down Expand Up @@ -317,10 +318,25 @@ app.once('ready', function() {
e.preventDefault();
});
mainWindow.on('close', function(e) {
if(hardwareWindow) {
hardwareWindow.close();
}
mainWindow.webContents.send('main-close');
});
mainWindow.on('closed', function() {
mainWindow = null;
app.quit();
process.exit(0);
});

let inspectorShortcut = '';
if(process.platform == 'darwin') {
inspectorShortcut = 'Command+Alt+i';
} else {
inspectorShortcut = 'Control+Shift+i';
}
globalShortcut.register(inspectorShortcut, () => {
mainWindow.webContents.openDevTools();
});
});

Expand Down Expand Up @@ -356,24 +372,10 @@ ipcMain.on('openHardware', function(event, arg) {
}

hardwareWindow.show();
} else {
if (hardwareWindow.isMinimized())
hardwareWindow.restore();
hardwareWindow.focus();
}

});

// try{
// if (handleStartupEvent()) {
// logger('handleStartupEvent = true');
// app.quit();
// process.exit(0);
// // setTimeout(function () {
// // }, 1000)
// return;
// } else {
// logger('handleStartupEvent = false');

// }
// } catch(e) {
// logger(e.stack);
// app.quit();
// process.exit(0);
// }
Loading

0 comments on commit 1bdd02c

Please sign in to comment.