diff options
Diffstat (limited to 'projects/mongrel_service/Rakefile')
-rw-r--r-- | projects/mongrel_service/Rakefile | 178 |
1 files changed, 89 insertions, 89 deletions
diff --git a/projects/mongrel_service/Rakefile b/projects/mongrel_service/Rakefile index 78eeb58..fc00777 100644 --- a/projects/mongrel_service/Rakefile +++ b/projects/mongrel_service/Rakefile @@ -1,89 +1,89 @@ -require 'echoe'
-require 'tools/freebasic'
-
-# Task :package needs compile before doing the gem stuff.
-# (weird behavior of Rake?)
-task :package => [:compile]
-
-echoe_spec = Echoe.new("mongrel_service") do |p|
- p.summary = "Mongrel Native Win32 Service Plugin for Rails"
- p.summary += " (debug build)" unless ENV['RELEASE']
- p.description = "This plugin offer native win32 services for rails, powered by Mongrel."
- p.author = "Luis Lavena"
- p.platform = Gem::Platform::WIN32
- p.dependencies = ['gem_plugin >=0.2.2', 'mongrel >=1.0.1', 'win32-service >=0.5.0']
-
- p.need_tar_gz = false
- p.need_zip = true
- p.certificate_chain = ['~/gem_certificates/mongrel-public_cert.pem',
- '~/gem_certificates/luislavena-mongrel-public_cert.pem']
- p.require_signed = true
-end
-
-desc "Compile native code"
-task :compile => [:native_lib, :native_service]
-
-# global options shared by all the project in this Rakefile
-OPTIONS = {
- :debug => false,
- :profile => false,
- :errorchecking => :ex,
- :mt => true,
- :pedantic => true }
-
-OPTIONS[:debug] = true if ENV['DEBUG']
-OPTIONS[:profile] = true if ENV['PROFILE']
-OPTIONS[:errorchecking] = :exx if ENV['EXX']
-OPTIONS[:pedantic] = false if ENV['NOPEDANTIC']
-
-# ServiceFB namespace (lib)
-namespace :lib do
- project_task 'servicefb' do
- lib 'ServiceFB'
- build_to 'lib'
-
- define 'SERVICEFB_DEBUG_LOG' unless ENV['RELEASE']
- source 'lib/ServiceFB/ServiceFB.bas'
-
- option OPTIONS
- end
-
- project_task 'servicefb_utils' do
- lib 'ServiceFB_Utils'
- build_to 'lib'
-
- define 'SERVICEFB_DEBUG_LOG' unless ENV['RELEASE']
- source 'lib/ServiceFB/ServiceFB_Utils.bas'
-
- option OPTIONS
- end
-end
-
-# add lib namespace to global tasks
-#include_projects_of :lib
-task :native_lib => "lib:build"
-task :clean => "lib:clobber"
-
-# mongrel_service (native)
-namespace :native do
- project_task 'mongrel_service' do
- executable 'mongrel_service'
- build_to 'bin'
-
- define 'DEBUG_LOG' unless ENV['RELEASE']
- define "GEM_VERSION=#{echoe_spec.version}"
-
- main 'native/mongrel_service.bas'
- source 'native/console_process.bas'
-
- lib_path 'lib'
- library 'ServiceFB', 'ServiceFB_Utils'
- library 'user32', 'advapi32', 'psapi'
-
- option OPTIONS
- end
-end
-
-#include_projects_of :native
-task :native_service => "native:build"
-task :clean => "native:clobber"
+require 'echoe' +require 'tools/freebasic' + +# Task :package needs compile before doing the gem stuff. +# (weird behavior of Rake?) +task :package => [:compile] + +echoe_spec = Echoe.new("mongrel_service") do |p| + p.summary = "Mongrel Native Win32 Service Plugin for Rails" + p.summary += " (debug build)" unless ENV['RELEASE'] + p.description = "This plugin offer native win32 services for rails, powered by Mongrel." + p.author = "Luis Lavena" + p.platform = Gem::Platform::WIN32 + p.dependencies = ['gem_plugin >=0.2.3', 'mongrel >=1.0.2', 'win32-service >=0.5.0'] + + p.need_tar_gz = false + p.need_zip = true + p.certificate_chain = ['~/gem_certificates/mongrel-public_cert.pem', + '~/gem_certificates/luislavena-mongrel-public_cert.pem'] + p.require_signed = true +end + +desc "Compile native code" +task :compile => [:native_lib, :native_service] + +# global options shared by all the project in this Rakefile +OPTIONS = { + :debug => false, + :profile => false, + :errorchecking => :ex, + :mt => true, + :pedantic => true } + +OPTIONS[:debug] = true if ENV['DEBUG'] +OPTIONS[:profile] = true if ENV['PROFILE'] +OPTIONS[:errorchecking] = :exx if ENV['EXX'] +OPTIONS[:pedantic] = false if ENV['NOPEDANTIC'] + +# ServiceFB namespace (lib) +namespace :lib do + project_task 'servicefb' do + lib 'ServiceFB' + build_to 'lib' + + define 'SERVICEFB_DEBUG_LOG' unless ENV['RELEASE'] + source 'lib/ServiceFB/ServiceFB.bas' + + option OPTIONS + end + + project_task 'servicefb_utils' do + lib 'ServiceFB_Utils' + build_to 'lib' + + define 'SERVICEFB_DEBUG_LOG' unless ENV['RELEASE'] + source 'lib/ServiceFB/ServiceFB_Utils.bas' + + option OPTIONS + end +end + +# add lib namespace to global tasks +#include_projects_of :lib +task :native_lib => "lib:build" +task :clean => "lib:clobber" + +# mongrel_service (native) +namespace :native do + project_task 'mongrel_service' do + executable 'mongrel_service' + build_to 'bin' + + define 'DEBUG_LOG' unless ENV['RELEASE'] + define "GEM_VERSION=#{echoe_spec.version}" + + main 'native/mongrel_service.bas' + source 'native/console_process.bas' + + lib_path 'lib' + library 'ServiceFB', 'ServiceFB_Utils' + library 'user32', 'advapi32', 'psapi' + + option OPTIONS + end +end + +#include_projects_of :native +task :native_service => "native:build" +task :clean => "native:clobber" |