CMake adjusted to allow proper releasing.

Mac side is ready.
This commit is contained in:
Jason Felds
2015-03-31 21:17:20 -04:00
parent 2291cd7f4d
commit b3addbedbc
4 changed files with 40 additions and 23 deletions
+20 -8
View File
@@ -29,14 +29,26 @@ File.open("#{Dir.pwd}/ProductInfo.h", "r") do |f|
end
end
end
# open ver.h in read-only mode
File.open("#{Dir.pwd}/ver.h", "r") do |f|
# read each line, matching for product version
f.each do |line|
if line.match( /^#define\s+product_version\s+"(.*?)"/ )
version = $1
end
end
# Determine if the Cmake generated verstub.cpp is available.
File.open("#{Dir.pwd}/verstub.cpp", "r") do |verFile|
verFile.each do |verLine|
if verLine.match( /^extern char const \* const product_version \= "(.*?)"/ )
version = $1
end
end
end
if (version.length == 0)
# open ver.h in read-only mode
File.open("#{Dir.pwd}/ver.h", "r") do |f|
# read each line, matching for product version
f.each do |line|
if line.match( /^#define\s+product_version\s+"(.*?)"/ )
version = $1
end
end
end
end
# replace whitespace with hyphens in the version string