get output file from command line

git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@4308 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
kichik 2005-10-07 13:21:09 +00:00
parent 03a887ba35
commit fae25f96ef

View file

@ -26,8 +26,8 @@ int main(int argc, char* argv[])
int filefound = 0; int filefound = 0;
if (argc == 3) if (argc != 4)
{ return 1;
// Get the full path of the local file // Get the full path of the local file
@ -86,8 +86,6 @@ int main(int argc, char* argv[])
FindClose(hFind); FindClose(hFind);
} }
}
int versionfound = 0; int versionfound = 0;
DWORD low = 0, high = 0; DWORD low = 0, high = 0;
@ -172,22 +170,13 @@ int main(int argc, char* argv[])
// Write the version to an NSIS header file // Write the version to an NSIS header file
char appfile[MAX_PATH]; ofstream header(argv[3], ofstream::out);
GetModuleFileName(0, appfile, MAX_PATH);
string headerfile;
headerfile = appfile;
headerfile = headerfile.substr(0, headerfile.rfind('\\'));
headerfile.append("\\LibraryLocal.nsh");
ofstream header(headerfile.c_str(), ofstream::out);
if (header) if (header)
{ {
if (!filefound) if (!filefound)
{ {
header << "!define LIBRARY_VERSION_FILENOTFOUND" << endl; header << "!define LIBRARY_VERSION_FILENOTFOUND" << endl;
} }
else if (!versionfound) else if (!versionfound)