program poptdisv2;
uses
{$IFDEF LINUX}
  cthreads,
  cmem,
  uemuladorwinipc in '../../../src_libnettopos/fctopos/IPC/Linux/uemuladorwinipc.pas',
  usemaforopolenta in '../../../src_libnettopos/fctopos/IPC/Linux/usemaforopolenta.pas',
  ipcobjs in '../../../src_libnettopos/fctopos/IPC/Linux/ipcobjs.pas',
  ukeydir in '../../../src_libnettopos/libnettopos/ukeydir.pas',
  uwinmsgs in '../../../src_libnettopos/fctopos/IPC/Linux/uwinmsgs.pas',
{$ELSE}
  Interfaces,
  Forms,
  ipcthrd in '../../../src_libnettopos/fctopos/IPC/Win32/ipcthrd.pas',
{$ENDIF}
{$IFDEF NETTOPOS_DLL}
  uimportnettopos in '../../../src_libnettopos/libnettopos/uimportnettopos.pas',
{$ELSE}
  unettopos in '../../../src_libnettopos/libnettopos/unettopos.pas',
  unettopostypes in '../../../src_libnettopos/libnettopos/unettopostypes.pas',
  uglobsharedmem in '../../../src_libnettopos/libnettopos/uglobsharedmem.pas',
  uHeapManager in '../../../src_libnettopos/libnettopos/uHeapManager.pas',
{$ENDIF}
   urosx in '../../../src_libnettopos/libnettopos/urosx.pas',
Classes,
uOptDisV2, usalasdejuego, usalasdejuegoParaEditor,


  uconstantes_nettopos in '../../../src_libnettopos/libnettopos/uconstantes_nettopos.pas',
  usockettimedconnect,
  ubuffrw in '../../../src_libnettopos/fctopos/ubuffrw.pas',
  uMsgsDespachador in '../../../src_libnettopos/fctopos/Despachador/uMsgsDespachador.pas',
  uLibFuncionesComunes in '../../../src_libnettopos/fctopos/uLibFuncionesComunes.pas',
  uDataSetGenerico, ucosa, uActores, uEventosOptSim, winLinuxUtils, uwinmsgs;

