File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ .DS_Store
2+ /.build
3+ /Packages
4+ /* .xcodeproj
5+ Package.resolved
6+ * ~
Original file line number Diff line number Diff line change 1+ // swift-tools-version:4.2
2+ // The swift-tools-version declares the minimum version of Swift required to build this package.
3+
4+ import PackageDescription
5+
6+ let package = Package (
7+ name: " IgisShellD " ,
8+ dependencies: [
9+ ] ,
10+ targets: [
11+ // Targets are the basic building blocks of a package. A target can define a module or a test suite.
12+ // Targets can depend on other targets in this package, and on products in packages which this package depends on.
13+ . target(
14+ name: " IgisShellD " ) ,
15+ ]
16+ )
Original file line number Diff line number Diff line change 1+ # IgisShellD
2+
3+ An empty shell to serve as a starting point for using Igis as a dynamically linked library.
4+ Before use, build Igis and set the LD_LIBRARY_PATH environment variable to include the
5+ library's location.
6+
7+ Then use make.sh to build the project and run.sh to run the project.
8+
Original file line number Diff line number Diff line change 1+ import Igis
2+
3+ class Painter : PainterBase {
4+
5+
6+ required init ( ) {
7+ }
8+
9+ override func setup( canvas: Canvas ) {
10+ }
11+
12+ }
13+
14+ print ( " Starting... " )
15+ do {
16+ let igis = Igis ( )
17+ try igis. run ( painterType: Painter . self)
18+ } catch ( let error) {
19+ print ( " Error: \( error) " )
20+ }
21+
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+ if [[ -z " $LD_LIBRARY_PATH " ]]; then
3+ echo " Must provide LD_LIBRARY_PATH in environment" 1>&2
4+ exit 1
5+ fi
6+ echo " LD_LIBRARY_PATH at $LD_LIBRARY_PATH "
7+ swift build -Xswiftc -I -Xswiftc $LD_LIBRARY_PATH -Xswiftc -L -Xswiftc $LD_LIBRARY_PATH -Xswiftc -lIgis --verbose
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+ if [[ -z " $LD_LIBRARY_PATH " ]]; then
3+ echo " Must provide LD_LIBRARY_PATH in environment" 1>&2
4+ exit 1
5+ fi
6+ echo " LD_LIBRARY_PATH at $LD_LIBRARY_PATH "
7+ swift run -Xswiftc -I -Xswiftc $LD_LIBRARY_PATH -Xswiftc -L -Xswiftc $LD_LIBRARY_PATH -Xswiftc -lIgis --verbose
You can’t perform that action at this time.
0 commit comments