Skip to content

Commit

Permalink
Now GTK frontend checks current directory for ansvif binary.
Browse files Browse the repository at this point in the history
  • Loading branch information
Marshall Lee Whittaker committed Sep 13, 2019
1 parent 41b09c4 commit f2f9aa9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ syscalls_SOURCES = src/linux/syscalls.cpp
syscalls_CPPFLAGS = -ansi -Wno-unused-result -Wno-nonnull -std=c++11
endif
if WITH_GTK
ansvif_gtk_SOURCES = src/gtk.cpp src/popen2.cpp
ansvif_gtk_SOURCES = src/gtk.cpp src/popen2.cpp src/file_check.cpp
ansvif_gtk_LDADD = @GTK_LIBS@
ansvif_gtk_CPPFLAGS = @GTK_CFLAGS@ -D __NOTANDROID__
endif
Expand Down
6 changes: 4 additions & 2 deletions src/gtk.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
FILE *popen2(std::string command, std::string type, int &pid,
std::string low_lvl_user);
int pclose2(FILE *fp, pid_t pid);

bool file_exists(const std::string &filen);
std::string version = "1.11a"; /* ansvif version */
std::string buffer_size;
std::string random_data;
Expand Down Expand Up @@ -408,7 +408,9 @@ int main(int argc, char *argv[]) {
}
}


if(file_exists("./ansvif")) {
ansvif_loc = "./ansvif ";
}
/* Pull in the args for gtk */
gtk_init(&argc, &argv);
/* Create gtk window */
Expand Down

0 comments on commit f2f9aa9

Please sign in to comment.