Skip to content

Commit

Permalink
功能升级OK
Browse files Browse the repository at this point in the history
  • Loading branch information
midoks committed Dec 16, 2021
1 parent c57be99 commit b813238
Show file tree
Hide file tree
Showing 5 changed files with 54 additions and 5 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,5 @@
mdserver/mdserver.xcodeproj/project.xcworkspace/xcuserdata/midoks.xcuserdatad/UserInterfaceState.xcuserstate
*.DS_Store
.DS_Store
build/release
build/release.xcarchive
10 changes: 10 additions & 0 deletions build/build.plist
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>compileBitcode</key>
<false/>
<key>method</key>
<string>mac-application</string>
</dict>
</plist>
37 changes: 37 additions & 0 deletions build/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
#!/bin/bash
# 打包

BUILD_DIR=$(cd "$(dirname "$0")"; pwd)
ROOT_DIR=$(dirname "$BUILD_DIR")

APP_NAME="mdserver"
APP_VER=$(sed -n '/MARKETING_VERSION/{s/MARKETING_VERSION = //;s/;//;s/^[[:space:]]*//;p;q;}' $ROOT_DIR/mdserver/mdserver.xcodeproj/project.pbxproj)
APP_RELEASE=${BUILD_DIR}/release

DMG_FINAL="${APP_NAME}.dmg"




function build(){
mkdir -p $APP_RELEASE

echo "build mdserver."${APP_VER}

echo "Building archive... please wait a minute"
xcodebuild -project $ROOT_DIR/mdserver/mdserver.xcodeproj -config Release -scheme mdserver -archivePath ${APP_RELEASE} archive

echo "Exporting archive..."
xcodebuild -archivePath ${BUILD_DIR}/release.xcarchive -exportArchive -exportPath ${APP_RELEASE} -exportOptionsPlist $BUILD_DIR/build.plist

}





echo $ROOT_DIR

build

echo 'done'
8 changes: 4 additions & 4 deletions mdserver/mdserver.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -586,11 +586,11 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_IDENTITY = "-";
COMBINE_HIDPI_IMAGES = YES;
CURRENT_PROJECT_VERSION = 2;
CURRENT_PROJECT_VERSION = 1;
INFOPLIST_FILE = mdserver/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks";
MACOSX_DEPLOYMENT_TARGET = 10.10;
MARKETING_VERSION = 4.0.0;
MARKETING_VERSION = 4.0.1;
PRODUCT_BUNDLE_IDENTIFIER = "com.midoks.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_NAME = "$(TARGET_NAME)";
};
Expand All @@ -602,11 +602,11 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_IDENTITY = "-";
COMBINE_HIDPI_IMAGES = YES;
CURRENT_PROJECT_VERSION = 2;
CURRENT_PROJECT_VERSION = 1;
INFOPLIST_FILE = mdserver/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks";
MACOSX_DEPLOYMENT_TARGET = 10.10;
MARKETING_VERSION = 4.0.0;
MARKETING_VERSION = 4.0.1;
MTL_ENABLE_DEBUG_INFO = YES;
PRODUCT_BUNDLE_IDENTIFIER = "com.midoks.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_NAME = "$(TARGET_NAME)";
Expand Down
2 changes: 1 addition & 1 deletion mdserver/mdserver/AppDelegate.m
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,7 @@ - (void)startWebService
NSString *addhost = [NSString stringWithFormat:@"cd %@ && ./addhost", supportDir];
//采用新的授权的方式
// [self AuthorizeExeCmd:addhost];
NSLog(@"addhost:%@",addhost);

[[NSTask launchedTaskWithLaunchPath:@"/bin/sh" arguments:[NSArray arrayWithObjects:@"-c", addhost, nil]] waitUntilExit];
[self startConfReplaceString];
sleep(0.1);
Expand Down

0 comments on commit b813238

Please sign in to comment.