From 6757602b00edcc5faae0cf7668e262dd8d1a3663 Mon Sep 17 00:00:00 2001 From: kawaiizenbo <48113593+kawaiizenbo@users.noreply.github.com> Date: Wed, 22 Jan 2025 11:56:17 -0700 Subject: [PATCH 1/6] Update README.md --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 1911b97..935b5ec 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ AFC File Browser for iOS Devices ## Requirements -Windows 7 SP1 or later -iTunes 10 or later (ensure "Apple Devices" from Microsoft Store is NOT installed) -.NET Framework 4.7.2 or later -Apple File Conduit 2 Tweak (if using AFC2 mode) +Windows 7 SP1 or later +iTunes 10 or later (ensure "Apple Devices" from Microsoft Store is NOT installed) +.NET Framework 4.7.2 or later +Apple File Conduit 2 Tweak (if using AFC2 mode) From da8caa7f51a74da879d39894df8a4066d4cafe58 Mon Sep 17 00:00:00 2001 From: kawaiizenbo Date: Wed, 26 Feb 2025 16:06:59 -0700 Subject: [PATCH 2/6] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 935b5ec..9293666 100644 --- a/README.md +++ b/README.md @@ -3,6 +3,6 @@ ## Requirements Windows 7 SP1 or later -iTunes 10 or later (ensure "Apple Devices" from Microsoft Store is NOT installed) +iTunes 10 or later or Apple Devices .NET Framework 4.7.2 or later Apple File Conduit 2 Tweak (if using AFC2 mode) From c1f6e7083ff8075f1df5e9c976e7eead94930d9b Mon Sep 17 00:00:00 2001 From: kawaiizenbo Date: Wed, 26 Feb 2025 16:07:59 -0700 Subject: [PATCH 3/6] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 9293666..365351b 100644 --- a/README.md +++ b/README.md @@ -3,6 +3,6 @@ ## Requirements Windows 7 SP1 or later -iTunes 10 or later or Apple Devices +iTunes 10 or later, or the Apple Devices app .NET Framework 4.7.2 or later Apple File Conduit 2 Tweak (if using AFC2 mode) From 85dc7bdff4548f4d52b18fd133ea804f01431a5d Mon Sep 17 00:00:00 2001 From: kawaiizenbo Date: Wed, 26 Feb 2025 16:08:16 -0700 Subject: [PATCH 4/6] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 365351b..f41330b 100644 --- a/README.md +++ b/README.md @@ -3,6 +3,6 @@ ## Requirements Windows 7 SP1 or later -iTunes 10 or later, or the Apple Devices app +iTunes 10 or later, or the Apple Devices app .NET Framework 4.7.2 or later Apple File Conduit 2 Tweak (if using AFC2 mode) From 6567881ce5555e800444b3aadff5b1bc2c3bae89 Mon Sep 17 00:00:00 2001 From: Persephone Bubblegum-Holiday Date: Fri, 28 Feb 2025 22:13:55 -0700 Subject: [PATCH 5/6] fix bug with symbolic links --- AFCExplorer/MainWindow.xaml.cs | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/AFCExplorer/MainWindow.xaml.cs b/AFCExplorer/MainWindow.xaml.cs index c64b8b7..c486870 100644 --- a/AFCExplorer/MainWindow.xaml.cs +++ b/AFCExplorer/MainWindow.xaml.cs @@ -59,9 +59,12 @@ namespace AFCExplorer { if (fn == "." || fn == "..") continue; afc.afc_get_file_info(afcHandle, path + fn, out ReadOnlyCollection fileInfo).ThrowOnError(); - string readableSize = FormatBytes(ulong.Parse(fileInfo[1])); - string readableType = fileInfo[7] == "S_IFDIR" ? "Directory" : "File"; - int unixSeconds = (int)(((long.Parse(fileInfo[9]) / 1000) / 1000) / 1000); + Dictionary fileInfoD = new Dictionary(); + for (int i = 0; i < fileInfo.Count; i += 2) fileInfoD.Add(fileInfo[i], fileInfo[i+1]); + //MessageBox.Show(string.Join("\n", fileInfo)); + string readableSize = FormatBytes(ulong.Parse(fileInfoD["st_size"])); + string readableType = ReadableTypes[fileInfoD["st_ifmt"]]; + int unixSeconds = (int)(((long.Parse(fileInfoD["st_mtime"]) / 1000) / 1000) / 1000); string readableTime = DateTimeOffset.FromUnixTimeSeconds(unixSeconds).DateTime.ToString(); afcDirectory.Add(new AFCFileType(fn, readableType, readableTime, readableSize)); } @@ -359,5 +362,12 @@ namespace AFCExplorer return string.Format("{0:0.##} {1}", dblSByte, Suffix[i]); } + + public static Dictionary ReadableTypes = new Dictionary + { + { "S_IFDIR", "Directory" }, + { "S_IFREG", "File" }, + { "S_IFLNK", "Symbolic Link" }, + }; } } From 3f7450be6700a8ebcf85f7b1ba50043b68d5a37d Mon Sep 17 00:00:00 2001 From: Persephone Bubblegum-Holiday Date: Fri, 28 Feb 2025 22:41:40 -0700 Subject: [PATCH 6/6] add setup script --- .gitignore | 3 +++ AFCExplorerSetup.iss | 23 +++++++++++++++++++++++ 2 files changed, 26 insertions(+) create mode 100644 AFCExplorerSetup.iss diff --git a/.gitignore b/.gitignore index 8a30d25..b9d54d1 100644 --- a/.gitignore +++ b/.gitignore @@ -396,3 +396,6 @@ FodyWeavers.xsd # JetBrains Rider *.sln.iml + +# Inno Setup +SetupFiles/ \ No newline at end of file diff --git a/AFCExplorerSetup.iss b/AFCExplorerSetup.iss new file mode 100644 index 0000000..3f4eed3 --- /dev/null +++ b/AFCExplorerSetup.iss @@ -0,0 +1,23 @@ +[Setup] +AppName=AFCExplorer +AppPublisher=KawaiiZenbo +AppVerName=AFCExplorer +AppVersion=1.0.1 +WizardStyle=modern +DefaultDirName={autopf}\AFCExplorer +DefaultGroupName=AFCExplorer +UninstallDisplayIcon={app}\AFCExplorer.exe +Compression=lzma2 +SolidCompression=yes +OutputDir=.\SetupFiles + +[Files] +Source: "AFCExplorer\bin\Release\*"; DestDir: "{app}" +Source: "AFCExplorer\bin\Release\win-x86\*"; DestDir: "{app}\win-x86" + +[Icons] +Name: "{group}\AFCExplorer"; Filename: "{app}\AFCExplorer.exe" +Name: "{commondesktop}\AFCExplorer"; Filename: "{app}\AFCExplorer.exe"; Tasks: desktopicon + +[Tasks] +Name: desktopicon; Description: "Create a &desktop icon";