package oui
Install
dune-project
Dependency
Authors
Maintainers
Sources
sha256=b806a63c9acd581a00729a48f1faf86b294cc82936fc705fc628a20ede33f977
sha512=e61c35a6e08671634c1edabd7b0add926ac6e0c6c43c9e0a095e89efab7696b6ae5cc1ea0844283a80640c19adb36478bdfb2414bbcab5077ceb7fd16ae45e66
doc/oui.lib/Oui/Macos_app_bundle/index.html
Module Oui.Macos_app_bundleSource
type 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:
- work_dir/AppName.app/Contents/MacOS/
- work_dir/AppName.app/Contents/Frameworks/
- work_dir/AppName.app/Contents/Resources/
add_subdir bundle ~relative_path creates a subdirectory under Resources. Example: add_subdir bundle ~relative_path:"lib/myapp" creates Resources/lib/myapp/
File Operations
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