mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-08-25 21:17:03 +00:00
Fix for copy bug and added capp changes.
Reviewed by me.
This commit is contained in:
@@ -27,5 +27,5 @@ end
|
||||
|
||||
#Framework in environment directory
|
||||
file_d $ENVIRONMENT_PRODUCT => [:BlendKit] do
|
||||
cp_r($BUILD_PATH, $ENVIRONMENT_PRODUCT)
|
||||
cp_r(File.join($BUILD_PATH, '.'), $ENVIRONMENT_PRODUCT)
|
||||
end
|
||||
|
||||
+1
-1
@@ -33,7 +33,7 @@ end
|
||||
|
||||
#Framework in environment directory
|
||||
file_d $ENVIRONMENT_PRODUCT => [:AppKit] do
|
||||
cp_r($BUILD_PATH, $ENVIRONMENT_PRODUCT)
|
||||
cp_r(File.join($BUILD_PATH, '.'), $ENVIRONMENT_PRODUCT)
|
||||
end
|
||||
|
||||
ThemeFiles = FileList['Themes/Aristo/*']
|
||||
|
||||
@@ -93,6 +93,11 @@
|
||||
return className ? CPClassFromString(className) : Nil;
|
||||
}
|
||||
|
||||
- (CPString)pathForResource:(CPString)aFilename
|
||||
{
|
||||
return [self resourcePath] + '/' + aFilename;
|
||||
}
|
||||
|
||||
- (CPDictionary)infoDictionary
|
||||
{
|
||||
return info;
|
||||
|
||||
+1
-1
@@ -27,5 +27,5 @@ end
|
||||
|
||||
#Framework in environment directory
|
||||
file_d $ENVIRONMENT_PRODUCT => [:Foundation] do
|
||||
cp_r($BUILD_PATH, $ENVIRONMENT_PRODUCT)
|
||||
cp_r(File.join($BUILD_PATH, '.'), $ENVIRONMENT_PRODUCT)
|
||||
end
|
||||
|
||||
@@ -46,7 +46,7 @@ end
|
||||
|
||||
#Framework in environment directory
|
||||
file_d $ENVIRONMENT_PRODUCT => [:Products] do
|
||||
cp_r($PRODUCT, $ENVIRONMENT_PRODUCT)
|
||||
cp_r(File.join($PRODUCT, '.'), $ENVIRONMENT_PRODUCT)
|
||||
end
|
||||
|
||||
def platform_flags(*platforms)
|
||||
|
||||
+1
-1
@@ -22,7 +22,7 @@ ObjectiveJ::BundleTask.new(:capp) do |t|
|
||||
t.email = 'feedback @nospam@ 280north.com'
|
||||
t.summary = 'Setup up Cappuccino projects'
|
||||
t.sources = FileList['*.j']
|
||||
t.resources = FileList['Resources/*']
|
||||
t.resources = FileList['Resources/*', 'Templates']
|
||||
t.license = ObjectiveJ::License::LGPL_v2_1
|
||||
t.build_path = $BUILD_PATH
|
||||
t.flag = 'DEBUG' if $CONFIGURATION == 'Debug'
|
||||
|
||||
+19
-7
@@ -1,14 +1,18 @@
|
||||
|
||||
importClass(java.lang.System);
|
||||
importClass(java.io.File);
|
||||
importClass(java.io.FileWriter);
|
||||
importClass(java.io.FileOutputStream);
|
||||
importClass(java.io.BufferedWriter);
|
||||
importClass(java.io.OutputStreamWriter);
|
||||
|
||||
@import <Foundation/Foundation.j>
|
||||
|
||||
function main()
|
||||
{
|
||||
if (arguments.length < 1)
|
||||
return printUsage();
|
||||
|
||||
|
||||
var index = 0,
|
||||
count = arguments.length,
|
||||
|
||||
@@ -43,7 +47,7 @@ function main()
|
||||
}
|
||||
}
|
||||
|
||||
var sourceTemplate = new File(OBJJ_HOME + "/lib/steam/Templates/" + template),
|
||||
var sourceTemplate = new File(OBJJ_HOME + "/lib/capp/Resources/Templates/" + template),
|
||||
destinationProject = new File(destination);
|
||||
|
||||
if (!destinationProject.exists())
|
||||
@@ -67,7 +71,7 @@ function main()
|
||||
createFrameworksInFile(destinationProject, shouldSymbolicallyLink);
|
||||
}
|
||||
else
|
||||
System.out.println("Directory already exists");
|
||||
print("Directory already exists");
|
||||
}
|
||||
|
||||
function createFrameworksInFile(/*File*/ aFile, /*Boolean*/ shouldSymbolicallyLink)
|
||||
@@ -77,12 +81,10 @@ function createFrameworksInFile(/*File*/ aFile, /*Boolean*/ shouldSymbolicallyLi
|
||||
|
||||
if (!shouldSymbolicallyLink)
|
||||
{
|
||||
var sourceFrameworks = new File(OBJJ_HOME + "/lib/Frameworks"),
|
||||
sourceDebugFrameworks = new File(OBJJ_HOME + "/lib/Frameworks-Debug");
|
||||
var sourceFrameworks = new File(OBJJ_HOME + "/lib/Frameworks");
|
||||
|
||||
exec(["cp", "-vR", sourceFrameworks.getCanonicalPath(), destinationFrameworks.getCanonicalPath()], true);
|
||||
exec(["cp", "-vR", sourceDebugFrameworks.getCanonicalPath(), destinationDebugFrameworks.getCanonicalPath()], true);
|
||||
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -117,3 +119,13 @@ function printUsage()
|
||||
{
|
||||
print("capp /path/to/your/app [options]");
|
||||
}
|
||||
|
||||
|
||||
function writeContentsToFile(/*String*/ aString, /*File*/ aFile)
|
||||
{
|
||||
var writer = new BufferedWriter(new FileWriter(aFile));
|
||||
|
||||
writer.write(aString);
|
||||
|
||||
writer.close();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user