Identify nativeLibraryFolder location for the current platform.
()
| 143 | * Identify nativeLibraryFolder location for the current platform. |
| 144 | */ |
| 145 | private void handleNative() { |
| 146 | String variant = Platform.getVariant(); |
| 147 | |
| 148 | // use the root of the library folder as the default |
| 149 | File nativeLibraryFolder = libraryFolder; |
| 150 | |
| 151 | /* |
| 152 | String hostPlatform = Platform.getName(); |
| 153 | // see if there's a 'windows', 'macosx', or 'linux' folder |
| 154 | File hostLibrary = new File(libraryFolder, hostPlatform); |
| 155 | if (hostLibrary.exists()) { |
| 156 | nativeLibraryFolder = hostLibrary; |
| 157 | } |
| 158 | */ |
| 159 | |
| 160 | // see if there's a {platform}-{arch} folder |
| 161 | File hostLibrary = new File(libraryFolder, variant); |
| 162 | if (hostLibrary.exists()) { |
| 163 | nativeLibraryFolder = hostLibrary; |
| 164 | |
| 165 | } else { |
| 166 | // if not found, try the old-style naming |
| 167 | String oldName = newToOld.get(variant); |
| 168 | if (oldName != null) { |
| 169 | hostLibrary = new File(libraryFolder, oldName); |
| 170 | if (hostLibrary.exists()) { |
| 171 | nativeLibraryFolder = hostLibrary; |
| 172 | } |
| 173 | } |
| 174 | } |
| 175 | |
| 176 | // save that folder for later use |
| 177 | nativeLibraryPath = nativeLibraryFolder.getAbsolutePath(); |
| 178 | } |
| 179 | |
| 180 | |
| 181 | private void handleExports() { |
no test coverage detected