Tweaks to my Mac build script.

This commit is contained in:
James Turner 2017-01-10 18:12:12 +00:00
parent 771c2a2abe
commit 0409f339ae

View File

@ -14,8 +14,9 @@ doInit = false
doClean = false doClean = false
doPackage = false doPackage = false
cmakeCommonArgs = "-G Xcode -DCMAKE_INSTALL_PREFIX=#{baseDir}/dist" cmakePlatformArgs = "-G Xcode"
cmakeSGArgs = "-DSIMGEAR_SHARED=1 -DENABLE_CURL=0" cmakeCommonArgs = "-DCMAKE_INSTALL_PREFIX=#{baseDir}/dist"
cmakeSGArgs = "-DSIMGEAR_SHARED=1"
cmakeFGArgs = "-DSIMGEAR_SHARED=1" cmakeFGArgs = "-DSIMGEAR_SHARED=1"
sfUser = "jmturner" sfUser = "jmturner"
@ -58,7 +59,7 @@ end
def createDirs() def createDirs()
`mkdir -p sgbuild` `mkdir -p sgbuild`
`mkdir -p fgbuild` `mkdir -p fgbuild`
`mkdir -p osg_mac_release_build` `mkdir -p osg_fg_build`
end end
# path is needed for Cmake & running macdeployqt # path is needed for Cmake & running macdeployqt
@ -70,14 +71,12 @@ if doClean
puts "Cleaning build dirs" puts "Cleaning build dirs"
`rm -r sgbuild` `rm -r sgbuild`
`rm -r fgbuild` `rm -r fgbuild`
`rm -r osg_mac_release_build` `rm -r osg_fg_build`
createDirs()
end end
if doInit if doInit
puts "Doing init" puts "Doing init"
cloneEverything() cloneEverything()
createDirs();
end end
if doPull if doPull
@ -95,9 +94,11 @@ if doPull
`git pull #{gitArgs}` `git pull #{gitArgs}`
end end
Dir.chdir "#{baseDir}/osg_mac_release_build" createDirs()
Dir.chdir "#{baseDir}/osg_fg_build"
if doCMake or !File.exist?("#{Dir.pwd}/Makefile") if doCMake or !File.exist?("#{Dir.pwd}/Makefile")
`cmake ../osg -DCMAKE_INSTALL_PREFIX=#{baseDir}/dist` `cmake ../osg #{cmakeCommonArgs}`
end end
puts "Building OpenSceneGraph" puts "Building OpenSceneGraph"
@ -107,7 +108,7 @@ puts "Building OpenSceneGraph"
Dir.chdir "#{baseDir}/sgbuild" Dir.chdir "#{baseDir}/sgbuild"
if doCMake or !File.exist?("#{Dir.pwd}/SimGear.xcodeproj") if doCMake or !File.exist?("#{Dir.pwd}/SimGear.xcodeproj")
`cmake ../simgear #{cmakeCommonArgs} #{cmakeSGArgs}` `cmake ../simgear #{cmakePlatformArgs} #{cmakeCommonArgs} #{cmakeSGArgs}`
end end
puts "Building SimGear Debug" puts "Building SimGear Debug"
@ -122,7 +123,7 @@ if doCMake or !File.exist?("#{Dir.pwd}/FlightGear.xcodeproj")
if qtPath != "" if qtPath != ""
cmakeFGArgs = '-DENABLE_QT=1' cmakeFGArgs = '-DENABLE_QT=1'
end end
`cmake ../flightgear #{cmakeCommonArgs} #{cmakeFGArgs}` `cmake ../flightgear #{cmakePlatformArgs} #{cmakeCommonArgs} #{cmakeFGArgs}`
end end
puts "Building FlightGear Debug" puts "Building FlightGear Debug"