Skip to content

Commit

Permalink
feat: compatible build for arm64 platform #20
Browse files Browse the repository at this point in the history
  • Loading branch information
tzmax committed Dec 9, 2022
1 parent 09d0e38 commit ac79f30
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 8 deletions.
2 changes: 1 addition & 1 deletion V2RayX/AppDelegate.m
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ - (BOOL)isSysconfVersionOK {
}

- (IBAction)openReleasePage:(id)sender {
[[NSWorkspace sharedWorkspace] openURL:[NSURL URLWithString:@"https://github.com/TZmax/V2RayXS/releases/latest"]];
[[NSWorkspace sharedWorkspace] openURL:[NSURL URLWithString:@"https://github.com/tzmax/V2RayXS/releases/latest"]];
}

- (IBAction)checkUpgrade:(id)sender {
Expand Down
2 changes: 1 addition & 1 deletion V2RayX/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>$(CURRENT_PROJECT_VERSION)</string>
<string>2</string>
<key>LSMinimumSystemVersion</key>
<string>$(MACOSX_DEPLOYMENT_TARGET)</string>
<key>LSUIElement</key>
Expand Down
13 changes: 9 additions & 4 deletions V2RayX/dlcorex.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,21 @@ BOLD='\033[1m'
NORMAL='\033[0m'

cd "$SRCROOT"
output="v0"
if [[ -f ./xray-core-bin/xray ]]; then
output="v${VERSION}"
if [[ -f ./xray-core-bin/xray ]] || [ "$1" == "" ]; then
output=$(./xray-core-bin/xray --version)
fi
existingVersion=${output:5:${#VERSION}}
if [ "$VERSION" != "$existingVersion" ]; then
osArch=$(uname -m)
if [[ "$VERSION" != "$existingVersion" ]] || [ "$1" != "" ]; then
getCore=0
mkdir -p xray-core-bin
cd xray-core-bin
curl -s -L -o xray-macos.zip https://github.com/XTLS/Xray-core/releases/download/v${VERSION}/Xray-macos-64.zip
osArchName="64" # intel
if [[ "$osArch" != "x86_64" ]] || [ "$1" == "arm64" ]; then
osArchName="arm64-v8a" # m1
fi
curl -s -L -o xray-macos.zip https://github.com/XTLS/Xray-core/releases/download/v${VERSION}/Xray-macos-${osArchName}.zip
if [[ $? == 0 ]]; then
unzip -o xray-macos.zip
getCore=1
Expand Down
15 changes: 13 additions & 2 deletions V2RayXS.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -766,13 +766,18 @@
9504C08A1C662C3000352520 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ARCHS = (
"$(ARCHS_STANDARD)",
armv7,
amd64,
);
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_IDENTITY = "-";
COMBINE_HIDPI_IMAGES = YES;
CURRENT_PROJECT_VERSION = 1;
INFOPLIST_FILE = V2RayX/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks";
MARKETING_VERSION = 1.5.4;
MARKETING_VERSION = 1.5.5;
PRODUCT_BUNDLE_IDENTIFIER = cenmrev.V2RayXS;
PRODUCT_NAME = "$(TARGET_NAME)";
};
Expand All @@ -781,13 +786,19 @@
9504C08B1C662C3000352520 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ARCHS = (
"$(ARCHS_STANDARD)",
armv7,
amd64,
);
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_IDENTITY = "-";
COMBINE_HIDPI_IMAGES = YES;
CURRENT_PROJECT_VERSION = 1;
INFOPLIST_FILE = V2RayX/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks";
MARKETING_VERSION = 1.5.4;
MARKETING_VERSION = 1.5.5;
ONLY_ACTIVE_ARCH = YES;
PRODUCT_BUNDLE_IDENTIFIER = cenmrev.V2RayXS;
PRODUCT_NAME = "$(TARGET_NAME)";
};
Expand Down

0 comments on commit ac79f30

Please sign in to comment.