diff --git a/Reconnect.xcodeproj/project.pbxproj b/Reconnect.xcodeproj/project.pbxproj index db6b5b0..1b94dd8 100644 --- a/Reconnect.xcodeproj/project.pbxproj +++ b/Reconnect.xcodeproj/project.pbxproj @@ -39,7 +39,6 @@ D89071912C4B025D00C11DE8 /* ArgumentParser in Frameworks */ = {isa = PBXBuildFile; productRef = D89071902C4B025D00C11DE8 /* ArgumentParser */; }; D89071932C4B02D900C11DE8 /* ReconnectCore in Frameworks */ = {isa = PBXBuildFile; productRef = D89071922C4B02D900C11DE8 /* ReconnectCore */; }; D89B5E8E2C2AA8680014A5B6 /* Sidebar.swift in Sources */ = {isa = PBXBuildFile; fileRef = D89B5E8D2C2AA8680014A5B6 /* Sidebar.swift */; }; - D8A37AE22C50CED600076AC1 /* PsiLuaEnv.swift in Sources */ = {isa = PBXBuildFile; fileRef = D8A37AE12C50CED600076AC1 /* PsiLuaEnv.swift */; }; D8CBAC652C4A02580035FC3D /* ReconnectCore in Frameworks */ = {isa = PBXBuildFile; productRef = D8CBAC642C4A02580035FC3D /* ReconnectCore */; }; D8D3E79F2C2540D9003E696D /* Interact in Frameworks */ = {isa = PBXBuildFile; productRef = D8D3E79E2C2540D9003E696D /* Interact */; }; D8DF2C112C3CE8AC006E56BA /* OpoLua in Frameworks */ = {isa = PBXBuildFile; productRef = D8DF2C102C3CE8AC006E56BA /* OpoLua */; }; @@ -137,7 +136,6 @@ D89071882C4B01FC00C11DE8 /* screenshot-sis */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = "screenshot-sis"; sourceTree = BUILT_PRODUCTS_DIR; }; D890718A2C4B01FC00C11DE8 /* Command.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Command.swift; sourceTree = ""; }; D89B5E8D2C2AA8680014A5B6 /* Sidebar.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Sidebar.swift; sourceTree = ""; }; - D8A37AE12C50CED600076AC1 /* PsiLuaEnv.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PsiLuaEnv.swift; sourceTree = ""; }; D8AD8B532C2379A10063A613 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist; path = Info.plist; sourceTree = ""; }; D8D3E7A02C25410E003E696D /* MainMenu.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MainMenu.swift; sourceTree = ""; }; D8E31EB42C26E10900350082 /* Licensable.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Licensable.swift; sourceTree = ""; }; @@ -338,7 +336,6 @@ isa = PBXGroup; children = ( D8E31EB42C26E10900350082 /* Licensable.swift */, - D8A37AE12C50CED600076AC1 /* PsiLuaEnv.swift */, ); path = Extensions; sourceTree = ""; @@ -609,7 +606,6 @@ D88FA1502C2CE29900805DBD /* ContentView.swift in Sources */, D83B4DE12C2F99C3003C3DC1 /* CheckForUpdatesViewModel.swift in Sources */, D8FFE85F2C49F2FB001F7D8A /* TransfersWindow.swift in Sources */, - D8A37AE22C50CED600076AC1 /* PsiLuaEnv.swift in Sources */, D83658B92C298C4F00B45693 /* NavigationStack.swift in Sources */, D8631DAB2C36867400344DC3 /* BrowserDetailView.swift in Sources */, D8184C472C253C59008FA79B /* ApplicationModel.swift in Sources */, diff --git a/ReconnectCore/Package.swift b/ReconnectCore/Package.swift index 108b65b..3f74a70 100644 --- a/ReconnectCore/Package.swift +++ b/ReconnectCore/Package.swift @@ -6,7 +6,7 @@ import PackageDescription let package = Package( name: "ReconnectCore", platforms: [ - .macOS(.v12), + .macOS(.v13), ], products: [ // Products define the executables and libraries a package produces, making them visible to other packages. @@ -15,6 +15,7 @@ let package = Package( targets: ["ReconnectCore"]), ], dependencies: [ + .package(path: "../dependencies/opolua"), .package(path: "../dependencies/plptools"), ], targets: [ @@ -23,6 +24,7 @@ let package = Package( .target( name: "ReconnectCore", dependencies: [ + .product(name: "OpoLua", package: "opolua"), .product(name: "ncp", package: "plptools"), .product(name: "plpftp", package: "plptools"), ], diff --git a/Reconnect/Extensions/PsiLuaEnv.swift b/ReconnectCore/Sources/ReconnectCore/Extensions/PsiLuaEnv.swift similarity index 93% rename from Reconnect/Extensions/PsiLuaEnv.swift rename to ReconnectCore/Sources/ReconnectCore/Extensions/PsiLuaEnv.swift index 27c2685..1fc304a 100644 --- a/Reconnect/Extensions/PsiLuaEnv.swift +++ b/ReconnectCore/Sources/ReconnectCore/Extensions/PsiLuaEnv.swift @@ -16,15 +16,14 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +import CoreGraphics import Foundation import OpoLua -import ReconnectCore - extension PsiLuaEnv { - func convertMultiBitmap(at url: URL, removeSource: Bool = false) throws { + public func convertMultiBitmap(at url: URL, removeSource: Bool = false) throws { let directoryURL = (url as NSURL).deletingLastPathComponent! let basename = (url.lastPathComponent as NSString).deletingPathExtension let bitmaps = PsiLuaEnv().getMbmBitmaps(path: url.path) ?? []