Skip to content

Instantly share code, notes, and snippets.

@TanisukeGoro
Created October 3, 2017 18:43
Show Gist options
  • Save TanisukeGoro/03657cad7b3e69ddfd94b912f59cbeb3 to your computer and use it in GitHub Desktop.
Save TanisukeGoro/03657cad7b3e69ddfd94b912f59cbeb3 to your computer and use it in GitHub Desktop.
ECHO OFF
CLS
REM insファイルのパスを指定。insファイルとbatファイルが同じフォルダに存在するなら以下の書き方で十分である。というか最早この記述もいらない。
SET INSfile=%~dp0
REM insファイルとbatファイルが同じフォルダに存在しない場合は、環境変数としてパスを定義して、作業ディレクトリを移動する。
REM SET INSfile=C:\RIETAN_VENUS_examples\Cu3Fe4P6\Cu3Fe4P6.ins
REM 作業ディレクトリの移動。9x系とNT系OSに対応するように条件分岐させる。使用しているPCが
REM NT系なら、[cd /d "%INSfile%"]だけでよい。参照: http://tanisukestr.hatenablog.com/entry/2017/10/02/013726
REM IF "%OS%" == "Windows_NT" CHDIR /D "%INSfile%"
REM IF NOT "%OS%" == "Windows_NT" "%RIETAN%\pushd" "%INSfile%"
REM ファイル名の指定
SET SAMPLE=Cu3Fe4P6
REM RIETANの実行ファイルを指定
SET RIETAN=C:\Program Files (x86)\RIETAN_VENUS
REM RIETVIEWの実行ファイルの指定。IgorユーザーはIgorの実行ファイルを指定。
SET RIETVIEW=%RIETAN%\RIETVIEW.EXE
REM RIETANの実行
"%RIETAN%\RIETAN.exe" "%SAMPLE%.ins" "%SAMPLE%.int" "%SAMPLE%.bkg" "%SAMPLE%.itx" "%SAMPLE%.hkl" "%SAMPLE%.xyz" "%SAMPLE%.fos" "%SAMPLE%.ffe" "%SAMPLE%.fba" "%SAMPLE%.ffi" "%SAMPLE%.ffo" "%SAMPLE%.vesta" "%SAMPLE%.plt" "%SAMPLE%.gpd" "%SAMPLE%.alb" "%SAMPLE%.prf" "%SAMPLE%.inflip" "%SAMPLE%.exp" | "%RIETAN%\Commands\tee.exe" "%SAMPLE%.lst"
REM 実行結果をメモ帳で表示
notepad "%SAMPLE%.lst"
REM 実行結果の描画
IF EXIST "%SAMPLE%.plt" "%RIETAN%\gnuplot\bin\wgnuplot.exe" /noend %SAMPLE%.plt
IF NOT EXIST "%SAMPLE%.plt" "%RIETVIEW%" "%SAMPLE%.itx"
REM 特に意味は無いけど、RIETANに同梱されているメッセージボックスを用いてコマンドプロンプトが直ぐに消えないようにする。
Wscript "%RIETAN%\message2.vbs"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment