]> granicus.if.org Git - postgis/commitdiff
Add in icon and resource information for Win32 GUI
authorPaul Ramsey <pramsey@cleverelephant.ca>
Fri, 18 Dec 2009 06:39:48 +0000 (06:39 +0000)
committerPaul Ramsey <pramsey@cleverelephant.ca>
Fri, 18 Dec 2009 06:39:48 +0000 (06:39 +0000)
git-svn-id: http://svn.osgeo.org/postgis/trunk@5024 b70326c6-7e19-0410-871a-916f4a2858ee

configure.ac
loader/Makefile.in
loader/shp2pgsql-gui.ico [new file with mode: 0644]
loader/shp2pgsql-gui.rc [new file with mode: 0644]

index 02350fc783770b22f4862aa16c326cd804ac0a5a..77f5860e4c05e287089fafaf95719d1b111f582c 100644 (file)
@@ -569,7 +569,9 @@ if test "x$GUI" = "xyes"; then
        dnl Add -mwindows to MinGW GUI build
        case $host in
                *mingw32*)
-                       GTK_WIN32="-mwindows"
+                       GTK_WIN32_FLAGS=-mwindows
+                       GTK_WIN32_RES=shp2pgsql-gui.res
+                        GTK_WIN32_BUILD=gui-win32
                        ;;
        esac
 fi
@@ -578,7 +580,8 @@ fi
 
 AC_SUBST([GTK_CFLAGS])
 AC_SUBST([GTK_LIBS])
-AC_SUBST([GTK_WIN32])
+AC_SUBST([GTK_WIN32_FLAGS])
+AC_SUBST([GTK_WIN32_RES])
 AC_SUBST([GTK_BUILD])
 
 
index deb51faed175e477bc6aba17a8103df78c914554..642f0093151f2778a2bf3a36d2888fd63b7962c8 100644 (file)
@@ -44,7 +44,8 @@ LIBLWGEOM=../liblwgeom/liblwgeom.a
 # GTK includes and libraries
 GTK_CFLAGS = @GTK_CFLAGS@
 GTK_LIBS = @GTK_LIBS@
-GTK_WIN32 = @GTK_WIN32@
+GTK_WIN32_FLAGS = @GTK_WIN32_FLAGS@
+GTK_WIN32_RES = @GTK_WIN32_RES@
 
 # If REGRESS=1 passed as a parameter, change the default install paths
 # so that no prefix is included. This allows us to relocate to a temporary
@@ -59,7 +60,10 @@ endif
 # The real parts of the Makefile
 all: $(SHP2PGSQL-CLI) $(PGSQL2SHP) @GTK_BUILD@
 
-gui: $(SHP2PGSQL-GUI) $(SHP2PGSQL-CLI)
+gui: $(SHP2PGSQL-GUI) $(SHP2PGSQL-CLI) @GTK_WIN32_RES@
+
+shp2pgsql-gui.res: shp2pgsql-gui.rc shp2pgsql-gui.ico
+       windres $< -O coff -o $@
 
 # liblwgeom.a dependency to allow "make install" in 
 # the loader/ subdirectory to work  
@@ -81,8 +85,8 @@ $(SHP2PGSQL-CLI): stringbuffer.o shpopen.o dbfopen.o shp2pgsql-core.o shp2pgsql-
 shp2pgsql-gui.o: shp2pgsql-gui.c
        $(CC) $(CFLAGS) $(PGSQL_FE_CPPFLAGS) $(GTK_CFLAGS) -o $@ -c shp2pgsql-gui.c
 
-$(SHP2PGSQL-GUI): stringbuffer.o shpopen.o dbfopen.o shp2pgsql-core.o shp2pgsql-gui.o $(LIBLWGEOM) 
-       $(CC) $(CFLAGS) $(GTK_WIN32) $^ -o $@ $(GTK_LIBS) $(ICONV_LDFLAGS) $(PGSQL_FE_LDFLAGS) -lm 
+$(SHP2PGSQL-GUI): stringbuffer.o shpopen.o dbfopen.o shp2pgsql-core.o shp2pgsql-gui.o $(LIBLWGEOM) $(GTK_WIN32_RES)
+       $(CC) $(CFLAGS) $(GTK_WIN32_FLAGS) $^ -o $@ $(GTK_LIBS) $(ICONV_LDFLAGS) $(PGSQL_FE_LDFLAGS) -lm 
 
 install: all
        @mkdir -p $(DESTDIR)$(bindir)
@@ -94,5 +98,5 @@ uninstall:
        @rm -f $(DESTDIR)$(bindir)/$(SHP2PGSQL-CLI)
 
 clean:
-       @rm -f *.o $(SHP2PGSQL-CLI) $(PGSQL2SHP) 
+       @rm -f *.o $(SHP2PGSQL-CLI) $(PGSQL2SHP) $(GTK_WIN32_RES)
 
diff --git a/loader/shp2pgsql-gui.ico b/loader/shp2pgsql-gui.ico
new file mode 100644 (file)
index 0000000..2155018
Binary files /dev/null and b/loader/shp2pgsql-gui.ico differ
diff --git a/loader/shp2pgsql-gui.rc b/loader/shp2pgsql-gui.rc
new file mode 100644 (file)
index 0000000..5a768a0
--- /dev/null
@@ -0,0 +1,25 @@
+id ICON "shp2pgsql-gui.ico"\r
+1 VERSIONINFO\r
+FILEVERSION     1,0,0,0\r
+PRODUCTVERSION  1,0,0,0\r
+BEGIN\r
+  BLOCK "StringFileInfo"\r
+  BEGIN\r
+    BLOCK "040904E4"\r
+    BEGIN\r
+      VALUE "CompanyName", "Open Source Geospatial Consortium"\r
+      VALUE "FileDescription", "Shape to PostGIS Converter"\r
+      VALUE "FileVersion", "1.0"\r
+      VALUE "InternalName", "shp2pgsql-gui"\r
+      VALUE "LegalCopyright", "Copyright (c) OSGeo"\r
+      VALUE "OriginalFilename", "shp2pgsql-gui.exe"\r
+      VALUE "ProductName", "Shp2PgSQL-GUI"\r
+      VALUE "ProductVersion", "1.0"\r
+    END\r
+  END\r
+\r
+  BLOCK "VarFileInfo"\r
+  BEGIN\r
+    VALUE "Translation", 0x409, 1252\r
+  END\r
+END\r