Skip to content

Commit

Permalink
Rename target platform name: winuwp ==> winrt
Browse files Browse the repository at this point in the history
  • Loading branch information
halx99 committed Nov 6, 2023
1 parent 8b8a946 commit 15f8e05
Show file tree
Hide file tree
Showing 7 changed files with 25 additions and 20 deletions.
2 changes: 1 addition & 1 deletion 1k/build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ $BUILD_LIBS = $args[2]

$targets_list = @{
'win32' = $true;
'winuwp' = $true;
'winrt' = $true; # Windows Universal Apps
'ios' = $true;
'tvos' = $true;
'osx' = $true;
Expand Down
10 changes: 5 additions & 5 deletions 1k/build1.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ if ($bw_archs -and !$bw_archs.contains($BUILD_ARCH)) {
return 0
}

$is_uwp = ($BUILD_TARGET -eq 'winuwp')
$is_winrt = ($BUILD_TARGET -eq 'winrt')

if($tag_dot2ul -eq 'true') {
$ver = ([Regex]::Replace($ver, '\.', '_'))
Expand All @@ -61,7 +61,7 @@ if ($cb_tool -eq 'cmake') {
if($BUILD_ARCH -eq "x86") {
$CONFIG_ALL_OPTIONS += '-A', 'Win32'
}
if ($is_uwp) {
if ($is_winrt) {
$CONFIG_ALL_OPTIONS += '-A', $BUILD_ARCH
$CONFIG_ALL_OPTIONS += '-DCMAKE_SYSTEM_NAME=WindowsStore', '-DCMAKE_SYSTEM_VERSION=10.0'
$CONFIG_ALL_OPTIONS += "-DCMAKE_VS_WINDOWS_TARGET_PLATFORM_MIN_VERSION=$env:VS_DEPLOYMENT_TARGET"
Expand All @@ -70,14 +70,14 @@ if ($cb_tool -eq 'cmake') {
}
elseif ($cb_tool -eq 'perl') { # opnel openssl use perl
if($BUILD_ARCH -eq "x86") {
if (!$is_uwp) {
if (!$is_winrt) {
$CONFIG_ALL_OPTIONS += 'VC-WIN32'
} else {
$CONFIG_ALL_OPTIONS += 'VC-WIN32-UWP'
}
}
else {
if (!$is_uwp) {
if (!$is_winrt) {
$CONFIG_ALL_OPTIONS += 'VC-WIN64A'
}
else {
Expand All @@ -95,7 +95,7 @@ elseif ($cb_tool -eq 'perl') { # opnel openssl use perl
}
}
elseif ($cb_tool -eq 'gn') {
if ($is_uwp) {
if ($is_winrt) {
$CONFIG_ALL_OPTIONS += 'target_os=\"winuwp\"'
}
}
Expand Down
20 changes: 10 additions & 10 deletions 1k/dist.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,16 @@ PATH=`pwd`/build:$PATH

# The dist flags
DISTF_WIN32=1
DISTF_WINUWP=2
DISTF_WINALL=$(($DISTF_WIN32|$DISTF_WINUWP))
DISTF_WINRT=2
DISTF_WINALL=$(($DISTF_WIN32|$DISTF_WINRT))
DISTF_LINUX=4
DISTF_ANDROID=8
DISTF_MAC=16
DISTF_IOS=32
DISTF_TVOS=64
DISTF_APPL=$(($DISTF_MAC|$DISTF_IOS|$DISTF_TVOS))
DISTF_NO_INC=1024
DISTF_NO_WINUWP=$(($DISTF_WIN32|$DISTF_LINUX|$DISTF_ANDROID|$DISTF_APPL))
DISTF_NO_WINRT=$(($DISTF_WIN32|$DISTF_LINUX|$DISTF_ANDROID|$DISTF_APPL))
DISTF_ALL=$(($DISTF_WINALL|$DISTF_LINUX|$DISTF_ANDROID|$DISTF_APPL))

function parse_yaml {
Expand Down Expand Up @@ -139,14 +139,14 @@ function dist_lib {
copy1k "install_win32_x64/${LIB_NAME}/bin/*.dll" ${DIST_DIR}/prebuilt/win32/x64/
fi

if [ ! $(($DIST_FLAGS & $DISTF_WINUWP)) = 0 ]; then
mkdir -p ${DIST_DIR}/prebuilt/winuwp/x64
copy1k "install_winuwp_x64/${LIB_NAME}/lib/*.lib" ${DIST_DIR}/prebuilt/winuwp/x64/
copy1k "install_winuwp_x64/${LIB_NAME}/bin/*.dll" ${DIST_DIR}/prebuilt/winuwp/x64/
if [ ! $(($DIST_FLAGS & $DISTF_WINRT)) = 0 ]; then
mkdir -p ${DIST_DIR}/prebuilt/winrt/x64
copy1k "install_winrt_x64/${LIB_NAME}/lib/*.lib" ${DIST_DIR}/prebuilt/winrt/x64/
copy1k "install_winrt_x64/${LIB_NAME}/bin/*.dll" ${DIST_DIR}/prebuilt/winrt/x64/

mkdir -p ${DIST_DIR}/prebuilt/winuwp/arm64
copy1k "install_winuwp_arm64/${LIB_NAME}/lib/*.lib" ${DIST_DIR}/prebuilt/winuwp/arm64/
copy1k "install_winuwp_arm64/${LIB_NAME}/bin/*.dll" ${DIST_DIR}/prebuilt/winuwp/arm64/
mkdir -p ${DIST_DIR}/prebuilt/winrt/arm64
copy1k "install_winrt_arm64/${LIB_NAME}/lib/*.lib" ${DIST_DIR}/prebuilt/winrt/arm64/
copy1k "install_winrt_arm64/${LIB_NAME}/bin/*.dll" ${DIST_DIR}/prebuilt/winrt/arm64/
fi

if [ ! $(($DIST_FLAGS & $DISTF_LINUX)) = 0 ]; then
Expand Down
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ Your thridparty prebuilts will never outdated if you're using build1k!
https://chromiumdash.appspot.com/fetch_releases?channel=Stable&platform=Windows&num=1

## Build Targets:

- osx:
- arm64 (M1+)
- x86_64
Expand All @@ -39,6 +40,10 @@ https://chromiumdash.appspot.com/fetch_releases?channel=Stable&platform=Windows&
- win32 (Windows Desktop Apps)
- x86
- x86_64
- winuwp (Windows Universal Apps)
- winrt/winuwp (Windows Universal Apps)
- x86_64
- arm64

## cppwinrt

Since axmol-2.1 migrate from `C++/CX` to [`cppwinrt`](https://learn.microsoft.com/en-us/windows/uwp/cpp-and-winrt-apis/move-to-winrt-from-wrl) for breaking of c++ standard limition, benefits to use c++20 on all target platforms.
2 changes: 1 addition & 1 deletion src/angle/build/config/win/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ config("compiler") {
cflags += [ "/D__WRL_ENABLE_FUNCTION_STATICS__" ]

# Tell clang which version of MSVC to emulate.
cflags += [ "-fmsc-version=1934" ]
cflags += [ "-fmsc-version=1937" ]

if (is_component_build) {
cflags += [
Expand Down
2 changes: 1 addition & 1 deletion src/jpeg-turbo/dist1.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ DIST_ROOT=$1
LIB_NAME=jpeg-turbo
DIST_DIR="${DIST_ROOT}/${LIB_NAME}"

dist_lib ${LIB_NAME} ${DIST_DIR} $DISTF_NO_WINUWP jconfig.h config_ab.h.in
dist_lib ${LIB_NAME} ${DIST_DIR} $DISTF_NO_WINRT jconfig.h config_ab.h.in

# create flat lib for ios
if [ -f "install_ios_arm/${LIB_NAME}/lib/libjpeg.a" ] ; then
Expand Down
2 changes: 1 addition & 1 deletion src/luajit/dist1.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ DIST_ROOT=$1
LIB_NAME=luajit
DIST_DIR="${DIST_ROOT}/${LIB_NAME}"

dist_lib ${LIB_NAME} ${DIST_DIR} $DISTF_NO_WINUWP
dist_lib ${LIB_NAME} ${DIST_DIR} $DISTF_NO_WINRT

# create flat lib for ios
if [ -f "install_ios_arm/${LIB_NAME}/lib/libluajit.a" ] ; then
Expand Down

0 comments on commit 15f8e05

Please sign in to comment.