-
Notifications
You must be signed in to change notification settings - Fork 0
/
Rakefile
65 lines (53 loc) · 1.8 KB
/
Rakefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
require 'rubygems'
require 'fileutils'
require 'date'
require 'rubygems/package_task'
COMMON_FILES = FileList[
'COPYING',
'README.txt',
]
COMMON_CPP_FILES = COMMON_FILES + FileList[
'examples/*.cpp',
'examples/media/*',
'reference/cpp/**/*',
]
COMMON_RUBY_FILES = COMMON_FILES + FileList[
'Gosu/**/*', # include headers to make inline-C extensions possible
'lib/**/*.rb',
'examples/*.rb',
'examples/media/*',
]
GOSU_VERSION = ENV['GOSU_RELEASE_VERSION'] || '0.0.0'
# Sets everything except 'platform' and 'files'.
def apply_gemspec_defaults s
s.name = 'gosu'
s.version = GOSU_VERSION
s.summary = '2D game development library.'
s.description = <<EOS
2D game development library.
Gosu features easy to use and game-friendly interfaces to 2D graphics
and text (accelerated by 3D hardware), sound samples and music as well as
keyboard, mouse and gamepad/joystick input.
Also includes demos for integration with RMagick, Chipmunk and OpenGL.
EOS
s.authors = ['Julian Raschke']
s.date = Time.now.strftime '%Y-%m-%d'
s.email = '[email protected]'
s.homepage = 'http://libgosu.org/'
s.require_paths = ['lib']
s.required_ruby_version = Gem::Requirement.new('>= 1.8.2')
s.summary = '2D game development library.'
end
def upload filename
sh "scp -P 22000 '#{filename}' libgosu.org:/Library/WebServer/Documents/libgosu.org/downloads/"
end
def zip filename, files
sh "zip #{filename} #{files.map { |fn| "'#{fn}'" }.join(' ')}"
end
def tar filename, files
sh "COPYFILE_DISABLE=true tar -czf #{filename} #{files.to_a.uniq.map { |fn| "'#{fn}'" }.join(' ')}"
end
Dir['rake/*.rb'].each { |task| require task }
task :release => [:'mac:release', :'win:release', :'linux:release',
:'mac:release_gem', :'win:release_gem', :'linux:release_gem',
:'mac:app_wrapper']