Skip to content
This repository has been archived by the owner on Jan 22, 2019. It is now read-only.

Commit

Permalink
Converted ServiceFB and native tasks
Browse files Browse the repository at this point in the history
  • Loading branch information
luislavena committed Dec 31, 2009
1 parent c703a61 commit 0253bb4
Show file tree
Hide file tree
Showing 6 changed files with 85 additions and 6 deletions.
6 changes: 6 additions & 0 deletions .gitignore
@@ -0,0 +1,6 @@
*.o
*.a
*.exe
bin
pkg
tmp
2 changes: 1 addition & 1 deletion tasks/gem.rake
@@ -1,6 +1,6 @@
require 'hoe' require 'hoe'


Hoe.spec 'mongrel_service' do HOE = Hoe.spec 'mongrel_service' do
self.version = '0.4.0.beta1' self.version = '0.4.0.beta1'


developer 'Luis Lavena', 'luislavena@gmail.com' developer 'Luis Lavena', 'luislavena@gmail.com'
Expand Down
1 change: 0 additions & 1 deletion tasks/native.rake

This file was deleted.

40 changes: 40 additions & 0 deletions tasks/native_lib.rake
@@ -0,0 +1,40 @@
require 'tools/freebasic'

# ServiceFB namespace (lib)
namespace :lib do
lib_options = {
:debug => false,
:profile => false,
:errorchecking => :ex,
:mt => true,
:pedantic => true
}

lib_options[:debug] = true if ENV['DEBUG']
lib_options[:profile] = true if ENV['PROFILE']
lib_options[:errorchecking] = :exx if ENV['EXX']
lib_options[:pedantic] = false if ENV['NOPEDANTIC']

project_task 'servicefb' do
lib 'ServiceFB'
build_to 'lib'

define 'SERVICEFB_DEBUG_LOG' unless ENV['RELEASE']
source 'lib/ServiceFB/ServiceFB.bas'

option lib_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 lib_options
end
end

task :native_lib => ["lib:build"]
task :clean => ["lib:clobber"]
37 changes: 37 additions & 0 deletions tasks/native_service.rake
@@ -0,0 +1,37 @@
require 'tools/freebasic'

# mongrel_service (native)
namespace :native do
exe_options = {
:debug => false,
:profile => false,
:errorchecking => :ex,
:mt => true,
:pedantic => true
}

exe_options[:debug] = true if ENV['DEBUG']
exe_options[:profile] = true if ENV['PROFILE']
exe_options[:errorchecking] = :exx if ENV['EXX']
exe_options[:pedantic] = false if ENV['NOPEDANTIC']

project_task 'mongrel_service' do
executable 'mongrel_service'
build_to 'bin'

define 'DEBUG_LOG' unless ENV['RELEASE']
define "GEM_VERSION=#{HOE.spec.version}"

main 'native/mongrel_service.bas'
source 'native/console_process.bas'

lib_path 'lib'
library 'ServiceFB', 'ServiceFB_Utils'
library 'user32', 'advapi32', 'psapi'

option exe_options
end
end

task :native_service => [:native_lib, 'native:build']
task :clean => ['native:clobber']
5 changes: 1 addition & 4 deletions tools/freebasic.rb
Expand Up @@ -32,14 +32,11 @@
# rake projects:my_fb_project:rebuild # Force a rebuild of the my_fb_project files # rake projects:my_fb_project:rebuild # Force a rebuild of the my_fb_project files
# rake projects:rebuild # Rebuild all projects # rake projects:rebuild # Rebuild all projects


require 'rake/tasklib'
require 'pp'

module FreeBASIC module FreeBASIC
# this help me reduce the attempts to remove already removed files. # this help me reduce the attempts to remove already removed files.
# works with src_files # works with src_files
CLOBBER = Rake::FileList.new CLOBBER = Rake::FileList.new
ON_WINDOWS = (RUBY_PLATFORM =~ /mswin|cygwin|bccwin/) ON_WINDOWS = (RUBY_PLATFORM =~ /mingw|mswin/)


class ProjectTask class ProjectTask
attr_accessor :name attr_accessor :name
Expand Down

0 comments on commit 0253bb4

Please sign in to comment.