@@ -97,6 +97,16 @@ SMBINVER="sourcemod-1.12.0-git7193-${HOSTOSPLAIN}" ### UPDATE .github/workflows/
9797SMBINEXT = { source = " ${OS}" , default_value = " tar.gz" , mapping = {"Windows_NT" = " zip" } }
9898SPCOMP = { source = " ${OS}" , default_value = " spcomp64" , mapping = {"Windows_NT" = " spcomp" } }
9999
100+
101+ TARGETARCH = " i686"
102+ [env .x64 ]
103+ # cargo make --profile x64 full
104+ TARGETARCH = " x86_64"
105+ [env .x32 ]
106+ # cargo make --profile x32 full
107+ TARGETARCH = " i686"
108+
109+
100110# ###############################################################################
101111# # asdf
102112# ###############################################################################
@@ -211,25 +221,24 @@ do_everything
211221[tasks .copy-extensions ]
212222script_runner = " @duckscript"
213223script = '''
214- extdir = set "${PACKAGEDIR}/srcwrtimer/addons/sourcemod/extensions/x64"
215- builddir = set "${CARGO_MAKE_WORKING_DIRECTORY}/_build"
216-
217224fn copy_ext
225+ extdir = set "${PACKAGEDIR}/srcwrtimer/addons/sourcemod/extensions${3}"
218226 rm "${extdir}/${1}.ext.dll"
219227 rm "${extdir}/${1}.pdb"
220228 rm "${extdir}/${1}.ext.so"
221- if is_path_exists "${builddir}/x86_64 -pc-windows-msvc/release/${1}.dll"
222- cp "${builddir}/x86_64 -pc-windows-msvc/release/${1}.dll" "${extdir}/${1}.ext.dll"
223- cp "${builddir}/x86_64 -pc-windows-msvc/release/${1}.pdb" "${extdir}/${1}.pdb"
229+ if is_path_exists "${2}/${4} -pc-windows-msvc/release/${1}.dll"
230+ cp "${2}/${4} -pc-windows-msvc/release/${1}.dll" "${extdir}/${1}.ext.dll"
231+ cp "${2}/${4} -pc-windows-msvc/release/${1}.pdb" "${extdir}/${1}.pdb"
224232 end
225- if is_path_exists "${builddir}/x86_64 -unknown-linux-gnu/release/lib${1}.so"
226- cp "${builddir}/x86_64 -unknown-linux-gnu/release/lib${1}.so" "${extdir}/${1}.ext.so"
233+ if is_path_exists "${2}/${4} -unknown-linux-gnu/release/lib${1}.so"
234+ cp "${2}/${4} -unknown-linux-gnu/release/lib${1}.so" "${extdir}/${1}.ext.so"
227235 end
228236end
229237
230238members = split "${CARGO_MAKE_CRATE_WORKSPACE_MEMBERS}" ","
231239for member in ${members}
232- copy_ext ${member}
240+ copy_ext ${member} "${CARGO_MAKE_WORKING_DIRECTORY}/_build/" "" "i686"
241+ copy_ext ${member} "${CARGO_MAKE_WORKING_DIRECTORY}/_build" "/x64" "x86_64"
233242end
234243release ${handle}
235244'''
@@ -304,19 +313,19 @@ toolchain = "nightly"
304313command = " cargo"
305314# CS:S binaries are now at 2.29 according to this:
306315# objdump -T bin/*.so | grep GLIBC | sed 's/.*GLIBC_\([.0-9]*\).*/\1/g' | sort -Vu
307- args = [" zigbuild" , " --release" , " --target" , " x86_64 -unknown-linux-gnu.2.29" ]
316+ args = [" zigbuild" , " --release" , " --target" , " ${TARGETARCH} -unknown-linux-gnu.2.29" ]
308317
309318[tasks .msvc ]
310319toolchain = " nightly"
311320command = " cargo"
312321# env = { "CARGO_LOG" = "cargo::core::compiler::fingerprint=info" }
313- args = [" build" , " --release" , " --target" , " x86_64 -pc-windows-msvc" ]
322+ args = [" build" , " --release" , " --target" , " ${TARGETARCH} -pc-windows-msvc" ]
314323
315324# TODO: xwin not quite worky...
316- [tasks .msvc .linux ]
317- toolchain = " nightly"
318- command = " cargo"
319- args = [" xwin" , " build" , " --xwin-arch" , " x86_64 " , " --release" , " --target" , " x86_64 -pc-windows-msvc" ]
325+ # [tasks.msvc.linux]
326+ # toolchain = "nightly"
327+ # command = "cargo"
328+ # args = ["xwin", "build", "--xwin-arch", "x86 ", "--release", "--target", "${TARGETARCH} -pc-windows-msvc"]
320329
321330# ###############################################################################
322331# # asdf
@@ -325,12 +334,12 @@ args = ["xwin", "build", "--xwin-arch", "x86_64", "--release", "--target", "x86_
325334[tasks .rustup-linux ]
326335toolchain = " nightly"
327336command = " rustup"
328- args = [" target" , " add" , " x86_64 -unknown-linux-gnu" ]
337+ args = [" target" , " add" , " ${TARGETARCH} -unknown-linux-gnu" ]
329338
330339[tasks .rustup-msvc ]
331340toolchain = " nightly"
332341command = " rustup"
333- args = [" target" , " add" , " x86_64 -pc-windows-msvc" ]
342+ args = [" target" , " add" , " ${TARGETARCH} -pc-windows-msvc" ]
334343
335344# ###############################################################################
336345# # asdf
0 commit comments