Skip to content

Commit

Permalink
iPhone support. To build libNu.a, "cd iphone; nuke"
Browse files Browse the repository at this point in the history
This commit also adds "baked in" versions of the
Nu source files in the nu directory.  These need
to be updated whenever the corresponding nu files
change.  Do that with "nuke bake" in the top-level
directory.  As a future enhancement, it would be
great to remove these files from the repo and
build them on demand. Also, we are currently baking
a lot of extra stuff into the iPhone libNu.a.
  • Loading branch information
Tim Burks committed Mar 12, 2008
1 parent e994c7e commit 7f1d750
Show file tree
Hide file tree
Showing 27 changed files with 10,040 additions and 14 deletions.
5 changes: 3 additions & 2 deletions Nukefile
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ END)
;; source files
(set @c_files (filelist "^objc/.*\.c$"))
(set @m_files (filelist "^objc/.*\.m$"))
(@m_files unionSet:(filelist "^baked/.*\.m$"))
(set @nu_files (filelist "^nu/.*\.nu$"))
(set @icon_files (filelist "^lib/.*\.icns$"))
(set @nib_files '("share/nu/resources/English.lproj/MainMenu.nib"))
Expand Down Expand Up @@ -96,7 +97,7 @@ END)
(SH "cp objc/Nu.h #{@framework_headers_dir}"))

(task "clobber" => "clean" is
(SH "rm -f objc/baked_*.m")
(SH "rm -f baked/*.m")
(SH "rm -rf nush #{@framework_dir} doc")

((filelist "^examples/[^/]*$") each:
Expand Down Expand Up @@ -188,6 +189,6 @@ END)
(nu_files each:
(do (nu_file)
(set basename (((nu_file pathComponents) lastObject) stringByDeletingPathExtension))
(set command "nubake #{nu_file} -n 'baked_#{basename}' -o objc/baked_#{basename}.m")
(set command "nubake #{nu_file} -n 'baked_#{basename}' -o baked/baked_#{basename}.m")
(puts command)
(system command))))
2 changes: 2 additions & 0 deletions baked/README
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Files in this directory are automatically generated. Regenerate them with the "nuke bake" task.
In the future, they will be removed from the repository and generated as part of the build process.
513 changes: 513 additions & 0 deletions baked/baked_beautify.m

Large diffs are not rendered by default.

95 changes: 95 additions & 0 deletions baked/baked_bridgesupport.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
#import <Foundation/Foundation.h>
#import <Nu/Nu.h>

