Skip to content

Commit c5ed469

Browse files
authored
Merge pull request #205 from AdvancedPhotonSource/fix_linux_rmc_issue
fix the linux RMCProfile launching issue
2 parents 92e5fd9 + 95d61ab commit c5ed469

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

GSASII/GSASIIphsGUI.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@
5757
from . import atmdata
5858
from . import ISODISTORT as ISO
5959
from . import SUBGROUPS
60+
from pathlib import Path
6061

6162
try:
6263
wx.NewIdRef
@@ -6260,6 +6261,15 @@ def RunRMCProfile(event):
62606261
f.write(f' do script "bash {script_file}" in window 1\n')
62616262
f.write("end tell\n")
62626263
subp.Popen(['osascript', ascript_file])
6264+
elif sys.platform.startswith("linux"):
6265+
script_file = os.path.join(os.getcwd(), "runrmc.sh")
6266+
with open(script_file, 'w') as frmc:
6267+
frmc.write("#!/bin/bash\n")
6268+
frmc.write(f"export LD_LIBRARY_PATH={Path(rmcfile).parent.parent}/exe/libs\n")
6269+
frmc.write(f"export LIBRARY_PATH={Path(rmcfile).parent.parent}/exe/libs\n")
6270+
frmc.write(f"export PATH=$PATH:{Path(rmcfile).parent.parent}/exe\n")
6271+
frmc.write(f'"rmcprofile" "{pName}"\n')
6272+
subp.Popen(['bash', script_file])
62636273
else:
62646274
script_file = os.path.join(os.getcwd(), "runrmc.bat")
62656275
with open(script_file,'w') as batch:

0 commit comments

Comments
 (0)