File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed
Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -40,7 +40,7 @@ def check_os(os_name):
4040 print ("\n Checking System" )
4141 print ("===============\n " )
4242 print (f" Operating System : { os_name } " )
43- supported = {"macOS" }
43+ supported = {"macOS" , "Linux" }
4444 if os_name not in supported :
4545 print ("Unsupported operating system" )
4646 sys .exit (1 )
@@ -51,9 +51,11 @@ def download_dawn(os_name):
5151
5252 outfile_map = {
5353 "macOS" : "third_party/lib/libdawn.dylib"
54+ "Linux" : "third_party/lib/libdawn.so" ,
5455 }
5556 url_map = {
5657 "macOS" : "https://github.com/austinvhuang/dawn-artifacts/releases/download/prerelease/libdawn.dylib"
58+ "Linux" : "https://github.com/austinvhuang/dawn-artifacts/releases/download/prerelease/libdawn.so" ,
5759 }
5860
5961 outfile = outfile_map .get (os_name )
@@ -87,6 +89,12 @@ def setup_env(os_name):
8789
8890 with open ("source" , "w" ) as f :
8991 f .write (f"export DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:{ lib_dir } \n " )
92+ if os_name == "Linux" :
93+ print (" Before running the program, run the following command or add it to your shell profile:" )
94+ print (f" export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:{ lib_dir } " )
95+
96+ with open ("source" , "w" ) as f :
97+ f .write (f"export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:{ lib_dir } \n " )
9098
9199def main ():
92100 os_name = get_os_name ()
You can’t perform that action at this time.
0 commit comments