Advertisement
Guest User

bundle.content

a guest
Jun 26th, 2017
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import qbs
  2. import qbs.FileInfo
  3.  
  4. Project {
  5.     CppApplication {
  6.         Depends { name: "coreutils" }
  7.         Depends { name: "ib"; condition: qbs.targetOS.contains("darwin") }
  8.         Depends { name: "Qt"; submodules: ["core", "gui", "widgets"] }
  9.  
  10.         destinationDirectory: "."
  11.         name: "window"
  12.         targetName: bundle.isBundle ? "Window" : "window"
  13.         files: [
  14.             "main.cpp",
  15.             "assetcatalog1.xcassets",
  16.             "assetcatalog2.xcassets",
  17.             "white.iconset",
  18.             "MainMenu.xib",
  19.             "Storyboard.storyboard"
  20.         ]
  21.  
  22.         Group {
  23.             fileTagsFilter: bundle.isBundle ? ["bundle.content"] : ["application"]
  24.             qbs.install: true
  25.             qbs.installDir: bundle.isBundle ? "." : (qbs.targetOS.contains("windows") ? "" : "bin")
  26.             qbs.installSourceBase: project.buildDirectory + '/' + product.destinationDirectory
  27.         }
  28.     }
  29.  
  30.     DynamicLibrary {
  31.         Depends { name: "cpp" }
  32.  
  33.         destinationDirectory: "Frameworks"
  34.         name: "coreutils"
  35.         targetName: bundle.isBundle ? "CoreUtils" : "coreutils"
  36.         files: ["coreutils.cpp", "coreutils.h"]
  37.  
  38.         Group {
  39.             fileTagsFilter: bundle.isBundle ? ["bundle.content"] : ["dynamiclibrary", "dynamiclibrary_symlink", "dynamiclibrary_import"]
  40.             qbs.install: true
  41.             qbs.installDir: bundle.isBundle ? "Window.app/Contents/Frameworks" : (qbs.targetOS.contains("windows") ? "" : "lib")
  42.             qbs.installSourceBase: project.buildDirectory + '/' + product.destinationDirectory
  43.         }
  44.     }
  45. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement