MCPcopy Create free account
hub / github.com/benfry/processing4 / handleNative

Method handleNative

app/src/processing/app/Library.java:145–178  ·  view source on GitHub ↗

Identify nativeLibraryFolder location for the current platform.

()

Source from the content-addressed store, hash-verified

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() {

Callers 1

handleMethod · 0.95

Calls 2

getVariantMethod · 0.95
getMethod · 0.65

Tested by

no test coverage detected