Oui.Macos_app_bundleSourcetype t = {app_bundle_dir : OpamFilename.Dir.t;MyApp.app
*)contents : OpamFilename.Dir.t;MyApp.app/Contents
*)macos : OpamFilename.Dir.t;MyApp.app/Contents/MacOS - executables go here
*)frameworks : OpamFilename.Dir.t;MyApp.app/Contents/Frameworks - dylibs go here
*)resources : OpamFilename.Dir.t;MyApp.app/Contents/Resources - everything else
*)app_name : string;Capitalized app name
*)binary_name : string;Main binary name
*)bundle_id : string;Bundle identifier
*)}Type representing a macOS .app bundle structure with all its directories
create ~installer_config ~work_dir creates the .app bundle directory structure and returns a bundle t.
Creates the following directory structure:
add_subdir bundle ~relative_path creates a subdirectory under Resources. Example: add_subdir bundle ~relative_path:"lib/myapp" creates Resources/lib/myapp/
copy_bundle_contents bundle ~bundle_dir copies all contents from bundle_dir to the Resources directory.
install_binary bundle ~binary_path copies the binary to the MacOS directory and makes it executable (chmod 755). The binary is copied as bundle.binary_name.
copy_dylib bundle ~dylib copies a dylib to the Frameworks directory
copy_to_resources bundle ~src ~relative_path copies a file to Resources/relative_path/basename(src). Creates the relative_path subdirectory if it doesn't exist