Skip to content

Commit 2dfbd6f

Browse files
committed
Organize distribution files into platform-specific subdirectories
- dist/macos/ for DMG files - dist/windows/ for ZIP packages - dist/linux/ for DEB and tarball packages - Updated all build scripts to use new directory structure - Improved build summary to show files by platform
1 parent 8c3f6d9 commit 2dfbd6f

File tree

3 files changed

+39
-14
lines changed

3 files changed

+39
-14
lines changed

build.sh

Lines changed: 37 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,11 @@ set -e
2727
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
2828
PROJECT_ROOT="$SCRIPT_DIR"
2929

30-
# Single output directory for ALL platforms
30+
# Output directories for each platform
3131
DIST_DIR="${PROJECT_ROOT}/dist"
32+
MACOS_DIST_DIR="${DIST_DIR}/macos"
33+
WINDOWS_DIST_DIR="${DIST_DIR}/windows"
34+
LINUX_DIST_DIR="${DIST_DIR}/linux"
3235

3336
# Version
3437
VERSION="${VERSION:-$(git describe --tags --always 2>/dev/null || echo "v1.0.0-dev")}"
@@ -75,11 +78,14 @@ Examples:
7578
Output:
7679
All builds output to: dist/
7780
78-
macOS: Fujisan-{version}-arm64.dmg
79-
Fujisan-{version}-x86_64.dmg
80-
Windows: Fujisan-{version}-windows.zip
81-
Linux: fujisan-{version}-linux-x64.tar.gz
82-
fujisan_{version}_amd64.deb
81+
dist/macos/
82+
- Fujisan-{version}-arm64.dmg
83+
- Fujisan-{version}-x86_64.dmg
84+
dist/windows/
85+
- Fujisan-{version}-windows.zip
86+
dist/linux/
87+
- fujisan-{version}-linux-x64.tar.gz
88+
- fujisan_{version}_amd64.deb
8389
8490
EOF
8591
}
@@ -155,10 +161,11 @@ build_windows() {
155161
# Package into zip for distribution
156162
if [[ -d "build-windows" ]]; then
157163
echo_info "Creating Windows distribution package..."
164+
mkdir -p "$WINDOWS_DIST_DIR"
158165
cd build-windows
159-
zip -r "$DIST_DIR/Fujisan-${VERSION_CLEAN}-windows.zip" * -x "*.log"
166+
zip -r "$WINDOWS_DIST_DIR/Fujisan-${VERSION_CLEAN}-windows.zip" * -x "*.log"
160167
cd ..
161-
echo_success "Created: dist/Fujisan-${VERSION_CLEAN}-windows.zip"
168+
echo_success "Created: dist/windows/Fujisan-${VERSION_CLEAN}-windows.zip"
162169

163170
# Clean up build directory after packaging
164171
rm -rf build-windows/
@@ -228,8 +235,8 @@ if [[ -z "$PLATFORM" ]]; then
228235
exit 0
229236
fi
230237

231-
# Create dist directory
232-
mkdir -p "$DIST_DIR"
238+
# Create dist directories
239+
mkdir -p "$MACOS_DIST_DIR" "$WINDOWS_DIST_DIR" "$LINUX_DIST_DIR"
233240

234241
# Clean if requested
235242
if [[ "$CLEAN" == "true" ]]; then
@@ -287,8 +294,26 @@ echo ""
287294
echo_step "Build Summary"
288295
echo_success "Build complete for: $PLATFORM"
289296
echo ""
290-
echo "Distribution files in: $DIST_DIR/"
291-
ls -lh "$DIST_DIR" 2>/dev/null | grep -E "\.(dmg|zip|tar\.gz|deb)$" || echo " (no distribution files found)"
297+
echo "Distribution files:"
298+
299+
# Show macOS files if they exist
300+
if [[ -d "$MACOS_DIST_DIR" ]] && ls "$MACOS_DIST_DIR"/*.dmg >/dev/null 2>&1; then
301+
echo " macOS (dist/macos/):"
302+
ls -lh "$MACOS_DIST_DIR"/*.dmg 2>/dev/null | awk '{print " - "$9" ("$5")"}'
303+
fi
304+
305+
# Show Windows files if they exist
306+
if [[ -d "$WINDOWS_DIST_DIR" ]] && ls "$WINDOWS_DIST_DIR"/*.zip >/dev/null 2>&1; then
307+
echo " Windows (dist/windows/):"
308+
ls -lh "$WINDOWS_DIST_DIR"/*.zip 2>/dev/null | awk '{print " - "$9" ("$5")"}'
309+
fi
310+
311+
# Show Linux files if they exist
312+
if [[ -d "$LINUX_DIST_DIR" ]] && ls "$LINUX_DIST_DIR"/*.{deb,tar.gz} >/dev/null 2>&1; then
313+
echo " Linux (dist/linux/):"
314+
ls -lh "$LINUX_DIST_DIR"/*.{deb,tar.gz} 2>/dev/null | awk '{print " - "$9" ("$5")"}'
315+
fi
316+
292317
echo ""
293318
echo "To build for other platforms, run:"
294319
echo " $0 [platform] --clean"

scripts/build-linux-docker.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ PROJECT_ROOT="$(dirname "$SCRIPT_DIR")"
1414

1515
# Output directory
1616
LINUX_BUILD_DIR="${PROJECT_ROOT}/build-linux"
17-
DIST_DIR="${PROJECT_ROOT}/dist"
17+
DIST_DIR="${PROJECT_ROOT}/dist/linux"
1818

1919
# Version
2020
VERSION="${VERSION:-$(git describe --tags --always 2>/dev/null || echo "v1.0.0-dev")}"

scripts/build-macos-separate-dmgs.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ echo ""
2222
# Build directories
2323
ARM64_BUILD_DIR="${PROJECT_ROOT}/build-arm64"
2424
X86_64_BUILD_DIR="${PROJECT_ROOT}/build-x86_64"
25-
DIST_DIR="${PROJECT_ROOT}/dist"
25+
DIST_DIR="${PROJECT_ROOT}/dist/macos"
2626

2727
# Qt paths
2828
QT_ARM64_PATH="/opt/homebrew/opt/qt@5"

0 commit comments

Comments
 (0)