Skip to content

Commit 6ccff11

Browse files
committed
Activates test-bylaws patches for ARM64EC builds
Integrates a suite of `test-bylaws` patches into the ARM64EC build process. These patches enable extended state (XSTATE/YMM) support, enhance thread suspension capabilities (e.g., adding `Wow64SuspendLocalThread`), and improve process and virtual memory management, along with server and threading infrastructure. Also reorganizes patch files for clearer categorization.
1 parent 120d917 commit 6ccff11

5 files changed

Lines changed: 81 additions & 21 deletions

File tree

.github/workflows/build-proton.yml

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -256,11 +256,30 @@ jobs:
256256
find artifacts -name "*.wcp.xz" -exec cp {} release/ \;
257257
ls -lah release/
258258
259+
- name: Generate date-based tag
260+
id: generate_tag
261+
run: |
262+
DATE=$(date +%Y%m%d)
263+
264+
# Get existing tags for today
265+
EXISTING_TAGS=$(git tag -l "build-${DATE}-*" | sort -V | tail -1)
266+
267+
if [ -z "$EXISTING_TAGS" ]; then
268+
BUILD_NUMBER=1
269+
else
270+
# Extract build number from last tag and increment
271+
BUILD_NUMBER=$(echo "$EXISTING_TAGS" | sed "s/build-${DATE}-//" | awk '{print $1 + 1}')
272+
fi
273+
274+
TAG_NAME="build-${DATE}-${BUILD_NUMBER}"
275+
echo "tag_name=${TAG_NAME}" >> $GITHUB_OUTPUT
276+
echo "Generated tag: ${TAG_NAME}"
277+
259278
- name: Create Release
260279
uses: softprops/action-gh-release@v1
261280
with:
262-
tag_name: release-${{ github.sha }}
263-
name: Proton Wine 10.0-4 (Build ${{ github.run_number }})
281+
tag_name: ${{ steps.generate_tag.outputs.tag_name }}
282+
name: Proton Wine 10.0-4 (${{ steps.generate_tag.outputs.tag_name }})
264283
files: release/*
265284
draft: false
266285
prerelease: false

android/patches/dlls_ntdll_loader_c.patch

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
diff --git a/dlls/ntdll/loader.c b/dlls/ntdll/loader.c
2-
index bc71fe0..e8dec1c 100644
2+
index bc71fe0..ef39f34 100644
33
--- a/dlls/ntdll/loader.c
44
+++ b/dlls/ntdll/loader.c
55
@@ -4429,7 +4429,7 @@ static void load_arm64ec_module(void)
@@ -11,3 +11,19 @@ index bc71fe0..e8dec1c 100644
1111
OBJECT_ATTRIBUTES attr;
1212
WINE_MODREF *wm;
1313
NTSTATUS status;
14+
@@ -4479,6 +4479,7 @@ static void build_wow64_main_module(void)
15+
static void (WINAPI *pWow64LdrpInitialize)( CONTEXT *ctx );
16+
17+
void (WINAPI *pWow64PrepareForException)( EXCEPTION_RECORD *rec, CONTEXT *context ) = NULL;
18+
+NTSTATUS (WINAPI *pWow64SuspendLocalThread)( HANDLE thread, ULONG *count ) = NULL;
19+
20+
static void init_wow64( CONTEXT *context )
21+
{
22+
@@ -4503,6 +4504,7 @@ static void init_wow64( CONTEXT *context )
23+
24+
GET_PTR( Wow64LdrpInitialize );
25+
GET_PTR( Wow64PrepareForException );
26+
+ GET_PTR( Wow64SuspendLocalThread );
27+
#undef GET_PTR
28+
imports_fixup_done = TRUE;
29+
}
File renamed without changes.

android/patches/test-bylaws/dlls_wow64_process_c.patch

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
diff --git a/dlls/wow64/process.c b/dlls/wow64/process.c
2-
index 269843a..8968bcc 100644
2+
index 269843a..85a5006 100644
33
--- a/dlls/wow64/process.c
44
+++ b/dlls/wow64/process.c
55
@@ -1092,7 +1092,7 @@ NTSTATUS WINAPI wow64_NtSuspendThread( UINT *args )
@@ -11,3 +11,16 @@ index 269843a..8968bcc 100644
1111
}
1212

1313

14+
@@ -1146,3 +1146,12 @@ NTSTATUS WINAPI wow64_NtWow64QueryInformationProcess64( UINT *args )
15+
return STATUS_NOT_IMPLEMENTED;
16+
}
17+
}
18+
+
19+
+
20+
+/**********************************************************************
21+
+ * Wow64SuspendLocalThread (wow64.@)
22+
+ */
23+
+NTSTATUS WINAPI Wow64SuspendLocalThread( HANDLE thread, ULONG *count )
24+
+{
25+
+ return NtSuspendThread( thread, count );
26+
+}

