Skip to content
This repository has been archived by the owner on Apr 13, 2023. It is now read-only.

Commit

Permalink
Fix load dylib
Browse files Browse the repository at this point in the history
  • Loading branch information
shincurry committed Oct 17, 2016
1 parent 5d81141 commit f37978f
Show file tree
Hide file tree
Showing 8 changed files with 52 additions and 41 deletions.
38 changes: 27 additions & 11 deletions Aria2Core.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,28 @@
objects = {

/* Begin PBXBuildFile section */
881F79AA1DB2449000576766 /* libaria2.0.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 881F79A91DB2449000576766 /* libaria2.0.dylib */; };
882A58431DB494AC00C45C4C /* libaria2-1.28.0.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 882A58421DB494AC00C45C4C /* libaria2-1.28.0.dylib */; };
882A58441DB494B300C45C4C /* libaria2-1.28.0.dylib in CopyFiles */ = {isa = PBXBuildFile; fileRef = 882A58421DB494AC00C45C4C /* libaria2-1.28.0.dylib */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; };
88DAEE811D912A8900FF6E35 /* Aria2Core.h in Headers */ = {isa = PBXBuildFile; fileRef = 88DAEE7F1D912A8900FF6E35 /* Aria2Core.h */; settings = {ATTRIBUTES = (Public, ); }; };
88DAEE891D912AE700FF6E35 /* aria2.h in Headers */ = {isa = PBXBuildFile; fileRef = 88DAEE871D912AE700FF6E35 /* aria2.h */; };
88DAEE8A1D912AE700FF6E35 /* Aria2Core.mm in Sources */ = {isa = PBXBuildFile; fileRef = 88DAEE881D912AE700FF6E35 /* Aria2Core.mm */; };
/* End PBXBuildFile section */

