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:
kichik 2005-04-16 17:08:46 +00:00
parent 5beda7dd82
commit 2f0e20a582

View file

@ -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);