From ecde8f008d8c954e62be24945b06eb028ab5962b Mon Sep 17 00:00:00 2001 From: perry.werneck@gmail.com Date: Wed, 27 Feb 2013 01:04:31 +0000 Subject: [PATCH] Ajustes na DLL do HLLAPI --- po/pt_BR.po | 257 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++------------------------------------------------------------------------------------------------------------------------ pw3270.nsi.in | 10 +++++++--- src/plugins/remotectl/Makefile.in | 9 +++++++++ src/plugins/remotectl/calls.c | 62 ++++++++++++++++++++++++++++++++++++++++++++++++++++---------- src/pw3270/common/config.c | 6 +++--- src/pw3270/main.c | 10 +++++----- 6 files changed, 213 insertions(+), 141 deletions(-) diff --git a/po/pt_BR.po b/po/pt_BR.po index 58fd9b7..2e1028d 100644 --- a/po/pt_BR.po +++ b/po/pt_BR.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: pw3270 5.0\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2013-02-26 07:23-0300\n" +"POT-Creation-Date: 2013-02-26 19:13-0300\n" "PO-Revision-Date: 2013-02-25 14:46-0300\n" "Last-Translator: Perry Werneck \n" "Language-Team: Português <>\n" @@ -83,7 +83,7 @@ msgstr "%s: Familia %d é inválida" msgid "%s:%d" msgstr "%s:%d" -#: main.c:318 +#: main.c:330 msgid "- 3270 Emulator for Gtk" msgstr "- Emulador 3270 para GTK" @@ -164,7 +164,7 @@ msgstr "" msgid "SSL state is undefinedUnexpected SSL status %ld" msgstr "Estado do SSL é indefinidoEstado SSL inesperado %ld" -#: main.c:338 +#: main.c:350 msgid "" "Valid options:\n" "\n" @@ -200,7 +200,7 @@ msgstr "Sobre a segurança" msgid "Action failed" msgstr "Ação falhou" -#: ui/00default.xml:286 +#: ui/00default.xml:64 msgid "Add to copy" msgstr "Adicionar à cópia" @@ -208,7 +208,7 @@ msgstr "Adicionar à cópia" msgid "Add/Remove _CR at end of line" msgstr "Adicionar/Remover _CR no final da linha" -#: ui/00default.xml:354 +#: ui/00default.xml:132 msgid "Alert sound" msgstr "Aviso sonoro" @@ -217,11 +217,11 @@ msgid "An error occurred trying to allocate memory. This should never happen." msgstr "" "Ocorreu um erro ao tentar alocar memória. Isso nunca deveria acontecer." -#: main.c:302 main.c:304 +#: main.c:314 main.c:316 msgid "Application name" msgstr "Nome da aplicação" -#: ui/10keypad.xml:155 +#: ui/10keypad.xml:467 msgid "Attn" msgstr "Attn" @@ -238,7 +238,7 @@ msgstr "Authority and issuer serial number mismatch" msgid "Authority and subject key identifier mismatch" msgstr "Authority and subject key identifier mismatch" -#: ui/00default.xml:349 +#: ui/00default.xml:127 msgid "Auto-Reconnect" msgstr "Reconectar automaticamente" @@ -262,11 +262,11 @@ msgstr "Versão winsock inválida" msgid "Black" msgstr "Preto" -#: ui/00default.xml:347 +#: ui/00default.xml:125 msgid "Blank Fill" msgstr "Completar com espaços" -#: ui/00default.xml:340 +#: ui/00default.xml:118 msgid "Blinking Cursor" msgstr "Cursor piscante" @@ -274,7 +274,7 @@ msgstr "Cursor piscante" msgid "Blue" msgstr "Azul" -#: ui/00default.xml:350 +#: ui/00default.xml:128 msgid "Bold" msgstr "Negrito" @@ -282,7 +282,7 @@ msgstr "Negrito" msgid "Brazilian Public Software Portal" msgstr "Portal do Software Público Brasileiro" -#: ui/10keypad.xml:156 +#: ui/10keypad.xml:468 msgid "Break" msgstr "Break" @@ -474,7 +474,7 @@ msgstr "Tabela de tradução tem %d entradas, precisa de 256" msgid "Charset has more than 256 entries" msgstr "Tabela de tradução tem mais de 256 caracteres" -#: ui/10keypad.xml:147 +#: ui/00default.xml:79 msgid "Clear" msgstr "Limpar" @@ -486,7 +486,7 @@ msgstr "Tema de cores:" msgid "Color setup" msgstr "Configuração de cores" -#: ui/00default.xml:329 +#: ui/00default.xml:107 msgid "Colors" msgstr "Cores" @@ -494,7 +494,7 @@ msgstr "Cores" msgid "Complete" msgstr "Completo" -#: ui/00default.xml:339 +#: ui/00default.xml:117 msgid "Connect on startup" msgstr "Conectar ao iniciar" @@ -502,19 +502,19 @@ msgstr "Conectar ao iniciar" msgid "Connection reset by peer" msgstr "Conexão foi cancelada pelo servidor" -#: ui/00default.xml:283 +#: ui/00default.xml:61 msgid "Copy" msgstr "Copiar" -#: ui/99debug.xml:200 +#: ui/99debug.xml:566 msgid "Copy as HTML" msgstr "Copiar como HTML" -#: ui/00default.xml:284 +#: ui/00default.xml:62 msgid "Copy as table" msgstr "Copiar como tabela" -#: colors.c:418 ui/00default.xml:346 +#: colors.c:418 ui/00default.xml:124 msgid "Cross hair cursor" msgstr "Cursor mira" @@ -527,7 +527,7 @@ msgstr "Atual (%s)" msgid "Custom colors" msgstr "Cores personalizadas" -#: ui/00default.xml:287 +#: ui/00default.xml:65 msgid "Cut" msgstr "Recortar" @@ -539,7 +539,7 @@ msgstr "Cilindros" msgid "DFT B_uffer size:" msgstr "Tamanho do b_uffer DFT:" -#: ui/99debug.xml:205 +#: ui/99debug.xml:571 msgid "DS Trace" msgstr "DS Trace" @@ -555,11 +555,11 @@ msgstr "Verde Escuro" msgid "Data conversion error" msgstr "Erro na conversão de dados" -#: ui/99debug.xml:213 +#: ui/99debug.xml:579 msgid "Debug" msgstr "Depuração" -#: ui/99debug.xml:215 +#: ui/99debug.xml:581 msgid "Debug window updates" msgstr "Mostrar atualizações de janela" @@ -567,7 +567,7 @@ msgstr "Mostrar atualizações de janela" msgid "Default" msgstr "Padrão" -#: ui/00default.xml:303 +#: ui/00default.xml:81 msgid "Delete field" msgstr "Apagar campo" @@ -599,7 +599,7 @@ msgstr "Nome do servidor em branco" msgid "Empty port name" msgstr "Porta em branco" -#: ui/10keypad.xml:151 +#: ui/10keypad.xml:463 msgid "" "Erase\n" "EOF" @@ -607,7 +607,7 @@ msgstr "" "Apagar\n" "Campo" -#: ui/10keypad.xml:152 +#: ui/10keypad.xml:464 msgid "" "Erase\n" "Input" @@ -615,15 +615,15 @@ msgstr "" "Apagar\n" "Campos" -#: ui/00default.xml:302 +#: ui/00default.xml:80 msgid "Erase input" msgstr "Apagar campos" -#: ui/00default.xml:304 +#: ui/00default.xml:82 msgid "Erase to end of field" msgstr "Apagar até o final do campo" -#: ui/00default.xml:305 +#: ui/00default.xml:83 msgid "Erase to end of line" msgstr "Apagar até o final da linha" @@ -666,7 +666,7 @@ msgstr "Erro lendo %s" msgid "Error resolving %s: %s" msgstr "Erro ao resolver %s: %s" -#: ui/99debug.xml:207 +#: ui/99debug.xml:573 msgid "Event Trace" msgstr "Trace de eventos" @@ -714,15 +714,15 @@ msgstr "Format error in certificate's notAfter field" msgid "Format error in certificate's notBefore field" msgstr "Format error in certificate's notBefore field" -#: ui/00default.xml:343 +#: ui/00default.xml:121 msgid "Full Screen" msgstr "Tela cheia" -#: ui/10functions.xml:35 +#: ui/10functions.xml:347 msgid "Function bar" msgstr "Barra de funções" -#: main.c:90 main.c:379 +#: main.c:90 main.c:391 msgid "GTK Version mismatch" msgstr "Divergência de versão GTK" @@ -763,7 +763,7 @@ msgstr "HTTP Proxy: EOF inesperado" msgid "HTTP Proxy: unrecognized reply" msgstr "HTTP Proxy: Resposta desconhecida" -#: ui/00default.xml:364 +#: ui/00default.xml:142 msgid "Help" msgstr "Ajuda" @@ -791,11 +791,11 @@ msgstr "Servidor rejeitou o tipo de dispositivo ou requisição" msgid "Host rejected resource(s)" msgstr "Servidor rejeitou recurso(s)" -#: main.c:310 +#: main.c:322 msgid "Host system type" msgstr "Tipo do sistema no servidor" -#: main.c:308 +#: main.c:320 msgid "Host to connect" msgstr "Servidor a conectar" @@ -824,7 +824,7 @@ msgstr "Comprimento de frame inválido" msgid "Informations" msgstr "Informações" -#: ui/00default.xml:359 +#: ui/00default.xml:137 msgid "Input method" msgstr "Método de entrada" @@ -871,7 +871,7 @@ msgstr "Sintaxe de proxy inválida" msgid "Invalid proxy type '%.*s'" msgstr "Tipo de proxy invalido '%.*s'" -#: ui/00default.xml:352 +#: ui/00default.xml:130 msgid "Keep selected" msgstr "Manter selecionado" @@ -887,7 +887,7 @@ msgstr "Teclado está bloqueado" msgid "LRECL:" msgstr "LRECL:" -#: ui/10keypad.xml:101 +#: ui/10keypad.xml:413 msgid "Lateral keypad" msgstr "Barra lateral" @@ -904,7 +904,7 @@ msgstr "Faltando ']'" msgid "Model %d (%s)" msgstr "Modelo %d (%s)" -#: ui/00default.xml:341 +#: ui/00default.xml:119 msgid "Monocase" msgstr "Só Maiúsculas" @@ -940,7 +940,7 @@ msgstr "Erro de rede" msgid "Network startup error" msgstr "Erro ao iniciar a rede" -#: ui/00default.xml:411 +#: ui/00default.xml:189 msgid "Next field" msgstr "Próximo campo" @@ -1017,115 +1017,115 @@ msgstr "Other (VM/CMS)" msgid "Out of memory" msgstr "Out of memory" -#: ui/10keypad.xml:138 +#: ui/10keypad.xml:450 msgid "PA1" msgstr "PA1" -#: ui/10keypad.xml:139 +#: ui/10keypad.xml:451 msgid "PA2" msgstr "PA2" -#: ui/10keypad.xml:140 +#: ui/10keypad.xml:452 msgid "PA3" msgstr "PA3" -#: ui/10functions.xml:36 +#: ui/10functions.xml:348 msgid "PF1" msgstr "PF1" -#: ui/10functions.xml:45 +#: ui/10functions.xml:357 msgid "PF10" msgstr "PF10" -#: ui/10functions.xml:46 +#: ui/10functions.xml:358 msgid "PF11" msgstr "PF11" -#: ui/10functions.xml:47 +#: ui/10functions.xml:359 msgid "PF12" msgstr "PF12" -#: ui/10functions.xml:50 +#: ui/10functions.xml:362 msgid "PF13" msgstr "PF13" -#: ui/10functions.xml:51 +#: ui/10functions.xml:363 msgid "PF14" msgstr "PF14" -#: ui/10functions.xml:52 +#: ui/10functions.xml:364 msgid "PF15" msgstr "PF15" -#: ui/10functions.xml:53 +#: ui/10functions.xml:365 msgid "PF16" msgstr "PF16" -#: ui/10functions.xml:54 +#: ui/10functions.xml:366 msgid "PF17" msgstr "PF17" -#: ui/10functions.xml:55 +#: ui/10functions.xml:367 msgid "PF18" msgstr "PF18" -#: ui/10functions.xml:56 +#: ui/10functions.xml:368 msgid "PF19" msgstr "PF19" -#: ui/10functions.xml:37 +#: ui/10functions.xml:349 msgid "PF2" msgstr "PF2" -#: ui/10functions.xml:57 +#: ui/10functions.xml:369 msgid "PF20" msgstr "PF20" -#: ui/10functions.xml:58 +#: ui/10functions.xml:370 msgid "PF21" msgstr "PF21" -#: ui/10functions.xml:59 +#: ui/10functions.xml:371 msgid "PF22" msgstr "PF22" -#: ui/10functions.xml:60 +#: ui/10functions.xml:372 msgid "PF23" msgstr "PF23" -#: ui/10functions.xml:61 +#: ui/10functions.xml:373 msgid "PF24" msgstr "PF24" -#: ui/10functions.xml:38 +#: ui/10functions.xml:350 msgid "PF3" msgstr "PF3" -#: ui/10functions.xml:39 +#: ui/10functions.xml:351 msgid "PF4" msgstr "PF4" -#: ui/10functions.xml:40 +#: ui/10functions.xml:352 msgid "PF5" msgstr "PF5" -#: ui/10functions.xml:41 +#: ui/10functions.xml:353 msgid "PF6" msgstr "PF6" -#: ui/10functions.xml:42 +#: ui/10functions.xml:354 msgid "PF7" msgstr "PF7" -#: ui/10functions.xml:43 +#: ui/10functions.xml:355 msgid "PF8" msgstr "PF8" -#: ui/10functions.xml:44 +#: ui/10functions.xml:356 msgid "PF9" msgstr "PF9" -#: main.c:336 +#: main.c:348 msgid "Parse error" msgstr "Erro de interpretação" @@ -1138,15 +1138,15 @@ msgstr "Erro de interpretação em %s" msgid "Passthru Proxy: send error" msgstr "Passthru Proxy: Erro ao enviar" -#: ui/00default.xml:288 +#: ui/00default.xml:66 msgid "Paste" msgstr "Colar" -#: ui/00default.xml:289 +#: ui/00default.xml:67 msgid "Paste next" msgstr "Colar próximo" -#: ui/00default.xml:292 +#: ui/00default.xml:70 msgid "Paste text file" msgstr "Colar arquivo texto" @@ -1154,7 +1154,7 @@ msgstr "Colar arquivo texto" msgid "Paste text file contents" msgstr "Colar conteúdo de arquivo texto" -#: ui/00default.xml:345 +#: ui/00default.xml:123 msgid "Paste with left margin" msgstr "Colar com margem esquerda" @@ -1162,7 +1162,7 @@ msgstr "Colar com margem esquerda" msgid "Path length constraint exceeded" msgstr "Path length constraint exceeded" -#: main.c:305 +#: main.c:317 msgid "Path to application data files" msgstr "Path to application data files" @@ -1170,7 +1170,7 @@ msgstr "Path to application data files" msgid "Pink" msgstr "Rosa" -#: ui/00default.xml:410 +#: ui/00default.xml:188 msgid "Previous field" msgstr "Campo anterior" @@ -1178,11 +1178,11 @@ msgstr "Campo anterior" msgid "Primary space:" msgstr "Primary space:" -#: ui/00default.xml:271 +#: ui/00default.xml:49 msgid "Print" msgstr "Imprimir" -#: ui/00default.xml:273 +#: ui/00default.xml:51 msgid "Print copy" msgstr "Imprimir cópia" @@ -1190,7 +1190,7 @@ msgstr "Imprimir cópia" msgid "Print operation failed" msgstr "Operação de impressão falhou" -#: ui/00default.xml:272 +#: ui/00default.xml:50 msgid "Print selected" msgstr "Imprimir seleção" @@ -1198,7 +1198,7 @@ msgstr "Imprimir seleção" msgid "Print selection box" msgstr "Imprimir marca de seleção" -#: print.c:743 ui/00default.xml:330 +#: print.c:743 ui/00default.xml:108 msgid "Print settings" msgstr "Configurações de impressão" @@ -1286,7 +1286,7 @@ msgstr "RPQ: can't resolve '%s': %s" msgid "RPQ: gethostbyname error" msgstr "RPQ: Erro em gethostbyname" -#: ui/00default.xml:276 +#: ui/00default.xml:54 msgid "Receive file" msgstr "Receber arquivo" @@ -1302,27 +1302,27 @@ msgstr "Formato de registro" msgid "Red" msgstr "Vermelho" -#: ui/99debug.xml:214 +#: ui/99debug.xml:580 msgid "Reload buffer contents" msgstr "Recarregar conteúdo do buffer" -#: ui/00default.xml:297 +#: ui/00default.xml:75 msgid "Remove selection" msgstr "Remover seleção" -#: ui/00default.xml:298 +#: ui/00default.xml:76 msgid "Reselect" msgstr "Reselecionar" -#: ui/10keypad.xml:148 +#: ui/10keypad.xml:460 msgid "Reset" msgstr "Reset" -#: ui/00default.xml:344 +#: ui/00default.xml:122 msgid "Resize on alternate screen" msgstr "Mudar tamanho do terminal em tela alternativa" -#: ui/00default.xml:412 +#: ui/00default.xml:190 msgid "Return" msgstr "Return" @@ -1483,7 +1483,7 @@ msgstr "" "SSL_write:\n" "%s" -#: ui/00default.xml:268 +#: ui/00default.xml:46 msgid "Save copy" msgstr "Salvar cópia" @@ -1491,7 +1491,7 @@ msgstr "Salvar cópia" msgid "Save copy to file" msgstr "Salvar cópia para arquivo" -#: ui/00default.xml:266 +#: ui/00default.xml:44 msgid "Save screen" msgstr "Salvar tela" @@ -1499,7 +1499,7 @@ msgstr "Salvar tela" msgid "Save screen to file" msgstr "Salvar tela para arquivo" -#: ui/00default.xml:267 +#: ui/00default.xml:45 msgid "Save selected" msgstr "Salvar seleção" @@ -1507,15 +1507,20 @@ msgstr "Salvar seleção" msgid "Save selection to file" msgstr "Salvar seleção para arquivo" -#: ui/99debug.xml:206 +#: ui/99debug.xml:572 msgid "Screen Trace" msgstr "Trace de tela" -#: ui/00default.xml:336 +#: ui/00default.xml:114 msgid "Screen size" msgstr "Tamanho da tela" -#: ui/00default.xml:311 +#: ui/09scripts.xml:297 +#, fuzzy +msgid "Script" +msgstr "Scripts" + +#: ui/00default.xml:89 msgid "Scripts" msgstr "Scripts" @@ -1527,15 +1532,15 @@ msgstr "Secondary space:" msgid "Secure connection was successful." msgstr "Conexão segura efetuada com sucesso." -#: ui/00default.xml:296 +#: ui/00default.xml:74 msgid "Select Field" msgstr "Selecionar campo" -#: ui/00default.xml:295 +#: ui/00default.xml:73 msgid "Select all" msgstr "Selecionar tudo" -#: ui/00default.xml:348 +#: ui/00default.xml:126 msgid "Select by rectangles" msgstr "Seleção retangular" @@ -1547,7 +1552,7 @@ msgstr "Selecione arquivo a receber" msgid "Select file to send" msgstr "Selecione arquivo a enviar" -#: ui/00default.xml:333 +#: ui/00default.xml:111 msgid "Select font" msgstr "Selecione fonte" @@ -1571,7 +1576,7 @@ msgstr "Self signed certificate" msgid "Self signed certificate in certificate chain" msgstr "Self signed certificate in certificate chain" -#: ui/00default.xml:277 +#: ui/00default.xml:55 msgid "Send file" msgstr "Enviar arquivo" @@ -1579,39 +1584,39 @@ msgstr "Enviar arquivo" msgid "Send file to host" msgstr "Enviar arquivo para o servidor" -#: main.c:312 +#: main.c:324 msgid "Send messages to syslog" msgstr "Send messages to syslog" -#: ui/00default.xml:276 +#: ui/00default.xml:54 msgid "Send/Receive" msgstr "Enviar/Receber" -#: main.c:307 +#: main.c:319 msgid "Session name" msgstr "Nome da sessão" -#: ui/00default.xml:314 +#: ui/00default.xml:92 msgid "Set hostname" msgstr "Selecione servidor" -#: main.c:309 +#: main.c:321 msgid "Set reported colors (8/16)" msgstr "Define número de cores informadas (8/16)" -#: ui/00default.xml:329 +#: ui/00default.xml:107 msgid "Settings" msgstr "Configurações" -#: ui/00default.xml:351 +#: ui/00default.xml:129 msgid "Show Underline" msgstr "Mostrar sublinhado" -#: ui/99debug.xml:213 +#: ui/99debug.xml:579 msgid "Show test pattern" msgstr "Mostrar padrão de teste" -#: ui/00default.xml:353 +#: ui/00default.xml:131 msgid "Smart paste" msgstr "Colar inteligente" @@ -1659,6 +1664,18 @@ msgstr "T_otal" msgid "Terminal colors" msgstr "Cores do terminal" +#: ui/09scripts.xml:298 +msgid "Teste01" +msgstr "Teste01" + +#: ui/09scripts.xml:302 +msgid "Teste02" +msgstr "Teste02" + +#: ui/09scripts.xml:306 +msgid "Teste03" +msgstr "Teste03" + #: host.c:216 msgid "Text before '['" msgstr "Texto antes de '['" @@ -1874,7 +1891,7 @@ msgstr "" "programa; se não, escreva para a Free Software Foundation, Inc., 59 Temple " "Place, Suite 330, Boston, MA, 02111-1307, USA" -#: main.c:375 +#: main.c:387 #, c-format msgid "This program requires GTK version %d.%d.%d" msgstr "Este programa precisa do GTK versão %d.%d.%d" @@ -1885,15 +1902,15 @@ msgid "" "This version of %s was built without support for secure sockets layer (SSL)." msgstr "Esta versão do %s foi gerada sem suporte para conexões seguras (SSL)." -#: ui/00default.xml:370 +#: ui/00default.xml:148 msgid "Toolbar" msgstr "Barra de ferramentas" -#: ui/99debug.xml:205 +#: ui/99debug.xml:571 msgid "Trace" msgstr "Trace" -#: ui/00default.xml:342 +#: ui/00default.xml:120 msgid "Track Cursor" msgstr "Mostrar posição do cursor" @@ -2100,7 +2117,7 @@ msgstr "Unsupported passthru host session" msgid "Unsupported socks 4 proxy" msgstr "Unsupported socks 4 proxy" -#: ui/00default.xml:355 +#: ui/00default.xml:133 msgid "Use +/- for field navigation" msgstr "Usar teclas +/- para navegar por campos" @@ -2113,7 +2130,7 @@ msgstr "Variável" msgid "Version %s - Revision %s" msgstr "Versão %s - Revisão %s" -#: ui/99debug.xml:208 +#: ui/99debug.xml:574 msgid "View Field Delimiters" msgstr "Mostrar delimitadores de campo" @@ -2141,7 +2158,7 @@ msgstr "Europa ocidental (ISO 8859-1)" msgid "White" msgstr "Branco" -#: ui/00default.xml:381 +#: ui/00default.xml:159 msgid "Window" msgstr "Janela" @@ -2209,19 +2226,19 @@ msgstr "_Procurar" msgid "_Color table:" msgstr "Tabela de cores:" -#: ui/00default.xml:324 +#: ui/00default.xml:102 msgid "_Connect" msgstr "_Conectar" -#: ui/00default.xml:325 +#: ui/00default.xml:103 msgid "_Disconnect" msgstr "_Desconectar" -#: ui/99debug.xml:200 +#: ui/00default.xml:61 msgid "_Edit" msgstr "_Editar" -#: ui/00default.xml:258 +#: ui/00default.xml:36 msgid "_File" msgstr "_Arquivo" @@ -2249,11 +2266,11 @@ msgstr "Nome do _Host:" msgid "_Local file name:" msgstr "Arquivo _local:" -#: ui/00default.xml:314 +#: ui/00default.xml:92 msgid "_Network" msgstr "_Rede" -#: ui/00default.xml:339 +#: ui/00default.xml:117 msgid "_Options" msgstr "_Opções" @@ -2281,7 +2298,7 @@ msgstr "Arquivo _texto" msgid "_To" msgstr "_Para" -#: ui/00default.xml:309 +#: ui/00default.xml:87 msgid "_View" msgstr "_Exibir" diff --git a/pw3270.nsi.in b/pw3270.nsi.in index 05c466b..33c5400 100644 --- a/pw3270.nsi.in +++ b/pw3270.nsi.in @@ -14,7 +14,7 @@ installDir $PROGRAMFILES\@PACKAGE@ icon "src\pw3270\@PACKAGE@.ico" # Get installation folder from registry if available -InstallDirRegKey HKLM "Software\@PACKAGE@" "datadir" +InstallDirRegKey HKLM "Software\@PACKAGE@" "InstallLocation" RequestExecutionLevel admin @@ -80,6 +80,10 @@ SubSection "@PACKAGE@" SecMain # Locale files CreateDirectory "$INSTDIR\@localedir@\pt_BR\LC_MESSAGES" file "/oname=$INSTDIR\@localedir@\pt_BR\LC_MESSAGES\@PACKAGE@.mo" ".bin\Release\@localedir@\pt_BR\LC_MESSAGES\@PACKAGE@.mo" + + # Save DataDir + WriteRegStr HKLM "Software\@PACKAGE@" \ + "datadir" $INSTDIR # define uninstaller name writeUninstaller $INSTDIR\uninstall.exe @@ -91,7 +95,6 @@ SubSection "@PACKAGE@" SecMain WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\@PACKAGE@" \ "DisplayVersion" "@PACKAGE_VERSION@ (Rev: @PACKAGE_REVISION@)" - WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\@PACKAGE@" \ "UninstallString" "$INSTDIR\uninstall.exe" WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\@PACKAGE@" \ @@ -105,7 +108,7 @@ SubSection "@PACKAGE@" SecMain WriteRegStr HKCU "Software\@PACKAGE@" "" $INSTDIR # Main library - file "/oname=$SYSDIR\lib3270.dll.@PACKAGE_VERSION@" ".bin\Release\lib3270.dll.@PACKAGE_VERSION@" + file "/oname=$SYSDIR\lib3270.dll.@PACKAGE_VERSION@" ".bin\Release\lib3270.dll.@PACKAGE_VERSION@" file "/oname=$SYSDIR\libpw3270.dll.@PACKAGE_VERSION@" ".bin\Release\libpw3270.dll.@PACKAGE_VERSION@" sectionEnd @@ -196,6 +199,7 @@ section "Uninstall" # Remove registry DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\@PACKAGE@" + DeleteRegKey HKLM "Software\@PACKAGE@" # Delete System libraries delete $SYSDIR\lib3270.dll.@PACKAGE_VERSION@ diff --git a/src/plugins/remotectl/Makefile.in b/src/plugins/remotectl/Makefile.in index cf8a55e..f7966ab 100644 --- a/src/plugins/remotectl/Makefile.in +++ b/src/plugins/remotectl/Makefile.in @@ -133,6 +133,15 @@ testprogram@EXEEXT@: testprogram.c test: testprogram@EXEEXT@ @PATH="../../../$(BINDIR)/Debug:$(PATH)" ./testprogram@EXEEXT@ + +install: $(BINRLS)/plugins/$(MODULE_NAME)@DLLEXT@ + @$(MKDIR) $(DESTDIR)$(libdir)/$(PACKAGE_NAME)-plugins + @$(INSTALL_PROGRAM) $(BINRLS)/plugins/$(MODULE_NAME)@DLLEXT@ $(DESTDIR)$(libdir)/$(PACKAGE_NAME)-plugins + +$(DEBDIR)/$(MODULE_NAME).install: Makefile + @$(MKDIR) `dirname $@` + @rm -f $@ + @echo $(libdir)/$(PACKAGE_NAME)-plugins/$(MODULE_NAME)@DLLEXT@ > $@ clean: @rm -fr $(OBJDIR) diff --git a/src/plugins/remotectl/calls.c b/src/plugins/remotectl/calls.c index 6a51ddf..b664bc9 100644 --- a/src/plugins/remotectl/calls.c +++ b/src/plugins/remotectl/calls.c @@ -83,8 +83,18 @@ }; #undef trace -#define trace(...) { FILE *__dbg = fopen("c:\\users\\perry\\debug.txt","a"); fprintf(__dbg,__VA_ARGS__); fclose(__dbg); } - + +#ifdef DEBUG + #define trace(...) { FILE *__dbg = fopen("c:\\users\\perry\\debug.txt","a"); if(__dbg) { fprintf(__dbg,__VA_ARGS__); fclose(__dbg); }; } +#else + #define trace(...) /* */ +#endif // DEBUG + +#ifndef LOAD_LIBRARY_SEARCH_DEFAULT_DIRS + // http://msdn.microsoft.com/en-us/library/windows/desktop/ms684179(v=vs.85).aspx + #define LOAD_LIBRARY_SEARCH_DEFAULT_DIRS 0x00001000 +#endif // LOAD_LIBRARY_SEARCH_DEFAULT_DIRS + /*--[ Implement ]------------------------------------------------------------------------------------*/ __declspec (dllexport) DWORD __stdcall hllapi_init(LPSTR mode) @@ -95,26 +105,58 @@ if(hModule) return EBUSY; - if(!*mode) + if(!(mode && *mode)) { // Direct mode, load lib3270.dll, get pointers to the calls - int f; + int f; + HKEY hKey = 0; + HMODULE kernel = LoadLibrary("kernel32.dll"); + HANDLE cookie = NULL; + DWORD rc; + HANDLE (*AddDllDirectory)(PCWSTR NewDirectory) = (HANDLE (*)(PCWSTR)) GetProcAddress(kernel,"AddDllDirectory"); + BOOL (*RemoveDllDirectory)(HANDLE Cookie) = (BOOL (*)(HANDLE)) GetProcAddress(kernel,"RemoveDllDirectory"); -#ifdef DEBUG // Notify user in case of error loading protocol DLL - SetErrorMode(0); -#endif // DEBUG + UINT errorMode = SetErrorMode(0); - hModule = LoadLibrary("lib3270.dll"); - trace("hModule=%p\n",hModule); + if(RegOpenKeyEx(HKEY_LOCAL_MACHINE,"Software\\pw3270",0,KEY_QUERY_VALUE,&hKey) == ERROR_SUCCESS) + { + char data[4096]; + unsigned long datalen = sizeof(data); // data field length(in), data returned length(out) + unsigned long datatype; // #defined in winnt.h (predefined types 0-11) + if(RegQueryValueExA(hKey,"datadir",NULL,&datatype,(LPBYTE) data,&datalen) == ERROR_SUCCESS) + { + // Datadir is set, add it to DLL load path + wchar_t path[4096]; + mbstowcs(path, data, 4095); + trace("Datadir=[%s] AddDllDirectory=%p RemoveDllDirectory=%p\n",data,AddDllDirectory,RemoveDllDirectory); + if(AddDllDirectory) + cookie = AddDllDirectory(path); + } + RegCloseKey(hKey); + } + + hModule = LoadLibraryEx("lib3270.dll.5.0",NULL,LOAD_LIBRARY_SEARCH_DEFAULT_DIRS); + rc = GetLastError(); + + SetErrorMode(errorMode); + + if(cookie && RemoveDllDirectory) + RemoveDllDirectory(cookie); + + if(kernel) + FreeLibrary(kernel); if(!hModule) - return GetLastError(); + return rc; // Get library entry pointers for(f=0;entry_point[f].name;f++) { void *ptr = (void *) GetProcAddress(hModule,entry_point[f].name); + + trace("%d %s=%p\n",f,entry_point[f].name,ptr); + if(!ptr) { fprintf(stderr,"Can´t load \"%s\"\n",entry_point[f].name); diff --git a/src/pw3270/common/config.c b/src/pw3270/common/config.c index 3e62890..d93ebaa 100644 --- a/src/pw3270/common/config.c +++ b/src/pw3270/common/config.c @@ -579,14 +579,14 @@ gchar * filename_from_va(const gchar *first_element, va_list args) for(p=0;p