Skip to content

Commit

Permalink
Merge pull request #2 from sinkingsugar/uwp
Browse files Browse the repository at this point in the history
Removed Store/Phone support
  • Loading branch information
sinkingsugar authored Nov 5, 2016
2 parents 0b17ea5 + 2a5c7f5 commit c6a74a6
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 67 deletions.
54 changes: 10 additions & 44 deletions buildWindows.bat
Original file line number Diff line number Diff line change
Expand Up @@ -19,66 +19,32 @@ msbuild libNativePath.sln /p:Configuration=Release
if %ERRORLEVEL% neq 0 GOTO :error_popd
popd

REM Windows Store
if not exist build\WindowsStore\x86 mkdir build\WindowsStore\x86
pushd build\WindowsStore\x86
cmake ..\..\..\ -G "Visual Studio 14" -DCMAKE_SYSTEM_NAME=WindowsStore -DCMAKE_SYSTEM_VERSION=8.1
msbuild libNativePath.sln /p:Configuration=Release
if %ERRORLEVEL% neq 0 GOTO :error_popd
popd

if not exist build\WindowsStore\x64 mkdir build\WindowsStore\x64
pushd build\WindowsStore\x64
cmake ..\..\..\ -G "Visual Studio 14 Win64" -DCMAKE_SYSTEM_NAME=WindowsStore -DCMAKE_SYSTEM_VERSION=8.1
msbuild libNativePath.sln /p:Configuration=Release
if %ERRORLEVEL% neq 0 GOTO :error_popd
popd

if not exist build\WindowsStore\ARM mkdir build\WindowsStore\ARM
pushd build\WindowsStore\ARM
cmake ..\..\..\ -G "Visual Studio 14 ARM" -DCMAKE_SYSTEM_NAME=WindowsStore -DCMAKE_SYSTEM_VERSION=8.1
msbuild libNativePath.sln /p:Configuration=Release
if %ERRORLEVEL% neq 0 GOTO :error_popd
popd

REM Windows Phone
if not exist build\WindowsPhone\x86 mkdir build\WindowsPhone\x86
pushd build\WindowsPhone\x86
cmake ..\..\..\ -G "Visual Studio 14" -DCMAKE_SYSTEM_NAME=WindowsPhone -DCMAKE_SYSTEM_VERSION=8.1
msbuild libNativePath.sln /p:Configuration=Release
if %ERRORLEVEL% neq 0 GOTO :error_popd
popd

if not exist build\WindowsPhone\ARM mkdir build\WindowsPhone\ARM
pushd build\WindowsPhone\ARM
cmake ..\..\..\ -G "Visual Studio 14 ARM" -DCMAKE_SYSTEM_NAME=WindowsPhone -DCMAKE_SYSTEM_VERSION=8.1
msbuild libNativePath.sln /p:Configuration=Release
if %ERRORLEVEL% neq 0 GOTO :error_popd
popd

REM Windows Universal
if not exist build\WindowsUniversal\x86 mkdir build\WindowsUniversal\x86
pushd build\WindowsUniversal\x86
REM Windows UWP
if not exist build\UWP\x86 mkdir build\UWP\x86
pushd build\UWP\x86
cmake ..\..\..\ -G "Visual Studio 14" -DCMAKE_SYSTEM_NAME=WindowsStore -DCMAKE_SYSTEM_VERSION=10.0
msbuild libNativePath.sln /p:Configuration=Release
if %ERRORLEVEL% neq 0 GOTO :error_popd
popd

if not exist build\WindowsUniversal\x64 mkdir build\WindowsUniversal\x64
pushd build\WindowsUniversal\x64
if not exist build\UWP\x64 mkdir build\UWP\x64
pushd build\UWP\x64
cmake ..\..\..\ -G "Visual Studio 14 Win64" -DCMAKE_SYSTEM_NAME=WindowsStore -DCMAKE_SYSTEM_VERSION=10.0
msbuild libNativePath.sln /p:Configuration=Release
if %ERRORLEVEL% neq 0 GOTO :error_popd
popd

