Separate platform from use of APPIMAGE (#196)

This commit is contained in:
Will Dietz 2017-12-09 16:01:30 -06:00 committed by xarkes
parent 44493c6327
commit 253dae261c
2 changed files with 4 additions and 3 deletions

View File

@ -201,5 +201,6 @@ unix {
appimage_root.files = $$icon_file $$desktop_file
INSTALLS += appimage_root
DEFINES += APPIMAGE
}
}

View File

@ -7,7 +7,7 @@
#include "dialogs/NewFileDialog.h"
#include "dialogs/OptionsDialog.h"
#ifdef __unix__
#ifdef APPIMAGE
#define PREFIX "/tmp/.cutter_usr"
#include <sys/types.h>
#include <sys/stat.h>
@ -109,13 +109,13 @@ int main(int argc, char *argv[])
}
// Hack to make it work with AppImage
#ifdef __unix__
#ifdef APPIMAGE
set_appimage_symlink();
#endif
int ret = a.exec();
#ifdef __unix__
#ifdef APPIMAGE
remove(PREFIX);
#endif