-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
269931c
commit 3c59e28
Showing
3 changed files
with
66 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
Pod::Spec.new do |s| | ||
s.name = 'LispCore' | ||
s.version = '0.1.0' | ||
s.license = 'MIT' | ||
s.summary = 'Common Lisp interpreter for macOS and iOS.' | ||
s.homepage = 'https://github.com/puliaiev/LispMac' | ||
s.authors = { 'Serhii Puliaiev' => 'http://puliaiev.com' } | ||
s.social_media_url = 'https://twitter.com/spuliaiev' | ||
s.source = { :git => 'https://github.com/puliaiev/LispMac.git', :tag => '0.1.0' } | ||
|
||
s.ios.deployment_target = '9.0' | ||
s.osx.deployment_target = '10.15' | ||
|
||
s.source_files = 'Sources/LispCore/**/*.swift' | ||
s.resource_bundles = { | ||
'LispCore_LispCore' => ['Sources/LispCore/Resources/**/*.*'] | ||
} | ||
|
||
s.swift_version = '5.3' | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
// | ||
// custom_resource_bundle_accessor.swift | ||
// LispMac | ||
// | ||
// Created by Roman Podymov on 10/21/20. | ||
// Copyright © 2020 Roman Podymov. All rights reserved. | ||
// | ||
|
||
import Foundation | ||
|
||
#if SWIFT_PACKAGE | ||
#else | ||
private class BundleFinder {} | ||
|
||
extension Foundation.Bundle { | ||
/// Returns the resource bundle associated with the current Swift module. | ||
static var module: Bundle = { | ||
let bundleName = "LispCore_LispCore" | ||
|
||
let candidates = [ | ||
// Bundle should be present here when the package is linked into an App. | ||
Bundle.main.resourceURL, | ||
|
||
// Bundle should be present here when the package is linked into a framework. | ||
Bundle(for: BundleFinder.self).resourceURL, | ||
|
||
// For command-line tools. | ||
Bundle.main.bundleURL, | ||
] | ||
|
||
for candidate in candidates { | ||
let bundlePath = candidate?.appendingPathComponent(bundleName + ".bundle") | ||
if let bundle = bundlePath.flatMap(Bundle.init(url:)) { | ||
return bundle | ||
} | ||
} | ||
fatalError("unable to find bundle named LispCore_LispCore") | ||
}() | ||
} | ||
#endif |