build-scripts/build-step-arm64ec.sh

Lines changed: 29 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -202,26 +202,38 @@ do
202202
"dlls_wow64_syscall_c.patch"
203203
"loader_wine_inf_in.patch"
204204

205-
# bylaws patch
206-
# "test-bylaws/dlls_ntdll_signal_arm64_c.patch"
207-
# "test-bylaws/dlls_ntdll_signal_arm64ec_c.patch"
208-
# "test-bylaws/dlls_ntdll_signal_x86_64_c.patch"
209-
# "test-bylaws/dlls_ntdll_unwind_h.patch"
210-
# "test-bylaws/include_winnt_h.patch"
205+
# fix build
211206
"programs_wineboot_wineboot_c.patch"
212207
"dlls_wdscore_wdscore_spec.patch"
213-
# "test-bylaws/dlls_ntdll_ntdll_spec.patch"
214-
# "test-bylaws/dlls_ntdll_ntdll_misc_h.patch"
215-
# "test-bylaws/dlls_wow64_process_c.patch"
216-
# "test-bylaws/dlls_wow64_wow64_spec.patch"
217-
# "test-bylaws/dlls_wow64_virtual_c.patch"
218-
# "test-bylaws/include_winternl_h.patch"
219-
# "test-bylaws/server_thread_h.patch"
220-
# "test-bylaws/server_thread_c.patch"
221-
# "test-bylaws/server_process_c.patch"
222-
# "test-bylaws/dlls_ntdll_unix_thread_c.patch"
208+
209+
# 1. Extended State (XSTATE/YMM) Support Patches
210+
"test-bylaws/dlls_ntdll_unwind_h.patch"
211+
"test-bylaws/include_winnt_h.patch"
212+
213+
# 2. Thread Suspension Patches
214+
"test-bylaws/dlls_ntdll_signal_arm64_c.patch"
215+
"test-bylaws/dlls_ntdll_signal_arm64ec_c.patch"
216+
"test-bylaws/dlls_ntdll_signal_x86_64_c.patch"
217+
"test-bylaws/dlls_ntdll_ntdll_spec.patch"
218+
"test-bylaws/dlls_ntdll_ntdll_misc_h.patch"
219+
"test-bylaws/dlls_wow64_process_c.patch"
220+
"test-bylaws/dlls_wow64_wow64_spec.patch"
221+
222+
# 3. Process and Virtual Memory Management
223+
"test-bylaws/dlls_wow64_virtual_c.patch"
224+
"test-bylaws/server_process_c.patch"
225+
"test-bylaws/dlls_ntdll_unix_process_c.patch"
226+
227+
# 4. Server and Threading Infrastructure
228+
"test-bylaws/server_thread_h.patch"
229+
"test-bylaws/server_thread_c.patch"
230+
"test-bylaws/dlls_ntdll_unix_thread_c.patch"
231+
232+
# 5. Internal Headers
233+
"test-bylaws/include_winternl_h.patch"
234+
235+
# 6. Build System (Optional)
223236
# "test-bylaws/tools_makedep_c.patch"
224-
# "test-bylaws/dlls_ntdll_unix_process_c.patch"
225237
)
226238

227239
for patch in "${PATCHES[@]}"; do

0 commit comments

Comments
 (0)