Skip to content

build: initial Windows compatibility and CMake setup#20

Draft
vitalyster wants to merge 22 commits intoz-libs:mainfrom
vitalyster:cmake
Draft

build: initial Windows compatibility and CMake setup#20
vitalyster wants to merge 22 commits intoz-libs:mainfrom
vitalyster:cmake

Conversation

@vitalyster
Copy link
Contributor

@vitalyster vitalyster commented Jan 12, 2026

Fixes #7

@vitalyster vitalyster force-pushed the cmake branch 4 times, most recently from 9d17c55 to 4c54ca5 Compare January 12, 2026 23:57
@Salvakiya
Copy link

should the generated code compile before #7 is completed? what is needed further so generated code compiles?

@vitalyster vitalyster force-pushed the cmake branch 5 times, most recently from a6319ca to 9f3923f Compare January 14, 2026 13:44
@vitalyster vitalyster marked this pull request as draft January 14, 2026 14:09
@vitalyster
Copy link
Contributor Author

It works now!
Screenshot 2026-01-14 183803

@vitalyster vitalyster marked this pull request as ready for review January 14, 2026 15:40
@vitalyster vitalyster force-pushed the cmake branch 5 times, most recently from 0ab95d8 to 645f360 Compare January 15, 2026 16:40
@vitalyster vitalyster marked this pull request as draft January 15, 2026 16:49
@vitalyster vitalyster force-pushed the cmake branch 2 times, most recently from 23573e7 to 497f946 Compare January 15, 2026 20:47
@vitalyster vitalyster marked this pull request as ready for review January 15, 2026 22:17
@vitalyster vitalyster force-pushed the cmake branch 6 times, most recently from 42bdb72 to 9aeb99b Compare January 16, 2026 15:18
@vitalyster vitalyster force-pushed the cmake branch 2 times, most recently from 35f7f91 to 7174ae1 Compare January 28, 2026 06:43
@vitalyster vitalyster marked this pull request as draft January 28, 2026 07:08
@vitalyster vitalyster force-pushed the cmake branch 2 times, most recently from ffc4882 to 2cab673 Compare February 2, 2026 03:44
Define PATH_MAX and implement the realpath function for Windows
to ensure compatibility across platforms. These changes address
the need for equivalent functionality on Windows, allowing the
code to correctly resolve file paths when PATH_MAX or realpath
are called.
Introduce a loop to create shared library targets for
each listed plugin ('befunge', 'brainfuck', 'forth',
'lisp', 'regex', 'sql') from their respective
source files in the 'plugins' directory.
Add `PLUGINAPI` macro in `zprep_plugin.h` to facilitate
dynamic linking of plugins. This change allows the use of
`__declspec(dllexport)` and `__declspec(dllimport)` for
Windows, enhancing portability and enabling the `z_plugin_init`
functions to be properly exported or imported in Windows DLLs.

Additionally, apply this macro to each plugin's `z_plugin_init`
function to ensure consistent use across different platforms.
TODO: implement directory scan in Win32 API
Change to capture test outputs into a temporary file, improving
error handling and test result reporting. The script now displays
test output upon failure, aiding diagnosis. Adjust increment logic
for PASSED and FAILED counters for clarity. This enhances test
feedback and maintains clean summaries after runs.
Modify the test runner script to exclude files whose names begin
with an underscore from being executed. This is achieved by
introducing a conditional check before test execution. This change
ensures test files intended to be skipped, such as temporary or
experimental ones, are not accidentally run. Clean up temporary files
after each test execution to ensure no remnants are left behind.
@Zuhaitz-dev Zuhaitz-dev added the Windows Related to Windows support. label Feb 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Windows Related to Windows support.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

WIndows Support Via Platform Abstraction Layer

3 participants