Skip to content

Commit 473d70c

Browse files
committed
Update build_mac_app.sh
1 parent 9f5a979 commit 473d70c

1 file changed

Lines changed: 28 additions & 20 deletions

File tree

build_mac_app.sh

Lines changed: 28 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -96,22 +96,24 @@ fi
9696
log_info "ExifTool 경로: ${EXIFTOOL_BIN}"
9797
log_info "LibRaw 경로: ${LIBRAW_DYLIB}"
9898

99-
# 이전 빌드 정리 (더 철저하게)
100-
log_info "이전 빌드 파일 정리 중..."
101-
rm -rf dist build *.spec 2>/dev/null || true
102-
rm -rf __pycache__ .pytest_cache 2>/dev/null || true
99+
# 이전 빌드 정리 (최강 정리)
100+
log_info "이전 빌드 파일 완전 정리 중..."
101+
sudo rm -rf dist build *.spec __pycache__ .pytest_cache 2>/dev/null || true
103102
find . -name "*.pyc" -delete 2>/dev/null || true
104-
find . -name "__pycache__" -type d -exec rm -rf {} + 2>/dev/null || true
103+
find . -name "__pycache__" -type d -exec sudo rm -rf {} + 2>/dev/null || true
104+
find . -type l -delete 2>/dev/null || true
105105

106-
# PySide6 관련 캐시 및 임시 파일 정리
107-
log_info "PySide6 관련 캐시 정리 중..."
108-
rm -rf ~/.cache/pip 2>/dev/null || true
109-
rm -rf /tmp/pip-* 2>/dev/null || true
106+
# PySide6 및 PyInstaller 캐시 완전 정리
107+
log_info "모든 캐시 완전 정리 중..."
108+
sudo rm -rf ~/.cache/pip ~/.cache/pyinstaller 2>/dev/null || true
109+
sudo rm -rf /tmp/pip-* /tmp/_MEI* /tmp/pyinstaller* 2>/dev/null || true
110110

111-
# PyInstaller 작업 디렉토리 강제 정리
112-
log_info "PyInstaller 작업 디렉토리 강제 정리 중..."
113-
mkdir -p dist build 2>/dev/null || true
114-
rm -rf dist/* build/* 2>/dev/null || true
111+
# 작업 디렉토리 새로 생성
112+
log_info "작업 디렉토리 새로 생성 중..."
113+
mkdir -p dist build
114+
115+
# spec 파일 강제 삭제 (매번 새로 생성하도록)
116+
rm -f VibeCulling.spec 2>/dev/null || true
115117

116118
# 버전 파일 생성 (plist 대신 간단한 버전 파일)
117119
cat > version_info.py << EOF
@@ -125,12 +127,14 @@ EOF
125127
# PyInstaller 실행
126128
log_info "PyInstaller를 사용하여 VibeCulling 앱 빌드 중..."
127129

130+
# spec 파일 없이 직접 빌드 (심볼릭 링크 충돌 방지)
128131
pyinstaller \
129132
--name "${APP_NAME}" \
130133
--windowed \
131134
--clean \
132135
--onedir \
133136
--noconfirm \
137+
--noupx \
134138
--distpath ./dist \
135139
--workpath ./build \
136140
--specpath . \
@@ -163,21 +167,25 @@ if [[ $? -ne 0 ]]; then
163167
log_error "PyInstaller 빌드 실패 - 재시도 중..."
164168

165169
# 심볼릭 링크 충돌 해결을 위한 추가 정리
166-
log_info "심볼릭 링크 충돌 해결을 위한 정리 중..."
167-
rm -rf dist build *.spec 2>/dev/null || true
170+
log_info "심볼릭 링크 충돌 해결을 위한 강력한 정리 중..."
171+
sudo rm -rf dist build *.spec __pycache__ .pytest_cache 2>/dev/null || true
172+
sudo rm -rf ~/.cache/pip ~/.cache/pyinstaller 2>/dev/null || true
173+
sudo rm -rf /tmp/pip-* /tmp/_MEI* /tmp/pyinstaller* 2>/dev/null || true
174+
find . -type l -delete 2>/dev/null || true
175+
find . -name "*.pyc" -delete 2>/dev/null || true
168176

169-
# 특정 PySide6 경로 정리
170-
find . -path "*/PySide6/Qt/lib/Qt3DAnimation.framework/Resources" -type l -delete 2>/dev/null || true
171-
find . -path "*/PySide6/Qt/lib/*/Resources" -type l -delete 2>/dev/null || true
177+
# 작업 디렉토리 새로 생성
178+
mkdir -p dist build
172179

173-
# 재시도
174-
log_info "PyInstaller 재시도 중..."
180+
# 재시도 (spec 파일 없이 직접 빌드)
181+
log_info "PyInstaller 재시도 중 (spec 파일 없이)..."
175182
pyinstaller \
176183
--name "${APP_NAME}" \
177184
--windowed \
178185
--clean \
179186
--onedir \
180187
--noconfirm \
188+
--noupx \
181189
--distpath ./dist \
182190
--workpath ./build \
183191
--specpath . \

0 commit comments

Comments
 (0)