diff options
author | Matthias Kramm <kramm@quiss.org> | 2009-08-24 20:52:50 +0200 |
---|---|---|
committer | Matthias Kramm <kramm@quiss.org> | 2009-08-24 20:52:50 +0200 |
commit | cb84c92e02e9b116f3192e2fb0a7b7856cd23d1f (patch) | |
tree | 2ea6f79a6047c889a4c88d76ddef61da3e350bb3 /installer | |
parent | d51c9b672a2a23d9e9c7bc4c2d366ca8d66bda0e (diff) |
small fixes
Diffstat (limited to 'installer')
-rw-r--r-- | installer/Makefile | 14 | ||||
-rw-r--r-- | installer/installer.c | 8 |
2 files changed, 12 insertions, 10 deletions
diff --git a/installer/Makefile b/installer/Makefile index d76f9159..35a00086 100644 --- a/installer/Makefile +++ b/installer/Makefile @@ -4,7 +4,7 @@ WINDRES=/opt/xmingw/bin/i386-mingw32msvc-windres LICENSE=gpl.c -all: files1.exe files2.exe uninstall.exe mkarchive +all: files1.exe uninstall.exe mkarchive LIBS=-lgdi32 -lshlwapi -lcomctl32 -lshell32 -lole32 -luuid @@ -14,11 +14,11 @@ files1.c: ../win32/*.exe mkarchive uninstall.exe cd ../win32;../installer/mkarchive `find` mv ../win32/crnfiles.c ./files1.c -files2.c: ../win32_gui/*.exe ../win32_gui/*.swf mkarchive uninstall.exe - cp uninstall.exe ../win32_gui/ - CWD=`pwd` - cd ../win32_gui;../installer/mkarchive `find` - mv ../win32_gui/crnfiles.c ./files2.c +#files2.c: ../win32_gui/*.exe ../win32_gui/*.swf mkarchive uninstall.exe +# cp uninstall.exe ../win32_gui/ +# CWD=`pwd` +# cd ../win32_gui;../installer/mkarchive `find` +# mv ../win32_gui/crnfiles.c ./files2.c %.o: %.c $(CC) -c $< @@ -27,7 +27,7 @@ mkarchive: mkarchive.c gcc mkarchive.c -o mkarchive -lz crnfiles1.o: crnfiles1.c -crnfiles2.o: crnfiles2.c +#crnfiles2.o: crnfiles2.c #depack.o: depack.c depack.h Makefile # $(CC) -c depack.c -o depack.o diff --git a/installer/installer.c b/installer/installer.c index 85f91be9..58c77659 100644 --- a/installer/installer.c +++ b/installer/installer.c @@ -44,6 +44,7 @@ static char path_programfiles[MAX_PATH] = "\0"; static char pathBuf[MAX_PATH]; static int do_abort = 0; +static char* pdf2swf_dir; static char* pdf2swf_path; static char registry_path[1024]; @@ -557,7 +558,8 @@ static HRESULT (WINAPI *f_SHGetSpecialFolderPath)(HWND hwnd, LPTSTR lpszPath, in BOOL CALLBACK PropertySheetFunc4(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) { if(message == WM_INITDIALOG) { - pdf2swf_path = concatPaths(install_path, "pdf2swf_gui.exe"); + pdf2swf_dir = concatPaths(install_path, "gpdf2swf"); + pdf2swf_path = concatPaths(pdf2swf_dir, "gpdf2swf.exe"); FILE*fi = fopen(pdf2swf_path, "rb"); if(fi) { printf("a GUI program exists, creating desktop/startmenu links\n"); @@ -623,7 +625,7 @@ BOOL CALLBACK PropertySheetFunc4(HWND hwnd, UINT message, WPARAM wParam, LPARAM if(config_createDesktop && path_desktop[0]) { char* linkName = concatPaths(path_desktop, "pdf2swf.lnk"); printf("Creating desktop link %s -> %s\n", linkName, pdf2swf_path); - if(!CreateShortcut(pdf2swf_path, "pdf2swf", linkName, 0, 0, 0, install_path)) { + if(!CreateShortcut(pdf2swf_path, "pdf2swf", linkName, 0, 0, 0, pdf2swf_dir)) { MessageBox(0, "Couldn't create desktop shortcut", INSTALLER_NAME, MB_OK); return 1; } @@ -633,7 +635,7 @@ BOOL CALLBACK PropertySheetFunc4(HWND hwnd, UINT message, WPARAM wParam, LPARAM CreateDirectory(group, 0); addDir(group); char* linkName = concatPaths(group, "pdf2swf.lnk"); - if(!CreateShortcut(pdf2swf_path, "pdf2swf", concatPaths(group, "pdf2swf.lnk"), 0, 0, 0, install_path) || + if(!CreateShortcut(pdf2swf_path, "pdf2swf", concatPaths(group, "pdf2swf.lnk"), 0, 0, 0, pdf2swf_dir) || !CreateShortcut(uninstall_path, "uninstall", concatPaths(group, "uninstall.lnk"), 0, 0, 0, install_path)) { MessageBox(0, "Couldn't create start menu entry", INSTALLER_NAME, MB_OK); return 1; |