2013-11-04 3 views
3

Java 응용 프로그램 용 .pkg 설치 프로그램을 만들었으며 최신 .pkg 설치 프로그램을 실행할 때마다 이전 개발 버전의 응용 프로그램이 삭제됩니다. 나는이 최신 인스톨러가 오래된 dev 버전 중 하나를 지울 때 "오래된 파일을 지우는 중 ..."을 출력한다는 것을 알아 차렸다. 이것은 종종 여러 dev 버전을 비교하기를 원하는 테스터들에게는 상당히 성가시다.OSX .pkg가 다른 개발자 버전을 삭제합니다.

설치 프로그램이 이전 파일을 강제로 제거하지 못하게 할 수 있습니까?

다음
pkgbuild --root "./Temp" --identifier "com.agentsheets.agentsheets" --install-location "/Applications" --sign "Developer ID Installer: AgentSheets, Inc." "./build_dir/temp.pkg" 
pkgbuild --root "$APP_FOLDER/AgentSheets.app" --identifier "com.agentsheets.agentsheets.app" --install-location "/Applications/$APP_FOLDER_NAME/AgentSheets.app" --sign "Developer ID Installer: AgentSheets, Inc." "./build_dir/asj_app.pkg" 
pkgbuild --root "./AgentSheetsCameraHelper.app" --identifier "com.agentsheets.agentsheets.camera" --install-location "/Applications/$APP_FOLDER_NAME/Resources/AgentSheetsCameraHelper.app" --sign "Developer ID Installer: AgentSheets, Inc." "./build_dir/camera.pkg" 

내가 productbuild와 최종가 .pkg를 만들 :

는 내가 처음 PKGBUILD하는 통화와 하위가 .pkg 년대의 몇 가지를 만들어 내 최종 설치 프로그램을 만들려면 여기

productbuild --package-path "./build_dir" --distribution "./Distribution.xml" --resources "./Resources" --sign "Developer ID Installer: AgentSheets, Inc." "$FINAL_PKG" 

가 내 distribution.xml :

<?xml version="1.0" encoding="utf-8" standalone="no"?> 
<installer-gui-script minSpecVersion="1"> 
    <title>AgentSheets</title> 
    <background file="background.png" scaling="toFit"/> 
    <options customize="never" require-scripts="false"/> 
    <pkg-ref id="com.agentsheets.agentsheets"/> 
    <pkg-ref id="com.agentsheets.agentsheets.app"/> 
    <pkg-ref id="com.agentsheets.agentsheets.camera"/> 
    <options customize="never" require-scripts="false"/> 
    <choices-outline> 
     <line choice="default"> 
      <line choice="com.agentsheets.agentsheets"/> 
      <line choice="com.agentsheets.agentsheets.app"/> 
      <line choice="com.agentsheets.agentsheets.camera"/> 
     </line> 
    </choices-outline> 
    <choice id="default"/> 
    <choice id="com.agentsheets.agentsheets" visible="false"> 
     <pkg-ref id="com.agentsheets.agentsheets"/> 
    </choice> 
    <pkg-ref id="com.agentsheets.agentsheets" version="0" onConclusion="none">temp.pkg</pkg-ref> 
    <choice id="com.agentsheets.agentsheets.app" visible="false"> 
     <pkg-ref id="com.agentsheets.agentsheets.app"/> 
    </choice> 
    <pkg-ref id="com.agentsheets.agentsheets.app" version="0" onConclusion="none">asj_app.pkg</pkg-ref> 
    <choice id="com.agentsheets.agentsheets.camera" visible="false"> 
     <pkg-ref id="com.agentsheets.agentsheets.camera"/> 
    </choice> 
    <pkg-ref id="com.agentsheets.agentsheets.camera" version="0" onConclusion="none">camera.pkg</pkg-ref> 
</installer-gui-script> 
+0

동시에 많은 버전을 어떻게 관리 하시겠습니까? 이름 바꾸기를 통해? App.app App (1) .app 등 ..? 또는 문제는 환경 설정 파일 제거입니까? – DNax

답변

1

pkgbuild현재은 이전 버전을 덮어 쓰지 않습니다. 그러나 git과 같은 버전 컨트롤을 사용하여 폴더를 추적 할 수 있습니다. 더 나아가 Dropbox는 파일의 이전 버전을 최대 200 개까지 유지합니다. 또한 무료입니다. 나는 그것을 밖으로 시도하는 것이 좋습니다. 일단 dropbox가 Mac에 설치되면 필요한 빌드 리소스를 디렉토리에 복사하고 사용자 홈의 'Dropbox'폴더에서 명령을 실행하십시오.

+0

Dropbox는 아주 좋은 소스 컨트롤이 아닙니다. 그래도 git 제안은 좋은 것이었다. –

+0

@JohnAsmuth 복잡한 프로젝트는 아니지만 더 간단한 프로젝트는 과도 할 수 있습니다. – William