mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-25 13:51:41 +00:00
Updating for vc8 build. WINCE ONLY
This commit is contained in:
parent
107bbb27b7
commit
ba0b75bda7
22
build/wince/shunt/build/vs8/mozce_shunt_static.sln
Executable file
22
build/wince/shunt/build/vs8/mozce_shunt_static.sln
Executable file
@ -0,0 +1,22 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 9.00
|
||||
# Visual Studio 2005
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mozce_shunt_static", "mozce_shunt_static.vcproj", "{082BAB06-D10F-4C57-B123-F84DC06C246D}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) = Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)
|
||||
Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) = Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{082BAB06-D10F-4C57-B123-F84DC06C246D}.Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)
|
||||
{082BAB06-D10F-4C57-B123-F84DC06C246D}.Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).Build.0 = Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)
|
||||
{082BAB06-D10F-4C57-B123-F84DC06C246D}.Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).Deploy.0 = Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)
|
||||
{082BAB06-D10F-4C57-B123-F84DC06C246D}.Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)
|
||||
{082BAB06-D10F-4C57-B123-F84DC06C246D}.Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).Build.0 = Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)
|
||||
{082BAB06-D10F-4C57-B123-F84DC06C246D}.Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).Deploy.0 = Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
EndGlobal
|
275
build/wince/shunt/build/vs8/mozce_shunt_static.vcproj
Executable file
275
build/wince/shunt/build/vs8/mozce_shunt_static.vcproj
Executable file
@ -0,0 +1,275 @@
|
||||
<?xml version="1.0" encoding="Windows-1252"?>
|
||||
<VisualStudioProject
|
||||
ProjectType="Visual C++"
|
||||
Version="8.00"
|
||||
Name="mozce_shunt_static"
|
||||
ProjectGUID="{082BAB06-D10F-4C57-B123-F84DC06C246D}"
|
||||
RootNamespace="mozce_shunt_static"
|
||||
Keyword="Win32Proj"
|
||||
>
|
||||
<Platforms>
|
||||
<Platform
|
||||
Name="Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
|
||||
/>
|
||||
</Platforms>
|
||||
<ToolFiles>
|
||||
</ToolFiles>
|
||||
<Configurations>
|
||||
<Configuration
|
||||
Name="Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
|
||||
OutputDirectory="$(PlatformName)\Debug"
|
||||
IntermediateDirectory="$(PlatformName)\Debug"
|
||||
ConfigurationType="4"
|
||||
CharacterSet="1"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
ExecutionBucket="7"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories="..\..\include"
|
||||
PreprocessorDefinitions="_WIN32_WCE=$(CEVER);UNDER_CE=$(CEVER);WINCE;$(PLATFORMDEFINES);_DEBUG;DEBUG;_LIB;$(ARCHFAM);$(_ARCHFAM_);MOZCE_STATIC_BUILD;MOZCE_SHUNT_EXPORTS"
|
||||
MinimalRebuild="true"
|
||||
ExceptionHandling="0"
|
||||
RuntimeLibrary="1"
|
||||
BufferSecurityCheck="false"
|
||||
EnableFunctionLevelLinking="true"
|
||||
TreatWChar_tAsBuiltInType="false"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
DebugInformationFormat="3"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
PreprocessorDefinitions="_DEBUG;_UNICODE;UNICODE;_WIN32_WCE;UNDER_CE"
|
||||
Culture="1033"
|
||||
AdditionalIncludeDirectories="$(IntDir)"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLibrarianTool"
|
||||
AdditionalOptions=" /subsystem:windowsce,5.01 /machine:THUMB"
|
||||
OutputFile="$(InputDir)/shunt_dbg.lib"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCodeSignTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
<DeploymentTool
|
||||
ForceDirty="-1"
|
||||
RemoteDirectory=""
|
||||
RegisterOutput="0"
|
||||
AdditionalFiles=""
|
||||
/>
|
||||
<DebuggerTool
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
|
||||
OutputDirectory="$(PlatformName)\Release"
|
||||
IntermediateDirectory="$(PlatformName)\Release"
|
||||
ConfigurationType="4"
|
||||
CharacterSet="1"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
ExecutionBucket="7"
|
||||
Optimization="2"
|
||||
AdditionalIncludeDirectories="..\..\include"
|
||||
PreprocessorDefinitions="_WIN32_WCE=$(CEVER);UNDER_CE=$(CEVER);WINCE;$(PLATFORMDEFINES);NDEBUG;_LIB;$(ARCHFAM);$(_ARCHFAM_);MOZCE_STATIC_BUILD;MOZCE_SHUNT_EXPORTS"
|
||||
ExceptionHandling="0"
|
||||
RuntimeLibrary="0"
|
||||
BufferSecurityCheck="false"
|
||||
TreatWChar_tAsBuiltInType="false"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
DebugInformationFormat="3"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
PreprocessorDefinitions="NDEBUG;_UNICODE;UNICODE;_WIN32_WCE;UNDER_CE"
|
||||
Culture="1033"
|
||||
AdditionalIncludeDirectories="$(IntDir)"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLibrarianTool"
|
||||
AdditionalOptions=" /subsystem:windowsce,5.01 /machine:THUMB"
|
||||
OutputFile="$(InputDir)/shunt.lib"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCodeSignTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
<DeploymentTool
|
||||
ForceDirty="-1"
|
||||
RemoteDirectory=""
|
||||
RegisterOutput="0"
|
||||
AdditionalFiles=""
|
||||
/>
|
||||
<DebuggerTool
|
||||
/>
|
||||
</Configuration>
|
||||
</Configurations>
|
||||
<References>
|
||||
</References>
|
||||
<Files>
|
||||
<Filter
|
||||
Name="Source Files"
|
||||
Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
|
||||
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
|
||||
>
|
||||
<File
|
||||
RelativePath="..\..\a2w.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\assert.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\clipboard.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\direct.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\errno.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\io.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\mbstring.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\nclog.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\process.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\signal.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\stat.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\stdio.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\stdlib.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\string.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\time.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\w2a.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\win32.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\win32A.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\win32W.cpp"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Header Files"
|
||||
Filter="h;hpp;hxx;hm;inl;inc;xsd"
|
||||
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
|
||||
>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Resource Files"
|
||||
Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
|
||||
UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
|
||||
>
|
||||
</Filter>
|
||||
</Files>
|
||||
<Globals>
|
||||
</Globals>
|
||||
</VisualStudioProject>
|
@ -1,33 +1,6 @@
|
||||
|
||||
|
||||
all:
|
||||
cl ppc2003arm/arm-wince-as.c
|
||||
mv arm-wince-as.exe ppc2003arm
|
||||
cl ppc2003arm/arm-wince-gcc.c
|
||||
mv arm-wince-gcc.exe ppc2003arm
|
||||
cl ppc2003arm/arm-wince-lib.c
|
||||
mv arm-wince-lib.exe ppc2003arm
|
||||
cl ppc2003arm/arm-wince-link.c
|
||||
mv arm-wince-link.exe ppc2003arm
|
||||
rm -f *.obj
|
||||
cl ppc2003em/arm-wince-as.c
|
||||
mv arm-wince-as.exe ppc2003em
|
||||
cl ppc2003em/arm-wince-gcc.c
|
||||
mv arm-wince-gcc.exe ppc2003em
|
||||
cl ppc2003em/arm-wince-lib.c
|
||||
mv arm-wince-lib.exe ppc2003em
|
||||
cl ppc2003em/arm-wince-link.c
|
||||
mv arm-wince-link.exe ppc2003em
|
||||
rm -f *.obj
|
||||
cl sp2003arm/arm-wince-as.c
|
||||
mv arm-wince-as.exe sp2003arm
|
||||
cl sp2003arm/arm-wince-gcc.c
|
||||
mv arm-wince-gcc.exe sp2003arm
|
||||
cl sp2003arm/arm-wince-lib.c
|
||||
mv arm-wince-lib.exe sp2003arm
|
||||
cl sp2003arm/arm-wince-link.c
|
||||
mv arm-wince-link.exe sp2003arm
|
||||
rm -f *.obj
|
||||
cl vs8ppc2003arm/arm-wince-as.c
|
||||
mv arm-wince-as.exe vs8ppc2003arm
|
||||
cl vs8ppc2003arm/arm-wince-gcc.c
|
||||
@ -38,14 +11,8 @@ all:
|
||||
mv arm-wince-link.exe vs8ppc2003arm
|
||||
rm -f *.obj
|
||||
|
||||
|
||||
clobber:
|
||||
rm -f ppc2003em/*.exe
|
||||
rm -f ppc2003em/*.obj
|
||||
rm -f ppc2003arm/*.exe
|
||||
rm -f ppc2003arm/*.obj
|
||||
rm -f sp2003arm/*.exe
|
||||
rm -f sp2003arm/*.obj
|
||||
rm -f vs8ppc2003arm/*.exe
|
||||
rm -f vs8ppc2003arm/*.obj
|
||||
rm -f *.obj
|
||||
rm -f *.exe
|
||||
|
@ -1,14 +0,0 @@
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <process.h>
|
||||
#include "toolpaths.h"
|
||||
|
||||
int
|
||||
main(int argc, char **argv)
|
||||
{
|
||||
char* args[1000];
|
||||
|
||||
argpath_conv(argv, args);
|
||||
|
||||
return _spawnv( _P_WAIT, ASM_PATH, args );
|
||||
}
|
@ -1,108 +0,0 @@
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <process.h>
|
||||
#include <errno.h>
|
||||
#include <windows.h>
|
||||
|
||||
#include "toolpaths.h"
|
||||
|
||||
int
|
||||
main(int argc, char **argv)
|
||||
{
|
||||
int iRetVal;
|
||||
int startOfArgvs;
|
||||
int i = 0;
|
||||
int j = 0;
|
||||
int link = 0;
|
||||
|
||||
char* args[1000];
|
||||
char outputFileArg[1000];
|
||||
|
||||
args[i++] = "clarm.exe";
|
||||
args[i++] = "/I\"" WCE_INC "\"";
|
||||
args[i++] = "/I\"" SHUNT_INC "\"";
|
||||
args[i++] = "/FI\"mozce_shunt.h\"";
|
||||
|
||||
args[i++] = "/DMOZCE_STATIC_BUILD";
|
||||
|
||||
args[i++] = "/DARM";
|
||||
args[i++] = "/DWINCE";
|
||||
args[i++] = "/D_WIN32_WCE=420";
|
||||
args[i++] = "/DUNDER_CE=420";
|
||||
args[i++] = "/DWIN32_PLATFORM_PSPC=400";
|
||||
args[i++] = "/D_ARM_";
|
||||
args[i++] = "/DDEPRECATE_SUPPORTED";
|
||||
args[i++] = "/DSTDC_HEADERS";
|
||||
|
||||
// args[i++] = "/F5000000";
|
||||
args[i++] = "/Gy"; // For link warning LNK1166
|
||||
|
||||
// args[i++] = "/Gf";
|
||||
|
||||
args[i++] = "/Gf";
|
||||
args[i++] = "/QRxscale";
|
||||
|
||||
// args[i++] = "/QRxscalesched";
|
||||
// args[i++] = "/Ox";
|
||||
|
||||
startOfArgvs = i;
|
||||
|
||||
i += argpath_conv(&argv[1], &args[i]);
|
||||
|
||||
// if /Fe is passed, then link
|
||||
//
|
||||
// if -o is passed, then blank out this argument, and place a "/Fo"
|
||||
// before the next argument
|
||||
while(argv[j])
|
||||
{
|
||||
if (strncmp(argv[j], "-o", 2) == 0)
|
||||
{
|
||||
if ( strstr(args[startOfArgvs+j], ".obj") )
|
||||
{
|
||||
// If we are outputting a .OBJ file, then we are
|
||||
// NOT linking, and we need to do some fancy
|
||||
// footwork to output "/FoFILENAME" as an argument
|
||||
args[startOfArgvs+j-1] = "";
|
||||
strcpy(outputFileArg, "/Fo");
|
||||
strcat(outputFileArg, args[startOfArgvs+j]);
|
||||
args[startOfArgvs+j] = outputFileArg;
|
||||
} else
|
||||
{
|
||||
// Otherwise, we are linking as usual
|
||||
link = 1;
|
||||
}
|
||||
}
|
||||
// if (strncmp(argv[j], "-o", 2) == 0)
|
||||
// {
|
||||
// link = 1;
|
||||
// }
|
||||
j++;
|
||||
}
|
||||
|
||||
if (link)
|
||||
{
|
||||
args[i++] = "/link";
|
||||
// args[i++] = "-STACK:0x5000000,0x100000";
|
||||
|
||||
args[i++] = "-ENTRY:mainACRTStartup";
|
||||
args[i++] = "-SUBSYSTEM:WINDOWSCE,4.20";
|
||||
args[i++] = "-ALIGN:\"4096\"";
|
||||
args[i++] = "-MACHINE:ARM";
|
||||
args[i++] = "-LIBPATH:\"" WCE_LIB "\"";
|
||||
args[i++] = "-LIBPATH:\"" SHUNT_LIB "\"";
|
||||
args[i++] = "shunt.lib";
|
||||
args[i++] = "winsock.lib";
|
||||
args[i++] = "corelibc.lib";
|
||||
args[i++] = "coredll.lib";
|
||||
}
|
||||
args[i] = NULL;
|
||||
|
||||
//dumpargs(args);
|
||||
|
||||
iRetVal = _spawnv( _P_WAIT, CL_PATH, args );
|
||||
if (iRetVal == -1)
|
||||
{
|
||||
printf("-----------------> %d <----------------------\n\n\n\n", errno);
|
||||
}
|
||||
return 0;
|
||||
}
|
@ -1,20 +0,0 @@
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <process.h>
|
||||
#include "toolpaths.h"
|
||||
|
||||
|
||||
int
|
||||
main(int argc, char **argv)
|
||||
{
|
||||
char* args[1000];
|
||||
int i = 0;
|
||||
|
||||
args[i++] = "lib.exe";
|
||||
args[i++] = "/SUBSYSTEM:WINDOWSCE,4.20";
|
||||
args[i++] = "/MACHINE:ARM";
|
||||
|
||||
argpath_conv(&argv[1], &args[i]);
|
||||
|
||||
return _spawnv( _P_WAIT, LIB_PATH, args );
|
||||
}
|
@ -1,67 +0,0 @@
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <process.h>
|
||||
|
||||
#include "toolpaths.h"
|
||||
|
||||
int
|
||||
main(int argc, char **argv)
|
||||
{
|
||||
int iRetVal;
|
||||
char* args[1000];
|
||||
int i = 0;
|
||||
int j = 0;
|
||||
int k = 0;
|
||||
|
||||
// Clear any link env variable that might get us tangled up
|
||||
_putenv("LINK=");
|
||||
|
||||
args[i++] = "link.exe";
|
||||
args[i++] = "/SUBSYSTEM:WINDOWSCE,4.20";
|
||||
args[i++] = "/MACHINE:ARM";
|
||||
args[i++] = "/LIBPATH:\"" WCE_LIB "\"";
|
||||
args[i++] = "/LIBPATH:\"" SHUNT_LIB "\"";
|
||||
|
||||
args[i++] = "winsock.lib";
|
||||
args[i++] = "corelibc.lib";
|
||||
args[i++] = "coredll.lib";
|
||||
args[i++] = "ceshell.lib";
|
||||
|
||||
args[i++] = "shunt.lib";
|
||||
|
||||
args[i++] = "ole32.lib";
|
||||
|
||||
args[i++] = "/NODEFAULTLIB:LIBC";
|
||||
args[i++] = "/NODEFAULTLIB:OLDNAMES";
|
||||
|
||||
|
||||
args[i++] = "/align:\"4096\"";
|
||||
|
||||
// args[i++] = "/STACK:0x5000000,0x100000";
|
||||
|
||||
// if -DLL is not passed, then change the entry to 'main'
|
||||
while(argv[j])
|
||||
{
|
||||
if (strncmp(argv[j], "-DLL", 4) == 0 || strncmp(argv[j], "/DLL", 4) == 0)
|
||||
{
|
||||
k = 1;
|
||||
break;
|
||||
}
|
||||
j++;
|
||||
}
|
||||
|
||||
if (k==0)
|
||||
args[i++] = "/ENTRY:mainACRTStartup";
|
||||
|
||||
argpath_conv(&argv[1], &args[i]);
|
||||
|
||||
// dumpargs(args);
|
||||
|
||||
iRetVal = _spawnv( _P_WAIT, LINK_PATH, args );
|
||||
|
||||
if (iRetVal == -1)
|
||||
{
|
||||
printf("-----------------> %d <----------------------\n\n\n\n", errno);
|
||||
}
|
||||
return 0;
|
||||
}
|
@ -1,17 +0,0 @@
|
||||
rm arm-wince-as.exe
|
||||
rm arm-wince-gcc.exe
|
||||
rm arm-wince-lib.exe
|
||||
rm arm-wince-link.exe
|
||||
|
||||
rm *.obj
|
||||
rm *.ilk
|
||||
rm *.pdb
|
||||
|
||||
cl /O2 arm-wince-as.c
|
||||
cl /O2 arm-wince-gcc.c
|
||||
cl /O2 arm-wince-lib.c
|
||||
cl /O2 arm-wince-link.c
|
||||
|
||||
rm *.obj
|
||||
rm *.ilk
|
||||
rm *.pdb
|
@ -1,94 +0,0 @@
|
||||
#ifndef TOPSRCDIR
|
||||
#include "../topsrcdir.h"
|
||||
#endif
|
||||
|
||||
#define WCE_BIN "c:/Program Files/Microsoft eMbedded C++ 4.0/EVC/wce420/bin/"
|
||||
|
||||
#define WCE_INC "c:/Program Files/Windows CE Tools/wce420/POCKET PC 2003/Include/Armv4/"
|
||||
#define WCE_LIB "c:/Program Files/Windows CE Tools/wce420/POCKET PC 2003/Lib/Armv4/"
|
||||
|
||||
#define SHUNT_LIB TOPSRCDIR "/build/wince/shunt/build/static/ARMV4Rel/"
|
||||
#define SHUNT_INC TOPSRCDIR "/build/wince/shunt/include/"
|
||||
|
||||
#define ASM_PATH WCE_BIN "armasm.exe"
|
||||
#define CL_PATH WCE_BIN "clarm.exe"
|
||||
#define LIB_PATH WCE_BIN "lib.exe"
|
||||
#define LINK_PATH WCE_BIN "link.exe"
|
||||
|
||||
#define MAX_NOLEAK_BUFFERS 100
|
||||
char noleak_buffers[MAX_NOLEAK_BUFFERS][1024];
|
||||
static int next_buffer = 0;
|
||||
|
||||
int argpath_conv(char **args_in, char **args_out)
|
||||
{
|
||||
int i = 0;
|
||||
|
||||
while (args_in[i])
|
||||
{
|
||||
args_out[i] = args_in[i];
|
||||
|
||||
if (args_in[i])
|
||||
{
|
||||
char *offset = strstr(args_out[i], "/cygdrive/");
|
||||
|
||||
if (offset) {
|
||||
|
||||
strcpy(offset, offset+9);
|
||||
offset[0] = offset[1];
|
||||
offset[1] = ':';
|
||||
offset[2] = '/';
|
||||
}
|
||||
|
||||
if ( (args_out[i][0] == '-' || args_out[i][0] == '/') &&
|
||||
(args_out[i][1] == 'D'))
|
||||
{
|
||||
|
||||
offset = strstr(args_out[i]+2, "=");
|
||||
if (offset)
|
||||
{
|
||||
char* equalsChar = offset;
|
||||
|
||||
if (equalsChar[1] == '"')
|
||||
{
|
||||
*equalsChar = '\0';
|
||||
|
||||
strcpy(noleak_buffers[next_buffer], args_out[i]);
|
||||
|
||||
*equalsChar = '=';
|
||||
|
||||
strcat(noleak_buffers[next_buffer], "=\\\"");
|
||||
strcat(noleak_buffers[next_buffer], equalsChar+1);
|
||||
strcat(noleak_buffers[next_buffer], "\\\"");
|
||||
|
||||
args_out[i] = noleak_buffers[next_buffer];
|
||||
|
||||
next_buffer++;
|
||||
|
||||
if (next_buffer > MAX_NOLEAK_BUFFERS) {
|
||||
printf("next_buffer>MAX_NOLEAK_BUFFERS\n");
|
||||
exit(-1);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
i++;
|
||||
}
|
||||
args_out[i] = NULL;
|
||||
return i;
|
||||
}
|
||||
|
||||
void dumpargs(char** args)
|
||||
{
|
||||
int i = 0;
|
||||
|
||||
if (args[0] == NULL)
|
||||
printf(":: first element is null!\n");
|
||||
|
||||
while(args[i])
|
||||
printf("%s ", args[i++]);
|
||||
|
||||
printf("\n");
|
||||
fflush(stdout);
|
||||
fflush(stderr);
|
||||
}
|
@ -1,14 +0,0 @@
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <process.h>
|
||||
#include "toolpaths.h"
|
||||
|
||||
int
|
||||
main(int argc, char **argv)
|
||||
{
|
||||
char* args[1000];
|
||||
|
||||
argpath_conv(argv, args);
|
||||
|
||||
return _spawnv( _P_WAIT, ASM_PATH, args );
|
||||
}
|
@ -1,98 +0,0 @@
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <process.h>
|
||||
#include <errno.h>
|
||||
#include <windows.h>
|
||||
|
||||
#include "toolpaths.h"
|
||||
|
||||
int
|
||||
main(int argc, char **argv)
|
||||
{
|
||||
int iRetVal;
|
||||
int startOfArgvs;
|
||||
int i = 0;
|
||||
int j = 0;
|
||||
int link = 0;
|
||||
|
||||
char* args[1000];
|
||||
char outputFileArg[1000];
|
||||
|
||||
args[i++] = "cl.exe";
|
||||
args[i++] = "/I\"" WCE_INC "\"";
|
||||
args[i++] = "/I\"" SHUNT_INC "\"";
|
||||
args[i++] = "/FI\"mozce_shunt.h\"";
|
||||
|
||||
args[i++] = "/D_i386_";
|
||||
args[i++] = "/D_X86_";
|
||||
args[i++] = "/Dx86";
|
||||
|
||||
args[i++] = "/DWINCE";
|
||||
args[i++] = "/D_WIN32_WCE=420";
|
||||
args[i++] = "/DUNDER_CE=420";
|
||||
args[i++] = "/DWIN32_PLATFORM_PSPC=400";
|
||||
args[i++] = "/DDEPRECATE_SUPPORTED";
|
||||
args[i++] = "/DSTDC_HEADERS";
|
||||
|
||||
args[i++] = "/F5000000";
|
||||
args[i++] = "/Gy"; // For link warning LNK1166
|
||||
|
||||
startOfArgvs = i;
|
||||
|
||||
i += argpath_conv(&argv[1], &args[i]);
|
||||
|
||||
// if /Fe is passed, then link
|
||||
//
|
||||
// if -o is passed, then blank out this argument, and place a "/Fo"
|
||||
// before the next argument
|
||||
while(argv[j])
|
||||
{
|
||||
if (strncmp(argv[j], "-o", 2) == 0)
|
||||
{
|
||||
if ( strstr(args[startOfArgvs+j], ".obj") )
|
||||
{
|
||||
// If we are outputting a .OBJ file, then we are
|
||||
// NOT linking, and we need to do some fancy
|
||||
// footwork to output "/FoFILENAME" as an argument
|
||||
args[startOfArgvs+j-1] = "";
|
||||
strcpy(outputFileArg, "/Fo");
|
||||
strcat(outputFileArg, args[startOfArgvs+j]);
|
||||
args[startOfArgvs+j] = outputFileArg;
|
||||
} else
|
||||
{
|
||||
// Otherwise, we are linking as usual
|
||||
link = 1;
|
||||
}
|
||||
}
|
||||
// if (strncmp(argv[j], "-o", 2) == 0)
|
||||
// {
|
||||
// link = 1;
|
||||
// }
|
||||
j++;
|
||||
}
|
||||
|
||||
if (link)
|
||||
{
|
||||
args[i++] = "/link";
|
||||
args[i++] = "-STACK:0x5000000"; //,1000000
|
||||
args[i++] = "-ENTRY:mainACRTStartup";
|
||||
args[i++] = "-SUBSYSTEM:WINDOWSCE,4.20";
|
||||
args[i++] = "-MACHINE:X86";
|
||||
args[i++] = "-LIBPATH:\"" WCE_LIB "\"";
|
||||
args[i++] = "-LIBPATH:\"" SHUNT_LIB "\"";
|
||||
args[i++] = "shunt.lib";
|
||||
args[i++] = "winsock.lib";
|
||||
args[i++] = "corelibc.lib";
|
||||
args[i++] = "coredll.lib";
|
||||
}
|
||||
args[i] = NULL;
|
||||
|
||||
//dumpargs(args);
|
||||
|
||||
iRetVal = _spawnv( _P_WAIT, CL_PATH, args );
|
||||
if (iRetVal == -1)
|
||||
{
|
||||
printf("-----------------> %d <----------------------\n\n\n\n", errno);
|
||||
}
|
||||
return 0;
|
||||
}
|
@ -1,20 +0,0 @@
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <process.h>
|
||||
#include "toolpaths.h"
|
||||
|
||||
|
||||
int
|
||||
main(int argc, char **argv)
|
||||
{
|
||||
char* args[1000];
|
||||
int i = 0;
|
||||
|
||||
args[i++] = "lib.exe";
|
||||
args[i++] = "/SUBSYSTEM:WINDOWSCE,4.20";
|
||||
args[i++] = "/MACHINE:X86";
|
||||
|
||||
argpath_conv(&argv[1], &args[i]);
|
||||
|
||||
return _spawnv( _P_WAIT, LIB_PATH, args );
|
||||
}
|
@ -1,63 +0,0 @@
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <process.h>
|
||||
|
||||
#include "toolpaths.h"
|
||||
|
||||
int
|
||||
main(int argc, char **argv)
|
||||
{
|
||||
int iRetVal;
|
||||
char* args[1000];
|
||||
int i = 0;
|
||||
int j = 0;
|
||||
int k = 0;
|
||||
|
||||
// Clear any link env variable that might get us tangled up
|
||||
_putenv("LINK=");
|
||||
|
||||
args[i++] = "link.exe";
|
||||
args[i++] = "/SUBSYSTEM:WINDOWSCE,4.20";
|
||||
args[i++] = "/MACHINE:X86";
|
||||
args[i++] = "/LIBPATH:\"" WCE_LIB "\"";
|
||||
args[i++] = "/LIBPATH:\"" SHUNT_LIB "\"";
|
||||
|
||||
args[i++] = "winsock.lib";
|
||||
args[i++] = "corelibc.lib";
|
||||
args[i++] = "coredll.lib";
|
||||
args[i++] = "ceshell.lib";
|
||||
|
||||
args[i++] = "shunt.lib";
|
||||
|
||||
args[i++] = "/NODEFAULTLIB:LIBC";
|
||||
args[i++] = "/NODEFAULTLIB:OLDNAMES";
|
||||
args[i++] = "/NODEFAULTLIB:MSVCRT";
|
||||
|
||||
args[i++] = "/STACK:0x5000000"; //,1000000
|
||||
|
||||
// if -DLL is not passed, then change the entry to 'main'
|
||||
while(argv[j])
|
||||
{
|
||||
if (strncmp(argv[j], "-DLL", 4) == 0 || strncmp(argv[j], "/DLL", 4) == 0)
|
||||
{
|
||||
k = 1;
|
||||
break;
|
||||
}
|
||||
j++;
|
||||
}
|
||||
|
||||
if (k==0)
|
||||
args[i++] = "/ENTRY:mainACRTStartup";
|
||||
|
||||
argpath_conv(&argv[1], &args[i]);
|
||||
|
||||
// dumpargs(args);
|
||||
|
||||
iRetVal = _spawnv( _P_WAIT, LINK_PATH, args );
|
||||
|
||||
if (iRetVal == -1)
|
||||
{
|
||||
printf("-----------------> %d <----------------------\n\n\n\n", errno);
|
||||
}
|
||||
return 0;
|
||||
}
|
@ -1,17 +0,0 @@
|
||||
rm arm-wince-as.exe
|
||||
rm arm-wince-gcc.exe
|
||||
rm arm-wince-lib.exe
|
||||
rm arm-wince-link.exe
|
||||
|
||||
rm *.obj
|
||||
rm *.ilk
|
||||
rm *.pdb
|
||||
|
||||
cl /O2 arm-wince-as.c
|
||||
cl /O2 arm-wince-gcc.c
|
||||
cl /O2 arm-wince-lib.c
|
||||
cl /O2 arm-wince-link.c
|
||||
|
||||
rm *.obj
|
||||
rm *.ilk
|
||||
rm *.pdb
|
@ -1,94 +0,0 @@
|
||||
#ifndef TOPSRCDIR
|
||||
#include "../topsrcdir.h"
|
||||
#endif
|
||||
|
||||
#define WCE_BIN "c:/Program Files/Microsoft eMbedded C++ 4.0/EVC/wce420/bin/"
|
||||
|
||||
#define WCE_INC "c:/Program Files/Windows CE Tools/wce420/Pocket PC 2003/Include/Emulator/"
|
||||
#define WCE_LIB "c:/Program Files/Windows CE Tools/wce420/Pocket PC 2003/Lib/Emulator/"
|
||||
|
||||
#define SHUNT_LIB TOPSRCDIR "/build/wince/shunt/build/emulatorRel/"
|
||||
#define SHUNT_INC TOPSRCDIR "/build/wince/shunt/include/"
|
||||
|
||||
#define ASM_PATH WCE_BIN "asm.exe"
|
||||
#define CL_PATH WCE_BIN "cl.exe"
|
||||
#define LIB_PATH WCE_BIN "lib.exe"
|
||||
#define LINK_PATH WCE_BIN "link.exe"
|
||||
|
||||
#define MAX_NOLEAK_BUFFERS 100
|
||||
char noleak_buffers[MAX_NOLEAK_BUFFERS][1024];
|
||||
static int next_buffer = 0;
|
||||
|
||||
int argpath_conv(char **args_in, char **args_out)
|
||||
{
|
||||
int i = 0;
|
||||
|
||||
while (args_in[i])
|
||||
{
|
||||
args_out[i] = args_in[i];
|
||||
|
||||
if (args_in[i])
|
||||
{
|
||||
char *offset = strstr(args_out[i], "/cygdrive/");
|
||||
|
||||
if (offset) {
|
||||
|
||||
strcpy(offset, offset+9);
|
||||
offset[0] = offset[1];
|
||||
offset[1] = ':';
|
||||
offset[2] = '/';
|
||||
}
|
||||
|
||||
if ( (args_out[i][0] == '-' || args_out[i][0] == '/') &&
|
||||
(args_out[i][1] == 'D'))
|
||||
{
|
||||
|
||||
offset = strstr(args_out[i]+2, "=");
|
||||
if (offset)
|
||||
{
|
||||
char* equalsChar = offset;
|
||||
|
||||
if (equalsChar[1] == '"')
|
||||
{
|
||||
*equalsChar = '\0';
|
||||
|
||||
strcpy(noleak_buffers[next_buffer], args_out[i]);
|
||||
|
||||
*equalsChar = '=';
|
||||
|
||||
strcat(noleak_buffers[next_buffer], "=\\\"");
|
||||
strcat(noleak_buffers[next_buffer], equalsChar+1);
|
||||
strcat(noleak_buffers[next_buffer], "\\\"");
|
||||
|
||||
args_out[i] = noleak_buffers[next_buffer];
|
||||
|
||||
next_buffer++;
|
||||
|
||||
if (next_buffer > MAX_NOLEAK_BUFFERS) {
|
||||
printf("next_buffer>MAX_NOLEAK_BUFFERS\n");
|
||||
exit(-1);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
i++;
|
||||
}
|
||||
args_out[i] = NULL;
|
||||
return i;
|
||||
}
|
||||
|
||||
void dumpargs(char** args)
|
||||
{
|
||||
int i = 0;
|
||||
|
||||
if (args[0] == NULL)
|
||||
printf(":: first element is null!\n");
|
||||
|
||||
while(args[i])
|
||||
printf("%s ", args[i++]);
|
||||
|
||||
printf("\n");
|
||||
fflush(stdout);
|
||||
fflush(stderr);
|
||||
}
|
@ -1,14 +0,0 @@
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <process.h>
|
||||
#include "toolpaths.h"
|
||||
|
||||
int
|
||||
main(int argc, char **argv)
|
||||
{
|
||||
char* args[1000];
|
||||
|
||||
argpath_conv(argv, args);
|
||||
|
||||
return _spawnv( _P_WAIT, ASM_PATH, args );
|
||||
}
|
@ -1,96 +0,0 @@
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <process.h>
|
||||
#include <errno.h>
|
||||
#include <windows.h>
|
||||
|
||||
#include "toolpaths.h"
|
||||
|
||||
int
|
||||
main(int argc, char **argv)
|
||||
{
|
||||
int iRetVal;
|
||||
int startOfArgvs;
|
||||
int i = 0;
|
||||
int j = 0;
|
||||
int link = 0;
|
||||
|
||||
char* args[1000];
|
||||
char outputFileArg[1000];
|
||||
|
||||
args[i++] = "clarm.exe";
|
||||
args[i++] = "/I\"" WCE_INC "\"";
|
||||
args[i++] = "/I\"" SHUNT_INC "\"";
|
||||
args[i++] = "/FI\"mozce_shunt.h\"";
|
||||
|
||||
args[i++] = "/DARM";
|
||||
args[i++] = "/DWINCE";
|
||||
args[i++] = "/D_WIN32_WCE=420";
|
||||
args[i++] = "/DUNDER_CE=420";
|
||||
args[i++] = "/DWIN32_PLATFORM_PSPC=400";
|
||||
args[i++] = "/D_ARM_";
|
||||
args[i++] = "/DDEPRECATE_SUPPORTED";
|
||||
args[i++] = "/DSTDC_HEADERS";
|
||||
|
||||
args[i++] = "/F5000000";
|
||||
args[i++] = "/Gy"; // For link warning LNK1166
|
||||
|
||||
startOfArgvs = i;
|
||||
|
||||
i += argpath_conv(&argv[1], &args[i]);
|
||||
|
||||
// if /Fe is passed, then link
|
||||
//
|
||||
// if -o is passed, then blank out this argument, and place a "/Fo"
|
||||
// before the next argument
|
||||
while(argv[j])
|
||||
{
|
||||
if (strncmp(argv[j], "-o", 2) == 0)
|
||||
{
|
||||
if ( strstr(args[startOfArgvs+j], ".obj") )
|
||||
{
|
||||
// If we are outputting a .OBJ file, then we are
|
||||
// NOT linking, and we need to do some fancy
|
||||
// footwork to output "/FoFILENAME" as an argument
|
||||
args[startOfArgvs+j-1] = "";
|
||||
strcpy(outputFileArg, "/Fo");
|
||||
strcat(outputFileArg, args[startOfArgvs+j]);
|
||||
args[startOfArgvs+j] = outputFileArg;
|
||||
} else
|
||||
{
|
||||
// Otherwise, we are linking as usual
|
||||
link = 1;
|
||||
}
|
||||
}
|
||||
// if (strncmp(argv[j], "-o", 2) == 0)
|
||||
// {
|
||||
// link = 1;
|
||||
// }
|
||||
j++;
|
||||
}
|
||||
|
||||
if (link)
|
||||
{
|
||||
args[i++] = "/link";
|
||||
args[i++] = "-STACK:0x5000000"; //,1000000
|
||||
args[i++] = "-ENTRY:mainACRTStartup";
|
||||
args[i++] = "-SUBSYSTEM:WINDOWSCE,4.20";
|
||||
args[i++] = "-MACHINE:ARM";
|
||||
args[i++] = "-LIBPATH:\"" WCE_LIB "\"";
|
||||
args[i++] = "-LIBPATH:\"" SHUNT_LIB "\"";
|
||||
args[i++] = "shunt.lib";
|
||||
args[i++] = "winsock.lib";
|
||||
args[i++] = "corelibc.lib";
|
||||
args[i++] = "coredll.lib";
|
||||
}
|
||||
args[i] = NULL;
|
||||
|
||||
//dumpargs(args);
|
||||
|
||||
iRetVal = _spawnv( _P_WAIT, CL_PATH, args );
|
||||
if (iRetVal == -1)
|
||||
{
|
||||
printf("-----------------> %d <----------------------\n\n\n\n", errno);
|
||||
}
|
||||
return 0;
|
||||
}
|
@ -1,20 +0,0 @@
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <process.h>
|
||||
#include "toolpaths.h"
|
||||
|
||||
|
||||
int
|
||||
main(int argc, char **argv)
|
||||
{
|
||||
char* args[1000];
|
||||
int i = 0;
|
||||
|
||||
args[i++] = "lib.exe";
|
||||
args[i++] = "/SUBSYSTEM:WINDOWSCE,4.20";
|
||||
args[i++] = "/MACHINE:ARM";
|
||||
|
||||
argpath_conv(&argv[1], &args[i]);
|
||||
|
||||
return _spawnv( _P_WAIT, LIB_PATH, args );
|
||||
}
|
@ -1,63 +0,0 @@
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <process.h>
|
||||
|
||||
#include "toolpaths.h"
|
||||
|
||||
int
|
||||
main(int argc, char **argv)
|
||||
{
|
||||
int iRetVal;
|
||||
char* args[1000];
|
||||
int i = 0;
|
||||
int j = 0;
|
||||
int k = 0;
|
||||
|
||||
// Clear any link env variable that might get us tangled up
|
||||
_putenv("LINK=");
|
||||
|
||||
args[i++] = "link.exe";
|
||||
args[i++] = "/SUBSYSTEM:WINDOWSCE,4.20";
|
||||
args[i++] = "/MACHINE:ARM";
|
||||
args[i++] = "/LIBPATH:\"" WCE_LIB "\"";
|
||||
args[i++] = "/LIBPATH:\"" SHUNT_LIB "\"";
|
||||
|
||||
args[i++] = "winsock.lib";
|
||||
args[i++] = "corelibc.lib";
|
||||
args[i++] = "coredll.lib";
|
||||
args[i++] = "ceshell.lib";
|
||||
|
||||
args[i++] = "shunt.lib";
|
||||
|
||||
args[i++] = "/NODEFAULTLIB:LIBC";
|
||||
args[i++] = "/NODEFAULTLIB:OLDNAMES";
|
||||
|
||||
args[i++] = "/STACK:0x5000000"; //,1000000
|
||||
//LARGEADDRESSAWARE
|
||||
|
||||
// if -DLL is not passed, then change the entry to 'main'
|
||||
while(argv[j])
|
||||
{
|
||||
if (strncmp(argv[j], "-DLL", 4) == 0 || strncmp(argv[j], "/DLL", 4) == 0)
|
||||
{
|
||||
k = 1;
|
||||
break;
|
||||
}
|
||||
j++;
|
||||
}
|
||||
|
||||
if (k==0)
|
||||
args[i++] = "/ENTRY:mainACRTStartup";
|
||||
|
||||
argpath_conv(&argv[1], &args[i]);
|
||||
|
||||
dumpargs(args);
|
||||
|
||||
iRetVal = _spawnv( _P_WAIT, LINK_PATH, args );
|
||||
|
||||
if (iRetVal == -1)
|
||||
{
|
||||
printf("-----------------> %d <----------------------\n\n\n\n", errno);
|
||||
}
|
||||
return 0;
|
||||
}
|
@ -1,94 +0,0 @@
|
||||
#ifndef TOPSRCDIR
|
||||
#include "../topsrcdir.h"
|
||||
#endif
|
||||
|
||||
#define WCE_BIN "c:/Program Files/Microsoft eMbedded C++ 4.0/EVC/wce420/bin/"
|
||||
|
||||
#define WCE_INC "c:/Program Files/Windows CE Tools/wce420/SMARTPHONE 2003/Include/Armv4/"
|
||||
#define WCE_LIB "c:/Program Files/Windows CE Tools/wce420/SMARTPHONE 2003/Lib/Armv4/"
|
||||
|
||||
#define SHUNT_LIB TOPSRCDIR "/build/wince/shunt/build/ARMV4SmartPhone/"
|
||||
#define SHUNT_INC TOPSRCDIR "/build/wince/shunt/include/"
|
||||
|
||||
#define ASM_PATH WCE_BIN "armasm.exe"
|
||||
#define CL_PATH WCE_BIN "clarm.exe"
|
||||
#define LIB_PATH WCE_BIN "lib.exe"
|
||||
#define LINK_PATH WCE_BIN "link.exe"
|
||||
|
||||
#define MAX_NOLEAK_BUFFERS 100
|
||||
char noleak_buffers[MAX_NOLEAK_BUFFERS][1024];
|
||||
static int next_buffer = 0;
|
||||
|
||||
int argpath_conv(char **args_in, char **args_out)
|
||||
{
|
||||
int i = 0;
|
||||
|
||||
while (args_in[i])
|
||||
{
|
||||
args_out[i] = args_in[i];
|
||||
|
||||
if (args_in[i])
|
||||
{
|
||||
char *offset = strstr(args_out[i], "/cygdrive/");
|
||||
|
||||
if (offset) {
|
||||
|
||||
strcpy(offset, offset+9);
|
||||
offset[0] = offset[1];
|
||||
offset[1] = ':';
|
||||
offset[2] = '/';
|
||||
}
|
||||
|
||||
if ( (args_out[i][0] == '-' || args_out[i][0] == '/') &&
|
||||
(args_out[i][1] == 'D'))
|
||||
{
|
||||
|
||||
offset = strstr(args_out[i]+2, "=");
|
||||
if (offset)
|
||||
{
|
||||
char* equalsChar = offset;
|
||||
|
||||
if (equalsChar[1] == '"')
|
||||
{
|
||||
*equalsChar = '\0';
|
||||
|
||||
strcpy(noleak_buffers[next_buffer], args_out[i]);
|
||||
|
||||
*equalsChar = '=';
|
||||
|
||||
strcat(noleak_buffers[next_buffer], "=\\\"");
|
||||
strcat(noleak_buffers[next_buffer], equalsChar+1);
|
||||
strcat(noleak_buffers[next_buffer], "\\\"");
|
||||
|
||||
args_out[i] = noleak_buffers[next_buffer];
|
||||
|
||||
next_buffer++;
|
||||
|
||||
if (next_buffer > MAX_NOLEAK_BUFFERS) {
|
||||
printf("next_buffer>MAX_NOLEAK_BUFFERS\n");
|
||||
exit(-1);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
i++;
|
||||
}
|
||||
args_out[i] = NULL;
|
||||
return i;
|
||||
}
|
||||
|
||||
void dumpargs(char** args)
|
||||
{
|
||||
int i = 0;
|
||||
|
||||
if (args[0] == NULL)
|
||||
printf(":: first element is null!\n");
|
||||
|
||||
while(args[i])
|
||||
printf("%s ", args[i++]);
|
||||
|
||||
printf("\n");
|
||||
fflush(stdout);
|
||||
fflush(stderr);
|
||||
}
|
Loading…
Reference in New Issue
Block a user