Changeset 0802b2c in tol


Ignore:
Timestamp:
Apr 9, 2015, 10:43:49 AM (12 years ago)
Author:
Pedro Gea <pgea@…>
Branches:
1941-docker-image-to-test, devel, master
Children:
71a1861
Parents:
c720eaa
Message:

Refs #1821
Funciones para la creación de paquetes binarios

git-svn-id: ​https://www.tol-project.org/svn/tolp/trunk@6554 be4846ae-f051-483a-831f-b64e7d08527f

Location:
tol/stdlib/TolPackage
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • tol/stdlib/TolPackage/TolPackage.tol

    rc720eaa r0802b2c  
    1818  Text _.autodoc.minTolVersion = "v3.1";
    1919  Real _.autodoc.version.high = 4;
    20   Real _.autodoc.version.low = 1;
     20  Real _.autodoc.version.low = 2;
    2121
    2222  Text _.version = ""<<_.autodoc.version.high<<"."<<_.autodoc.version.low;
  • tol/stdlib/TolPackage/TolPlatform.tol

    rc720eaa r0802b2c  
    3535    Real If(ok, ok := If(infoB[3]=="ANY", True, infoB[3]==infoA[3]));
    3636    ok
     37  };
     38
     39  ////////////////////////////////////////////////////////////////////////////
     40  Text ObtainPlatform(Text os, Text wordsize, Text compiler)
     41  ////////////////////////////////////////////////////////////////////////////
     42  {
     43    Set info = ObtainInfo(Platform(?));
     44    Set requiredInfo = SetOfText(
     45      Case(os=="OWN", info[1], os=="ANY", "ANY", os==info[1], os, True, {
     46        WriteLn("La versión y plataforma de TOL utilizada no es compatible "
     47          <<"con el sistema operativo '"<<os<<"'.", "E");
     48        Text ""
     49      });
     50      Case(wordsize=="OWN", info[2], wordsize=="NN", "NN",
     51        wordsize==info[2], wordsize, True, {
     52        WriteLn("La versión y plataforma de TOL utilizada no es compatible "
     53          <<"con los sistemas de '"<<wordsize<<"' bits.", "E");
     54        Text ""
     55      });
     56      Case(compiler=="OWN", info[3], compiler=="ANY", "ANY",
     57        compiler==info[3], compiler, True, {
     58        WriteLn("La versión y plataforma de TOL utilizada no es compatible "
     59          <<"con la versión compilada con '"<<compiler<<"'.", "E");
     60        Text ""
     61      })
     62    );
     63    If(Real SetMin(EvalSet(requiredInfo,TextLength))==0, {
     64      Real Stop;
     65      Text ""
     66    }, TextJoinWith(requiredInfo, "__"))
     67  };
     68
     69  ////////////////////////////////////////////////////////////////////////////
     70  Text ObtainVariant(Text requiredPlatform)
     71  ////////////////////////////////////////////////////////////////////////////
     72  {
     73    If(requiredPlatform=="ANY__NN__ANY", {
     74      WriteLn("No es necesaria una variante.", "E");
     75      Real Stop;
     76      Text ""
     77    }, {
     78      Set info = ObtainInfo(requiredPlatform);
     79      Set words = SetOfText(
     80        Case(info[1]=="ANY", If(info[2]=="NN", "", "OS"),
     81          info[1]=="WINDOWS", "Win", True, FirstToUpper(ToLower(info[1]))),
     82        If(info[2]=="NN", "", info[2]),
     83        If(info[3]=="ANY", "", info[3])
     84      );
     85      TextJoinWith(words, "")
     86    })
     87  };
     88
     89  ////////////////////////////////////////////////////////////////////////////
     90  Text ObtainDllFolder(Real void)
     91  ////////////////////////////////////////////////////////////////////////////
     92  {
     93    Text platform = Platform(?);
     94    Real debugVersion = TextEndAt(Version,"{DEBUG}");
     95    If(TextMatch(platform, "WINDOWS__32__GNU") , {
     96      "lib"
     97    }, {
     98      "CppTools/"+GetHardSoftPlattform(0)+If(debugVersion, "_dbg", "")
     99    })
    37100  }
    38101]];
Note: See TracChangeset for help on using the changeset viewer.