Commit graph

294 commits

Author SHA1 Message Date
rfm
4a4a802060 Set launch directory before AbsolutePathOfExecutable() needs it. 2024-12-08 13:40:59 +00:00
rfm
30d66f525b Fixes proposed by Frederick Seiffert 2024-12-07 16:20:28 +00:00
rfm
7c038fff64 Add debug of problems in finding absolute executable path 2024-12-06 21:45:55 +00:00
rfm
e7dd2f741a Don't assert inside lock protected region (could leave lock held). 2024-12-06 12:01:21 +00:00
rfm
a75d1c7b18 Add diagnositcs for faulure to get executable pathhhhhhhhhhhhhhhhhhhhhhhhh 2024-12-06 10:58:15 +00:00
rfm
f2368086f4 A bit of re-ordering to try to avoid premature initialisation of NSUserDefaults. 2024-11-27 16:25:08 +00:00
rfm
e64b7dc6b3 iuse bundle identifier for user defaults 2024-11-13 23:11:10 +00:00
rfm
6667842dd5 Update FSF address as requested by Gregory 2024-11-07 13:37:59 +00:00
Riccardo Mottola
08858caf29 cleanup biolerplate comments, enable autogsdoc comments, cleanup some old RCS/CVS tags, fix emails 2023-12-23 02:44:50 +01:00
rfm
cead13c823 cope with partial path to file containing class 2023-12-12 21:11:55 +00:00
rfm
48e599ae06 add some logging info 2023-12-12 20:59:09 +00:00
rfm
2473c744d1 fix accidentally deleted line 2023-11-23 17:30:51 +00:00
rfm
07fed93200 Improvements for github issue 352 2023-11-23 16:39:58 +00:00
Riccardo Mottola
d22abeebc5 add further debug log 2023-11-21 17:30:00 +01:00
rfm
270429cf97 Warn if we can't find the library version for a bundle 2023-11-21 08:31:44 +00:00
Richard Frith-Macdonald
c76ebf2962 Replaced IF_NO_GC() macro calls with the more descriptive IF_NO_ARC()
and deprecate it.  Searched for and removed obsolete references to
garbage collection in comments and documentation.
2022-02-17 10:08:18 +00:00
Frederik Seiffert
7a5c2a6550 Default to UTF-8 when reading localized string files without BOM. 2021-12-26 11:43:43 +01:00
Frederik Seiffert
813ae35d39 Export GSPathHandling() in GNUstep headers.
Fixes linker errors for some tests under Windows MSVC.
2021-07-14 10:09:45 +02:00
Frederik Seiffert
0582eddd96 Export string constants and annotate exported function implementations
Moves scattered string constants to externs.m, and removes obsolete code replacing constant strings.
2021-03-27 17:36:15 +01:00
Frederik Seiffert
c6f24e6634 Fix Android assets support for bundle directories 2020-06-10 20:31:03 +02:00
Frederik Seiffert
db19fc3308 Android assets improvements to support directories
- Extend NSBundle resources support to handle directories in Android assets.
- Fix NSFileManager -isReadableFileAtPath: to also support directories in Android assets.
2020-05-20 13:39:47 +02:00
Gregory John Casamento
753c907938 Fix address for FSF and License name in all headers in base 2019-12-09 18:36:00 -05:00
Richard Frith-Macdonald
2425c42ace Cosmetic tweaks to match coding style 2019-06-06 14:16:30 +01:00
Frederik Seiffert
409030a367 Extended NSBundle localizations method for Android. 2019-05-24 10:56:34 +02:00
Frederik Seiffert
ca76053c8e Fixed Android asset language logic in NSBundle. 2019-05-24 09:53:01 +02:00
Frederik Seiffert
9f01876102 Added option to specify Android asset reading mode. 2019-05-24 09:29:24 +02:00
Frederik Seiffert
3b60b1a8be Added support for asset loading on Android.
Requires passing the activity's AssetManager object from Java to GNUstep by calling +[NSBundle setJavaAssetManager:withJNIEnv:], which then enables the following features:

