From 5b087416a02a53c61d0827ee4bad50370320a0fb Mon Sep 17 00:00:00 2001 From: Thomas White Date: Wed, 6 Jul 2022 13:41:08 +0200 Subject: GUI: Invoke programs without path Including the path wasn't working very well. One of the problems is that it prevents the use of a wrapper script for the programs, which is needed for certain environments. This commit just removes the path prefixes altogether. --- src/gui_merge.c | 24 +++++------------------- 1 file changed, 5 insertions(+), 19 deletions(-) (limited to 'src/gui_merge.c') diff --git a/src/gui_merge.c b/src/gui_merge.c index aa1fffcc..391957d7 100644 --- a/src/gui_merge.c +++ b/src/gui_merge.c @@ -358,7 +358,6 @@ static int write_partialator_script(const char *filename, const char *log_folder) { FILE *fh; - char *exe_path; int i; fh = fopen(filename, "w"); @@ -366,12 +365,7 @@ static int write_partialator_script(const char *filename, fprintf(fh, "#!/bin/sh\n"); - exe_path = get_crystfel_exe("partialator"); - if ( exe_path == NULL ) { - fclose(fh); - return 1; - } - fprintf(fh, "%s \\\n", exe_path); + fprintf(fh, "partialator \\\n"); for ( i=0; in_streams; i++ ) { fprintf(fh, "\"%s\" \\\n", input->streams[i]); @@ -429,7 +423,6 @@ static int write_partialator_script(const char *filename, static void add_process_hkl(FILE *fh, - const char *exe_path, struct gui_indexing_result *input, struct merging_params *params, const char *out_hkl, @@ -440,7 +433,7 @@ static void add_process_hkl(FILE *fh, { int i; - fprintf(fh, "%s \\\n", exe_path); + fprintf(fh, "process_hkl \\\n"); for ( i=0; in_streams; i++ ) { fprintf(fh, " \"%s\" \\\n", input->streams[i]); @@ -471,24 +464,17 @@ static int write_process_hkl_script(const char *filename, const char *stderr_filename) { FILE *fh; - char *exe_path; fh = fopen(filename, "w"); if ( fh == NULL ) return 1; fprintf(fh, "#!/bin/sh\n"); - exe_path = get_crystfel_exe("process_hkl"); - if ( exe_path == NULL ) { - fclose(fh); - return 1; - } - - add_process_hkl(fh, exe_path, input, params, out_hkl, + add_process_hkl(fh, input, params, out_hkl, stdout_filename, stderr_filename, "", ""); - add_process_hkl(fh, exe_path, input, params, out_hkl, + add_process_hkl(fh, input, params, out_hkl, stdout_filename, stderr_filename, "--even-only", "1"); - add_process_hkl(fh, exe_path, input, params, out_hkl, + add_process_hkl(fh, input, params, out_hkl, stdout_filename, stderr_filename, "--odd-only", "2"); fclose(fh); -- cgit v1.2.3