mirror of
https://github.com/wu736139669/OzgGameRPG.git
synced 2026-08-05 06:24:38 +00:00
init
This commit is contained in:
@@ -0,0 +1,45 @@
|
||||
options
|
||||
{
|
||||
module_path="../../../cocos2dx/proj.marmalade/;../../../CocosDenshion/proj.marmalade/;../../../scripting/lua/proj.marmalade/;../../../extensions/proj.marmalade/;../../../external/chipmunk/proj.marmalade/;../../../external/Box2D/proj.marmalade/"
|
||||
s3e-data-dir = "../Resources"
|
||||
}
|
||||
|
||||
includepaths
|
||||
{
|
||||
../Classes
|
||||
}
|
||||
subprojects
|
||||
{
|
||||
IwGL
|
||||
cocos2dx
|
||||
CocosDenshion
|
||||
cocos2dx-ext
|
||||
Box2D
|
||||
lua
|
||||
}
|
||||
|
||||
defines
|
||||
{
|
||||
CC_ENABLE_BOX2D_INTEGRATION=1
|
||||
}
|
||||
|
||||
assets
|
||||
{
|
||||
(../Resources)
|
||||
.
|
||||
}
|
||||
|
||||
|
||||
files
|
||||
{
|
||||
[Main]
|
||||
(src)
|
||||
Main.h
|
||||
Main.cpp
|
||||
|
||||
(../Classes)
|
||||
AppDelegate.h
|
||||
AppDelegate.cpp
|
||||
}
|
||||
|
||||
postbuild "cccopy.py -s ../../../scripting/lua/script/ -d ../Resources/"
|
||||
@@ -0,0 +1,46 @@
|
||||
import os
|
||||
import shutil
|
||||
from optparse import OptionParser
|
||||
|
||||
def cccopy(sourcePath, destPath):
|
||||
for root, dirs, files in os.walk(sourcePath):
|
||||
#figure out where we're going
|
||||
dest = destPath + root.replace(sourcePath, '')
|
||||
destAbsPath = os.path.abspath(destPath)
|
||||
#if we're in a directory that doesn't exist in the destination folder then create a new folder
|
||||
if not os.path.isdir(dest):
|
||||
os.mkdir(dest)
|
||||
print os.path.abspath(dest).replace(destAbsPath, '')[1:] + ' directory created.'
|
||||
|
||||
#loop through all files in the directory
|
||||
for f in files:
|
||||
#compute current (old) & new file locations
|
||||
oldLoc = root + "/" + f
|
||||
newLoc = dest + "/" + f
|
||||
|
||||
if not os.path.isfile(newLoc):
|
||||
try:
|
||||
shutil.copy2(oldLoc, newLoc)
|
||||
print os.path.abspath(newLoc).replace(destAbsPath,'')[1:] + ' copied.'
|
||||
except IOError:
|
||||
print os.path.abspath(newLoc).replace(destAbsPath,'')[1:] + ' already exists.'
|
||||
|
||||
|
||||
|
||||
# main
|
||||
def main():
|
||||
# parse options
|
||||
parser = OptionParser(usage="%prog [options]")
|
||||
parser.add_option("-s", "--sourcePath", action="store", help="Source path", dest="sourcePath")
|
||||
parser.add_option("-d", "--destPath", action="store", help="Destination path", dest="destPath")
|
||||
|
||||
(options, args) = parser.parse_args()
|
||||
|
||||
if options.sourcePath and options.destPath:
|
||||
cccopy(options.sourcePath, options.destPath)
|
||||
else:
|
||||
parser.error("")
|
||||
|
||||
## entry
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
@@ -0,0 +1,19 @@
|
||||
// Application main file.
|
||||
|
||||
#include "Main.h"
|
||||
#include "../Classes/AppDelegate.h"
|
||||
|
||||
// Cocos2dx headers
|
||||
#include "cocos2d.h"
|
||||
|
||||
// Marmalade headers
|
||||
#include "IwGL.h"
|
||||
|
||||
USING_NS_CC;
|
||||
|
||||
int main()
|
||||
{
|
||||
AppDelegate app;
|
||||
|
||||
return cocos2d::CCApplication::sharedApplication()->Run();
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
#ifndef MAIN_H
|
||||
#define MAIN_H
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user