This is the mail archive of the cygwin-apps mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Add a new entry in setup.ini file


Hello,

I want to add a "license" entry into setup.ini file because I want to
ask by a license agreement in setup.exe  for example:

@ agg-devel
sdesc: "AGG rendering library (development)"
ldesc: "AGG rendering library (development)"
category: Libs
requires: shell
version: 2.4-1
install: ./release/agg/agg-devel/agg-devel-2.4-1.tar.bz2 379815
8ef010bafbb234ed1f9372e9b50767f6
license: ./release/agg/agg-devel/agg-devel-2.4-1.txt

I changed next files:
- I added a token in "iniparse.yy" :
 %token SETUP_TIMESTAMP SETUP_VERSION PACKAGEVERSION INSTALL SOURCE
SDESC LDESC LICENSE

singleitem /* non-empty */
 : PACKAGEVERSION STRING NL     { iniBuilder->buildPackageVersion ($2); }
 | SDESC STRING NL              { iniBuilder->buildPackageSDesc($2); }
 | LDESC STRING NL              { iniBuilder->buildPackageLDesc($2); }
 | LICENSE STRING NL    { iniBuilder->buildPackageLicense($2); }
 | T_PREV NL                    { iniBuilder->buildPackageTrust (TRUST_PREV); }
........

 and added a grammar in "inilex.ll" file:
  "license:"            return LICENSE;

 after I did in order to rebuild the source:
    bison.exe -d --output-file=iniparse.cc iniparse.yy


I also changed the abstract class "_packageversion.cc" and derivated
classes like "packageversion.cc" adding "license" field.

class _packageversion
{
public:
  _packageversion();
  virtual ~_packageversion();
  /* for list inserts/mgmt. */
  std::string key;
  /* name is needed here, because if we are querying a file, the data
may be embedded in
     the file */
  virtual const std::string Name () = 0;
  virtual const std::string Vendor_version () = 0;
  virtual const std::string Package_version () = 0;
  virtual const std::string Canonical_version () = 0;
  virtual void setCanonicalVersion (const std::string& ) = 0;
  virtual package_status_t Status () = 0;
//  virtual package_stability_t Stability () = 0;
  virtual package_type_t Type () = 0;
  /* TODO: we should probably return a metaclass - file name & path &
size & type
     - ie doc/script/binary
   */
  virtual const std::string getfirstfile () = 0;
  virtual const std::string getnextfile () = 0;
  virtual const std::string SDesc () = 0;
  virtual const std::string LDesc () = 0;
  virtual const std::string License ()= 0;

  virtual void set_sdesc (const std::string& ) = 0;
  virtual void set_ldesc (const std::string& ) = 0;
  virtual void set_license (const std::string& ) = 0;


I also added to "IniDBBuilderPackage.cc" file:

IniDBBuilderPackage::buildPackageLicense (const std::string& lic)
{
                cbpv.set_license(lic);

}

But when I try to build the setup.exe can't scan the new entry. Do you
have some advice to me? What is the procedure to add more entries into
setup.ini?

thanks

steve
..........


-- 
Steve Ataucuri Cruz
School of Computer Science,
San Pablo Catholic University - Arequipa, Peru (http://www.ucsp.edu.pe),
Screen Names :
 stonescenter@hotmail.com (Windows Live Messenger)
 stonescenter@gmail.com (Google talk)
 stonescenter@yahoo.com (Yahoo Messenger)
 stonescenter (Skype)
+51.972529201 (Mobile)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]