1
0
Commit Graph

68 Commits

Author SHA1 Message Date
e325ba08f1 feat: finish highlevel register 2026-05-08 10:56:47 +08:00
03d17fad6e feat: finish highlevel unregister 2026-05-08 10:45:43 +08:00
8f762928db feat: finish highlevel register function 2026-05-08 10:41:33 +08:00
94f868ebda doc: add some doc in highlevel 2026-05-07 21:09:08 +08:00
2da84f8797 feat: finish highlevel convertion 2026-05-07 20:56:23 +08:00
fe81541eeb feat: update highlevel parse 2026-05-07 13:21:35 +08:00
3edb08efc7 feat: add func in lowlevel 2026-05-06 21:44:40 +08:00
edb9d0a14d feat: add some lowlevel functions 2026-05-06 21:39:13 +08:00
01302214c2 feat: rename some func name in lowlevel 2026-04-30 13:12:58 +08:00
e6ac59d85c feat: add shell verb struct 2026-04-30 13:09:59 +08:00
1df7191a36 fix: rename losse icon and string res into variant 2026-04-30 13:04:59 +08:00
66dc8c2630 fix: resotre highlevel program internal struct 2026-04-30 13:02:49 +08:00
6096265017 feat: add placeholder cmdline concept 2026-04-30 12:59:37 +08:00
5f9c893d95 feat: finish lowlevel application key decl 2026-04-30 10:16:52 +08:00
2fff56b74d feat: add losse StrRefStr and IconRefStr 2026-04-30 10:01:22 +08:00
94db3fdfd4 feat: introduce territory in lowlevel 2026-04-29 20:37:19 +08:00
10b27c0fc2 feat: add verb concept 2026-04-29 18:58:51 +08:00
e8ff9a3e4f feat: write some lowlevel code 2026-04-29 13:11:12 +08:00
6ff42928f1 feat: write some highlevel code 2026-04-23 13:17:25 +08:00
fed02ad9bc feat: update highlevel 2026-04-22 14:53:22 +08:00
3e588f0ac9 doc: update some doc 2026-04-19 16:10:04 +08:00
c650290df6 feat: finish manifest convertion 2026-04-17 15:43:39 +08:00
a7a9a71e80 feat: update wfassoc-exec 2026-04-17 15:24:22 +08:00
e9ca5dd5ec feat: make a clear boundary for lowlevel and highlevel API 2026-04-17 15:01:28 +08:00
1509723ada refactor: move something and implement FileName 2026-04-15 15:13:24 +08:00
69c7592f41 feat: remove useless win32 concept for clear code 2026-04-12 16:39:15 +08:00
7d8757c0ec refactor: commit code which idk when i write them 2026-04-03 15:02:16 +08:00
0b98610e1f doc: write some README but not finish 2025-12-17 22:34:49 +08:00
2741969164 refactor(assoc): improve error handling and type safety
- Remove unused `Infallible` import
- Add `ParseProgIdKindError` for better ProgId parsing error handling
- Implement `BlankProgId` variant for empty ProgId strings
- Add `ExtKey::new` and `ProgIdKey::new` constructors
- Add `as_inner` methods to `ExtKey` and `ProgIdKey`
- Replace `to_string()` calls with `as_inner().to_string()`
- Update error type from `BlankStringError` to `BlankPathError`
- Rename `BlankStringError` to `BlankPathError` with updated message
- Update `blank_path_guard` return type and error handling
- Remove `Display` and `FromStr` implementations from `ExtKey` and `ProgIdKey`
2025-11-01 16:11:22 +08:00
3694a6a82a feat(windows): add blank path guard for registry operations
- Add BlankStringError to handle empty registry paths
- Implement blank_path_guard function to prevent dangerous registry operations
- Apply blank path guard to extension and ProgId key operations
- Update error handling to include BlankPath error variant
2025-10-29 10:53:29 +08:00
a3456e9fdd feat(windows): implement registry manipulation for file associations
- Add comprehensive error types for registry operations
- Implement ProgIdKind enum with Display and FromStr traits
- Create ApplicationVisitor and ClassesVisitor structs
- Add ExtKey methods for linking, unlinking and querying ProgId
- Implement ProgIdKey creation and deletion in registry
- Add safe delete function to prevent accidental registry cleanup
- Introduce Display and FromStr implementations for ExtKey and ProgIdKey
- Organize registry access through scoped and viewed key opening
- Enable setting default "Open With" verbs for file extensions
- Support both user and system level registry modifications
2025-10-29 10:31:00 +08:00
3f1a070b65 refactor(wfassoc): restructure association module for registry operations
- Removed unused regex and uuid dependencies
- Replaced custom Ext and ProgId implementations with windows-specific types
- Added Scope and View enums for registry access control
- Introduced ExtKey and ProgIdKey structs for registry key handling
- Added error types for better error handling
- Implemented stub methods for registry operations
- Restructured module organization for better clarity
- Added utility functions for privilege checking
2025-10-28 14:10:28 +08:00
4d679588f8 feat(wfassoc): enhance CLSID handling and parsing
- Add `getrandom` dependency for UUID v4 feature
- Enable UUID v4 feature in `Cargo.toml`
- Implement `Clsid::with_random()` for generating random CLSIDs
- Improve `Clsid::new()` to accept `&Uuid` directly
- Update `Clsid::from_str()` to use `uuid::fmt::Braced` for stricter parsing
- Add comprehensive tests for valid and invalid CLSID strings
- Fix minor typo in test assertion code
- Enhance documentation comments for CLSID struct and error type
2025-10-28 12:50:15 +08:00
1342799303 feat(windows): implement file extension and ProgId parsing structs
- Add Ext struct for handling file extensions with validation
- Implement ProgId struct following Microsoft's suggested format
- Create Clsid struct for handling CLSID with UUID parsing
- Add ExpandString struct for environment variable expansion
- Include comprehensive tests for new structs and parsing logic
- Remove duplicate ExpandString implementation from windows.rs
- Organize code regions for better readability and maintenance
2025-10-28 11:12:13 +08:00
6be27def80 refactor(windows): update Windows API calls and error handling
- Replace `Default::default()` with `std::ptr::null_mut()` or `std::ptr::null()` for FFI calls
- Change `WideCStr::from_ptr` to `WideStr::from_ptr` for better safety
- Remove redundant error variants in `LoadStrRcError` and `ExpandEnvVarError`
- Reorder imports for better readability
- Add test cases for `StrRc` and `ExpandString` utilities
- Improve documentation comments for icon loading functions
2025-10-27 20:49:04 +08:00
81fd224236 feat(windows): implement icon and string resource loading
- Add IconRc struct for loading icons from executable or .ico files
- Implement LoadIconRcError for icon loading error handling
- Add StrRc struct for loading string resources from files
- Implement LoadStrRcError for string loading error handling
- Remove old Icon struct and related error types
- Update tests to use new resource loading implementations
- Add Windows Resource section with proper documentation
- Include Win32_System_LibraryLoader feature in Cargo.toml
2025-10-27 14:09:51 +08:00
cc79951ee6 refactor(windows): improve resource string parsing and documentation
- Rename structs to be more descriptive (IconRefStr, StrRefStr)
- Add comprehensive documentation for all public items
- Simplify error handling in FromStr implementations
- Add getter methods for path and index fields
2025-10-26 22:16:48 +08:00
23d0a79c0b feat(windows): add resource reference string parsers
Add IconRc and StrRc structs for parsing Windows resource reference strings.
Implement FromStr and Display traits for both types along with error handling.
Rename BadExpandStrError to ParseExpandStrError for consistency.
2025-10-24 10:34:07 +08:00
e908e775ed refactor(tests): restructure windows commandline tests for better readability
- Extract test helpers into nested functions to reduce duplication
- Rename test functions to be more descriptive
- Group related test cases together
2025-10-23 21:48:48 +08:00
217d3d5fd3 fix(windows): improve backslash handling in command lexer
Handle multiple backslashes before quotes correctly by counting them and applying Windows command line parsing rules. Even number of backslashes before quote are treated as escape sequences, odd number as literal quotes.
2025-10-22 20:27:40 +08:00
563ab483fc test(windows): add tests for Windows command line argument parsing
Add comprehensive test cases for Windows command line argument parsing, including edge cases with quotes and backslashes. Tests cover both single argument and multiple argument scenarios.
2025-10-22 16:51:57 +08:00
ffd58ff677 feat(windows): add command line argument parsing utilities
Implement CmdLexer, CmdArg and CmdArgs for proper Windows command line argument parsing and quoting. Add itertools dependency for string joining functionality.
2025-10-22 12:11:42 +08:00
84a29c862b feat(windows): add ExpandString for environment variable expansion
Implement ExpandString struct to handle Windows environment variable expansion
with proper error handling. Also reorganize windows-sys dependencies and improve
icon loading error messages.
2025-10-20 14:41:50 +08:00
26d867d42f refactor(winreg): reorganize Windows registry utilities into extra module
Move winreg_extra functionality into new extra/winreg module and restructure project layout
Add Windows icon handling utilities in extra/windows module
Update dependencies and clean up unused wincmd module
2025-10-20 13:38:41 +08:00
d493285900 feat(cli): implement register and unregister commands with scope support
- Add Target enum to handle user/system scope selection
- Move scope argument from global CLI to register/unregister subcommands
- Implement actual registration logic including ProgId subkey creation
- Update Program::new to accept string path instead of Path
- Add proper error handling and success messages
2025-10-19 17:37:51 +08:00
f42c50ce10 feat(wfassoc): add query_ext method and improve CLI output
- Implement query_ext method to check default program associations
- Enhance CLI query command with tabular output showing associations
- Refactor program building into Composition struct for better organization
- Update documentation comments for clarity
2025-10-19 15:12:15 +08:00
d5fed1e580 feat(registry): add privilege check and improve ProgId handling
- Add WFHasPrivilege function to check user privileges
- Refactor ProgId structure to use standard format with optional version
- Improve registry operations with safer key/value handling
- Update dependencies to include Win32_System_Registry
2025-10-19 14:10:21 +08:00
f37b4b6652 feat(registry): implement file extension linking in Windows registry
- Add `link_ext` and `unlink_ext` methods to Program for managing file associations
- Introduce new error variants for invalid tokens
- Add utility function `capitalize_first_ascii` for ProgId generation
- Implement registry key operations for user and system scopes
2025-10-19 12:10:55 +08:00
4f0f9670cb feat: add Windows-specific modules and enhance program registration
- Add new modules for Windows command line handling (wincmd) and registry extensions (winreg_extra)
- Replace Manner struct with simple String and add identifier validation
- Update WFAdd function signature and add new WFStartup/WFShutdown functions
- Implement ExpandString wrapper for registry operations
2025-10-18 23:11:33 +08:00
bcd0d503d4 write shit 2025-10-18 09:55:08 +08:00