Skip to content

Commit 65043c1

Browse files
Add symbolic link support
1 parent efdefff commit 65043c1

4 files changed

Lines changed: 26 additions & 7 deletions

File tree

DebToIPA.xcodeproj/project.pbxproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -310,7 +310,7 @@
310310
"$(inherited)",
311311
"@executable_path/Frameworks",
312312
);
313-
MARKETING_VERSION = 1.0;
313+
MARKETING_VERSION = 1.0.1;
314314
PRODUCT_BUNDLE_IDENTIFIER = "net.sourceloc.deb-to-ipa-app";
315315
PRODUCT_NAME = "$(TARGET_NAME)";
316316
SWIFT_EMIT_LOC_STRINGS = YES;
@@ -342,7 +342,7 @@
342342
"$(inherited)",
343343
"@executable_path/Frameworks",
344344
);
345-
MARKETING_VERSION = 1.0;
345+
MARKETING_VERSION = 1.0.1;
346346
PRODUCT_BUNDLE_IDENTIFIER = "net.sourceloc.deb-to-ipa-app";
347347
PRODUCT_NAME = "$(TARGET_NAME)";
348348
SWIFT_EMIT_LOC_STRINGS = YES;

DebToIPA.xcodeproj/xcuserdata/exerhythm.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,5 +68,21 @@
6868
landmarkType = "7">
6969
</BreakpointContent>
7070
</BreakpointProxy>
71+
<BreakpointProxy
72+
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
73+
<BreakpointContent
74+
uuid = "8DED8990-5711-4391-A4E6-47B84448250C"
75+
shouldBeEnabled = "Yes"
76+
ignoreCount = "0"
77+
continueAfterRunningActions = "No"
78+
filePath = "DebToIPA/DebToIPA.swift"
79+
startingColumnNumber = "9223372036854775807"
80+
endingColumnNumber = "9223372036854775807"
81+
startingLineNumber = "99"
82+
endingLineNumber = "99"
83+
landmarkName = "extractDeb(_:statusUpdate:)"
84+
landmarkType = "7">
85+
</BreakpointContent>
86+
</BreakpointProxy>
7187
</Breakpoints>
7288
</Bucket>

DebToIPA/ContentView.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,7 @@ struct ContentView: View {
122122
shareActivity.popoverPresentationController?.sourceRect = CGRect(x: UIScreen.main.bounds.width / 2, y: UIScreen.main.bounds.height, width: 0, height: 0)
123123
shareActivity.popoverPresentationController?.permittedArrowDirections = UIPopoverArrowDirection.down
124124
shareActivity.completionWithItemsHandler = { (type,completed, returnedItems, activityError) in
125+
statusText = "Done."
125126
if performCleanup {
126127
do {
127128
try DebToIPA.cleanup()

DebToIPA/DebToIPA.swift

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ class DebToIPA {
3939
try? fm.removeItem(at: destIpaURL)
4040
try fm.moveItem(at: zipFilePath, to: destIpaURL)
4141

42-
statusUpdate("Done.")
42+
statusUpdate("Opening share sheet...")
4343
return zipFilePath.deletingPathExtension().appendingPathExtension("ipa")
4444
}
4545

@@ -65,19 +65,19 @@ class DebToIPA {
6565
switch DecompressionMethod(rawValue: header.name.components(separatedBy: ".").last ?? "") {
6666
case .lzma:
6767
foundData = true
68-
statusUpdate("Using LZMA")
68+
statusUpdate("Decompressing LZMA data.\nThis might take a while")
6969
decompressedData = try LZMA.decompress(data: data)
7070
case .gz:
7171
foundData = true
72-
statusUpdate("Using GzipArchive")
72+
statusUpdate("Unarchiving Gzip archive.\nThis might take a while")
7373
decompressedData = try GzipArchive.unarchive(archive:data)
7474
case .bzip2:
7575
foundData = true
76-
statusUpdate("Using BZip2")
76+
statusUpdate("Decompressing BZip2 data.\nThis might take a while")
7777
decompressedData = try BZip2.decompress(data:data)
7878
case .xz:
7979
foundData = true
80-
statusUpdate("Using XZArchive")
80+
statusUpdate("Unarchiving XZ archive.\nThis might take a while")
8181
decompressedData = try XZArchive.unarchive(archive:data)
8282
case .none:
8383
throw ConversionError.unsupportedCompression
@@ -93,6 +93,8 @@ class DebToIPA {
9393
try fm.createDirectory(at: extractedDir.appendingPathComponent(entry.info.name), withIntermediateDirectories: true)
9494
} else if entry.info.type == .regular {
9595
try entry.data?.write(to: extractedDir.appendingPathComponent(entry.info.name))
96+
} else if entry.info.type == .symbolicLink {
97+
try fm.createSymbolicLink(at: extractedDir.appendingPathComponent(entry.info.name), withDestinationURL: URL(fileURLWithPath: entry.info.linkName))
9698
} else {
9799
throw ConversionError.unknownFiletypeInsideTar
98100
}

0 commit comments

Comments
 (0)