Windows build fails: Invalid icon.ico format and Unix-only imports
Environment
- OS: Windows 11
- Rust version: 1.88.0
- Tauri CLI version: 2.5.0
- Bun version: 1.2.17
- Build tools: Microsoft C++ Build Tools (Visual Studio Build Tools 2022)
Description
When attempting to build Claudia on Windows, the build process fails with two distinct issues that prevent successful compilation and packaging.
Issue 1: Invalid ICO file format
Error message:
error RC2175: resource file \\?\C:\Projects\claudia\src-tauri\icons\icon.ico is not in 3.00 format
Root cause:
The icon.ico file in the repository is either corrupted or not in the proper Windows ICO format that the Windows Resource Compiler expects.
Details:
- File location:
src-tauri/icons/icon.ico
- Current file size: 6,261 bytes
- The Windows Resource Compiler requires ICO files to be in "3.00 format"
- Other icon files (PNG, ICNS) are present and valid
Issue 2: Unix-only import on Windows
Error message:
error[E0432]: unresolved import `crate::sandbox::executor::create_sandboxed_command`
--> src\commands\claude.rs:984:26
|
984 | use crate::sandbox::{executor::create_sandboxed_command, profile::ProfileBuilder};
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ no `create_sandboxed_command` in `sandbox::executor`
Root cause:
The function create_sandboxed_command is gated with #[cfg(unix)] at line 399 in src/sandbox/executor.rs, making it unavailable on Windows.
Steps to Reproduce
-
Clone the repository:
git clone https://github.com/getAsterisk/claudia.git
cd claudia
-
Install dependencies:
-
Attempt to build:
Expected Behavior
The application should build successfully on Windows, creating MSI and NSIS installers.
Actual Behavior
Build fails with the errors mentioned above.
Workaround/Solutions Applied
For Issue 1 (Icon):
- Used online ICO converter (icoconverter.com) to convert
icon.png to proper Windows ICO format
- Generated ICO with multiple resolutions (16x16, 32x32, 48x48, 64x64) at 32-bit color depth
- Replaced the corrupted
icon.ico with the properly formatted version
- File size of working ICO: 32,038 bytes
For Issue 2 (Unix import):
- Edited
src-tauri/src/commands/claude.rs line 984
- Removed the Unix-only import:
// Before:
use crate::sandbox::{executor::create_sandboxed_command, profile::ProfileBuilder};
// After:
use crate::sandbox::{profile::ProfileBuilder};
Additional Context
The build process also showed that icon_template.ico exists but is 0 bytes, suggesting the icon generation process might have failed previously.
After applying both fixes, the build completed successfully, producing:
Claudia_0.1.0_x64_en-US.msi
Claudia_0.1.0_x64-setup.exe
Suggested Permanent Fixes
-
Icon Issue:
- Include a properly formatted Windows ICO file in the repository
- Add a GitHub Action to validate ICO files on commit
- Document the ICO format requirements in the build documentation
-
Unix Import Issue:
- Add conditional compilation for Windows in
claude.rs:
#[cfg(unix)]
use crate::sandbox::executor::create_sandboxed_command;
use crate::sandbox::profile::ProfileBuilder;
- Or provide a Windows-compatible implementation of sandboxing
System Information
Windows 11 Pro
Version: 23H2
Build: 22631.3958
Architecture: x64
Logs
Full build logs available upon request.
I'm happy to:
- Provide the working
icon.ico file
- Submit a PR with these fixes
- Test any proposed solutions on Windows
Thank you for creating this excellent tool! Despite these build issues, Claudia works wonderfully once compiled.
Windows build fails: Invalid icon.ico format and Unix-only imports
Environment
Description
When attempting to build Claudia on Windows, the build process fails with two distinct issues that prevent successful compilation and packaging.
Issue 1: Invalid ICO file format
Error message:
Root cause:
The
icon.icofile in the repository is either corrupted or not in the proper Windows ICO format that the Windows Resource Compiler expects.Details:
src-tauri/icons/icon.icoIssue 2: Unix-only import on Windows
Error message:
Root cause:
The function
create_sandboxed_commandis gated with#[cfg(unix)]at line 399 insrc/sandbox/executor.rs, making it unavailable on Windows.Steps to Reproduce
Clone the repository:
git clone https://github.com/getAsterisk/claudia.git cd claudiaInstall dependencies:
Attempt to build:
Expected Behavior
The application should build successfully on Windows, creating MSI and NSIS installers.
Actual Behavior
Build fails with the errors mentioned above.
Workaround/Solutions Applied
For Issue 1 (Icon):
icon.pngto proper Windows ICO formaticon.icowith the properly formatted versionFor Issue 2 (Unix import):
src-tauri/src/commands/claude.rsline 984Additional Context
The build process also showed that
icon_template.icoexists but is 0 bytes, suggesting the icon generation process might have failed previously.After applying both fixes, the build completed successfully, producing:
Claudia_0.1.0_x64_en-US.msiClaudia_0.1.0_x64-setup.exeSuggested Permanent Fixes
Icon Issue:
Unix Import Issue:
claude.rs:System Information
Logs
Full build logs available upon request.
I'm happy to:
icon.icofileThank you for creating this excellent tool! Despite these build issues, Claudia works wonderfully once compiled.