Noble colega Claudio,
Yo ya resolví el problema de tratar los argumentos de los switches en orden aleatorio en el Build.bat.
Funciona PERFECTAMENTE en todos los ordenes, sea en console como GUI con uno, dos y tres switches sin algun problema.
Por lo tanto poderíamos utilizarlo en el nuevo release, si te parece adecuado. Fué relativamente fácil de resolver, le agregué uno nuevo LABEL llamado de CHECKPARAMS.
Solo que me encontré con un otro problema.
Yo leí este mensaje de Roberto en el fórum:
viewtopic.php?p=16796#p16796
Me parece muy bien la medida adoptada pero ahora analisando las sintaxis que siempre aprareció en el Build.bat sobre
hbmk2 params, no me funciona...
build [ /n ] [ /d ] [ /c ] <program.prg> | <project.hbp> [<hbmk2 params>]
No sé si estoy haciendo algo errado, porque hago asi en la linea de comando:
C:\hmg.3.4.3\Build.bat /c demo.hbp -run -runflag="Param1"
Pero me dá este error:
- Screen21.png (16.91 KiB) Viewed 8030 times
Como puedes ver, eses parametros el Build.bat los interpreta como si fueran bibliotecas o módulos PRGs y no como
hbmk2 params
Algo está mal: la sintaxis del Build.bat o yo estoy haciendo algo errado.
Esto funciona en Harbour, pero no con el Build.bat. Eses parametros que son do hbmk2 son para atender a
esta mi necesidad.
Los argumentos
%1 %2 %3 %4 %5 %6 %7 %8 que preceden a
%debug% -q (en la linea donde está el HBMK2 del Build.bat) parece que no los accepta...
Yo hice una prueba con esta sintaxis:
SET PARAMS="Param1 Param2 Param3"
HBMK2 -mt -run -runflag="%PARAMS%" -o"%~n1" %HMGPATH%\hmg32.hbc %gtdrivers% %debug% -q %1 %2 %3 %4 %5 %6 %7 %8 >hbmk.log 2>&1
Asi de esta forma me dá re-bien. Y ya tengo una solución para compilar y ejecutar la aplicacion pasandole parametros.
Aquí en adjunto para su evaluación:
- Build_bat.rar
- Build.bat (fixed with spaces in param)
- (1.94 KiB) Downloaded 390 times
Aquí también el ejemplo para tus pruebas:
- IDE_Param.rar
- Source files for building
- (41.42 KiB) Downloaded 356 times
Un abrazo
--- Google translated ---
Noble colleague Claudio,
I already solved the problem of handling the arguments of the switches in random order in the Build.bat.
It works PERFECTLY on all orders, either console or GUI with one, two and three switches without any problems.
Therefore we could use it in the new release, if it seems appropriate. It was relatively easy to solve, I added a new LABEL called CHECKPARAMS.
The only thing that I ran into another problem.
I read this message from Roberto in the forum:
viewtopic.php?p=16796#p16796
It seems fine to me the measure adopted but now analyzing the syntax I always endorsed in the Build.bat on [b hbmk2 params[/b], it does not work...
build [/n] [/d] [/c] <program.prg> | <Project.hbp> [<hbmk2 params>]
I do not know if I'm doing something wrong, because I do so in the command line:
C:\hmg.3.4.3\Build.bat /c demo.hbp -run -runflag="Param1"
But he gives me this error:
As you can see, these parameters Build.bat interprets as if they were libraries or PRGs modules and not as
hbmk2 params
Something is wrong: the Build.bat syntax or I am doing something wrong. :Oops:
This works in Harbour, but not with Build.bat. Those parameters that are from hbmk2 are to attend
this my necessity.
The arguments
% 1% 2% 3% 4% 5% 6% 7% 8 preceding
%debug% -q (in the line where the HBMK2 of the Build .bat) does not seem to accept them ...
I did a test with this syntax:
SET PARAMS="Param1 Param2 Param3"
HBMK2 -mt -run -runflag="% PARAMS%" -o "% ~ n1"% HMGPATH% \ hmg32.hbc% gtdrivers%% debug% -q% 1 Hbmk.log 2> & 1
This way I get re-well. And I already have a solution to compile and run the application by passing parameters to it.
Here in attached for your evaluation:
- Build_bat.rar
- Build.bat (fixed with spaces in param)
- (1.94 KiB) Downloaded 390 times
Here also the example for your tests:
- IDE_Param.rar
- Source files for building
- (41.42 KiB) Downloaded 356 times
Added later: This message was re-edited in order to update Build.bat. Which it was fixed to accept spaces in projects names as well.