Opened 15 years ago

Closed 15 years ago

Last modified 15 years ago

#355 closed defect (invalid)

Can't make shp2pgsql-gui a plugin anymore under PgAdmin III

Reported by: robe Owned by: pramsey
Priority: medium Milestone: PostGIS 1.5.0
Component: postgis Version: master
Keywords: Cc:

Description

This works with the 1.4 install, but not the 1.5 install. I suspect its the removal of that commandline dialog or perhaps the trapping of the connection parameters.

In 1.4 — I can add this line to my plugins.ini in PgAdminIII

;
; POSTGIS SHP2PGSQL-GUI (Windows):
;
Title=PostGIS SHP2PGSQL-GUI Console
Command="$$PGBINDIR\postgisgui\shp2pgsql-gui.exe" --host "$$HOSTNAME" --port $$PORT --username "$$USERNAME" "$$DATABASE"
Description=Open a PostGIS ESRI Shapefile loader console to the current database.
KeyFile=$$PGBINDIR\postgisgui\shp2pgsql-gui.exe
Platform=windows
ServerType=postgresql
Database=Yes
SetPassword=Yes
;

But it doesn't pick up the db name, password and all that other cool stuff.

For 1.5 — nothing happens when I click the plugin item from PgAdminIII. I get absolutely nothing — no error or nothing

(note I have all the dependencies thrown into one folder so it doesn't get mixed up with other dlls and I can manually launch it works fine and I see Mark's shiny progress bar).

Change History (5)

comment:1 by pramsey, 15 years ago

For 1.5, I have added a 'shp2pgsql-pgadmin.exe' build target you can make, which omits the -mwindows and icon resources. see if that makes things work under PgAdmin. (I wonder if you'll get that ugly console thing — probably. Seems a bad tradeoff. I wonder why the pgadmin plugin code doesn't like the -mwindows version.)

For 1.4, the command-line addition hasn't been put in, that's why it's not picking up the plug-in options.

comment:2 by pramsey, 15 years ago

At r5048 I added support for the same commandline opts as are in trunk. I didn't put in any usage info, but they are

-W password
-p port
-d database
-h host
-U username

Please close this ticket if all is well.

comment:3 by robe, 15 years ago

It didn't build the PgAdmin target, I had to edit the makefile.in to add it to gui: was that your intention? or am I missing something.

And NO, that did not work. Now it gives a blank screen which quickly disappears if I launch from PgAdmin plugin menu.

comment:4 by robe, 15 years ago

Resolution: invalid
Status: newclosed

Nevermind I'm an idiot. Though I don't know if its worthwhile to make this idiot proof.

You can take out the pgAdmin one its not necessary the original gui works fine. I just had the wrong switches in my ini file because I was copying from the psql one assuming they worked the same. Though annoyed idiot user response "You should have given me some message that I'm an idiot, instead of a screen that doesn't come up." :)

So changing to the below fixed my issue

;
; POSTGIS SHP2PGSQL-GUI (Windows):
;
Title=PostGIS SHP2PGSQL-GUI Console
Command="$$PGBINDIR\postgisgui\shp2pgsql-gui.exe" -h "$$HOSTNAME" -p $$PORT -U "$$USERNAME" -d "$$DATABASE"
Description=Open a PostGIS ESRI Shapefile loader console to the current database.
KeyFile=$$PGBINDIR\postgisgui\shp2pgsql-gui.exe
Platform=windows
ServerType=postgresql
Database=Yes
SetPassword=Yes

comment:5 by pramsey, 15 years ago

Yay!, thanks for the update.

Note: See TracTickets for help on using tickets.