private class IOSToolchain
super MakefileToolchain
- # Root of the iOS project, usually `.nit_compile/ios/`
+ # Root of the iOS project, usually `nit_compile/ios/`
var ios_project_root: String is noinit
# `app.nit` project for the current compilation target
# Compile C files in `ios_project_root/app_project.name`
redef fun compile_dir
do
- ios_project_root = super/"ios"
+ ios_project_root = root_compile_dir/"ios"
return ios_project_root/app_project.short_name
end
## Register all source files
for file in cfiles do pbx.add_file new PbxFile(file)
for file in compiler.extern_bodies do
- pbx.add_file new PbxFile(file.filename.basename(""))
+ pbx.add_file new PbxFile(file.filename.basename)
end
## TODO Register asset files
"xcodebuild -target '{project_name}' " +
"-destination 'platform=iOS Simulator,name=iPhone' " +
"-configuration {if release then "Release" else "Debug"} " +
+ "ONLY_ACTIVE_ARCH=NO "+
"-sdk iphonesimulator build"]
toolcontext.exec_and_check(args, "iOS project error")