Browse Subversion Repository
Contents of /script/adjustPackageVcproj.rb
Parent Directory
| Revision Log
Revision 359 -
( show annotations)
( download)
Wed Apr 16 09:41:28 2008 UTC
(15 years, 11 months ago)
by satofumi
File size: 1015 byte(s)
fix gl_gui/ComboBoxComponent
| 1 |
#!/usr/bin/ruby |
| 2 |
# Satofumi KAMIMURA |
| 3 |
# $Id$ |
| 4 |
# |
| 5 |
# svn 用から package 用の vcproj を作るスクリプト |
| 6 |
# 全ファイルは同一フォルダにあるので、そうなるように調整する |
| 7 |
|
| 8 |
|
| 9 |
if ARGV.length <= 0 |
| 10 |
print "usage:\n\truby " + __FILE__ + " <original_vcproj>\n" |
| 11 |
exit |
| 12 |
end |
| 13 |
original_file = ARGV[0] |
| 14 |
|
| 15 |
# 読み出し |
| 16 |
File.open(original_file) { |io| |
| 17 |
|
| 18 |
output = '' |
| 19 |
while line = io.gets |
| 20 |
|
| 21 |
# 置換 |
| 22 |
case line |
| 23 |
when /AdditionalIncludeDirectories/ |
| 24 |
output += "\t\t\t\tAdditionalIncludeDirectories=\"..\\..\\SDL_devel\\include;..\\src;.\" |
| 25 |
\n" |
| 26 |
when /AdditionalLibraryDirectories/ |
| 27 |
output += "\t\t\t\tAdditionalLibraryDirectories=\"..\\..\\SDL_devel\\lib\" |
| 28 |
\n" |
| 29 |
when /RelativePath=\".+\\(.+?)\"/ |
| 30 |
base_name = File.basename(Regexp.last_match[1]) |
| 31 |
output += "\t\t\tRelativePath=\"..\\src\\" + base_name + "\" |
| 32 |
\n" |
| 33 |
|
| 34 |
when /PreprocessorDefinitions=\"(.+)\"/ |
| 35 |
output += "\t\t\t\tPreprocessorDefinitions=\"" + Regexp.last_match[1] + ";HAVE_CONFIG_H;\" |
| 36 |
\n" |
| 37 |
else |
| 38 |
output += line |
| 39 |
end |
| 40 |
end |
| 41 |
print output |
| 42 |
} |
|