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:
parent
03a887ba35
commit
fae25f96ef
1 changed files with 43 additions and 54 deletions
|
@ -26,8 +26,8 @@ int main(int argc, char* argv[])
|
|||
|
||||
int filefound = 0;
|
||||
|
||||
if (argc == 3)
|
||||
{
|
||||
if (argc != 4)
|
||||
return 1;
|
||||
|
||||
// Get the full path of the local file
|
||||
|
||||
|
@ -86,8 +86,6 @@ int main(int argc, char* argv[])
|
|||
FindClose(hFind);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
int versionfound = 0;
|
||||
DWORD low = 0, high = 0;
|
||||
|
||||
|
@ -172,22 +170,13 @@ int main(int argc, char* argv[])
|
|||
|
||||
// Write the version to an NSIS header file
|
||||
|
||||
char appfile[MAX_PATH];
|
||||
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);
|
||||
ofstream header(argv[3], ofstream::out);
|
||||
|
||||
if (header)
|
||||
{
|
||||
|
||||
if (!filefound)
|
||||
{
|
||||
|
||||
header << "!define LIBRARY_VERSION_FILENOTFOUND" << endl;
|
||||
}
|
||||
else if (!versionfound)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue