@@ -64,6 +64,24 @@ def generate_executable_source(write_source_files=True,
6464 return dct_sources
6565
6666
67+ # BOINC executable naming conventions:
68+ # windows_intelx86 Microsoft Windows (98 or later) running on an Intel x86-compatible CPU (32bit)
69+ # windows_x86_64 Microsoft Windows running on an AMD x86_64 or Intel EM64T CPU
70+ # i686-pc-linux-gnu Linux running on an Intel x86-compatible CPU (32bit)
71+ # x86_64-pc-linux-gnu Linux running on an AMD x86_64 or Intel EM64T CPU
72+ # powerpc-apple-darwin Mac OS X 10.3 or later running on Motorola PowerPC
73+ # i686-apple-darwin Mac OS 10.4 or later running on Intel (32bit)
74+ # x86_64-apple-darwin Intel 64-bit Mac OS 10.5 or later
75+ # arm64-apple-darwin Mac OS on M1 or M2
76+ # sparc-sun-solaris2.7 Solaris 2.7 running on a SPARC-compatible CPU
77+ # sparc-sun-solaris Solaris 2.8 or later running on a SPARC-compatible CPU
78+ # sparc64-sun-solaris Solaris 2.8 or later running on a SPARC 64-bit CPU
79+ # powerpc64-ps3-linux-gnu Sony Playstation 3 running Linux
80+ # arm-android-linux-gnu Android running on ARM
81+ # aarch64-android-linux-gnu Android running on aarch64
82+ # aarch64-unknown-linux-gnu Linux running aarch64
83+ # x86_64-pc-freebsd__sse2 Free BSD running on 64 bit X86
84+
6785def generate_executable (keep_source = False , windows32 = False , windows64 = False ):
6886 main = Path .cwd () / "main.c"
6987 config = Path .cwd () / "sim_config.h"
@@ -77,13 +95,13 @@ def generate_executable(keep_source=False, windows32=False, windows64=False):
7795 compiler = "x86_64-w64-mingw32-gcc"
7896 else :
7997 raise ValueError ("Mingw32 not found!" )
80- tag += '-x86_64-pc-windows-gnu .exe'
98+ tag += '-windows_x86_64 .exe'
8199 elif windows32 :
82100 if shutil .which ("i686-w64-mingw32-gcc" ) is not None :
83101 compiler = "i686-w64-mingw32-gcc"
84102 else :
85103 raise ValueError ("Mingw32 not found!" )
86- tag += '-i686-pc-windows-gnu .exe'
104+ tag += '-windows_intelx86 .exe'
87105 else :
88106 if shutil .which ("gcc" ) is not None :
89107 compiler = "gcc"
@@ -98,7 +116,8 @@ def generate_executable(keep_source=False, windows32=False, windows64=False):
98116 if cmd .returncode == 0 :
99117 thisos = cmd .stdout .decode ('UTF-8' ).strip ().lower ()
100118 vendor = 'apple' if thisos == 'darwin' else 'pc'
101- tag += f"-{ machine } -{ vendor } -{ thisos } -gnu"
119+ thisos = f'{ thisos } -gnu' if thisos == 'linux' else thisos
120+ tag += f"-{ machine } -{ vendor } -{ thisos } "
102121
103122 cmd = subprocess .run ([compiler , 'main.c' , '-o' , f'xboinc{ tag } ' , '-lm' ],
104123 stdout = subprocess .PIPE , stderr = subprocess .PIPE )
0 commit comments