aboutsummaryrefslogtreecommitdiff
path: root/src/gui_merge.c
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2022-07-06 13:41:08 +0200
committerThomas White <taw@physics.org>2022-07-06 13:41:08 +0200
commit5b087416a02a53c61d0827ee4bad50370320a0fb (patch)
treea52bea18f36b2d2ff6056c57952d289ada56f089 /src/gui_merge.c
parentd8e55abe45fa3efe1a886a34c46523f3c1f3ef23 (diff)
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.
Diffstat (limited to 'src/gui_merge.c')
-rw-r--r--src/gui_merge.c24
1 files changed, 5 insertions, 19 deletions
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; i<input->n_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; i<input->n_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);