Skip to content

Commit a1b733d

Browse files
committed
Revise with feedback from GitHub review.
1 parent 76ef735 commit a1b733d

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

Docs/FHS Bundles.md

+11-11
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ The base name of this bundle is the name of this directory, removing the extensi
2323

2424
### Bundle Paths
2525

26-
The bundle's `.resources` directory contains resources much like an iOS-style flat bundle. Unlike on iOS, however, executables are not contained directly inside this directory. Instead, given that the bundle exists in `share/MyFramework.resources`, then an installed bundle will source from the following additional paths within the prefix the bundle is installed in (the parent directory of the `share` directory):
26+
The bundle's `.resources` directory contains resources much like an [iOS-style flat bundle](https://developer.apple.com/library/content/documentation/CoreFoundation/Conceptual/CFBundles/BundleTypes/BundleTypes.html#//apple_ref/doc/uid/10000123i-CH101-SW1). Unlike on iOS, however, executables are not contained directly inside this directory. Instead, given that the bundle exists in `share/MyFramework.resources`, then an installed bundle will source from the following additional paths within the prefix the bundle is installed in (the parent directory of the `share` directory):
2727

2828
- The main executable will be searched in the `bin`, `sbin`, or `lib…` directories.
2929
- Executable bundles will search `bin`, then `sbin`, for an executable with the same base name as the resources folder, plus any platform prefix or suffix for executables. e.g.: `bin/MyApp`.
@@ -78,19 +78,19 @@ We will also support freestanding bundles on platforms that also support install
7878

7979
The bundle path for an installed bundle is the same as its resources path. That's the path that needs to be passed into `CFBundleCreate()` and equivalents for the bundle to be successfully created; passing associated paths, including the path to the executable, will return `NULL`. [](#nullForInnerPaths)
8080

81-
The `.resources` directory functions exactly like an iOS bundle, returning the same paths. By way of example, for a freestanding bundle created with `CFBundleCreate(NULL, …(…"./MyFramework.resources"))`:
81+
The `.resources` directory functions exactly like an iOS bundle, returning the same paths. By way of example, for a freestanding bundle created with `CFBundleCreate(NULL, …(…"/opt/myapp/MyFramework.resources"))`:
8282

8383
Function | Path returned
8484
---|---
85-
`CFBundleCopyBundleURL` | `/MyFramework.resources`
86-
`CFBundleCopyExecutableURL` | `/libMyFramework.so`
87-
`CFBundleCopyResourcesDirectoryURL` | `/MyFramework.resources`
88-
`CFBundleCopySharedSupportURL` |`/MyFramework.resources/SharedSupport`
89-
`CFBundleCopyPrivateFrameworksURL` | `/MyFramework.resources/Frameworks`
90-
`CFBundleCopySharedFrameworksURL` | `/MyFramework.resources/SharedFrameworks`
91-
`CFBundleCopyBuiltInPlugInsURL` | `/MyFramework.resources/PlugIns`
92-
`CFBundleCopyAuxiliaryExecutableURL(…, CFSTR("myexec"))` | `/MyFramework.resources/myexec`
93-
`CFBundleCopyResourceURL(…, CFSTR("Welcome"), CFSTR("txt") …)` | `/MyFramework.resources/en.lproj/Welcome.txt`
85+
`CFBundleCopyBundleURL` | `/opt/myapp/MyFramework.resources`
86+
`CFBundleCopyExecutableURL` | `/opt/myapp/libMyFramework.so`
87+
`CFBundleCopyResourcesDirectoryURL` | `/opt/myapp/MyFramework.resources`
88+
`CFBundleCopySharedSupportURL` |`/opt/myapp/MyFramework.resources/SharedSupport`
89+
`CFBundleCopyPrivateFrameworksURL` | `/opt/myapp/MyFramework.resources/Frameworks`
90+
`CFBundleCopySharedFrameworksURL` | `/opt/myapp/MyFramework.resources/SharedFrameworks`
91+
`CFBundleCopyBuiltInPlugInsURL` | `/opt/myapp/MyFramework.resources/PlugIns`
92+
`CFBundleCopyAuxiliaryExecutableURL(…, CFSTR("myexec"))` | `/opt/myapp/MyFramework.resources/myexec`
93+
`CFBundleCopyResourceURL(…, CFSTR("Welcome"), CFSTR("txt") …)` | `/opt/myapp/MyFramework.resources/en.lproj/Welcome.txt`
9494

9595
### Embedded Frameworks
9696

0 commit comments

Comments
 (0)