- NSBundle main bundle resource paths support for Android assets, e.g. for pathForResource:ofType:, URLForResource:ofType: and related methods.
- NSBundle main bundle info dictionary support if Info.plist exists in Android assets.
- -initWithContentsOfFile: and related methods support for reading Android assets from main bundle in various classes (e.g. NSData, NSDictionary, NSArray, etc.).
- NSFileManager fileExistsAtPath:(isDirectory:) and isReadableFileAtPath: return YES for main bundle asset / asset directory paths.
- NSFileHandle support for reading Android assets from main bundle.
- NSDirectoryEnumerator support for enumerating Android assets from main bundle. Note that recursion into subdirectories is currently not supported by the native Android asset manager API (see https://issuetracker.google.com/issues/37002833).

Also adds support for automatic NSProcessInfo initialization on Android with a fake executable path "/data/data/<app identifier>/exe" (as Android apps don't have a real executable path), and tweaks main bundle initialization to allow that path. Main bundle resource paths are prefixed by "/data/data/<app identifier>/Resources".
2019-05-23 15:44:07 +02:00
Richard Frith-Macdonald
911c5cdd66 make class lookup more reliable 2019-02-14 12:37:44 +00:00
Richard Frith-Macdonald
43673452a5 locking debug/performance tweaks 2018-03-26 15:05:01 +01:00
Richard Frith-MacDonald
9592363863 msys 64bit tweaks
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@39933 72102866-910b-0410-8b05-ffd578937521
2016-06-27 19:06:12 +00:00
Richard Frith-MacDonald
ecfbd24d8e Changed to restructure subdirectory layout for binaries and system dependent
resources in a non-flattened installation.  First step towards seamless
Debian multiarch support.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@39918 72102866-910b-0410-8b05-ffd578937521
2016-06-25 07:12:41 +00:00
Richard Frith-MacDonald
a0c97c1ddd deprecate confusing extension in favour of simpler ARC-complient method
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@39520 72102866-910b-0410-8b05-ffd578937521
2016-03-10 16:50:41 +00:00
Richard Frith-MacDonald
62d2bcbabc changes for use of _WIN32 define on windows
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@39492 72102866-910b-0410-8b05-ffd578937521
2016-03-09 13:16:16 +00:00
Richard Frith-MacDonald
4f9d5c0982 use compiler conventions to tell if we are on mswindows
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@39453 72102866-910b-0410-8b05-ffd578937521
2016-03-04 15:02:07 +00:00
Richard Frith-MacDonald
3fc29289f2 remove declaration of unused methods
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@39084 72102866-910b-0410-8b05-ffd578937521
2015-10-21 07:10:25 +00:00
Luboš Doležel
80f925978a * Source/NSBundle.m:
* Headers/Foundation/NSBundle.h: add -resourceURL



git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@37602 72102866-910b-0410-8b05-ffd578937521
2014-01-14 14:13:31 +00:00
Richard Frith-MacDonald
2f72f4b86e try to locate msys via PATH as last resort
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@37598 72102866-910b-0410-8b05-ffd578937521
2014-01-13 17:32:31 +00:00
Richard Frith-MacDonald
5960e99013 move executable extensions code out to NSTask+GNUstepBase.m to avoid duplication
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@37590 72102866-910b-0410-8b05-ffd578937521
2014-01-13 12:08:04 +00:00
Richard Frith-MacDonald
41a59dc49e when looking for executables in windows path, try all executable file extensions
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@37571 72102866-910b-0410-8b05-ffd578937521
2014-01-10 21:03:25 +00:00
Richard Frith-MacDonald
4381b10267 Tweaks for leack checking at exit
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@37008 72102866-910b-0410-8b05-ffd578937521
2013-08-22 19:55:03 +00:00
Richard Frith-MacDonald
ed09c55959 leak detection improvements
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@37003 72102866-910b-0410-8b05-ffd578937521
2013-08-22 15:44:54 +00:00
Luboš Doležel
cac2ee2d7e * Source/NSBundle.m: add NSBundle pathForAuxiliaryExecutable: and -privateFrameworksPath and their URL counterparts
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@36973 72102866-910b-0410-8b05-ffd578937521
2013-08-14 21:10:35 +00:00
Luboš Doležel
351c6d8b54 Added NSBundle executableURL and builtInPlugInsURL
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@36959 72102866-910b-0410-8b05-ffd578937521
2013-08-10 13:31:46 +00:00
Luboš Doležel
c08c16568d Added -[NSBundle bundleURL]
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@36958 72102866-910b-0410-8b05-ffd578937521
2013-08-10 13:15:29 +00:00
Richard Frith-MacDonald
97cecc058e tweaks to keep static analyzer happy
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@36527 72102866-910b-0410-8b05-ffd578937521
2013-04-14 16:25:27 +00:00
Richard Frith-MacDonald
e02ff90f23 make code more robust when there's no autorelease pool.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@35706 72102866-910b-0410-8b05-ffd578937521
2012-10-17 13:47:11 +00:00
Richard Frith-MacDonald
5ae3033e20 variable initialisation fix
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@35597 72102866-910b-0410-8b05-ffd578937521
2012-09-23 16:25:20 +00:00
Richard Frith-MacDonald
0be505308d simplification, including use of strtoull() everywhere
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@35503 72102866-910b-0410-8b05-ffd578937521
2012-09-03 13:36:45 +00:00
Richard Frith-MacDonald
327b1beb91 add a few languages to the bootstrap maps
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@35277 72102866-910b-0410-8b05-ffd578937521
2012-07-09 11:28:58 +00:00
Richard Frith-MacDonald
6b5a2c4c03 Language lookup improvements
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@35275 72102866-910b-0410-8b05-ffd578937521
2012-07-09 10:47:48 +00:00