git-svn-id: https://svn.eduke32.com/eduke32@132 1a8010ca-5511-0410-912e-c29ae57300e0

This commit is contained in:
terminx 2006-05-01 06:52:06 +00:00
parent 106f0efd24
commit c0f4fd552b
2 changed files with 18 additions and 17 deletions

View file

@ -160,7 +160,7 @@ endif
all: eduke32$(EXESUFFIX) mapster32$(EXESUFFIX) all: eduke32$(EXESUFFIX) mapster32$(EXESUFFIX)
eduke32$(EXESUFFIX): $(GAMEOBJS) $(EOBJ)$(ENGINELIB) eduke32$(EXESUFFIX): $(GAMEOBJS) $(EOBJ)$(ENGINELIB)
$(CC) $(CFLAGS) $(OURCFLAGS) -o $@ $^ $(JFAUDLIBS) $(LIBS) $(STDCPPLIB) -Wl,-Map=$@.map $(CC) -o $@ $^ $(JFAUDLIBS) $(LIBS) $(STDCPPLIB) -Wl,-Map=$@.map
-rm eduke32.sym$(EXESUFFIX) -rm eduke32.sym$(EXESUFFIX)
cp eduke32$(EXESUFFIX) eduke32.sym$(EXESUFFIX) cp eduke32$(EXESUFFIX) eduke32.sym$(EXESUFFIX)
strip eduke32$(EXESUFFIX) strip eduke32$(EXESUFFIX)
@ -171,6 +171,10 @@ mapster32$(EXESUFFIX): $(EDITOROBJS) $(EOBJ)$(EDITORLIB) $(EOBJ)$(ENGINELIB)
cp mapster32$(EXESUFFIX) mapster32.sym$(EXESUFFIX) cp mapster32$(EXESUFFIX) mapster32.sym$(EXESUFFIX)
strip mapster32$(EXESUFFIX) strip mapster32$(EXESUFFIX)
duke3d_w32$(EXESUFFIX): $(OBJ)wrapper.$o
$(CC) $(CFLAGS) $(OURCFLAGS) -o $@ $^ -Wl
strip duke3d_w32$(EXESUFFIX)
include Makefile.deps include Makefile.deps
.PHONY: enginelib editorlib .PHONY: enginelib editorlib
@ -222,7 +226,7 @@ clean:
ifeq ($(PLATFORM),DARWIN) ifeq ($(PLATFORM),DARWIN)
cd osx && xcodebuild -target All clean cd osx && xcodebuild -target All clean
else else
-rm -f $(OBJ)* eduke32$(EXESUFFIX) eduke32.sym$(EXESUFFIX) mapster32$(EXESUFFIX) mapster32.sym$(EXESUFFIX) core* -rm -f $(OBJ)* eduke32$(EXESUFFIX) eduke32.sym$(EXESUFFIX) mapster32$(EXESUFFIX) mapster32.sym$(EXESUFFIX) core* duke3d_w32$(EXESUFFIX)
endif endif
veryclean: clean veryclean: clean

View file

@ -21,24 +21,22 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInst, LPSTR lpCmdLine, in
PROCESS_INFORMATION pi; PROCESS_INFORMATION pi;
ZeroMemory(&szFileName,sizeof(szFileName)); ZeroMemory(&szFileName,sizeof(szFileName));
strcpy(sCmdLine,lpCmdLine);
for(i=0;i<strlen(lpCmdLine);i++) for(i=0;i<(signed)strlen(sCmdLine);i++)
{ {
if(lpCmdLine[i] == '-' && lpCmdLine[i+1] == 'n' && lpCmdLine[i+2] == 'e' && lpCmdLine[i+3] == 't') if(sCmdLine[i] == '-' && sCmdLine[i+1] == 'n' && sCmdLine[i+2] == 'e' && sCmdLine[i+3] == 't')
{ {
i += 5; j = 0,i += 5;
j = 0; while(!sCmdLine[i] != ' ' && i<(signed)strlen(sCmdLine))
while(!ISWS(lpCmdLine[i]) && i<strlen(lpCmdLine))
{ {
szFileName[j] = lpCmdLine[i]; szFileName[j] = sCmdLine[i];
fprintf(fp,"%d %d\n",j,i); if(sCmdLine[i+1] == ' ')
if(lpCmdLine[i+1] == ' ' || lpCmdLine[i+1] == '\n' || lpCmdLine[i+1] == '\r')
break; break;
j++,i++; j++,i++;
} }
break; break;
} }
else CmdLine[i] = lpCmdLine[i]; else CmdLine[i] = sCmdLine[i];
} }
if(szFileName[0]) if(szFileName[0])
@ -47,11 +45,10 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInst, LPSTR lpCmdLine, in
szCmdLine = sCmdLine; szCmdLine = sCmdLine;
fprintf(fp,"EDuke32 wrapper for Dukester X v0.01\ fprintf(fp,"EDuke32 wrapper for Dukester X v0.01\n");
\nCopyright (c) 2006 EDuke32 team\n\ fprintf(fp,"Copyright (c) 2006 EDuke32 team\n\n");
\nArgs passed to wrapper: %s\ fprintf(fp,"Args passed to wrapper: %s\n",lpCmdLine);
\nRancidmeat net filename: %s\ fprintf(fp,"Final command line: %s",szCmdLine);
\nFinal command line: %s\n",lpCmdLine,szFileName,szCmdLine);
fclose(fp); fclose(fp);