Commit Graph

342 Commits

Author SHA1 Message Date
Sasha Szpakowski 2d65274ae6 Improve error message when require fails to load a dll. 2025-02-09 14:11:57 -04:00
Sasha Szpakowski 34affbd1ac tests: fix love.filesystem mounting 2025-02-08 23:05:35 -04:00
Sasha Szpakowski f03cf6a88f love.filesystem mount APIs return false if the path is already mounted.
Fixes #2153.
2025-02-08 22:03:19 -04:00
Miku AuahDark bff50070c6 Android: Support content:// URI in love.filesystem.mountFullPath. 2025-01-16 17:06:03 +08:00
Miku AuahDark cb27e30879 Android: Cleanup and remove usage of love:// custom protocol.
Let SDL3 handle content:// URI support instead.
2025-01-16 17:04:27 +08:00
Miku AuahDark 0589245387 NativeFile: Make sure default buffer size at least 4096 bytes. 2025-01-10 14:23:33 +08:00
Miku AuahDark 1789855647 NativeFile: Implement better buffered write routines. 2025-01-10 14:18:51 +08:00
Miku AuahDark e95c3a2816 NativeFile: Temporarily open the file for reading to determine file size. 2025-01-05 12:15:23 +08:00
Miku AuahDark 88fb547a58 NativeFile: Implement buffering. 2025-01-05 12:00:23 +08:00
Miku AuahDark 1a61f631e4 NativeFile: Do not check if SDL_GetError() is empty string. 2025-01-05 12:00:23 +08:00
Miku AuahDark 8beb7f0e4b Do not include SDL_iostream.h in NativeFile.h. 2025-01-05 12:00:23 +08:00
Miku AuahDark 4029df5a13 Replace NativeFile to use SDL IO functions.
Also remove Android-specific code from it as SDL is now able to handle them.
2025-01-05 12:00:23 +08:00
Sasha Szpakowski 8e98711096 small filesystem code cleanup 2025-01-04 15:52:52 -04:00
Sasha Szpakowski e40485dd12 No longer expose a distinct subtype for native files. 2025-01-04 15:50:52 -04:00
Sasha Szpakowski aef47df40c Add love.filesystem.openNativeFile (name may change in the future) 2024-12-29 16:43:49 -04:00
Sasha Szpakowski 850e721be2 minor optimization: avoid opening a file twice when its full contents are read. 2024-12-19 18:18:41 -04:00
Sasha Szpakowski 337d8fa048 remove source code support for SDL2 2024-10-18 20:22:26 -03:00
Sasha Szpakowski caca6196fc make sure non-app common paths are canonicalized. 2024-10-17 20:56:48 -03:00
Miku AuahDark 72d865eedc Android: Fix error when trying to open .love file through "Load .love File". 2024-10-13 13:54:37 +08:00
Miku AuahDark 86bb7ba0ae Android: Initial SDL3 support. 2024-10-12 19:44:54 +08:00
Sasha Szpakowski e986160431 Use SDL3-compatible SDL includes when SDL3 headers are available 2024-10-06 20:27:28 -03:00
Sasha Szpakowski dda7603d0d update SDL3 codepaths to work with 3.1. 2024-10-06 16:53:09 -03:00
Sasha Szpakowski 15dfc8db0b Canonicalize getFullCommonPath paths.
Fixes getRealDirectory test.
2024-08-03 19:53:46 -03:00
Sasha Szpakowski e94b8c3d04 love.filesystem canonicalizes internal full paths where possible.
resolves #1693.
resolves #1100.
2024-08-03 19:33:55 -03:00
Miku AuahDark 629fc1c581 Android: Use mode a+rwx for directories and a+rw for files in external storage path.
Issue love2d/love-android#269.
2024-04-27 12:38:30 +08:00
Miku AuahDark 329796d3ba Android: Fix inconsistency issue with t.externalstorage. 2024-04-25 12:36:43 +08:00
Miku AuahDark 8cdbeb20b9 Fix compile error from previous commit. 2024-04-25 12:04:33 +08:00
Miku AuahDark 4270985df1 Android: Fix missing directories and files with externalstorage when trying to browse it through MTP. 2024-04-25 11:54:13 +08:00
Sasha Szpakowski 2bdadf51d4 Merge branch 'main' into SDL3 2024-03-24 18:53:08 -03:00
Miku AuahDark 9eacd483c6 Android: Fixed assets/game.love fusing not being recognized.
Fixes love2d/love-android#267.
2024-03-19 22:24:45 +08:00
Sasha Szpakowski 1e97e09b28 Rework internal module registration to happen in constructors. 2024-02-24 15:21:38 -04:00
Sasha Szpakowski 64a30f177f Merge branch 'main' into 12.0-development 2024-02-10 12:24:48 -04:00
Sasha Szpakowski 94d5864144 update year for copyright notice 2024-02-10 12:13:22 -04:00
Sasha Szpakowski 8d73622311 Fix compilation 2024-02-04 23:18:40 -04:00
Sasha Szpakowski d5282339a2 Merge branch 'main' into 12.0-development 2024-02-04 23:07:50 -04:00
Sasha Szpakowski 62ac858f30 Initial source code support for SDL3. No build system support. 2024-02-04 17:02:26 -04:00
Sasha Szpakowski 5d11b095e8 Fix loading code-signed games on Windows with non-ascii paths.
Use DroppedFile (renamed to NativeFile in love 12) instead of C file APIs. NativeFile properly handles unicode file paths on Windows.
2024-02-03 12:06:27 -04:00
Sasha Szpakowski b0e3246ba8 Fix the Data object variant of File:write.
Fixes #1962
2023-08-21 16:50:28 -03:00
Sasha Szpakowski 6e80d85110 Merge branch 'main' into 12.0-development 2023-08-19 21:35:55 -03:00
Miku AuahDark e559fd5e68 Pass pointer of PHYSFS_AndroidInit struct in Android when initializing PhysFS. 2023-06-01 15:33:04 +08:00
Miku AuahDark e9c564e989 Use new PhysfsIo class for Android AAsset wrapper. 2023-06-01 15:10:43 +08:00
Sasha Szpakowski 93c2709f7c Maybe fix build when VS2013 is used 2023-05-29 10:29:46 -03:00
Sasha Szpakowski 6cc188b8ba Merge pull request #1930 from pfirsich/physfs_skip_codesign
Add PHYSFS_Io StripSuffixIo to skip codesign signatures
2023-05-29 09:42:25 -03:00
Sasha Szpakowski a161207f02 update PhysFS to 3.2.0.
Fixes #1880.
2023-05-28 12:30:32 -03:00
Joel Schumacher efc54d5124 Add PHYSFS_Io StripSuffixIo to skip codesign signatures
When a fused löve executable is signed with codesign on Windows some
data is appended to the executable, preventing physfs from finding the
zip file at the end of the file.
To help physfs out a bit, we try to find the zip ourselves in the case
of regular mount failure by looking for it's characteristic end of
central directory record and, once found, pretend to physfs that the
file is shorter than it actually is and ends at the end of the zip file.
2023-05-18 13:57:07 +02:00
Sasha Szpakowski 95d44c2c2d very minor compile speed improvements 2023-02-11 16:29:24 -04:00
Sasha Szpakowski f6cdbdc868 Merge branch 'main' into 12.0-development 2022-12-31 22:46:34 -04:00
Sasha Szpakowski 0b75f6cfa5 Missed some files... 2022-12-31 22:36:48 -04:00
Sasha Szpakowski c823dbca96 Update copyright year for 2023 2022-12-31 22:25:49 -04:00
Miku AuahDark b738668e9c Only show deprecation notice of using slash in require if the file is found. 2022-11-22 11:58:30 +08:00