id baked_bridgesupport() {
return _nucell(_nusymbol((const char[]){112,114,111,103,110,0}),
_nucell(_nucell(_nusymbol((const char[]){103,108,111,98,97,108,0}),
_nucell(_nusymbol((const char[]){66,114,105,100,103,101,83,117,112,112,111,114,116,0}),
_nucell(_nucell(_nusymbol((const char[]){100,105,99,116,0}),
_nucell(_nusymbol((const char[]){102,114,97,109,101,119,111,114,107,115,58,0}),
_nucell(_nucell(_nusymbol((const char[]){100,105,99,116,0}),
_nunull()),
_nucell(_nusymbol((const char[]){99,111,110,115,116,97,110,116,115,58,0}),
_nucell(_nucell(_nusymbol((const char[]){100,105,99,116,0}),
_nunull()),
_nucell(_nusymbol((const char[]){101,110,117,109,115,58,0}),
_nucell(_nucell(_nusymbol((const char[]){100,105,99,116,0}),
_nunull()),
_nucell(_nusymbol((const char[]){102,117,110,99,116,105,111,110,115,58,0}),
_nucell(_nucell(_nusymbol((const char[]){100,105,99,116,0}),
_nunull()),
_nunull()))))))))),
_nunull()))),
_nucell(_nucell(_nusymbol((const char[]){103,108,111,98,97,108,0}),
_nucell(_nusymbol((const char[]){105,109,112,111,114,116,0}),
_nucell(_nucell(_nusymbol((const char[]){109,97,99,114,111,0}),
_nucell(_nusymbol((const char[]){95,0}),
_nucell(_nucell(_nusymbol((const char[]){78,117,66,114,105,100,103,101,83,117,112,112,111,114,116,0}),
_nucell(_nusymbol((const char[]){105,109,112,111,114,116,70,114,97,109,101,119,111,114,107,58,0}),
_nucell(_nucell(_nucell(_nusymbol((const char[]){109,97,114,103,115,0}),
_nucell(_nusymbol((const char[]){99,97,114,0}),
_nunull())),
_nucell(_nusymbol((const char[]){115,116,114,105,110,103,86,97,108,117,101,0}),
_nunull())),
_nucell(_nusymbol((const char[]){102,114,111,109,80,97,116,104,58,0}),
_nucell(_nucell(_nusymbol((const char[]){105,102,0}),
_nucell(_nucell(_nusymbol((const char[]){109,97,114,103,115,0}),
_nucell(_nusymbol((const char[]){99,100,114,0}),
_nunull())),
_nucell(_nucell(_nusymbol((const char[]){116,104,101,110,0}),
_nucell(_nucell(_nusymbol((const char[]){101,118,97,108,0}),
_nucell(_nucell(_nucell(_nusymbol((const char[]){109,97,114,103,115,0}),
_nucell(_nusymbol((const char[]){99,100,114,0}),
_nunull())),
_nucell(_nusymbol((const char[]){99,97,114,0}),
_nunull())),
_nunull())),
_nunull())),
_nucell(_nucell(_nusymbol((const char[]){101,108,115,101,0}),
_nucell(_nusymbol((const char[]){110,105,108,0}),
_nunull())),
_nunull())))),
_nucell(_nusymbol((const char[]){105,110,116,111,68,105,99,116,105,111,110,97,114,121,58,0}),
_nucell(_nusymbol((const char[]){66,114,105,100,103,101,83,117,112,112,111,114,116,0}),
_nunull()))))))),
_nunull()))),
_nunull()))),
_nucell(_nucell(_nusymbol((const char[]){103,108,111,98,97,108,0}),
_nucell(_nusymbol((const char[]){105,109,112,111,114,116,45,115,121,115,116,101,109,0}),
_nucell(_nucell(_nusymbol((const char[]){109,97,99,114,111,0}),
_nucell(_nusymbol((const char[]){95,0}),
_nucell(_nucell(_nucell(_nucell(_nusymbol((const char[]){78,83,83,116,114,105,110,103,0}),
_nucell(_nusymbol((const char[]){115,116,114,105,110,103,87,105,116,104,83,104,101,108,108,67,111,109,109,97,110,100,58,0}),
_nucell(_nustring((const char[]){108,115,32,47,83,121,115,116,101,109,47,76,105,98,114,97,114,121,47,70,114,97,109,101,119,111,114,107,115,0}),
_nunull()))),
_nucell(_nusymbol((const char[]){108,105,110,101,115,0}),
_nunull())),
_nucell(_nusymbol((const char[]){101,97,99,104,58,0}),
_nucell(_nucell(_nusymbol((const char[]){100,111,0}),
_nucell(_nucell(_nusymbol((const char[]){108,105,110,101,0}),
_nunull()),
_nucell(_nucell(_nusymbol((const char[]){115,101,116,0}),
_nucell(_nusymbol((const char[]){110,97,109,101,0}),
_nucell(_nucell(_nucell(_nusymbol((const char[]){108,105,110,101,0}),
_nucell(_nusymbol((const char[]){99,111,109,112,111,110,101,110,116,115,83,101,112,97,114,97,116,101,100,66,121,83,116,114,105,110,103,58,0}),
_nucell(_nustring((const char[]){46,0}),
_nunull()))),
_nucell(_nunumberd(0),
_nunull())),
_nunull()))),
_nucell(_nucell(_nusymbol((const char[]){101,118,97,108,0}),
_nucell(_nucell(_nusymbol((const char[]){99,111,110,115,0}),
_nucell(_nucell(_nusymbol((const char[]){113,117,111,116,101,0}),
_nucell(_nusymbol((const char[]){105,109,112,111,114,116,0}),
_nunull())),
_nucell(_nucell(_nusymbol((const char[]){108,105,115,116,0}),
_nucell(_nusymbol((const char[]){110,97,109,101,0}),
_nunull())),
_nunull()))),
_nunull())),
_nunull())))),
_nunull()))),
_nunull()))),
_nunull()))),
_nunull()))));
}
Loading

0 comments on commit 7f1d750

Please sign in to comment.