代码拉取完成,页面将自动刷新
require 'dev'
require 'rbconfig'
require_relative 'lib/admin.rb'
require 'execute'
CLEAN.include('example/*.wxs','tests/test/**','tests/wixgem_install*.*', 'tests/rakefile.rb', 'tests/Gemfile')
task :commit => [:add]
task :setup do
FileUtils.chmod('a-w', 'tests/test_files/ReadOnly.txt')
raise 'Wixtoolset must be installed' if(ENV['WIX'].nil?)
end
task :add => [:clean]
task :pre_build do
Dir.glob('**/*.wxs').each { |f| File.delete(f) } # Default build task tries to build these
end
task :build => [:pre_build] do
Dir.chdir('example') do
cmd = Execute.new("#{RbConfig::CONFIG['bindir']}/rake.bat")
cmd.execute
end
Dir.chdir('tests/CustomActionExe') do
cmd = Execute.new('ocra hello_world.rb', {echo_output: false})
cmd.execute
end
end
task :test => [:setup] do
Dir.chdir('tests') do
MSBuild.get_build_commands 'COMObject/COMObject.sln'
cmd = Execute.new("#{RbConfig::CONFIG['bindir']}/ruby.exe all_tests.rb", {echo_output: false})
cmd.execute
end
end
unless(admin?)
puts '!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!'
puts 'No user interaction requred when running rakefile as an administrator '
puts '!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!'
end
# Yard command line for realtime feed back of Readme.md modifications
# yard server --reload
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。