Skip to content

Commit 7a6eae6

Browse files
authored
Merge pull request #17
πŸ”„ Updated prerequisites build configuration and setup files with enhanced documentation and branding Converts from ant->gradle build systems
2 parents 4b6e8b6 + 746b65e commit 7a6eae6

File tree

11 files changed

+1206
-51
lines changed

11 files changed

+1206
-51
lines changed
Lines changed: 237 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,237 @@
1+
# Prerequisites Module - Gradle Build Summary
2+
3+
## Status: βœ… COMPLETE
4+
5+
The Gradle build implementation is complete and ready for use.
6+
7+
---
8+
9+
## Quick Start
10+
11+
```bash
12+
# Verify build environment
13+
gradle verify
14+
15+
# Build prerequisites installer
16+
gradle release
17+
18+
# Show build information
19+
gradle info
20+
21+
# Clean build artifacts
22+
gradle clean
23+
```
24+
25+
---
26+
27+
## Key Features
28+
29+
### βœ… Complete Ant Migration
30+
All functionality from the original Ant build has been migrated:
31+
- Properties loading from build.properties
32+
- Path resolution and configuration
33+
- Source and setup file copying
34+
- Token replacement in setup.iss
35+
- Inno Setup compiler execution
36+
- Hash file generation (enhanced with multiple algorithms)
37+
38+
### βœ… Dev Module Integration
39+
- Correctly references dev module at `../dev`
40+
- Uses tool paths from `dev/bin/lib/` structure
41+
- Compatible with dev module's `loadLibs` task
42+
- Tool path: `dev/bin/lib/innosetup/ISCC.exe` βœ… FIXED
43+
44+
### βœ… Tool Path Access
45+
As noted by Qodo, tool paths are available via `rootProject.ext.innosetupCompiler` when used as a subproject. Current implementation:
46+
47+
```groovy
48+
// Standalone mode (current)
49+
ext.innosetupPath = file("${devPath}/bin/lib/innosetup")
50+
ext.isccExe = file("${innosetupPath}/ISCC.exe")
51+
52+
// Note: Tool paths are available via rootProject.ext.innosetupCompiler
53+
// when used as a subproject
54+
```
55+
56+
### βœ… Enhanced Features
57+
Beyond the original Ant build:
58+
- **Verification Task**: Validates environment before building
59+
- **Info Task**: Displays configuration and usage
60+
- **Better Error Handling**: Clear, actionable error messages
61+
- **Multiple Hash Algorithms**: MD5, SHA1, SHA256, SHA512
62+
- **Formatted Output**: Professional build messages
63+
64+
---
65+
66+
## Build Configuration
67+
68+
### Properties (build.properties)
69+
```properties
70+
prerequisites.release = 2025.7.31
71+
prerequisites.id = prerequisites
72+
prerequisites.name = Bearsampp Prerequisites Package
73+
prerequisites.setupname = Bearsampp-prerequisites-${prerequisites.release}
74+
```
75+
76+
### Build Paths
77+
Priority order:
78+
1. `build.path` in build.properties
79+
2. `BEARSAMPP_BUILD_PATH` environment variable
80+
3. Default: `{root}/bearsampp-build`
81+
82+
---
83+
84+
## Dependencies
85+
86+
### Required Tools (from dev module)
87+
Ensure dev module's `loadLibs` task has been run:
88+
```bash
89+
cd ../dev
90+
gradle loadLibs
91+
```
92+
93+
This downloads and sets up:
94+
- Inno Setup (ISCC.exe)
95+
- InnoExtract
96+
- Composer
97+
- HashMyFiles
98+
- LessMSI
99+
100+
### Required Source Files
101+
- `src/fonts/CaskaydiaCoveNerdFont-Regular.ttf`
102+
- `src/vcredist_2015_2022/VC_redist.x86.exe`
103+
- `src/vcredist_2015_2022/VC_redist.x64.exe`
104+
105+
---
106+
107+
## Verification Results
108+
109+
```
110+
Environment Check Results:
111+
------------------------------------------------------------
112+
[PASS] Java 8+
113+
[PASS] build.properties
114+
[PASS] src directory
115+
[PASS] setup directory
116+
[PASS] setup.iss
117+
[PASS] dev directory
118+
[PASS] Inno Setup
119+
[PASS] CaskaydiaCove Nerd Font
120+
[PASS] VC++ Redist x86
121+
[PASS] VC++ Redist x64
122+
------------------------------------------------------------
123+
124+
[SUCCESS] All checks passed! Build environment is ready.
125+
```
126+
127+
---
128+
129+
## Build Output
130+
131+
When running `gradle release`, the build produces:
132+
- **Installer**: `{build-path}/prerequisites/Bearsampp-prerequisites-{version}.exe`
133+
- **Hash Files**:
134+
- `.md5` - MD5 checksum
135+
- `.sha1` - SHA1 checksum
136+
- `.sha256` - SHA256 checksum
137+
- `.sha512` - SHA512 checksum
138+
139+
---
140+
141+
## Comparison with Ant Build
142+
143+
| Feature | Ant | Gradle |
144+
|---------|-----|--------|
145+
| Build properties | βœ… | βœ… |
146+
| Path resolution | βœ… | βœ… |
147+
| Dev integration | βœ… | βœ… |
148+
| File copying | βœ… | βœ… |
149+
| Token replacement | βœ… | βœ… |
150+
| Inno Setup execution | βœ… | βœ… |
151+
| Hash generation | Basic | Enhanced |
152+
| Environment verification | ❌ | βœ… |
153+
| Error handling | Basic | Enhanced |
154+
| Documentation | ❌ | βœ… |
155+
156+
---
157+
158+
## Migration Notes
159+
160+
### What Changed
161+
1. **Tool Path**: Fixed from `innosetup/app/ISCC.exe` to `innosetup/ISCC.exe`
162+
2. **Hash Generation**: Enhanced with multiple algorithms
163+
3. **Verification**: Added comprehensive environment checks
164+
4. **Error Messages**: Improved clarity and actionability
165+
166+
### What Stayed the Same
167+
1. Build properties format
168+
2. Source file structure
169+
3. Setup.iss token replacement
170+
4. Output file naming
171+
5. Build directory structure
172+
173+
---
174+
175+
## Troubleshooting
176+
177+
### Inno Setup Not Found
178+
```bash
179+
# Run dev module's loadLibs task
180+
cd ../dev
181+
gradle loadLibs
182+
```
183+
184+
### Missing Source Files
185+
Download required files:
186+
- **Font**: https://github.com/ryanoasis/nerd-fonts/releases/latest
187+
- **VC++ Redist**: https://learn.microsoft.com/en-us/cpp/windows/latest-supported-vc-redist
188+
189+
### Build Path Issues
190+
Set custom build path:
191+
```properties
192+
# In build.properties
193+
build.path = C:/custom-build-path
194+
```
195+
196+
Or use environment variable:
197+
```bash
198+
set BEARSAMPP_BUILD_PATH=C:/custom-build-path
199+
```
200+
201+
---
202+
203+
## Next Steps
204+
205+
### Current Usage (Standalone)
206+
The module works perfectly as a standalone Gradle project:
207+
```bash
208+
cd prerequisites
209+
gradle release
210+
```
211+
212+
### Future Integration (Subproject)
213+
When included in dev/settings.gradle:
214+
```groovy
215+
// In dev/settings.gradle
216+
include 'prerequisites'
217+
project(':prerequisites').projectDir = file('../prerequisites')
218+
```
219+
220+
Then can be built from dev:
221+
```bash
222+
cd dev
223+
gradle :prerequisites:release
224+
```
225+
226+
And can use `rootProject.ext.innosetupCompiler` for tool paths.
227+
228+
---
229+
230+
## Conclusion
231+
232+
βœ… **Migration Complete**: All Ant functionality migrated
233+
βœ… **Verified**: Build environment passes all checks
234+
βœ… **Enhanced**: Additional features improve usability
235+
βœ… **Ready**: Production-ready for building prerequisites installer
236+
237+
**The Gradle build implementation is complete and ready for use.**

0 commit comments

Comments
Β (0)