(*
  uActualizadorLPD in '..\..\fc\base\uActualizadorLPD.pas',
  uAuxiliares in '..\..\fc\base\uAuxiliares.pas',
  uconstantesSimSEE in '..\..\fc\base\uconstantesSimSEE.pas',
  uCosa in '..\..\fc\base\uCosa.pas',
  uCosaConNombre in '..\..\fc\base\uCosaConNombre.pas',
  udatoshorariosdetallados in '..\..\fc\base\udatoshorariosdetallados.pas',
  uEsclavizador in '..\..\fc\base\uEsclavizador.pas',
  uEsclavizadorSobreMuestreado in '..\..\fc\base\uEsclavizadorSobreMuestreado.pas',
  uEsclavizadorSubMuestreado in '..\..\fc\base\uEsclavizadorSubMuestreado.pas',
  uEstados in '..\..\fc\base\uEstados.pas',
  ufechas in '..\..\fc\base\ufechas.pas',
  ufichasLPD in '..\..\fc\base\ufichasLPD.pas',
  uFuenteCombinacion in '..\..\fc\base\uFuenteCombinacion.pas',
  uFuenteConstante in '..\..\fc\base\uFuenteConstante.pas',
  uFuenteGaussiana in '..\..\fc\base\uFuenteGaussiana.pas',
  uFuentesAleatorias in '..\..\fc\base\uFuentesAleatorias.pas',
  uFuenteSintetizador in '..\..\fc\base\uFuenteSintetizador.pas',
  uFuenteUniforme in '..\..\fc\base\uFuenteUniforme.pas',
  uFuenteWeibull in '..\..\fc\base\uFuenteWeibull.pas',
  uFuncionesReales in '..\..\fc\base\uFuncionesReales.pas',
  uglobs in '..\..\fc\base\uglobs.pas',
  uInicioYFinal in '..\..\fc\base\uInicioYFinal.pas',
  umodelosintcegh in '..\..\fc\base\umodelosintcegh.pas',
  upreprocesador in '..\..\fc\base\upreprocesador.pas',
  uranddispos in '..\..\fc\base\uranddispos.pas',
  usalasdejuego in '..\..\fc\base\usalasdejuego.pas',
  usalasdejuegoParaEditor in '..\..\fc\base\usalasdejuegoParaEditor.pas',
  compol in '..\..\fc\rch30\compol.pas',
  fddp in '..\..\fc\rch30\fddp.pas',
  matent in '..\..\fc\rch30\matent.pas',
  math01 in '..\..\fc\rch30\math01.pas',
  math02 in '..\..\fc\rch30\math02.pas',
  matreal in '..\..\fc\rch30\matreal.pas',
  udisnormcan in '..\..\fc\rch30\udisnormcan.pas',
  uListaViolacionesPermitidasSimplex in '..\..\fc\rch30\uListaViolacionesPermitidasSimplex.pas',
  umipsimplex in '..\..\fc\rch30\umipsimplex.pas',
  umipsimplex_mejorcamino in '..\..\fc\rch30\umipsimplex_mejorcamino.pas',
  usimplex in '..\..\fc\rch30\usimplex.pas',
  xmatdefs in '..\..\fc\rch30\xmatdefs.pas',
  uodt_types in '..\..\fc\base\uodt_types.pas',
  uActores in '..\..\fc\actores\uActores.pas',
  uActorNodal in '..\..\fc\actores\uActorNodal.pas',
  uArcos in '..\..\fc\actores\uArcos.pas',
  uComercioInternacional in '..\..\fc\actores\uComercioInternacional.pas',
  ucontratomodalidaddevolucion in '..\..\fc\actores\ucontratomodalidaddevolucion.pas',
  uDemandaAnioBaseEIndices in '..\..\fc\actores\uDemandaAnioBaseEIndices.pas',
  udemandadetallada in '..\..\fc\actores\udemandadetallada.pas',
  uDemandas in '..\..\fc\actores\uDemandas.pas',
  udemandas01 in '..\..\fc\actores\udemandas01.pas',
  uevapUruguay in '..\..\fc\actores\uevapUruguay.pas',
  uGeneradores in '..\..\fc\actores\uGeneradores.pas',
  uGTer in '..\..\fc\actores\uGTer.pas',
  ugter_arranqueparada in '..\..\fc\actores\ugter_arranqueparada.pas',
  ugter_basico in '..\..\fc\actores\ugter_basico.pas',
  ugter_basico_trep in '..\..\fc\actores\ugter_basico_trep.pas',
  ugter_onoffporpaso in '..\..\fc\actores\ugter_onoffporpaso.pas',
  ugter_onoffporposte in '..\..\fc\actores\ugter_onoffporposte.pas',
  uHidroConEmbalse in '..\..\fc\actores\uHidroConEmbalse.pas',
  uHidroConEmbalseValorizado in '..\..\fc\actores\uHidroConEmbalseValorizado.pas',
  uHidroDePasada in '..\..\fc\actores\uHidroDePasada.pas',
  uBaseMercadoSpot in '..\..\fc\actores\uBaseMercadoSpot.pas',
  uMercadoSpot in '..\..\fc\actores\uMercadoSpot.pas',
  uMercadoSpotConDetalleHorarioSemanal in '..\..\fc\actores\uMercadoSpotConDetalleHorarioSemanal.pas',
  unodos in '..\..\fc\actores\unodos.pas',
  uParqueEolico in '..\..\fc\actores\uParqueEolico.pas',
  uFuenteProducto in '..\..\fc\base\uFuenteProducto.pas',
  uRobotOptimizadorMultiCore in '..\..\fc\base\uRobotOptimizadorMultiCore.pas',
  winLinuxUtils in '..\..\fc\PA10\winLinuxUtils.pas',
  uDatosHistoricos in '..\..\fc\base\uDatosHistoricos.pas',
  ugter_onoffporpaso_conrestricciones in '..\..\fc\actores\ugter_onoffporpaso_conrestricciones.pas',
  uevaluador in '..\..\fc\rch30\uevaluador.pas',
  uHidroConEmbalseBinacional in '..\..\fc\actores\uHidroConEmbalseBinacional.pas';
*)

{$IFDEF LINUX}
procedure TFmth_execute;
var
	m: TWinMsg;
begin
//writeln('TFmth_execute->TOptDisV2.Create');
  OptDisV2:= TOptDisV2.Create(nil);
  while OptDisV2.recolectar do
  begin
   if xGetMessage_WAIT( m ) = 0 then
   begin
//     writeln('OptDisV2 mensaje: ', m.msgCode,' : ',m.wParam,' : ',m.lParam);
     OptDisV2.Dispatch(m);
   end
   else
    write('.');
  end;
//writeln('TFmth_execute->TOptDisV2.Free');
  OptDisV2.Free;
//writeln('TFmth_execute->TOptDisV2.fin.');
end;
{$ELSE}
{$R *.res}
{$ENDIF}

begin
{$IFDEF LINUX}
//  writeln(' Paso a modo SUBTERRANEO !');
  // test;
//  daemon(0,0);

//  tf:= TFmth.Create;
  TFmth_execute;
{$ELSE}
    Application.Initialize;
    Application.CreateForm(TOptDisV2, uOptDisV2.OptDisV2);
    Application.Run;
{$ENDIF}
end.
