platform/osx/build/osx.rake in rhodes-6.0.11 vs platform/osx/build/osx.rake in rhodes-6.2.0

- old
+ new

@@ -60,11 +60,11 @@ ENV['TARGET_TEMP_DIR'] = File.join(ENV['PWD'], "platform", "osx", "bin", "extensions") ENV["BUILD_DIR"] = File.join(ENV['PWD'], "platform", "osx", "bin", "RhoSimulator", "tmp") ENV["ARCHS"] = "x86_64 -g -gdwarf-2 -Xarch_x86_64 -mmacosx-version-min=10.5 -DRHODES_EMULATOR" ENV["RHO_ROOT"] = $startdir ENV["RHO_QMAKE"] = $qmake - ENV['RHO_QMAKE_SPEC'] = 'macx-g++' + ENV['RHO_QMAKE_SPEC'] = 'macx-clang' ENV['RHO_QMAKE_VARS'] = $rhosimulator_build ? 'RHOSIMULATOR_BUILD=1' : '' ENV["XCODEBUILD"] = $xcodebuild ENV["CONFIGURATION"] ||= $configuration ENV["SDK_NAME"] ||= $sdk @@ -76,11 +76,11 @@ ENV['TEMP_FILES_DIR'] = File.join(ENV['PWD'], "platform", "osx", "bin", "extensions", ext) if ext != 'openssl.so' $extensions_lib << " -l#{ext}" $pre_targetdeps << " ../../../osx/bin/extensions/lib#{ext}.a" end - Jake.run3('./build', extpath) + Jake.run3('./build', extpath, {}, true) end end end task :rhosimulator => ["config:rhosimulator", "config:set_osx_platform", "config:osx", "config:qt", "build:rhosimulator_version"] do @@ -99,11 +99,13 @@ PRE_TARGETDEPS += #{$pre_targetdeps} }) end app_path = File.join( $build_dir, 'RhoSimulator/RhoSimulator.app' ) - Jake.run3("#{$remove} -Rf #{app_path}") + if File.exists? app_path + Jake.run3("#{$remove} -Rf #{app_path}", nil, {}, true) + end File.open(File.join($startdir, 'platform/shared/qt/rhodes/resources/Info.plist'), "wb") do |fversion| fversion.write( %{<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist SYSTEM "file://localhost/System/Library/DTDs/PropertyList.dtd"> <plist version="0.9"> @@ -123,20 +125,26 @@ </dict> </plist> }) end - qmake = "#{$qmake} -o Makefile -r -spec macx-g++ RhoSimulator.pro RHOSIMULATOR_BUILD=1" - Jake.run3(qmake , $qt_project_dir) - #Jake.run3("#{$make} clean" , $qt_project_dir) - Jake.run3("#{$make} all" , $qt_project_dir) - Jake.run3("#{$macdeployqt} #{app_path}", $qt_project_dir) - #Jake.run3("#{$make} clean" , $qt_project_dir) + qmake = "#{$qmake} -o Makefile -r -spec macx-clang RhoSimulator.pro RHOSIMULATOR_BUILD=1" + Jake.run3(qmake , $qt_project_dir, {}, false) + #Jake.run3("#{$make} clean" , $qt_project_dir, {}, false) + Jake.run3("#{$make} all" , $qt_project_dir, {}, false) + Jake.run3("#{$macdeployqt} #{app_path}", $qt_project_dir, {}, false) + #Jake.run3("#{$make} clean" , $qt_project_dir, {}, true) end end end namespace "clean" do task :osx => ["config:rhosimulator", "config:set_osx_platform", "config:osx"] do rm_rf File.join($startdir, 'platform/osx/bin') end + namespace "osx" do + task :rhosimulator do + rhoSimDir = File.join( $build_dir, 'RhoSimulator/RhoSimulator.app' ) + FileUtils.rm_rf("#{rhoSimDir}/.", secure: true) + end + end end