45
#define IMPLEMENT_BuildDescriptorEntryPoint() \
46
extern "C" __declspec(dllexport) void BuildDescriptor(HWND hwnd, HINSTANCE hinst, LPSTR lpszCmdLine, int nCmdShow) { \
47
std::string args = lpszCmdLine; \
48
std::stringstream is(args); \
50
std::string extFileName; \
53
std::string fullPath = path + "\\" + extFileName + ".inf"; \
54
std::cout << "Writing extension descriptor to " << fullPath.c_str() << " ..." << std::endl; fstream fs; \
55
fs.open ( fullPath.c_str(), fstream::out); \
56
fs << "DLL=" << extFileName << ".dll" << std::endl; \
57
fs << PRIVATE_EXTENSION_NAME() << std::endl; \
58
fs << "CORE_VERSION=" << GINKGO_VERSION << std::endl; \
59
fs << "CORE_SUBVERSION=" << GINKGO_SUB_VERSION << std::endl; \
61
std::cout << "Done" << std::endl; \
42
64
#if defined(_DEBUG)
43
#define IMPLEMENT_PrivateExtension(name) extern "C" __declspec(dllexport) PrivateExtension* PRIVATE_EXTENSION_NAME() { return new name();};
65
#define IMPLEMENT_PrivateExtension(name) \
66
extern "C" __declspec(dllexport) PrivateExtension* PRIVATE_EXTENSION_NAME() { return new name();}\
67
IMPLEMENT_BuildDescriptorEntryPoint()
45
#define IMPLEMENT_PrivateExtension(name) extern "C" __declspec(dllexport) PrivateExtension* PRIVATE_EXTENSION_NAME() { return new name();};
70
#define IMPLEMENT_PrivateExtension(name) \
71
extern "C" __declspec(dllexport) PrivateExtension* PRIVATE_EXTENSION_NAME() { return new name();}\
72
IMPLEMENT_BuildDescriptorEntryPoint()
76
#define IMPLEMENT_BuildDescriptorEntryPoint() \
77
extern "C" EXTAPI int main(int argc, char**argv) { \
78
std::string args = argv[1]; \
79
std::stringstream is(args); \
81
std::string extFileName; \
84
std::string fullPath = path + "\\" + extFileName + ".inf"; \
85
std::cout << "Writing extension descriptor to " << fullPath.c_str() << " ..." << std::endl; fstream fs; \
86
fs.open ( fullPath.c_str(), fstream::out); \
87
fs << "DLL=" << extFileName << ".dll" << std::endl; \
88
fs << PRIVATE_EXTENSION_NAME() << std::endl; \
89
fs << "CORE_VERSION=" << GINKGO_VERSION << std::endl; \
90
fs << "CORE_SUBVERSION=" << GINKGO_SUB_VERSION << std::endl; \
92
std::cout << "Done" << std::endl; \
48
95
#if defined(_DEBUG)
49
#define IMPLEMENT_PrivateExtension(name) extern "C" EXTAPI PrivateExtension* PRIVATE_EXTENSION_NAME() { return new name();};
96
#define IMPLEMENT_PrivateExtension(name) \
97
extern "C" EXTAPI PrivateExtension* PRIVATE_EXTENSION_NAME() { return new name();};\
98
IMPLEMENT_BuildDescriptorEntryPoint()
51
#define IMPLEMENT_PrivateExtension(name) extern "C" EXTAPI PrivateExtension* PRIVATE_EXTENSION_NAME() { return new name();};
100
#define IMPLEMENT_PrivateExtension(name) \
101
extern "C" EXTAPI PrivateExtension* PRIVATE_EXTENSION_NAME() { return new name();};\
102
IMPLEMENT_BuildDescriptorEntryPoint()
57
108
class PrivateExtension
60
PrivateExtension(const std::string& sid, const std::string& provider, const std::string& description, int version, int subversion, int subrelease, const unsigned char* pixelDataIcon = NULL, unsigned int iconSize = 0)
111
PrivateExtension(const std::string& sid, const std::string& provider, const std::string& description, int version, int subversion, int subrelease, const char* svnBuildString, const char* codename, const char* updateurl, const unsigned char* pixelDataIcon = NULL, unsigned int iconSize = 0)
63
114
this->provider = provider;
65
116
this->version = version;
66
117
this->subversion = subversion;
67
118
this->subrelease = subrelease;
119
this->build = ParseSVNBuild(svnBuildString);
120
this->codename = codename;
121
this->updateurl = updateurl;
68
123
this->iconSize = iconSize;
69
124
this->pixelDataIcon = pixelDataIcon;
71
this->coreVersion = GINKGO_VERSION;
72
this->coreSubversion = GINKGO_SUB_VERSION;
74
126
AsignarFechaCompilacion(__DATE__);
161
223
this->version = o.version;
162
224
this->subversion = o.subversion;
163
225
this->subrelease = o.subrelease;
226
this->build = o.build;
227
this->codename = o.codename;
164
229
this->sid = o.sid;
165
230
this->provider = o.provider;
166
231
this->description = o.description;
167
232
this->fecha_compilacion = o.fecha_compilacion;
233
this->updateurl = o.updateurl;
169
this->coreVersion = o.coreVersion;
170
this->coreSubversion = o.coreSubversion;
171
235
this->pixelDataIcon = o.pixelDataIcon;
172
236
this->iconSize = o.iconSize;
176
240
friend std::ostream& operator<<(std::ostream &os, const PrivateExtension& ext)
178
return os << ext.GetSID() << " V" << ext.GetVersion() << "." << ext.GetSubVersion()<< "." << ext.GetSubRelease() << ". (c) " << ext.GetProvider().c_str() << " " << ext.GetFechaCompilacion().c_str();
242
os << "SID=" << ext.sid.c_str() << std::endl;
243
os << "DESCRIPTION=" << ext.description.c_str() << std::endl;
244
os << "PROVIDER=" << ext.provider.c_str() << std::endl;
245
//os << "COMPILATION=" << ext.fecha_compilacion.c_str() << std::endl;
246
os << "VERSION=" << ext.version << std::endl;
247
os << "SUBVERSION=" << ext.subversion << std::endl;
248
os << "RELEASE=" << ext.subrelease << std::endl;
249
os << "BUILD=" << ext.build << std::endl;
250
os << "CODENAME=" << ext.codename.c_str() << std::endl;
251
os << "UPDATEURL=" << ext.updateurl.c_str();
181
255
friend std::ostream& operator<<(std::ostream& os, PrivateExtension* ext)