Skip to content

Commit 91826e6

Browse files
Split patches with functionality changes
1 parent 734ad78 commit 91826e6

File tree

7 files changed

+387
-101
lines changed

7 files changed

+387
-101
lines changed

.github/workflows/release.yml

Lines changed: 60 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -154,12 +154,12 @@ jobs:
154154
if: github.event_name == 'release'
155155
shell: bash
156156
run: |
157-
zip -9vr ./source-pre-LoadLibraryEx.zip . -x "./.*" "./.*/*" "./**/.*" "./**/.*/*"
157+
zip -9vr ./source-pre-KB2533623.zip . -x "./.*" "./.*/*" "./**/.*" "./**/.*/*"
158158
159159
- name: Compute hashes for file
160160
if: github.event_name == 'release'
161161
run: |
162-
FILE=./source-pre-LoadLibraryEx.zip
162+
FILE=./source-pre-KB2533623.zip
163163
DGST=$FILE.dgst
164164
for METHOD in {"md5","sha1","sha256","sha512"}
165165
do
@@ -171,6 +171,63 @@ jobs:
171171
if: github.event_name == 'release'
172172
with:
173173
repo_token: ${{ secrets.GITHUB_TOKEN }}
174-
file: ./source-pre-LoadLibraryEx.zip*
174+
file: ./source-pre-KB2533623.zip*
175+
tag: ${{ github.ref }}
176+
file_glob: true
177+
178+
pre-ws:
179+
runs-on: ubuntu-latest
180+
permissions:
181+
contents: write
182+
strategy:
183+
matrix:
184+
buildtarget: ['go1.26.0']
185+
fail-fast: false
186+
steps:
187+
- name: Download source
188+
uses: actions/checkout@v6
189+
with:
190+
repository: 'golang/go'
191+
ref: ${{ matrix.buildtarget }}
192+
193+
- name: Apply patch
194+
run: |
195+
curl -L -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" https://github.com/XTLS/go-win7/raw/refs/heads/build/unified-1-26-patch.diff | patch --verbose -p 1
196+
curl -L -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" https://github.com/XTLS/go-win7/raw/refs/heads/build/pre-SP1-1-26.diff | patch --verbose -p 1
197+
198+
- name: Copy License
199+
run: |
200+
rm ./LICENSE
201+
curl -O https://raw.githubusercontent.com/XTLS/go-win7/refs/heads/build/LICENSE
202+
203+
- name: Upload package to Artifacts
204+
uses: actions/upload-artifact@v6
205+
with:
206+
name: source-pre-SP1
207+
path: |
208+
./*
209+
210+
- name: create ZIP archive
211+
if: github.event_name == 'release'
212+
shell: bash
213+
run: |
214+
zip -9vr ./source-pre-SP1.zip . -x "./.*" "./.*/*" "./**/.*" "./**/.*/*"
215+
216+
- name: Compute hashes for file
217+
if: github.event_name == 'release'
218+
run: |
219+
FILE=./source-pre-SP1.zip
220+
DGST=$FILE.dgst
221+
for METHOD in {"md5","sha1","sha256","sha512"}
222+
do
223+
openssl dgst -$METHOD $FILE | sed 's/([^)]*)//g' >>$DGST
224+
done
225+
226+
- name: Upload packages to release
227+
uses: svenstaro/upload-release-action@v2
228+
if: github.event_name == 'release'
229+
with:
230+
repo_token: ${{ secrets.GITHUB_TOKEN }}
231+
file: ./source-pre-SP1.zip*
175232
tag: ${{ github.ref }}
176233
file_glob: true

.github/workflows/test-go1_26.yml

Lines changed: 28 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,6 @@ jobs:
9494
path: |
9595
./*
9696
97-
9897
pre-llex:
9998
runs-on: ubuntu-latest
10099
permissions:
@@ -118,6 +117,33 @@ jobs:
118117
- name: Upload package to Artifacts
119118
uses: actions/upload-artifact@v6
120119
with:
121-
name: source-pre-LoadLibraryEx
120+
name: source-pre-KB2533623
121+
path: |
122+
./*
123+
124+
pre-ws:
125+
runs-on: ubuntu-latest
126+
permissions:
127+
contents: write
128+
strategy:
129+
matrix:
130+
buildtarget: ['release-branch.go1.26']
131+
fail-fast: false
132+
steps:
133+
- name: Download source
134+
uses: actions/checkout@v6
135+
with:
136+
repository: 'golang/go'
137+
ref: ${{ matrix.buildtarget }}
138+
139+
- name: Apply patch
140+
run: |
141+
curl -L -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" https://github.com/XTLS/go-win7/raw/refs/heads/build/unified-1-26-patch.diff | patch --verbose -p 1
142+
curl -L -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" https://github.com/XTLS/go-win7/raw/refs/heads/build/pre-SP1-1-26.diff | patch --verbose -p 1
143+
144+
- name: Upload package to Artifacts
145+
uses: actions/upload-artifact@v6
146+
with:
147+
name: source-pre-SP1
122148
path: |
123149
./*

README-eng.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,9 +112,12 @@ These patches must be applied from up to down:
112112

113113
1. https://github.com/XTLS/go-win7/commit/86eda38dabd1753092f64de7dcd2050d346c89b4 / [Git diff](https://github.com/XTLS/go-win7/commit/86eda38dabd1753092f64de7dcd2050d346c89b4.diff)
114114
1. https://github.com/XTLS/go-win7/commit/c3e5e430625ba7ab5d638c753f94cc52253793f5 / [Git diff](https://github.com/XTLS/go-win7/commit/c3e5e430625ba7ab5d638c753f94cc52253793f5.diff)
115-
1. https://github.com/XTLS/go-win7/commit/d72cb94820d800b72f4c7a018f3948908b876460 / [Git diff](https://github.com/XTLS/go-win7/commit/d72cb94820d800b72f4c7a018f3948908b876460.diff)
116115
1. https://github.com/XTLS/go-win7/commit/0d36c60d2c0754fde7e4e7e4773e0349527cff08 / [Git diff](https://github.com/XTLS/go-win7/commit/0d36c60d2c0754fde7e4e7e4773e0349527cff08.diff)
117116

118-
For Windows 7 without KB2533623 installed, these patches are also needed:
117+
For Windows 7 SP1/Windows Server 2008 R2 SP1 without KB2533623 installed, these patches are also needed:
119118

120119
1. https://github.com/XTLS/go-win7/raw/refs/heads/build/pre-KB2533623-1-26.diff
120+
121+
For Windows 7/Windows Server 2008 R2 without SP1 installed, these patches are also needed:
122+
123+
1. https://github.com/XTLS/go-win7/raw/refs/heads/build/pre-SP1-1-26.diff

README-zho-hans.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,9 +112,12 @@
112112

113113
1. https://github.com/XTLS/go-win7/commit/86eda38dabd1753092f64de7dcd2050d346c89b4 / [Git diff](https://github.com/XTLS/go-win7/commit/86eda38dabd1753092f64de7dcd2050d346c89b4.diff)
114114
1. https://github.com/XTLS/go-win7/commit/c3e5e430625ba7ab5d638c753f94cc52253793f5 / [Git diff](https://github.com/XTLS/go-win7/commit/c3e5e430625ba7ab5d638c753f94cc52253793f5.diff)
115-
1. https://github.com/XTLS/go-win7/commit/d72cb94820d800b72f4c7a018f3948908b876460 / [Git diff](https://github.com/XTLS/go-win7/commit/d72cb94820d800b72f4c7a018f3948908b876460.diff)
116115
1. https://github.com/XTLS/go-win7/commit/0d36c60d2c0754fde7e4e7e4773e0349527cff08 / [Git diff](https://github.com/XTLS/go-win7/commit/0d36c60d2c0754fde7e4e7e4773e0349527cff08.diff)
117116

118-
对于没有安装 KB2533623 的 Windows 7,应该同时添加以下补丁:
117+
对于没有安装 KB2533623 的 Windows 7 SP1/Windows Server 2008 R2 SP1,应该同时添加以下补丁:
119118

120119
1. https://github.com/XTLS/go-win7/raw/refs/heads/build/pre-KB2533623-1-26.diff
120+
121+
对于没有安装 SP1 的 Windows 7/Windows Server 2008 R2,应该同时添加以下补丁:
122+
123+
1. https://github.com/XTLS/go-win7/raw/refs/heads/build/pre-SP1-1-26.diff

pre-KB2533623-1-26.diff

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -140,9 +140,7 @@ index 9d779869531788..5dc7d3162e71ba 100644
140140
- const _LOAD_LIBRARY_SEARCH_SYSTEM32 = 0x00000800
141141
- handle, _, err := SyscallN(uintptr(__LoadLibraryExW), uintptr(unsafe.Pointer(filename)), 0, _LOAD_LIBRARY_SEARCH_SYSTEM32)
142142
+func loadsystemlibrary(filename *uint16, absoluteFilepath *uint16) (uintptr, Errno) {
143-
+ var handle uintptr
144-
+ var err Errno
145-
+ handle, _, err = SyscallN(uintptr(__LoadLibraryW), uintptr(unsafe.Pointer(absoluteFilepath)))
143+
+ handle, _, err := SyscallN(uintptr(__LoadLibraryW), uintptr(unsafe.Pointer(absoluteFilepath)))
146144
if handle != 0 {
147145
err = 0
148146
}

0 commit comments

Comments
 (0)