新增 make install:Release 构建并安装到应用程序文件夹
This commit is contained in:
1 parent
de81173517
commit
7ea40d98e6
2 files changed
+11
-1
No files matched your search
@@ -4,7 +4,7 @@ CONFIG ?= Debug
|
||||
DERIVED := build/DerivedData
|
||||
APP := $(DERIVED)/Build/Products/$(CONFIG)/OpenStats.app
|
||||
|
||||
.PHONY: generate build run stop test snapshot open clean
|
||||
.PHONY: generate build run install stop test snapshot open clean
|
||||
|
||||
## 由 project.yml 生成 Xcode 工程
|
||||
generate:
|
||||
@@ -19,6 +19,15 @@ build: generate
|
||||
run: build stop
|
||||
open $(APP)
|
||||
|
||||
## 以 Release 构建安装到 /Applications 并启动(覆盖旧版本,保留偏好设置)
|
||||
install:
|
||||
$(MAKE) build CONFIG=Release
|
||||
-pkill -x OpenStats
|
||||
rm -rf /Applications/OpenStats.app
|
||||
ditto $(DERIVED)/Build/Products/Release/OpenStats.app /Applications/OpenStats.app
|
||||
/System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Support/lsregister -f /Applications/OpenStats.app
|
||||
open /Applications/OpenStats.app
|
||||
|
||||
stop:
|
||||
-pkill -x OpenStats
|
||||
|
||||
|
||||
Reference in new issue
Block a user