Update build instructions for Visual Studio project generation and vcpkg integration
- Changed the project file generation command from PowerShell to Python for better integration with vcpkg. - Enhanced documentation to clarify automatic vcpkg dependency management for zlib, libpng, and SDL2. - Added note that generated project files will remain in sync with CMake configuration.
This commit is contained in:
@@ -201,8 +201,8 @@ cmake -B build -DCMAKE_BUILD_TYPE=Release # All platforms
|
|||||||
# Setup development environment
|
# Setup development environment
|
||||||
.\scripts\setup-windows-dev.ps1
|
.\scripts\setup-windows-dev.ps1
|
||||||
|
|
||||||
# Generate Visual Studio project files
|
# Generate Visual Studio project files (with proper vcpkg integration)
|
||||||
.\scripts\generate-vs-projects.ps1
|
python scripts/generate-vs-projects.py
|
||||||
|
|
||||||
# Open YAZE.sln in Visual Studio 2022
|
# Open YAZE.sln in Visual Studio 2022
|
||||||
# Select configuration (Debug/Release) and platform (x64/x86/ARM64)
|
# Select configuration (Debug/Release) and platform (x64/x86/ARM64)
|
||||||
@@ -212,9 +212,10 @@ cmake -B build -DCMAKE_BUILD_TYPE=Release # All platforms
|
|||||||
**Features:**
|
**Features:**
|
||||||
- Full IntelliSense support
|
- Full IntelliSense support
|
||||||
- Integrated debugging
|
- Integrated debugging
|
||||||
- vcpkg dependency management
|
- Automatic vcpkg dependency management (zlib, libpng, SDL2)
|
||||||
- Multi-platform support (x64, x86, ARM64)
|
- Multi-platform support (x64, x86, ARM64)
|
||||||
- Automatic asset copying
|
- Automatic asset copying
|
||||||
|
- Generated project files stay in sync with CMake configuration
|
||||||
|
|
||||||
### VS Code
|
### VS Code
|
||||||
1. Install CMake Tools extension
|
1. Install CMake Tools extension
|
||||||
@@ -246,7 +247,7 @@ The project includes several PowerShell and Batch scripts to streamline Windows
|
|||||||
- Visual Studio 2022 detection
|
- Visual Studio 2022 detection
|
||||||
|
|
||||||
### Project Generation Scripts
|
### Project Generation Scripts
|
||||||
- **`generate-vs-projects.ps1`**: Generate Visual Studio project files
|
- **`generate-vs-projects.py`**: Generate Visual Studio project files with proper vcpkg integration
|
||||||
- **`generate-vs-projects.bat`**: Batch version of project generation
|
- **`generate-vs-projects.bat`**: Batch version of project generation
|
||||||
|
|
||||||
**Features:**
|
**Features:**
|
||||||
|
|||||||
@@ -11,7 +11,8 @@ vcpkg is Microsoft's C++ package manager that simplifies dependency management f
|
|||||||
## Features
|
## Features
|
||||||
|
|
||||||
- **Manifest Mode**: Dependencies are automatically managed via `vcpkg.json`
|
- **Manifest Mode**: Dependencies are automatically managed via `vcpkg.json`
|
||||||
- **Visual Studio Integration**: Seamless integration with Visual Studio 2019+
|
- **Visual Studio Integration**: Seamless integration with Visual Studio 2022
|
||||||
|
- **Generated Project Files**: Visual Studio project files with proper vcpkg integration
|
||||||
- **CMake Presets**: Pre-configured build presets for Windows
|
- **CMake Presets**: Pre-configured build presets for Windows
|
||||||
- **Automatic Setup**: Setup scripts for easy vcpkg installation
|
- **Automatic Setup**: Setup scripts for easy vcpkg installation
|
||||||
|
|
||||||
@@ -20,15 +21,27 @@ vcpkg is Microsoft's C++ package manager that simplifies dependency management f
|
|||||||
### 1. Setup vcpkg
|
### 1. Setup vcpkg
|
||||||
|
|
||||||
Run the automated setup script:
|
Run the automated setup script:
|
||||||
```cmd
|
```powershell
|
||||||
# Command Prompt
|
# PowerShell (recommended)
|
||||||
scripts\setup-vcpkg-windows.bat
|
.\scripts\setup-windows-dev.ps1
|
||||||
|
|
||||||
# PowerShell
|
|
||||||
.\scripts\setup-vcpkg-windows.ps1
|
|
||||||
```
|
```
|
||||||
|
|
||||||
### 2. Build with vcpkg
|
This will:
|
||||||
|
- Set up vcpkg
|
||||||
|
- Install dependencies (zlib, libpng, SDL2)
|
||||||
|
- Generate Visual Studio project files with proper vcpkg integration
|
||||||
|
|
||||||
|
### 2. Build with Visual Studio
|
||||||
|
|
||||||
|
```powershell
|
||||||
|
# Generate project files (if not already done)
|
||||||
|
python scripts/generate-vs-projects.py
|
||||||
|
|
||||||
|
# Open YAZE.sln in Visual Studio 2022
|
||||||
|
# Select configuration and platform, then build
|
||||||
|
```
|
||||||
|
|
||||||
|
### 3. Alternative: Build with CMake
|
||||||
|
|
||||||
Use the Windows presets in CMakePresets.json:
|
Use the Windows presets in CMakePresets.json:
|
||||||
|
|
||||||
@@ -52,13 +65,23 @@ The `vcpkg.json` file defines all dependencies:
|
|||||||
{
|
{
|
||||||
"name": "yaze",
|
"name": "yaze",
|
||||||
"version": "0.3.1",
|
"version": "0.3.1",
|
||||||
|
"description": "Yet Another Zelda3 Editor",
|
||||||
"dependencies": [
|
"dependencies": [
|
||||||
"zlib",
|
{
|
||||||
"libpng",
|
"name": "zlib",
|
||||||
"sdl2",
|
"platform": "!uwp"
|
||||||
"abseil",
|
},
|
||||||
"gtest"
|
{
|
||||||
]
|
"name": "libpng",
|
||||||
|
"platform": "!uwp"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "sdl2",
|
||||||
|
"platform": "!uwp",
|
||||||
|
"features": ["vulkan"]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"builtin-baseline": "2024.12.12"
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -82,10 +105,10 @@ Available Windows presets:
|
|||||||
vcpkg automatically installs these dependencies:
|
vcpkg automatically installs these dependencies:
|
||||||
|
|
||||||
- **zlib**: Compression library
|
- **zlib**: Compression library
|
||||||
- **libpng**: PNG image support
|
- **libpng**: PNG image support
|
||||||
- **sdl2**: Graphics and input handling
|
- **sdl2**: Graphics and input handling (with Vulkan support)
|
||||||
- **abseil**: Google's C++ common libraries
|
|
||||||
- **gtest**: Google Test framework (with gmock)
|
**Note**: Abseil and gtest are now built from source via CMake rather than through vcpkg to avoid compatibility issues.
|
||||||
|
|
||||||
## Environment Variables
|
## Environment Variables
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user