/* Begin PBXCopyFilesBuildPhase section */
882A58401DB4905D00C45C4C /* CopyFiles */ = {
isa = PBXCopyFilesBuildPhase;
buildActionMask = 2147483647;
dstPath = "";
dstSubfolderSpec = 10;
files = (
882A58441DB494B300C45C4C /* libaria2-1.28.0.dylib in CopyFiles */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXCopyFilesBuildPhase section */

/* Begin PBXFileReference section */
881F79A91DB2449000576766 /* libaria2.0.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libaria2.0.dylib; path = Aria2Core/Frameworks/libaria2.0.dylib; sourceTree = "<group>"; };
882A58421DB494AC00C45C4C /* libaria2-1.28.0.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = "libaria2-1.28.0.dylib"; path = "Aria2Core/Frameworks/libaria2-1.28.0.dylib"; sourceTree = "<group>"; };
88DAEE7C1D912A8900FF6E35 /* Aria2Core.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Aria2Core.framework; sourceTree = BUILT_PRODUCTS_DIR; };
88DAEE7F1D912A8900FF6E35 /* Aria2Core.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = Aria2Core.h; sourceTree = "<group>"; };
88DAEE801D912A8900FF6E35 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
Expand All @@ -27,7 +41,7 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
881F79AA1DB2449000576766 /* libaria2.0.dylib in Frameworks */,
882A58431DB494AC00C45C4C /* libaria2-1.28.0.dylib in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down Expand Up @@ -65,7 +79,7 @@
88DAEE8B1D912AFA00FF6E35 /* Frameworks */ = {
isa = PBXGroup;
children = (
881F79A91DB2449000576766 /* libaria2.0.dylib */,
882A58421DB494AC00C45C4C /* libaria2-1.28.0.dylib */,
);
name = Frameworks;
sourceTree = "<group>";
Expand Down Expand Up @@ -93,6 +107,7 @@
88DAEE781D912A8900FF6E35 /* Frameworks */,
88DAEE791D912A8900FF6E35 /* Headers */,
88DAEE7A1D912A8900FF6E35 /* Resources */,
882A58401DB4905D00C45C4C /* CopyFiles */,
);
buildRules = (
);
Expand All @@ -114,6 +129,7 @@
TargetAttributes = {
88DAEE7B1D912A8900FF6E35 = {
CreatedOnToolsVersion = 8.0;
DevelopmentTeam = 525R2U87NG;
ProvisioningStyle = Automatic;
};
};
Expand Down Expand Up @@ -258,15 +274,15 @@
CODE_SIGN_IDENTITY = "Mac Developer";
COMBINE_HIDPI_IMAGES = YES;
DEFINES_MODULE = NO;
DEVELOPMENT_TEAM = "";
DEVELOPMENT_TEAM = 525R2U87NG;
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
DYLIB_INSTALL_NAME_BASE = "@rpath";
FRAMEWORK_VERSION = A;
GCC_INPUT_FILETYPE = automatic;
INFOPLIST_FILE = Aria2Core/Info.plist;
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/Frameworks";
INSTALL_PATH = "@rpath";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/Frameworks @loader_path/../Frameworks";
LIBRARY_SEARCH_PATHS = (
"$(inherited)",
"$(PROJECT_DIR)/Aria2Core/Frameworks",
Expand All @@ -280,18 +296,18 @@
88DAEE861D912A8900FF6E35 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
CODE_SIGN_IDENTITY = "";
CODE_SIGN_IDENTITY = "Mac Developer";
COMBINE_HIDPI_IMAGES = YES;
DEFINES_MODULE = NO;
DEVELOPMENT_TEAM = "";
DEVELOPMENT_TEAM = 525R2U87NG;
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
DYLIB_INSTALL_NAME_BASE = "@rpath";
FRAMEWORK_VERSION = A;
GCC_INPUT_FILETYPE = automatic;
INFOPLIST_FILE = Aria2Core/Info.plist;
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/Frameworks";
INSTALL_PATH = "@rpath";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/Frameworks @loader_path/../Frameworks";
LIBRARY_SEARCH_PATHS = (
"$(inherited)",
"$(PROJECT_DIR)/Aria2Core/Frameworks",
Expand Down
2 changes: 1 addition & 1 deletion Aria2Core/Aria2Core.mm
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#import "Aria2Core.h"
#include "aria2.h"

NSString * const EmbeddedAria2Version = @"1.19.0 stable";
NSString * const EmbeddedAria2Version = @"1.28.0";

@implementation Aria2Core {
aria2::Session * session;
Expand Down
Binary file added Aria2Core/Frameworks/libaria2-1.28.0.dylib
Binary file not shown.
Binary file removed Aria2Core/Frameworks/libaria2.0.dylib
Binary file not shown.
39 changes: 17 additions & 22 deletions Aria2Core/aria2.h
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ typedef uint64_t A2Gid;
*
* The type of Key/Value pairs.
*/
typedef std::vector<std::pair<std::string, std::string> > KeyVals;
typedef std::vector<std::pair<std::string, std::string>> KeyVals;

/**
* @enum
Expand Down Expand Up @@ -291,11 +291,8 @@ bool isNull(A2Gid gid);
* the queue, it is appended at the end of the queue. This function
* returns 0 if it succeeds, or negative error code.
*/
int addUri(Session* session,
A2Gid* gid,
const std::vector<std::string>& uris,
const KeyVals& options,
int position = -1);
int addUri(Session* session, A2Gid* gid, const std::vector<std::string>& uris,
const KeyVals& options, int position = -1);

/**
* @function
Expand All @@ -311,10 +308,8 @@ int addUri(Session* session,
* the queue, it is appended at the end of the queue. This function
* returns 0 if it succeeds, or negative error code.
*/
int addMetalink(Session* session,
std::vector<A2Gid>* gids,
const std::string& metalinkFile,
const KeyVals& options,
int addMetalink(Session* session, std::vector<A2Gid>* gids,
const std::string& metalinkFile, const KeyVals& options,
int position = -1);

/**
Expand All @@ -339,24 +334,18 @@ int addMetalink(Session* session,
* This function returns 0 if it succeeds, or negative error code.
*
*/
int addTorrent(Session* session,
A2Gid* gid,
const std::string& torrentFile,
int addTorrent(Session* session, A2Gid* gid, const std::string& torrentFile,
const std::vector<std::string>& webSeedUris,
const KeyVals& options,
int position = -1);
const KeyVals& options, int position = -1);

/**
* @function
*
* Same as :func:`addTorrent()` with an empty vector as the
* |webSeedUris|.
*/
int addTorrent(Session* session,
A2Gid* gid,
const std::string& torrentFile,
const KeyVals& options,
int position = -1);
int addTorrent(Session* session, A2Gid* gid, const std::string& torrentFile,
const KeyVals& options, int position = -1);

/**
* @function
Expand Down Expand Up @@ -691,7 +680,7 @@ struct BtMetaInfoData {
* ``announce`` and no ``announce-list``, ``announce`` is converted
* to ``announce-list`` format.
*/
std::vector<std::vector<std::string> > announceList;
std::vector<std::vector<std::string>> announceList;
/**
* ``comment`` for the torrent. ``comment.utf-8`` is used if
* available.
Expand Down Expand Up @@ -752,7 +741,7 @@ enum DownloadStatus {
*/
class DownloadHandle {
public:
virtual ~DownloadHandle() {}
virtual ~DownloadHandle() = default;
/**
* Returns status of this download.
*/
Expand Down Expand Up @@ -818,6 +807,12 @@ class DownloadHandle {
* downloads, this function returns empty array.
*/
virtual const std::vector<A2Gid>& getFollowedBy() = 0;
/**
* Returns the GID of the download which generated this download.
* This is a reverse link of
* :func:`DownloadHandle::getFollowedBy()`.
*/
virtual A2Gid getFollowing() = 0;
/**
* Returns the GID of a parent download. Some downloads are a part
* of another download. For example, if a file in Metalink has
Expand Down
2 changes: 1 addition & 1 deletion Maria Widget/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<key>CFBundleShortVersionString</key>
<string>1.1.3</string>
<key>CFBundleVersion</key>
<string>1610151</string>
<string>1610173</string>
<key>LSMinimumSystemVersion</key>
<string>$(MACOSX_DEPLOYMENT_TARGET)</string>
<key>NSExtension</key>
Expand Down
10 changes: 5 additions & 5 deletions Maria/Base.lproj/Main.storyboard
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.Cocoa.Storyboard.XIB" version="3.0" toolsVersion="11201" systemVersion="16A323" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" initialViewController="5mb-Q8-ck4">
<document type="com.apple.InterfaceBuilder3.Cocoa.Storyboard.XIB" version="3.0" toolsVersion="11201" systemVersion="16B2548a" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" initialViewController="5mb-Q8-ck4">
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="11201"/>
</dependencies>
Expand Down Expand Up @@ -326,14 +326,14 @@
<action selector="clearCompletedErrorRemovedTasks:" target="5mb-Q8-ck4" id="lwt-MQ-y39"/>
</connections>
</toolbarItem>
<toolbarItem implicitItemIdentifier="CD626368-D9F8-4549-AFCD-0F8E3A61B07B" label="" paletteLabel="Start" image="A31CC066-930A-4A49-B4AA-36A92CD0448B" id="fWl-Gq-lVn">
<toolbarItem implicitItemIdentifier="CD626368-D9F8-4549-AFCD-0F8E3A61B07B" label="" paletteLabel="Start" image="F6358FA5-E8FC-4F38-928D-DC56D7680A37" id="fWl-Gq-lVn">
<nil key="toolTip"/>
<size key="minSize" width="40" height="32"/>
<size key="maxSize" width="40" height="32"/>
<button key="view" verticalHuggingPriority="750" id="atI-Si-Tc8">
<rect key="frame" x="0.0" y="14" width="40" height="32"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<buttonCell key="cell" type="roundTextured" title="" bezelStyle="texturedRounded" image="A31CC066-930A-4A49-B4AA-36A92CD0448B" imagePosition="below" alignment="center" borderStyle="border" inset="2" id="Naa-Lc-yiZ">
<buttonCell key="cell" type="roundTextured" title="" bezelStyle="texturedRounded" image="F6358FA5-E8FC-4F38-928D-DC56D7680A37" imagePosition="below" alignment="center" borderStyle="border" inset="2" id="Naa-Lc-yiZ">
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
<font key="font" metaFont="systemBold" size="17"/>
</buttonCell>
Expand Down Expand Up @@ -831,7 +831,8 @@ DQ
</scene>
</scenes>
<resources>
<image name="A31CC066-930A-4A49-B4AA-36A92CD0448B" width="1" height="1">
<image name="Broom" width="20" height="20"/>
<image name="F6358FA5-E8FC-4F38-928D-DC56D7680A37" width="1" height="1">
<mutableData key="keyedArchiveRepresentation">
YnBsaXN0MDDUAQIDBAUGPT5YJHZlcnNpb25YJG9iamVjdHNZJGFyY2hpdmVyVCR0b3ASAAGGoK4HCBMU
GR4fIyQrLjE3OlUkbnVsbNUJCgsMDQ4PEBESVk5TU2l6ZVYkY2xhc3NcTlNJbWFnZUZsYWdzVk5TUmVw
Expand Down Expand Up @@ -882,7 +883,6 @@ ALAAswC1ALcAuQC7AMAA1wDZANsJiwmQCZsJpAm3CbsJxgnPCdQJ3AnfCeQJ8wn3Cf4KBgoTChgKGgoc
CiEKKQosCjEKOQo8Ck4KUQpWAAAAAAAAAgEAAAAAAAAAQQAAAAAAAAAAAAAAAAAAClg
</mutableData>
</image>
<image name="Broom" width="20" height="20"/>
<image name="GreenBall" width="16" height="12"/>
<image name="NSAddTemplate" width="11" height="11"/>
<image name="NSSmartBadgeTemplate" width="14" height="14"/>
Expand Down
2 changes: 1 addition & 1 deletion Maria/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1610151</string>
<string>1610173</string>
<key>LSApplicationCategoryType</key>
<string>public.app-category.utilities</string>
<key>LSMinimumSystemVersion</key>
Expand Down

0 comments on commit f37978f

Please sign in to comment.