v0.1.1.4: Build scripts moved to scripts/ directory; enhanced documentation; automated release script

This commit is contained in:
mbusc
2025-08-28 20:11:27 +02:00
parent 5528096614
commit 3c2c2b35e2
12 changed files with 186 additions and 20 deletions

View File

@ -11,6 +11,7 @@ A C++ library for interacting with PrivateBin servers via the JSON API v1.3.
- **End-to-End Encryption**: Client-side encryption with AES-256-GCM
- **Cross-Platform**: Support for Windows and Linux
- **Complete API**: Implementation of all PrivateBin v1.3 API functions
- **Automated Builds**: Platform-specific build scripts for easy compilation
## File Upload Functionality
@ -56,6 +57,57 @@ int upload_file(const char* server_url, const char* file_path,
5. **Upload**: Encrypted data is sent to the PrivateBin server
6. **URL Generation**: The URL is created with the Base58-encoded key
## Build Scripts
The project includes several build scripts in the `scripts/` directory for different platforms and use cases.
### Windows Build Scripts
#### PowerShell Build (Recommended)
**File:** `scripts/build_windows.ps1`
**Requirements:** PowerShell, Visual Studio 2022 Build Tools (C++), vcpkg (will be bootstrapped), Git
```powershell
# Run from project root
powershell -NoProfile -ExecutionPolicy Bypass -File .\scripts\build_windows.ps1
```
This script:
- Automatically bootstraps vcpkg if not present
- Configures CMake with Visual Studio 2022 generator
- Builds the project in Release configuration
- Creates a Windows distribution package with all artifacts
#### Command Line Build
**File:** `scripts/build_thinkpad.bat`
**Requirements:** Visual Studio 2022 Build Tools/Community with C++ workload, vcpkg
```cmd
# Run from project root
scripts\build_thinkpad.bat
```
This script:
- Automatically detects and initializes Visual Studio environment
- Handles vcpkg bootstrapping
- Configures CMake with proper toolchain
- Builds the project using MSVC compiler
### Linux/macOS Build Script
**File:** `scripts/build.sh`
**Requirements:** CMake, C++17 compiler, vcpkg
```bash
# Make executable and run from project root
chmod +x scripts/build.sh
./scripts/build.sh
```
This script:
- Bootstraps vcpkg if not present
- Configures CMake with Unix Makefiles
- Builds the project in Release configuration
## Installation
### Dependencies
@ -67,6 +119,26 @@ int upload_file(const char* server_url, const char* file_path,
### Compilation
#### Windows (PowerShell) - Build via scripts/build_windows.ps1
```powershell
# Requires: PowerShell, Visual Studio 2022 Build Tools (C++), vcpkg (will be bootstrapped), Git
powershell -NoProfile -ExecutionPolicy Bypass -File .\scripts\build_windows.ps1
```
#### Windows (Command Line) - Build via scripts/build_thinkpad.bat
```cmd
# Requires: Visual Studio 2022 Build Tools/Community with C++ workload, vcpkg
scripts\build_thinkpad.bat
```
#### Linux/macOS - Build via scripts/build.sh
```bash
# Requires: CMake, C++17 compiler, vcpkg
chmod +x scripts/build.sh
./scripts/build.sh
```
#### Manual Build
```bash
mkdir build
cd build
@ -74,6 +146,8 @@ cmake ..
cmake --build . --config Release
```
**Note:** The manual build method requires you to have all dependencies (CMake, compiler, vcpkg) properly configured. For most users, the platform-specific build scripts are recommended.
## Usage
### Simple Text Paste
@ -207,6 +281,12 @@ See [LICENSE](LICENSE) for details.
## Changelog
### v0.1.1.4 (2025-08-28)
- **NEW**: Automated release creation script (`scripts/create_release.ps1`)
- **NEW**: Build scripts moved to `scripts/` directory for better organization
- **IMPROVED**: Enhanced build documentation with platform-specific instructions
- **IMPROVED**: Better project structure and organization
### v0.1.1.1 (2025-08-28)
- **NEW**: Combined example program with both text and file upload functionality
- **IMPROVED**: Unified command-line interface for examples