replaced WinMain with main
git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@3964 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
parent
5beda7dd82
commit
2f0e20a582
1 changed files with 5 additions and 9 deletions
|
@ -13,16 +13,12 @@
|
|||
|
||||
using namespace std;
|
||||
|
||||
int APIENTRY WinMain(HINSTANCE hInstance,
|
||||
HINSTANCE hPrevInstance,
|
||||
LPSTR lpCmdLine,
|
||||
int nCmdShow)
|
||||
int main(int argc, char* argv[])
|
||||
{
|
||||
|
||||
// Parse the command line
|
||||
// Parse the command line
|
||||
|
||||
string cmdline;
|
||||
cmdline = lpCmdLine;
|
||||
|
||||
string mode;
|
||||
string filename;
|
||||
|
@ -30,13 +26,13 @@ int APIENTRY WinMain(HINSTANCE hInstance,
|
|||
|
||||
int filefound = 0;
|
||||
|
||||
if (cmdline.length() >= 3)
|
||||
if (argc == 3)
|
||||
{
|
||||
|
||||
// Get the full path of the local file
|
||||
|
||||
mode = cmdline.substr(0, 1);
|
||||
filename = cmdline.substr(2);
|
||||
mode = argv[1];
|
||||
filename = argv[2];
|
||||
|
||||
char buf[MAX_PATH];
|
||||
GetCurrentDirectory(MAX_PATH, buf);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue