Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add windows support. #162

Merged
merged 40 commits into from
May 23, 2023
Merged

feat: add windows support. #162

merged 40 commits into from
May 23, 2023

Conversation

andycall
Copy link
Member

@andycall andycall commented Nov 28, 2022

Support running WebF in windows platform.

  1. Modify some C and C++ codes in quickjs and the bridge to be compatible with the MSVC compiler.
  2. All shared c struct between Dart and C++ much use the CoTaskMemAlloc and CoTaskMemFree allocators instead of malloc and free from kernel32.dll, as in the dart ffi package >= 2.0.0, Dart has migrate to these allocator instead of kernel32.dll. These shared structs are SharedNativeString and DartReadble struct.
  3. Some shell commands in the build scripts are broken in powershell, all these tasks have been rewriten using Node.js.
  4. Add stdatomic.h and pthread-win32 library to make quickjs works on windows.
  5. Upgrade mimalloc to v2.1.1 to fix the MSVC compile issue.

image

@BurnWW
Copy link

BurnWW commented Apr 5, 2023

我想参与到这个项目来,请问我能帮助测试window这个平台的PR吗

@andycall andycall force-pushed the feat/windows_support branch 2 times, most recently from b53b621 to ce7805b Compare April 16, 2023 12:14
@andycall andycall changed the title [WIP] feat: add windows support. feat: add windows support. Apr 16, 2023
@andycall
Copy link
Member Author

@bai-3 欢迎参与 WebF 贡献,请留下你的联系方式以便我能联系到你

@andycall andycall force-pushed the feat/windows_support branch 17 times, most recently from 69a6cc3 to 1e785a4 Compare April 27, 2023 03:06
@andycall andycall force-pushed the feat/windows_support branch 2 times, most recently from fb9db6c to e79547d Compare May 16, 2023 03:07
@andycall andycall requested review from XGHeaven and ErosZy May 23, 2023 02:43
@ErosZy
Copy link
Member

ErosZy commented May 23, 2023

LGTM

@andycall andycall added this pull request to the merge queue May 23, 2023
Merged via the queue into main with commit a60b569 May 23, 2023
@andycall andycall deleted the feat/windows_support branch May 23, 2023 11:19
@andycall andycall self-assigned this May 23, 2023
Comment on lines +517 to +558
if (${CMAKE_BUILD_TYPE} STREQUAL "Release" OR ${CMAKE_BUILD_TYPE} STREQUAL "RelWithDebInfo")
target_compile_options(webf PRIVATE -fno-exceptions -fvisibility=hidden -fno-rtti)
else ()
### remove dynamic_cast and exceptions
target_compile_options(webf PRIVATE -fno-exceptions -fno-rtti)
endif ()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

indent

@@ -580,7 +618,7 @@ if (${CMAKE_SYSTEM_NAME} MATCHES "iOS")
PUBLIC_HEADER ${WEBF_PUBLIC_HEADERS}
)

# If quickjs is static, there will be no quickjs.framework any more.
# If quickjs is static, there will be no quickjs.framework any more.1
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove 1

@andycall andycall mentioned this pull request Jun 9, 2023
@andycall andycall added the enhancement New feature or request label Jan 18, 2024
looseyi pushed a commit that referenced this pull request May 29, 2024
[1.84.0][NEZ][FIX] fix: layout and color error
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

5 participants