@nguyenphp/antigravity-marketing 1.0.18 → 1.0.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +130 -78
- package/package.json +4 -3
- package/templates/.agent/skills/marketing-report-expert/SKILL.md +70 -0
- package/templates/.agent/skills/minimax-docx/LICENSE +21 -0
- package/templates/.agent/skills/minimax-docx/SKILL.md +274 -0
- package/templates/.agent/skills/minimax-docx/assets/styles/academic_styles.xml +250 -0
- package/templates/.agent/skills/minimax-docx/assets/styles/corporate_styles.xml +284 -0
- package/templates/.agent/skills/minimax-docx/assets/styles/default_styles.xml +449 -0
- package/templates/.agent/skills/minimax-docx/assets/xsd/aesthetic-rules.xsd +470 -0
- package/templates/.agent/skills/minimax-docx/assets/xsd/business-rules.xsd +130 -0
- package/templates/.agent/skills/minimax-docx/assets/xsd/common-types.xsd +159 -0
- package/templates/.agent/skills/minimax-docx/assets/xsd/wml-subset.xsd +589 -0
- package/templates/.agent/skills/minimax-docx/references/cjk_typography.md +357 -0
- package/templates/.agent/skills/minimax-docx/references/cjk_university_template_guide.md +184 -0
- package/templates/.agent/skills/minimax-docx/references/comments_guide.md +191 -0
- package/templates/.agent/skills/minimax-docx/references/design_good_bad_examples.md +829 -0
- package/templates/.agent/skills/minimax-docx/references/design_principles.md +819 -0
- package/templates/.agent/skills/minimax-docx/references/openxml_element_order.md +308 -0
- package/templates/.agent/skills/minimax-docx/references/openxml_encyclopedia_part1.md +4061 -0
- package/templates/.agent/skills/minimax-docx/references/openxml_encyclopedia_part2.md +2820 -0
- package/templates/.agent/skills/minimax-docx/references/openxml_encyclopedia_part3.md +3381 -0
- package/templates/.agent/skills/minimax-docx/references/openxml_namespaces.md +82 -0
- package/templates/.agent/skills/minimax-docx/references/openxml_units.md +72 -0
- package/templates/.agent/skills/minimax-docx/references/scenario_a_create.md +284 -0
- package/templates/.agent/skills/minimax-docx/references/scenario_b_edit_content.md +295 -0
- package/templates/.agent/skills/minimax-docx/references/scenario_c_apply_template.md +456 -0
- package/templates/.agent/skills/minimax-docx/references/track_changes_guide.md +200 -0
- package/templates/.agent/skills/minimax-docx/references/troubleshooting.md +506 -0
- package/templates/.agent/skills/minimax-docx/references/typography_guide.md +294 -0
- package/templates/.agent/skills/minimax-docx/references/xsd_validation_guide.md +158 -0
- package/templates/.agent/skills/minimax-docx/scripts/doc_to_docx.sh +40 -0
- package/templates/.agent/skills/minimax-docx/scripts/docx_preview.sh +37 -0
- package/templates/.agent/skills/minimax-docx/scripts/dotnet/MiniMaxAIDocx.Cli/MiniMaxAIDocx.Cli.csproj +19 -0
- package/templates/.agent/skills/minimax-docx/scripts/dotnet/MiniMaxAIDocx.Cli/Program.cs +18 -0
- package/templates/.agent/skills/minimax-docx/scripts/dotnet/MiniMaxAIDocx.Core/Commands/AnalyzeCommand.cs +147 -0
- package/templates/.agent/skills/minimax-docx/scripts/dotnet/MiniMaxAIDocx.Core/Commands/ApplyTemplateCommand.cs +322 -0
- package/templates/.agent/skills/minimax-docx/scripts/dotnet/MiniMaxAIDocx.Core/Commands/CreateCommand.cs +324 -0
- package/templates/.agent/skills/minimax-docx/scripts/dotnet/MiniMaxAIDocx.Core/Commands/DiffCommand.cs +155 -0
- package/templates/.agent/skills/minimax-docx/scripts/dotnet/MiniMaxAIDocx.Core/Commands/EditContentCommand.cs +487 -0
- package/templates/.agent/skills/minimax-docx/scripts/dotnet/MiniMaxAIDocx.Core/Commands/FixOrderCommand.cs +108 -0
- package/templates/.agent/skills/minimax-docx/scripts/dotnet/MiniMaxAIDocx.Core/Commands/MergeRunsCommand.cs +122 -0
- package/templates/.agent/skills/minimax-docx/scripts/dotnet/MiniMaxAIDocx.Core/Commands/ValidateCommand.cs +107 -0
- package/templates/.agent/skills/minimax-docx/scripts/dotnet/MiniMaxAIDocx.Core/MiniMaxAIDocx.Core.csproj +15 -0
- package/templates/.agent/skills/minimax-docx/scripts/dotnet/MiniMaxAIDocx.Core/OpenXml/CommentSynchronizer.cs +169 -0
- package/templates/.agent/skills/minimax-docx/scripts/dotnet/MiniMaxAIDocx.Core/OpenXml/ElementOrder.cs +80 -0
- package/templates/.agent/skills/minimax-docx/scripts/dotnet/MiniMaxAIDocx.Core/OpenXml/NamespaceConstants.cs +42 -0
- package/templates/.agent/skills/minimax-docx/scripts/dotnet/MiniMaxAIDocx.Core/OpenXml/RunMerger.cs +81 -0
- package/templates/.agent/skills/minimax-docx/scripts/dotnet/MiniMaxAIDocx.Core/OpenXml/StyleAnalyzer.cs +81 -0
- package/templates/.agent/skills/minimax-docx/scripts/dotnet/MiniMaxAIDocx.Core/OpenXml/TrackChangesHelper.cs +99 -0
- package/templates/.agent/skills/minimax-docx/scripts/dotnet/MiniMaxAIDocx.Core/OpenXml/UnitConverter.cs +23 -0
- package/templates/.agent/skills/minimax-docx/scripts/dotnet/MiniMaxAIDocx.Core/Samples/AestheticRecipeSamples.cs +1832 -0
- package/templates/.agent/skills/minimax-docx/scripts/dotnet/MiniMaxAIDocx.Core/Samples/AestheticRecipeSamples_Batch1.cs +910 -0
- package/templates/.agent/skills/minimax-docx/scripts/dotnet/MiniMaxAIDocx.Core/Samples/AestheticRecipeSamples_Batch2.cs +999 -0
- package/templates/.agent/skills/minimax-docx/scripts/dotnet/MiniMaxAIDocx.Core/Samples/AestheticRecipeSamples_Batch3.cs +1048 -0
- package/templates/.agent/skills/minimax-docx/scripts/dotnet/MiniMaxAIDocx.Core/Samples/AestheticRecipeSamples_Batch4.cs +1038 -0
- package/templates/.agent/skills/minimax-docx/scripts/dotnet/MiniMaxAIDocx.Core/Samples/CharacterFormattingSamples.cs +1020 -0
- package/templates/.agent/skills/minimax-docx/scripts/dotnet/MiniMaxAIDocx.Core/Samples/DocumentCreationSamples.cs +1121 -0
- package/templates/.agent/skills/minimax-docx/scripts/dotnet/MiniMaxAIDocx.Core/Samples/FieldAndTocSamples.cs +624 -0
- package/templates/.agent/skills/minimax-docx/scripts/dotnet/MiniMaxAIDocx.Core/Samples/FootnoteAndCommentSamples.cs +675 -0
- package/templates/.agent/skills/minimax-docx/scripts/dotnet/MiniMaxAIDocx.Core/Samples/HeaderFooterSamples.cs +838 -0
- package/templates/.agent/skills/minimax-docx/scripts/dotnet/MiniMaxAIDocx.Core/Samples/ImageSamples.cs +917 -0
- package/templates/.agent/skills/minimax-docx/scripts/dotnet/MiniMaxAIDocx.Core/Samples/ListAndNumberingSamples.cs +826 -0
- package/templates/.agent/skills/minimax-docx/scripts/dotnet/MiniMaxAIDocx.Core/Samples/ParagraphFormattingSamples.cs +1199 -0
- package/templates/.agent/skills/minimax-docx/scripts/dotnet/MiniMaxAIDocx.Core/Samples/StyleSystemSamples.cs +1487 -0
- package/templates/.agent/skills/minimax-docx/scripts/dotnet/MiniMaxAIDocx.Core/Samples/TableSamples.cs +1163 -0
- package/templates/.agent/skills/minimax-docx/scripts/dotnet/MiniMaxAIDocx.Core/Samples/TrackChangesSamples.cs +595 -0
- package/templates/.agent/skills/minimax-docx/scripts/dotnet/MiniMaxAIDocx.Core/Typography/CjkHelper.cs +39 -0
- package/templates/.agent/skills/minimax-docx/scripts/dotnet/MiniMaxAIDocx.Core/Typography/FontDefaults.cs +24 -0
- package/templates/.agent/skills/minimax-docx/scripts/dotnet/MiniMaxAIDocx.Core/Typography/PageSizes.cs +20 -0
- package/templates/.agent/skills/minimax-docx/scripts/dotnet/MiniMaxAIDocx.Core/Validation/BusinessRuleValidator.cs +224 -0
- package/templates/.agent/skills/minimax-docx/scripts/dotnet/MiniMaxAIDocx.Core/Validation/GateCheckValidator.cs +148 -0
- package/templates/.agent/skills/minimax-docx/scripts/dotnet/MiniMaxAIDocx.Core/Validation/ValidationResult.cs +23 -0
- package/templates/.agent/skills/minimax-docx/scripts/dotnet/MiniMaxAIDocx.Core/Validation/XsdValidator.cs +69 -0
- package/templates/.agent/skills/minimax-docx/scripts/dotnet/MiniMaxAIDocx.slnx +4 -0
- package/templates/.agent/skills/minimax-docx/scripts/env_check.sh +196 -0
- package/templates/.agent/skills/minimax-docx/scripts/setup.ps1 +274 -0
- package/templates/.agent/skills/minimax-docx/scripts/setup.sh +504 -0
- package/templates/.agent/skills/minimax-multimodal-toolkit/SKILL.md +359 -0
- package/templates/.agent/skills/minimax-pdf/README.md +222 -0
- package/templates/.agent/skills/minimax-pdf/SKILL.md +201 -0
- package/templates/.agent/skills/minimax-pdf/design/design.md +381 -0
- package/templates/.agent/skills/minimax-pdf/scripts/cover.py +1579 -0
- package/templates/.agent/skills/minimax-pdf/scripts/fill_inspect.py +200 -0
- package/templates/.agent/skills/minimax-pdf/scripts/fill_write.py +242 -0
- package/templates/.agent/skills/minimax-pdf/scripts/make.sh +491 -0
- package/templates/.agent/skills/minimax-pdf/scripts/merge.py +112 -0
- package/templates/.agent/skills/minimax-pdf/scripts/palette.py +559 -0
- package/templates/.agent/skills/minimax-pdf/scripts/reformat_parse.py +374 -0
- package/templates/.agent/skills/minimax-pdf/scripts/render_body.py +1055 -0
- package/templates/.agent/skills/minimax-pdf/scripts/render_cover.cjs +111 -0
- package/templates/.agent/skills/minimax-xlsx/SKILL.md +138 -0
- package/templates/.agent/skills/minimax-xlsx/references/create.md +691 -0
- package/templates/.agent/skills/minimax-xlsx/references/edit.md +684 -0
- package/templates/.agent/skills/minimax-xlsx/references/fix.md +37 -0
- package/templates/.agent/skills/minimax-xlsx/references/format.md +768 -0
- package/templates/.agent/skills/minimax-xlsx/references/ooxml-cheatsheet.md +231 -0
- package/templates/.agent/skills/minimax-xlsx/references/read-analyze.md +97 -0
- package/templates/.agent/skills/minimax-xlsx/references/validate.md +772 -0
- package/templates/.agent/skills/minimax-xlsx/scripts/formula_check.py +422 -0
- package/templates/.agent/skills/minimax-xlsx/scripts/libreoffice_recalc.py +248 -0
- package/templates/.agent/skills/minimax-xlsx/scripts/shared_strings_builder.py +163 -0
- package/templates/.agent/skills/minimax-xlsx/scripts/style_audit.py +575 -0
- package/templates/.agent/skills/minimax-xlsx/scripts/xlsx_add_column.py +395 -0
- package/templates/.agent/skills/minimax-xlsx/scripts/xlsx_insert_row.py +274 -0
- package/templates/.agent/skills/minimax-xlsx/scripts/xlsx_pack.py +87 -0
- package/templates/.agent/skills/minimax-xlsx/scripts/xlsx_reader.py +362 -0
- package/templates/.agent/skills/minimax-xlsx/scripts/xlsx_shift_rows.py +396 -0
- package/templates/.agent/skills/minimax-xlsx/scripts/xlsx_unpack.py +130 -0
- package/templates/.agent/skills/minimax-xlsx/templates/minimal_xlsx/[Content_Types].xml +9 -0
- package/templates/.agent/skills/minimax-xlsx/templates/minimal_xlsx/_rels/.rels +6 -0
- package/templates/.agent/skills/minimax-xlsx/templates/minimal_xlsx/xl/_rels/workbook.xml.rels +19 -0
- package/templates/.agent/skills/minimax-xlsx/templates/minimal_xlsx/xl/sharedStrings.xml +33 -0
- package/templates/.agent/skills/minimax-xlsx/templates/minimal_xlsx/xl/styles.xml +160 -0
- package/templates/.agent/skills/minimax-xlsx/templates/minimal_xlsx/xl/workbook.xml +30 -0
- package/templates/.agent/skills/minimax-xlsx/templates/minimal_xlsx/xl/worksheets/sheet1.xml +70 -0
- package/templates/.agent/skills/pptx-generator/SKILL.md +249 -0
- package/templates/.agent/skills/pptx-generator/references/design-system.md +392 -0
- package/templates/.agent/skills/pptx-generator/references/editing.md +162 -0
- package/templates/.agent/skills/pptx-generator/references/pitfalls.md +112 -0
- package/templates/.agent/skills/pptx-generator/references/pptxgenjs.md +420 -0
- package/templates/.agent/skills/pptx-generator/references/slide-types.md +413 -0
- package/templates/.agent/skills/tutorial-video-expert/SKILL.md +88 -0
- package/templates/.agent/skills/ui-ux-pro-max/SKILL.md +170 -585
- package/templates/.agent/skills/vision-analysis/SKILL.md +174 -0
- package/templates/.agent/workflows/analyze.md +3 -0
- package/templates/.agent/workflows/brand-report.md +44 -0
- package/templates/.agent/workflows/report.md +49 -0
- package/templates/.agent/agents/backend-specialist.md +0 -263
- package/templates/.agent/agents/database-architect.md +0 -226
- package/templates/.agent/agents/debugger.md +0 -225
- package/templates/.agent/agents/devops-engineer.md +0 -242
- package/templates/.agent/agents/frontend-specialist.md +0 -527
- package/templates/.agent/agents/game-developer.md +0 -162
- package/templates/.agent/agents/mobile-developer.md +0 -377
- package/templates/.agent/agents/penetration-tester.md +0 -188
- package/templates/.agent/agents/security-auditor.md +0 -170
- package/templates/.agent/agents/test-engineer.md +0 -158
- package/templates/.agent/skills/api-patterns/SKILL.md +0 -81
- package/templates/.agent/skills/api-patterns/api-style.md +0 -42
- package/templates/.agent/skills/api-patterns/auth.md +0 -24
- package/templates/.agent/skills/api-patterns/documentation.md +0 -26
- package/templates/.agent/skills/api-patterns/graphql.md +0 -41
- package/templates/.agent/skills/api-patterns/rate-limiting.md +0 -31
- package/templates/.agent/skills/api-patterns/response.md +0 -37
- package/templates/.agent/skills/api-patterns/rest.md +0 -40
- package/templates/.agent/skills/api-patterns/scripts/api_validator.py +0 -211
- package/templates/.agent/skills/api-patterns/security-testing.md +0 -122
- package/templates/.agent/skills/api-patterns/trpc.md +0 -41
- package/templates/.agent/skills/api-patterns/versioning.md +0 -22
- package/templates/.agent/skills/app-builder/SKILL.md +0 -75
- package/templates/.agent/skills/app-builder/agent-coordination.md +0 -71
- package/templates/.agent/skills/app-builder/feature-building.md +0 -53
- package/templates/.agent/skills/app-builder/project-detection.md +0 -34
- package/templates/.agent/skills/app-builder/scaffolding.md +0 -118
- package/templates/.agent/skills/app-builder/tech-stack.md +0 -40
- package/templates/.agent/skills/app-builder/templates/SKILL.md +0 -39
- package/templates/.agent/skills/app-builder/templates/astro-static/TEMPLATE.md +0 -76
- package/templates/.agent/skills/app-builder/templates/chrome-extension/TEMPLATE.md +0 -92
- package/templates/.agent/skills/app-builder/templates/cli-tool/TEMPLATE.md +0 -88
- package/templates/.agent/skills/app-builder/templates/electron-desktop/TEMPLATE.md +0 -88
- package/templates/.agent/skills/app-builder/templates/express-api/TEMPLATE.md +0 -83
- package/templates/.agent/skills/app-builder/templates/flutter-app/TEMPLATE.md +0 -90
- package/templates/.agent/skills/app-builder/templates/monorepo-turborepo/TEMPLATE.md +0 -90
- package/templates/.agent/skills/app-builder/templates/nextjs-fullstack/TEMPLATE.md +0 -82
- package/templates/.agent/skills/app-builder/templates/nextjs-saas/TEMPLATE.md +0 -100
- package/templates/.agent/skills/app-builder/templates/nextjs-static/TEMPLATE.md +0 -106
- package/templates/.agent/skills/app-builder/templates/nuxt-app/TEMPLATE.md +0 -101
- package/templates/.agent/skills/app-builder/templates/python-fastapi/TEMPLATE.md +0 -83
- package/templates/.agent/skills/app-builder/templates/react-native-app/TEMPLATE.md +0 -93
- package/templates/.agent/skills/architecture/SKILL.md +0 -55
- package/templates/.agent/skills/architecture/context-discovery.md +0 -43
- package/templates/.agent/skills/architecture/examples.md +0 -94
- package/templates/.agent/skills/architecture/pattern-selection.md +0 -68
- package/templates/.agent/skills/architecture/patterns-reference.md +0 -50
- package/templates/.agent/skills/architecture/trade-off-analysis.md +0 -77
- package/templates/.agent/skills/bash-linux/SKILL.md +0 -199
- package/templates/.agent/skills/behavioral-modes/SKILL.md +0 -242
- package/templates/.agent/skills/clean-code/SKILL.md +0 -201
- package/templates/.agent/skills/code-review-checklist/SKILL.md +0 -109
- package/templates/.agent/skills/database-design/SKILL.md +0 -52
- package/templates/.agent/skills/database-design/database-selection.md +0 -43
- package/templates/.agent/skills/database-design/indexing.md +0 -39
- package/templates/.agent/skills/database-design/migrations.md +0 -48
- package/templates/.agent/skills/database-design/optimization.md +0 -36
- package/templates/.agent/skills/database-design/orm-selection.md +0 -30
- package/templates/.agent/skills/database-design/schema-design.md +0 -56
- package/templates/.agent/skills/database-design/scripts/schema_validator.py +0 -172
- package/templates/.agent/skills/deployment-procedures/SKILL.md +0 -241
- package/templates/.agent/skills/docker-expert/SKILL.md +0 -409
- package/templates/.agent/skills/game-development/2d-games/SKILL.md +0 -119
- package/templates/.agent/skills/game-development/3d-games/SKILL.md +0 -135
- package/templates/.agent/skills/game-development/SKILL.md +0 -167
- package/templates/.agent/skills/game-development/game-art/SKILL.md +0 -185
- package/templates/.agent/skills/game-development/game-audio/SKILL.md +0 -190
- package/templates/.agent/skills/game-development/game-design/SKILL.md +0 -129
- package/templates/.agent/skills/game-development/mobile-games/SKILL.md +0 -108
- package/templates/.agent/skills/game-development/multiplayer/SKILL.md +0 -132
- package/templates/.agent/skills/game-development/pc-games/SKILL.md +0 -144
- package/templates/.agent/skills/game-development/vr-ar/SKILL.md +0 -123
- package/templates/.agent/skills/game-development/web-games/SKILL.md +0 -150
- package/templates/.agent/skills/lint-and-validate/SKILL.md +0 -45
- package/templates/.agent/skills/lint-and-validate/scripts/lint_runner.py +0 -172
- package/templates/.agent/skills/lint-and-validate/scripts/type_coverage.py +0 -173
- package/templates/.agent/skills/mcp-builder/SKILL.md +0 -176
- package/templates/.agent/skills/nestjs-expert/SKILL.md +0 -552
- package/templates/.agent/skills/nextjs-best-practices/SKILL.md +0 -203
- package/templates/.agent/skills/nodejs-best-practices/SKILL.md +0 -333
- package/templates/.agent/skills/parallel-agents/SKILL.md +0 -175
- package/templates/.agent/skills/performance-profiling/SKILL.md +0 -143
- package/templates/.agent/skills/performance-profiling/scripts/lighthouse_audit.py +0 -76
- package/templates/.agent/skills/powershell-windows/SKILL.md +0 -167
- package/templates/.agent/skills/prisma-expert/SKILL.md +0 -355
- package/templates/.agent/skills/python-patterns/SKILL.md +0 -441
- package/templates/.agent/skills/react-patterns/SKILL.md +0 -198
- package/templates/.agent/skills/red-team-tactics/SKILL.md +0 -199
- package/templates/.agent/skills/server-management/SKILL.md +0 -161
- package/templates/.agent/skills/systematic-debugging/SKILL.md +0 -109
- package/templates/.agent/skills/tdd-workflow/SKILL.md +0 -149
- package/templates/.agent/skills/testing-patterns/SKILL.md +0 -178
- package/templates/.agent/skills/testing-patterns/scripts/test_runner.py +0 -219
- package/templates/.agent/skills/typescript-expert/SKILL.md +0 -429
- package/templates/.agent/skills/vue-expert/SKILL.md +0 -374
- package/templates/.agent/skills/vulnerability-scanner/SKILL.md +0 -276
- package/templates/.agent/skills/vulnerability-scanner/checklists.md +0 -121
- package/templates/.agent/skills/vulnerability-scanner/scripts/security_scan.py +0 -458
- package/templates/.agent/skills/webapp-testing/SKILL.md +0 -187
- package/templates/.agent/skills/webapp-testing/scripts/playwright_runner.py +0 -173
- package/templates/.agent/workflows/debug.md +0 -103
- package/templates/.agent/workflows/deploy.md +0 -176
- package/templates/.agent/workflows/enhance.md +0 -63
- package/templates/.agent/workflows/test.md +0 -144
|
@@ -0,0 +1,504 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# minimax-docx Environment Setup & Initialization Script
|
|
3
|
+
# Supports: macOS (Homebrew), Linux (apt/dnf/pacman), WSL
|
|
4
|
+
# License: MIT
|
|
5
|
+
set -euo pipefail
|
|
6
|
+
|
|
7
|
+
# Force English output for dotnet CLI
|
|
8
|
+
export DOTNET_CLI_UI_LANGUAGE=en
|
|
9
|
+
|
|
10
|
+
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
11
|
+
PROJECT_DIR="$(cd "$SCRIPT_DIR/.." && pwd)"
|
|
12
|
+
DOTNET_DIR="$SCRIPT_DIR/dotnet"
|
|
13
|
+
LOG_FILE="$PROJECT_DIR/.setup.log"
|
|
14
|
+
|
|
15
|
+
# --- Colors ---
|
|
16
|
+
RED='\033[0;31m'
|
|
17
|
+
GREEN='\033[0;32m'
|
|
18
|
+
YELLOW='\033[1;33m'
|
|
19
|
+
BLUE='\033[0;34m'
|
|
20
|
+
NC='\033[0m'
|
|
21
|
+
|
|
22
|
+
log() { echo -e "${GREEN}[OK]${NC} $*"; }
|
|
23
|
+
warn() { echo -e "${YELLOW}[WARN]${NC} $*"; }
|
|
24
|
+
fail() { echo -e "${RED}[FAIL]${NC} $*"; }
|
|
25
|
+
info() { echo -e "${BLUE}[INFO]${NC} $*"; }
|
|
26
|
+
step() { echo -e "\n${BLUE}=== $* ===${NC}"; }
|
|
27
|
+
|
|
28
|
+
# --- Detect OS & Package Manager ---
|
|
29
|
+
detect_platform() {
|
|
30
|
+
OS="unknown"
|
|
31
|
+
PKG_MGR="unknown"
|
|
32
|
+
ARCH="$(uname -m)"
|
|
33
|
+
|
|
34
|
+
case "$(uname -s)" in
|
|
35
|
+
Darwin)
|
|
36
|
+
OS="macos"
|
|
37
|
+
if command -v brew &>/dev/null; then
|
|
38
|
+
PKG_MGR="brew"
|
|
39
|
+
else
|
|
40
|
+
PKG_MGR="none"
|
|
41
|
+
fi
|
|
42
|
+
;;
|
|
43
|
+
Linux)
|
|
44
|
+
OS="linux"
|
|
45
|
+
if [ -f /etc/os-release ]; then
|
|
46
|
+
. /etc/os-release
|
|
47
|
+
case "$ID" in
|
|
48
|
+
ubuntu|debian|linuxmint|pop)
|
|
49
|
+
PKG_MGR="apt"
|
|
50
|
+
;;
|
|
51
|
+
fedora|rhel|centos|rocky|alma)
|
|
52
|
+
PKG_MGR="dnf"
|
|
53
|
+
;;
|
|
54
|
+
arch|manjaro|endeavouros)
|
|
55
|
+
PKG_MGR="pacman"
|
|
56
|
+
;;
|
|
57
|
+
opensuse*|sles)
|
|
58
|
+
PKG_MGR="zypper"
|
|
59
|
+
;;
|
|
60
|
+
alpine)
|
|
61
|
+
PKG_MGR="apk"
|
|
62
|
+
;;
|
|
63
|
+
*)
|
|
64
|
+
PKG_MGR="unknown"
|
|
65
|
+
;;
|
|
66
|
+
esac
|
|
67
|
+
fi
|
|
68
|
+
# Detect WSL
|
|
69
|
+
if grep -qi microsoft /proc/version 2>/dev/null; then
|
|
70
|
+
OS="wsl"
|
|
71
|
+
fi
|
|
72
|
+
;;
|
|
73
|
+
MINGW*|MSYS*|CYGWIN*)
|
|
74
|
+
OS="windows-git-bash"
|
|
75
|
+
PKG_MGR="none"
|
|
76
|
+
;;
|
|
77
|
+
esac
|
|
78
|
+
|
|
79
|
+
echo "Platform: $OS ($ARCH), Package Manager: $PKG_MGR"
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
# --- .NET SDK Installation ---
|
|
83
|
+
install_dotnet() {
|
|
84
|
+
step "Checking .NET SDK"
|
|
85
|
+
|
|
86
|
+
if command -v dotnet &>/dev/null; then
|
|
87
|
+
local ver
|
|
88
|
+
ver=$(dotnet --version 2>/dev/null || echo "0")
|
|
89
|
+
local major="${ver%%.*}"
|
|
90
|
+
if [ "$major" -ge 8 ] 2>/dev/null; then
|
|
91
|
+
log "dotnet $ver already installed (>= 8.0 OK)"
|
|
92
|
+
return 0
|
|
93
|
+
else
|
|
94
|
+
warn "dotnet $ver found but < 8.0, upgrading..."
|
|
95
|
+
fi
|
|
96
|
+
fi
|
|
97
|
+
|
|
98
|
+
info "Installing .NET SDK..."
|
|
99
|
+
case "$PKG_MGR" in
|
|
100
|
+
brew)
|
|
101
|
+
brew install --cask dotnet-sdk
|
|
102
|
+
;;
|
|
103
|
+
apt)
|
|
104
|
+
# Microsoft package repo for Ubuntu/Debian
|
|
105
|
+
if ! dpkg -l dotnet-sdk-8.0 &>/dev/null 2>&1; then
|
|
106
|
+
info "Adding Microsoft package repository..."
|
|
107
|
+
sudo apt-get update -qq
|
|
108
|
+
sudo apt-get install -y -qq wget apt-transport-https
|
|
109
|
+
wget -q "https://dot.net/v1/dotnet-install.sh" -O /tmp/dotnet-install.sh
|
|
110
|
+
chmod +x /tmp/dotnet-install.sh
|
|
111
|
+
/tmp/dotnet-install.sh --channel 8.0 --install-dir "$HOME/.dotnet"
|
|
112
|
+
export PATH="$HOME/.dotnet:$PATH"
|
|
113
|
+
echo 'export PATH="$HOME/.dotnet:$PATH"' >> "$HOME/.bashrc"
|
|
114
|
+
fi
|
|
115
|
+
;;
|
|
116
|
+
dnf)
|
|
117
|
+
sudo dnf install -y dotnet-sdk-8.0
|
|
118
|
+
;;
|
|
119
|
+
pacman)
|
|
120
|
+
sudo pacman -S --noconfirm dotnet-sdk
|
|
121
|
+
;;
|
|
122
|
+
zypper)
|
|
123
|
+
sudo zypper install -y dotnet-sdk-8.0
|
|
124
|
+
;;
|
|
125
|
+
apk)
|
|
126
|
+
apk add --no-cache dotnet8-sdk
|
|
127
|
+
;;
|
|
128
|
+
none)
|
|
129
|
+
if [ "$OS" = "windows-git-bash" ]; then
|
|
130
|
+
fail "On Windows, install .NET SDK from: https://dotnet.microsoft.com/download"
|
|
131
|
+
fail "Then restart your terminal and re-run this script."
|
|
132
|
+
return 1
|
|
133
|
+
fi
|
|
134
|
+
# Fallback: use Microsoft install script
|
|
135
|
+
info "Using Microsoft install script..."
|
|
136
|
+
wget -q "https://dot.net/v1/dotnet-install.sh" -O /tmp/dotnet-install.sh || \
|
|
137
|
+
curl -sSL "https://dot.net/v1/dotnet-install.sh" -o /tmp/dotnet-install.sh
|
|
138
|
+
chmod +x /tmp/dotnet-install.sh
|
|
139
|
+
/tmp/dotnet-install.sh --channel 8.0 --install-dir "$HOME/.dotnet"
|
|
140
|
+
export PATH="$HOME/.dotnet:$PATH"
|
|
141
|
+
echo 'export PATH="$HOME/.dotnet:$PATH"' >> "$HOME/.bashrc"
|
|
142
|
+
;;
|
|
143
|
+
*)
|
|
144
|
+
warn "Unknown package manager. Install .NET SDK manually: https://dotnet.microsoft.com/download"
|
|
145
|
+
return 1
|
|
146
|
+
;;
|
|
147
|
+
esac
|
|
148
|
+
|
|
149
|
+
# Verify
|
|
150
|
+
if command -v dotnet &>/dev/null; then
|
|
151
|
+
log "dotnet $(dotnet --version) installed"
|
|
152
|
+
else
|
|
153
|
+
fail "dotnet installation failed. Install manually: https://dotnet.microsoft.com/download"
|
|
154
|
+
return 1
|
|
155
|
+
fi
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
# --- Pandoc Installation (Optional) ---
|
|
159
|
+
install_pandoc() {
|
|
160
|
+
step "Checking pandoc (optional: content preview)"
|
|
161
|
+
|
|
162
|
+
if command -v pandoc &>/dev/null; then
|
|
163
|
+
log "pandoc $(pandoc --version | head -1 | grep -oE '[0-9]+\.[0-9]+(\.[0-9]+)?') already installed"
|
|
164
|
+
return 0
|
|
165
|
+
fi
|
|
166
|
+
|
|
167
|
+
info "Installing pandoc..."
|
|
168
|
+
case "$PKG_MGR" in
|
|
169
|
+
brew) brew install pandoc ;;
|
|
170
|
+
apt) sudo apt-get install -y -qq pandoc ;;
|
|
171
|
+
dnf) sudo dnf install -y pandoc ;;
|
|
172
|
+
pacman) sudo pacman -S --noconfirm pandoc ;;
|
|
173
|
+
zypper) sudo zypper install -y pandoc ;;
|
|
174
|
+
apk) apk add --no-cache pandoc ;;
|
|
175
|
+
*)
|
|
176
|
+
warn "Cannot auto-install pandoc. Install manually: https://pandoc.org/installing.html"
|
|
177
|
+
return 0
|
|
178
|
+
;;
|
|
179
|
+
esac
|
|
180
|
+
|
|
181
|
+
if command -v pandoc &>/dev/null; then
|
|
182
|
+
log "pandoc installed"
|
|
183
|
+
else
|
|
184
|
+
warn "pandoc installation failed (optional, will degrade gracefully)"
|
|
185
|
+
fi
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
# --- LibreOffice Installation (Optional) ---
|
|
189
|
+
install_soffice() {
|
|
190
|
+
step "Checking LibreOffice/soffice (optional: .doc conversion)"
|
|
191
|
+
|
|
192
|
+
if command -v soffice &>/dev/null; then
|
|
193
|
+
log "soffice already installed"
|
|
194
|
+
return 0
|
|
195
|
+
fi
|
|
196
|
+
|
|
197
|
+
# Also check common install paths
|
|
198
|
+
local soffice_paths=(
|
|
199
|
+
"/usr/bin/soffice"
|
|
200
|
+
"/usr/local/bin/soffice"
|
|
201
|
+
"/opt/libreoffice/program/soffice"
|
|
202
|
+
"/snap/bin/libreoffice"
|
|
203
|
+
"/Applications/LibreOffice.app/Contents/MacOS/soffice"
|
|
204
|
+
)
|
|
205
|
+
for p in "${soffice_paths[@]}"; do
|
|
206
|
+
if [ -x "$p" ]; then
|
|
207
|
+
log "soffice found at $p"
|
|
208
|
+
if [ "$OS" = "macos" ] && [ "$p" = "/Applications/LibreOffice.app/Contents/MacOS/soffice" ]; then
|
|
209
|
+
info "Tip: Add to PATH: ln -s '$p' /usr/local/bin/soffice"
|
|
210
|
+
fi
|
|
211
|
+
return 0
|
|
212
|
+
fi
|
|
213
|
+
done
|
|
214
|
+
|
|
215
|
+
info "Installing LibreOffice (this may take a while)..."
|
|
216
|
+
case "$PKG_MGR" in
|
|
217
|
+
brew) brew install --cask libreoffice ;;
|
|
218
|
+
apt) sudo apt-get install -y -qq libreoffice-core ;;
|
|
219
|
+
dnf) sudo dnf install -y libreoffice-core ;;
|
|
220
|
+
pacman) sudo pacman -S --noconfirm libreoffice-still ;;
|
|
221
|
+
zypper) sudo zypper install -y libreoffice ;;
|
|
222
|
+
apk) apk add --no-cache libreoffice ;;
|
|
223
|
+
*)
|
|
224
|
+
warn "Cannot auto-install LibreOffice. Install manually: https://www.libreoffice.org/download/"
|
|
225
|
+
return 0
|
|
226
|
+
;;
|
|
227
|
+
esac
|
|
228
|
+
|
|
229
|
+
if command -v soffice &>/dev/null; then
|
|
230
|
+
log "soffice installed"
|
|
231
|
+
else
|
|
232
|
+
warn "soffice not found after install (optional, .doc conversion unavailable)"
|
|
233
|
+
fi
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
# --- zip/unzip ---
|
|
237
|
+
install_zip_tools() {
|
|
238
|
+
step "Checking zip/unzip"
|
|
239
|
+
|
|
240
|
+
local need_zip=false need_unzip=false
|
|
241
|
+
command -v zip &>/dev/null && log "zip already installed" || need_zip=true
|
|
242
|
+
command -v unzip &>/dev/null && log "unzip already installed" || need_unzip=true
|
|
243
|
+
|
|
244
|
+
if ! $need_zip && ! $need_unzip; then
|
|
245
|
+
return 0
|
|
246
|
+
fi
|
|
247
|
+
|
|
248
|
+
info "Installing zip/unzip..."
|
|
249
|
+
case "$PKG_MGR" in
|
|
250
|
+
brew) brew install zip unzip 2>/dev/null || true ;;
|
|
251
|
+
apt) sudo apt-get install -y -qq zip unzip ;;
|
|
252
|
+
dnf) sudo dnf install -y zip unzip ;;
|
|
253
|
+
pacman) sudo pacman -S --noconfirm zip unzip ;;
|
|
254
|
+
zypper) sudo zypper install -y zip unzip ;;
|
|
255
|
+
apk) apk add --no-cache zip unzip ;;
|
|
256
|
+
*) warn "Install zip/unzip manually (optional, .NET handles DOCX natively)" ;;
|
|
257
|
+
esac
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
# --- .NET Project Build ---
|
|
261
|
+
build_project() {
|
|
262
|
+
step "Building minimax-docx .NET project"
|
|
263
|
+
|
|
264
|
+
if [ ! -d "$DOTNET_DIR" ]; then
|
|
265
|
+
fail "Dotnet project directory not found: $DOTNET_DIR"
|
|
266
|
+
return 1
|
|
267
|
+
fi
|
|
268
|
+
|
|
269
|
+
cd "$DOTNET_DIR"
|
|
270
|
+
|
|
271
|
+
info "Restoring NuGet packages..."
|
|
272
|
+
if ! dotnet restore --verbosity quiet 2>>"$LOG_FILE"; then
|
|
273
|
+
fail "NuGet restore failed. Check network and $LOG_FILE for details."
|
|
274
|
+
fail "Common causes:"
|
|
275
|
+
fail " - No internet access (NuGet needs to download packages)"
|
|
276
|
+
fail " - Corporate proxy blocking nuget.org"
|
|
277
|
+
fail " - Disk space insufficient"
|
|
278
|
+
echo ""
|
|
279
|
+
fail "Try manually: cd $DOTNET_DIR && dotnet restore --verbosity detailed"
|
|
280
|
+
return 1
|
|
281
|
+
fi
|
|
282
|
+
log "NuGet packages restored"
|
|
283
|
+
|
|
284
|
+
info "Building project..."
|
|
285
|
+
if ! dotnet build --verbosity quiet --no-restore 2>>"$LOG_FILE"; then
|
|
286
|
+
fail "Build failed. Check $LOG_FILE for details."
|
|
287
|
+
fail "Try manually: cd $DOTNET_DIR && dotnet build --verbosity normal"
|
|
288
|
+
return 1
|
|
289
|
+
fi
|
|
290
|
+
log "Project built successfully"
|
|
291
|
+
|
|
292
|
+
cd "$PROJECT_DIR"
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
# --- Shell Script Permissions ---
|
|
296
|
+
fix_permissions() {
|
|
297
|
+
step "Setting script permissions"
|
|
298
|
+
|
|
299
|
+
local scripts=(
|
|
300
|
+
"$SCRIPT_DIR/env_check.sh"
|
|
301
|
+
"$SCRIPT_DIR/docx_preview.sh"
|
|
302
|
+
"$SCRIPT_DIR/doc_to_docx.sh"
|
|
303
|
+
"$SCRIPT_DIR/setup.sh"
|
|
304
|
+
)
|
|
305
|
+
|
|
306
|
+
for s in "${scripts[@]}"; do
|
|
307
|
+
if [ -f "$s" ]; then
|
|
308
|
+
chmod +x "$s"
|
|
309
|
+
log "chmod +x $(basename "$s")"
|
|
310
|
+
fi
|
|
311
|
+
done
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
# --- NuGet Proxy / Certificate Issues (Corporate Environments) ---
|
|
315
|
+
check_nuget_config() {
|
|
316
|
+
step "Checking NuGet configuration"
|
|
317
|
+
|
|
318
|
+
local nuget_config="$HOME/.nuget/NuGet/NuGet.Config"
|
|
319
|
+
if [ -f "$nuget_config" ]; then
|
|
320
|
+
log "NuGet config exists: $nuget_config"
|
|
321
|
+
else
|
|
322
|
+
info "No custom NuGet config found (using defaults)"
|
|
323
|
+
fi
|
|
324
|
+
|
|
325
|
+
# Test NuGet connectivity
|
|
326
|
+
if dotnet nuget list source 2>/dev/null | grep -q "nuget.org"; then
|
|
327
|
+
log "nuget.org source is configured"
|
|
328
|
+
else
|
|
329
|
+
warn "nuget.org not in sources. Adding..."
|
|
330
|
+
dotnet nuget add source "https://api.nuget.org/v3/index.json" --name "nuget.org" 2>/dev/null || true
|
|
331
|
+
fi
|
|
332
|
+
}
|
|
333
|
+
|
|
334
|
+
# --- Locale / Encoding Check ---
|
|
335
|
+
check_locale() {
|
|
336
|
+
step "Checking locale and encoding"
|
|
337
|
+
|
|
338
|
+
local current_lang="${LANG:-not set}"
|
|
339
|
+
local current_lc="${LC_ALL:-not set}"
|
|
340
|
+
|
|
341
|
+
if echo "$current_lang" | grep -qi "utf-8\|utf8"; then
|
|
342
|
+
log "Locale supports UTF-8: LANG=$current_lang"
|
|
343
|
+
else
|
|
344
|
+
warn "Locale may not support UTF-8: LANG=$current_lang"
|
|
345
|
+
warn "CJK document processing requires UTF-8. Set: export LANG=en_US.UTF-8"
|
|
346
|
+
if [ "$OS" = "linux" ] || [ "$OS" = "wsl" ]; then
|
|
347
|
+
info "To fix permanently: sudo locale-gen en_US.UTF-8 && sudo update-locale LANG=en_US.UTF-8"
|
|
348
|
+
fi
|
|
349
|
+
fi
|
|
350
|
+
}
|
|
351
|
+
|
|
352
|
+
# --- Font Check (for CJK and professional documents) ---
|
|
353
|
+
check_fonts() {
|
|
354
|
+
step "Checking fonts for document rendering"
|
|
355
|
+
|
|
356
|
+
if [ "$OS" = "macos" ]; then
|
|
357
|
+
# macOS has good CJK support built-in
|
|
358
|
+
log "macOS: built-in CJK font support (PingFang, Hiragino, Apple SD Gothic)"
|
|
359
|
+
log "macOS: built-in Western fonts (Helvetica, Times, Calibri via Office)"
|
|
360
|
+
if [ -d "/Applications/Microsoft Word.app" ] || [ -d "/Applications/Microsoft Office" ]; then
|
|
361
|
+
log "Microsoft Office fonts available (Calibri, Cambria, etc.)"
|
|
362
|
+
else
|
|
363
|
+
warn "Microsoft Office not installed — Calibri/Cambria fonts may be missing"
|
|
364
|
+
info "Documents will render with fallback fonts on this machine"
|
|
365
|
+
info "Recipients with Office installed will see correct fonts"
|
|
366
|
+
fi
|
|
367
|
+
elif [ "$OS" = "linux" ] || [ "$OS" = "wsl" ]; then
|
|
368
|
+
# Check for key font packages
|
|
369
|
+
local missing_fonts=()
|
|
370
|
+
|
|
371
|
+
if ! fc-list 2>/dev/null | grep -qi "liberation\|times new roman\|calibri"; then
|
|
372
|
+
missing_fonts+=("Western: liberation-fonts or msttcorefonts")
|
|
373
|
+
fi
|
|
374
|
+
|
|
375
|
+
if ! fc-list 2>/dev/null | grep -qi "noto.*cjk\|wqy\|simsun\|pingfang"; then
|
|
376
|
+
missing_fonts+=("CJK: noto-fonts-cjk or wqy-microhei")
|
|
377
|
+
fi
|
|
378
|
+
|
|
379
|
+
if [ ${#missing_fonts[@]} -eq 0 ]; then
|
|
380
|
+
log "Font support looks good"
|
|
381
|
+
else
|
|
382
|
+
warn "Missing fonts may affect document rendering:"
|
|
383
|
+
for f in "${missing_fonts[@]}"; do
|
|
384
|
+
warn " - $f"
|
|
385
|
+
done
|
|
386
|
+
info "Install fonts:"
|
|
387
|
+
case "$PKG_MGR" in
|
|
388
|
+
apt)
|
|
389
|
+
info " sudo apt-get install -y fonts-liberation fonts-noto-cjk"
|
|
390
|
+
info " # For MS core fonts: sudo apt-get install -y ttf-mscorefonts-installer"
|
|
391
|
+
;;
|
|
392
|
+
dnf)
|
|
393
|
+
info " sudo dnf install -y liberation-fonts google-noto-sans-cjk-fonts"
|
|
394
|
+
;;
|
|
395
|
+
pacman)
|
|
396
|
+
info " sudo pacman -S ttf-liberation noto-fonts-cjk"
|
|
397
|
+
;;
|
|
398
|
+
*)
|
|
399
|
+
info " Install Liberation Fonts and Noto CJK fonts for your distribution"
|
|
400
|
+
;;
|
|
401
|
+
esac
|
|
402
|
+
fi
|
|
403
|
+
fi
|
|
404
|
+
}
|
|
405
|
+
|
|
406
|
+
# --- Verification Run ---
|
|
407
|
+
verify_installation() {
|
|
408
|
+
step "Verification Test"
|
|
409
|
+
|
|
410
|
+
local test_output="/tmp/minimax-docx-setup-test-$$.docx"
|
|
411
|
+
|
|
412
|
+
info "Creating a test document..."
|
|
413
|
+
if cd "$DOTNET_DIR" && dotnet run --project MiniMaxAIDocx.Cli -- create \
|
|
414
|
+
--type report --output "$test_output" --title "Setup Test" 2>>"$LOG_FILE"; then
|
|
415
|
+
log "Test document created: $test_output"
|
|
416
|
+
|
|
417
|
+
# Try preview
|
|
418
|
+
if command -v pandoc &>/dev/null; then
|
|
419
|
+
local preview
|
|
420
|
+
preview=$(pandoc -f docx -t plain "$test_output" 2>/dev/null | head -5)
|
|
421
|
+
if [ -n "$preview" ]; then
|
|
422
|
+
log "Preview working: \"$preview\""
|
|
423
|
+
fi
|
|
424
|
+
fi
|
|
425
|
+
|
|
426
|
+
# Cleanup
|
|
427
|
+
rm -f "$test_output"
|
|
428
|
+
log "Test passed — minimax-docx is ready to use!"
|
|
429
|
+
else
|
|
430
|
+
fail "Test document creation failed. Check $LOG_FILE for details."
|
|
431
|
+
return 1
|
|
432
|
+
fi
|
|
433
|
+
|
|
434
|
+
cd "$PROJECT_DIR"
|
|
435
|
+
}
|
|
436
|
+
|
|
437
|
+
# --- Summary ---
|
|
438
|
+
print_summary() {
|
|
439
|
+
step "Setup Complete"
|
|
440
|
+
|
|
441
|
+
echo ""
|
|
442
|
+
echo " Environment: $OS ($ARCH)"
|
|
443
|
+
echo " .NET SDK: $(dotnet --version 2>/dev/null || echo 'NOT FOUND')"
|
|
444
|
+
echo " pandoc: $(pandoc --version 2>/dev/null | head -1 | grep -oE '[0-9]+\.[0-9]+(\.[0-9]+)?' || echo 'not installed (optional)')"
|
|
445
|
+
echo " soffice: $(soffice --version 2>/dev/null | grep -oE '[0-9]+\.[0-9]+(\.[0-9]+)?' || echo 'not installed (optional)')"
|
|
446
|
+
echo " Project: $DOTNET_DIR"
|
|
447
|
+
echo ""
|
|
448
|
+
echo " Usage:"
|
|
449
|
+
echo " dotnet run --project $DOTNET_DIR/MiniMaxAIDocx.Cli -- create --type report --output my_report.docx"
|
|
450
|
+
echo " bash $SCRIPT_DIR/env_check.sh # Quick environment check"
|
|
451
|
+
echo ""
|
|
452
|
+
echo " Log file: $LOG_FILE"
|
|
453
|
+
}
|
|
454
|
+
|
|
455
|
+
# --- Main ---
|
|
456
|
+
main() {
|
|
457
|
+
echo "============================================"
|
|
458
|
+
echo " minimax-docx Setup & Initialization"
|
|
459
|
+
echo " $(date '+%Y-%m-%d %H:%M:%S')"
|
|
460
|
+
echo "============================================"
|
|
461
|
+
|
|
462
|
+
: > "$LOG_FILE" # Clear log
|
|
463
|
+
|
|
464
|
+
detect_platform
|
|
465
|
+
|
|
466
|
+
# Parse arguments
|
|
467
|
+
local SKIP_OPTIONAL=false
|
|
468
|
+
local SKIP_VERIFY=false
|
|
469
|
+
for arg in "$@"; do
|
|
470
|
+
case "$arg" in
|
|
471
|
+
--minimal) SKIP_OPTIONAL=true ;;
|
|
472
|
+
--skip-verify) SKIP_VERIFY=true ;;
|
|
473
|
+
--help|-h)
|
|
474
|
+
echo "Usage: setup.sh [options]"
|
|
475
|
+
echo " --minimal Only install critical dependencies (skip pandoc, soffice, fonts)"
|
|
476
|
+
echo " --skip-verify Skip the verification test at the end"
|
|
477
|
+
echo " --help Show this help"
|
|
478
|
+
exit 0
|
|
479
|
+
;;
|
|
480
|
+
esac
|
|
481
|
+
done
|
|
482
|
+
|
|
483
|
+
install_dotnet
|
|
484
|
+
install_zip_tools
|
|
485
|
+
|
|
486
|
+
if ! $SKIP_OPTIONAL; then
|
|
487
|
+
install_pandoc
|
|
488
|
+
install_soffice
|
|
489
|
+
check_fonts
|
|
490
|
+
fi
|
|
491
|
+
|
|
492
|
+
check_locale
|
|
493
|
+
check_nuget_config
|
|
494
|
+
fix_permissions
|
|
495
|
+
build_project
|
|
496
|
+
|
|
497
|
+
if ! $SKIP_VERIFY; then
|
|
498
|
+
verify_installation
|
|
499
|
+
fi
|
|
500
|
+
|
|
501
|
+
print_summary
|
|
502
|
+
}
|
|
503
|
+
|
|
504
|
+
main "$@"
|