if not exist build\WindowsUniversal\ARM mkdir build\WindowsUniversal\ARM
pushd build\WindowsUniversal\ARM
if not exist build\UWP\ARM mkdir build\UWP\ARM
pushd build\UWP\ARM
cmake ..\..\..\ -G "Visual Studio 14 ARM" -DCMAKE_SYSTEM_NAME=WindowsStore -DCMAKE_SYSTEM_VERSION=10.0
msbuild libNativePath.sln /p:Configuration=Release
if %ERRORLEVEL% neq 0 GOTO :error_popd
popd

goto :exit

:error_popd
popd

:exit
@echo on
46 changes: 23 additions & 23 deletions tools/np-build.lua
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ local release_ms_flags = "-O2"
function BuildWindows32DLL(cfile)
local flags = ""
if debug then flags = debug_flags else flags = release_flags end
local cmd = "clang -m32 -DNP_WIN32 -Wall -fno-ms-extensions -nobuiltininc -nostdinc++ -target i686-pc-windows-msvc "..common_flags.." "..flags.." -o "..cfile..".o ".." -c "..cfile;
local cmd = "clang -m32 -DNP_WIN32 -Wall -fno-ms-extensions -nostdlibinc -nobuiltininc -nostdinc++ -target i686-pc-windows-msvc "..common_flags.." "..flags.." -o "..cfile..".o ".." -c "..cfile;
if is_verbose == true then
print(cmd)
end
Expand All @@ -40,7 +40,7 @@ end
function BuildWindows32(cfile)
local flags = ""
if debug then flags = debug_flags else flags = release_flags end
local cmd = "clang -m32 -DNP_WIN32 -nobuiltininc -nostdinc++ -target i686-pc-windows-msvc "..common_flags.." "..flags.." -o "..cfile..".o ".." -c "..cfile;
local cmd = "clang -m32 -DNP_WIN32 -nostdlibinc -nobuiltininc -nostdinc++ -target i686-pc-windows-msvc "..common_flags.." "..flags.." -o "..cfile..".o ".." -c "..cfile;
if is_verbose == true then
print(cmd)
end
Expand All @@ -62,7 +62,7 @@ end
function BuildWindows64(cfile)
local flags = ""
if debug then flags = debug_flags else flags = release_flags end
local cmd = "clang -m64 -DNP_WIN32 -nobuiltininc -nostdinc++ -target i686-pc-windows-msvc "..common_flags.." "..flags.." -o "..cfile..".o ".." -c "..cfile;
local cmd = "clang -m64 -DNP_WIN32 -nostdlibinc -nobuiltininc -nostdinc++ -target i686-pc-windows-msvc "..common_flags.." "..flags.." -o "..cfile..".o ".." -c "..cfile;
if is_verbose == true then
print(cmd)
end
Expand All @@ -86,7 +86,7 @@ end
function BuildWindowsUWP32(cfile)
local flags = ""
if debug then flags = debug_ms_flags else flags = release_ms_flags end
local cmd = "clang-cl -DNP_WIN32 -WX -EHsc -MD -DWIN_EXPORT -m32 "..common_flags.." "..flags.." -o "..cfile..".o ".." -c "..cfile;
local cmd = "clang-cl -DNP_WIN32 -WX -EHsc -GS- -MD -DWIN_EXPORT -m32 "..common_flags.." "..flags.." -o "..cfile..".o ".." -c "..cfile;
if is_verbose == true then
print(cmd)
end
Expand All @@ -98,7 +98,7 @@ function LinkWindowsUWP32()
for i, o in ipairs(objs) do
objs_str = objs_str..o.." "
end
local cmd = "\"C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\vcvarsall\" x86 store && lib /NOLOGO /OUT:WindowsUWP\\x86\\"..outputName..".lib "..objs_str
local cmd = "\"C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\vcvarsall\" x86 store 10.0.10240 && lib /NOLOGO /OUT:WindowsUWP\\x86\\"..outputName..".lib "..objs_str
if is_verbose == true then
print(cmd)
end
Expand All @@ -108,7 +108,7 @@ end
function BuildWindowsUWP64(cfile)
local flags = ""
if debug then flags = debug_ms_flags else flags = release_ms_flags end
local cmd = "clang-cl -DNP_WIN32 -WX -EHsc -MD -DWIN_EXPORT -m64 "..common_flags.." "..flags.." -o "..cfile..".o ".." -c "..cfile;
local cmd = "clang-cl -DNP_WIN32 -WX -EHsc -GS- -MD -DWIN_EXPORT -m64 "..common_flags.." "..flags.." -o "..cfile..".o ".." -c "..cfile;
if is_verbose == true then
print(cmd)
end
Expand All @@ -120,7 +120,7 @@ function LinkWindowsUWP64()
for i, o in ipairs(objs) do
objs_str = objs_str..o.." "
end
local cmd = "\"C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\vcvarsall\" x64 store && lib /NOLOGO /OUT:WindowsUWP\\x64\\"..outputName..".lib "..objs_str
local cmd = "\"C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\vcvarsall\" x64 store 10.0.10240 && lib /NOLOGO /OUT:WindowsUWP\\x64\\"..outputName..".lib "..objs_str
if is_verbose == true then
print(cmd)
end
Expand All @@ -130,7 +130,7 @@ end
function BuildWindowsUWPARM(cfile)
local flags = ""
if debug then flags = debug_ms_flags else flags = release_ms_flags end
local cmd = "clang-cl -DNP_WIN32 -WX -EHsc -MD -DWIN_EXPORT -m32 --target=thumbv7-windows-msvc "..common_flags.." "..flags.." -o "..cfile..".o ".." -c "..cfile;
local cmd = "clang-cl -DNP_WIN32 -WX -EHsc -GS- -MD -DWIN_EXPORT -m32 --target=thumbv7-windows-msvc "..common_flags.." "..flags.." -o "..cfile..".o ".." -c "..cfile;
if is_verbose == true then
print(cmd)
end
Expand All @@ -142,7 +142,7 @@ function LinkWindowsUWPARM()
for i, o in ipairs(objs) do
objs_str = objs_str..o.." "
end
local cmd = "\"C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\vcvarsall\" x86_arm store && lib /NOLOGO /OUT:WindowsUWP\\ARM\\"..outputName..".lib "..objs_str
local cmd = "\"C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\vcvarsall\" x86_arm store 10.0.10240 && lib /NOLOGO /OUT:WindowsUWP\\ARM\\"..outputName..".lib "..objs_str
if is_verbose == true then
print(cmd)
end
Expand Down Expand Up @@ -218,7 +218,7 @@ end
function BuildIOSArm7(cfile)
local flags = ""
if debug then flags = debug_flags else flags = release_flags end
local cmd = "clang -DNP_IOS -nobuiltininc -nostdinc++ -mios-version-min=6.0 -target armv7-apple-ios "..common_flags.." "..flags.." -o "..cfile..".o ".." -c "..cfile;
local cmd = "clang -DNP_IOS -nostdlibinc -nobuiltininc -nostdinc++ -mios-version-min=6.0 -target armv7-apple-ios "..common_flags.." "..flags.." -o "..cfile..".o ".." -c "..cfile;
if is_verbose == true then
print(cmd)
end
Expand All @@ -243,7 +243,7 @@ end
function BuildIOSArm7s(cfile)
local flags = ""
if debug then flags = debug_flags else flags = release_flags end
local cmd = "clang -DNP_IOS -nobuiltininc -nostdinc++ -mios-version-min=6.0 -target armv7s-apple-ios "..common_flags.." "..flags.." -o "..cfile..".o ".." -c "..cfile;
local cmd = "clang -DNP_IOS -nostdlibinc -nobuiltininc -nostdinc++ -mios-version-min=6.0 -target armv7s-apple-ios "..common_flags.." "..flags.." -o "..cfile..".o ".." -c "..cfile;
if is_verbose == true then
print(cmd)
end
Expand All @@ -265,7 +265,7 @@ end
function BuildIOSArm64(cfile)
local flags = ""
if debug then flags = debug_flags else flags = release_flags end
local cmd = "clang -DNP_IOS -nobuiltininc -nostdinc++ -mios-version-min=6.0 -target arm64-apple-ios "..common_flags.." "..flags.." -o "..cfile..".o ".." -c "..cfile;
local cmd = "clang -DNP_IOS -nostdlibinc -nobuiltininc -nostdinc++ -mios-version-min=6.0 -target arm64-apple-ios "..common_flags.." "..flags.." -o "..cfile..".o ".." -c "..cfile;
if is_verbose == true then
print(cmd)
end
Expand All @@ -287,7 +287,7 @@ end
function BuildIOSx86(cfile)
local flags = ""
if debug then flags = debug_flags else flags = release_flags end
local cmd = "clang -DNP_IOS -nobuiltininc -nostdinc++ -mios-version-min=6.0 -target i386-apple-ios "..common_flags.." "..flags.." -o "..cfile..".o ".." -c "..cfile;
local cmd = "clang -DNP_IOS -nostdlibinc -nobuiltininc -nostdinc++ -mios-version-min=6.0 -target i386-apple-ios "..common_flags.." "..flags.." -o "..cfile..".o ".." -c "..cfile;
if is_verbose == true then
print(cmd)
end
Expand All @@ -309,7 +309,7 @@ end
function BuildIOSx64(cfile)
local flags = ""
if debug then flags = debug_flags else flags = release_flags end
local cmd = "clang -DNP_IOS -nobuiltininc -nostdinc++ -mios-version-min=6.0 -target x86_64-apple-ios "..common_flags.." "..flags.." -o "..cfile..".o ".." -c "..cfile;
local cmd = "clang -DNP_IOS -nostdlibinc -nobuiltininc -nostdinc++ -mios-version-min=6.0 -target x86_64-apple-ios "..common_flags.." "..flags.." -o "..cfile..".o ".." -c "..cfile;
if is_verbose == true then
print(cmd)
end
Expand All @@ -333,7 +333,7 @@ end
function BuildMacOSx86(cfile)
local flags = ""
if debug then flags = debug_flags else flags = release_flags end
local cmd = "clang -DNP_MACOS -nobuiltininc -nostdinc++ -mmacosx-version-min=10.5 -target i386-apple-macosx "..common_flags.." "..flags.." -o "..cfile..".o ".." -c "..cfile;
local cmd = "clang -DNP_MACOS -nostdlibinc -nobuiltininc -nostdinc++ -mmacosx-version-min=10.5 -target i386-apple-macosx "..common_flags.." "..flags.." -o "..cfile..".o ".." -c "..cfile;
if is_verbose == true then
print(cmd)
end
Expand All @@ -355,7 +355,7 @@ end
function BuildMacOSx64(cfile)
local flags = ""
if debug then flags = debug_flags else flags = release_flags end
local cmd = "clang -DNP_MACOS -nobuiltininc -nostdinc++ -mmacosx-version-min=10.5 -target x86_64-apple-macosx "..common_flags.." "..flags.." -o "..cfile..".o ".." -c "..cfile;
local cmd = "clang -DNP_MACOS -nostdlibinc -nobuiltininc -nostdinc++ -mmacosx-version-min=10.5 -target x86_64-apple-macosx "..common_flags.." "..flags.." -o "..cfile..".o ".." -c "..cfile;
if is_verbose == true then
print(cmd)
end
Expand All @@ -379,7 +379,7 @@ end
function BuildAndroidArm(cfile)
local flags = ""
if debug then flags = debug_flags else flags = release_flags end
local cmd = "clang -DNP_ANDROID -nobuiltininc -nostdinc++ -target arm-none-android "..common_flags.." "..flags.." -o "..cfile..".o ".." -c "..cfile;
local cmd = "clang -DNP_ANDROID -nostdlibinc -nobuiltininc -nostdinc++ -target arm-none-android "..common_flags.." "..flags.." -o "..cfile..".o ".." -c "..cfile;
if is_verbose == true then
print(cmd)
end
Expand All @@ -401,7 +401,7 @@ end
function BuildAndroidArm7(cfile)
local flags = ""
if debug then flags = debug_flags else flags = release_flags end
local cmd = "clang -DNP_ANDROID -nobuiltininc -nostdinc++ -target armv7-none-android "..common_flags.." "..flags.." -o "..cfile..".o ".." -c "..cfile;
local cmd = "clang -DNP_ANDROID -nostdlibinc -nobuiltininc -nostdinc++ -target armv7-none-android "..common_flags.." "..flags.." -o "..cfile..".o ".." -c "..cfile;
if is_verbose == true then
print(cmd)
end
Expand All @@ -423,7 +423,7 @@ end
function BuildAndroidArm64(cfile)
local flags = ""
if debug then flags = debug_flags else flags = release_flags end
local cmd = "clang -DNP_ANDROID -nobuiltininc -nostdinc++ -target aarch64-none-android "..common_flags.." "..flags.." -o "..cfile..".o ".." -c "..cfile;
local cmd = "clang -DNP_ANDROID -nostdlibinc -nobuiltininc -nostdinc++ -target aarch64-none-android "..common_flags.." "..flags.." -o "..cfile..".o ".." -c "..cfile;
if is_verbose == true then
print(cmd)
end
Expand All @@ -445,7 +445,7 @@ end
function BuildAndroidx86(cfile)
local flags = ""
if debug then flags = debug_flags else flags = release_flags end
local cmd = "clang -DNP_ANDROID -nobuiltininc -nostdinc++ -target i386-none-android "..common_flags.." "..flags.." -o "..cfile..".o ".." -c "..cfile;
local cmd = "clang -DNP_ANDROID -nostdlibinc -nobuiltininc -nostdinc++ -target i386-none-android "..common_flags.." "..flags.." -o "..cfile..".o ".." -c "..cfile;
if is_verbose == true then
print(cmd)
end
Expand All @@ -470,7 +470,7 @@ end
function BuildAndroidx64(cfile)
local flags = ""
if debug then flags = debug_flags else flags = release_flags end
local cmd = "clang -DNP_ANDROID -nobuiltininc -nostdinc++ -target x86_64-none-android "..common_flags.." "..flags.." -o "..cfile..".o ".." -c "..cfile;
local cmd = "clang -DNP_ANDROID -nostdlibinc -nobuiltininc -nostdinc++ -target x86_64-none-android "..common_flags.." "..flags.." -o "..cfile..".o ".." -c "..cfile;
if is_verbose == true then
print(cmd)
end
Expand All @@ -494,7 +494,7 @@ end
function BuildLinuxX64(cfile)
local flags = ""
if debug then flags = debug_flags else flags = release_flags end
local cmd = "clang -DNP_LINUX -nobuiltininc -nostdinc++ -fPIC -target x86_64-linux-gnu "..common_flags.." "..flags.." -o "..cfile..".o ".." -c "..cfile;
local cmd = "clang -DNP_LINUX -nostdlibinc -nobuiltininc -nostdinc++ -fPIC -target x86_64-linux-gnu "..common_flags.." "..flags.." -o "..cfile..".o ".." -c "..cfile;
if is_verbose == true then
print(cmd)
end
Expand All @@ -516,7 +516,7 @@ end
function BuildLinuxX86(cfile)
local flags = ""
if debug then flags = debug_flags else flags = release_flags end
local cmd = "clang -DNP_LINUX -nobuiltininc -nostdinc++ -fPIC -target i386-linux-gnu "..common_flags.." "..flags.." -o "..cfile..".o ".." -c "..cfile;
local cmd = "clang -DNP_LINUX -nostdlibinc -nobuiltininc -nostdinc++ -fPIC -target i386-linux-gnu "..common_flags.." "..flags.." -o "..cfile..".o ".." -c "..cfile;
if is_verbose == true then
print(cmd)
end
Expand Down

0 comments on commit c6a74a6

Please sign in to comment.