Skip to content

Commit

Permalink
Refine windows targets: win, uwp
Browse files Browse the repository at this point in the history
  • Loading branch information
halx99 committed Apr 25, 2023
1 parent 4664af5 commit d8d1722
Show file tree
Hide file tree
Showing 11 changed files with 45 additions and 45 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ jobs:
path: ./${{ env.INSTALL_ROOT }}/**
name: ${{ env.INSTALL_ROOT }}

windows:
win:
# The type of runner that the job will run on
runs-on: windows-latest

Expand All @@ -198,7 +198,7 @@ jobs:
- x86
- x64
env:
BUILD_TARGET: windows
BUILD_TARGET: win
NO_DLL: ${{ github.event.inputs.no_dll }}
BUILD_ARCH: ${{ matrix.arch }}

Expand All @@ -221,7 +221,7 @@ jobs:
path: ./${{ env.INSTALL_ROOT }}/**
name: ${{ env.INSTALL_ROOT }}

winrt:
uwp:
# The type of runner that the job will run on
runs-on: windows-latest

Expand All @@ -232,7 +232,7 @@ jobs:
- x64
- amd64_arm64
env:
BUILD_TARGET: winrt
BUILD_TARGET: uwp
NO_DLL: ${{ github.event.inputs.no_dll }}
BUILD_ARCH: ${{ matrix.arch }}

Expand Down
10 changes: 5 additions & 5 deletions 1k/build1.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ if ($bw_archs -and !$bw_archs.contains($BUILD_ARCH)) {
return 0
}

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

if($tag_dot2ul -eq 'true') {
$ver = ([Regex]::Replace($ver, '\.', '_'))
Expand All @@ -60,22 +60,22 @@ if ($cb_tool -eq 'cmake') {
if($BUILD_ARCH -eq "x86") {
$CONFIG_ALL_OPTIONS += '-A', 'Win32'
}
if ($is_winrt) {
if ($is_uwp) {
$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"
}
}
elseif ($cb_tool -eq 'perl') { # opnel openssl use perl
if($BUILD_ARCH -eq "x86") {
if (!$is_winrt) {
if (!$is_uwp) {
$CONFIG_ALL_OPTIONS += 'VC-WIN32'
} else {
$CONFIG_ALL_OPTIONS += 'VC-WIN32-UWP'
}
}
else {
if (!$is_winrt) {
if (!$is_uwp) {
$CONFIG_ALL_OPTIONS += 'VC-WIN64A'
}
else {
Expand All @@ -93,7 +93,7 @@ elseif ($cb_tool -eq 'perl') { # opnel openssl use perl
}
}
elseif ($cb_tool -eq 'gn') {
if ($is_winrt) {
if ($is_uwp) {
$CONFIG_ALL_OPTIONS += 'target_os=\"winuwp\"'
}
}
Expand Down
54 changes: 27 additions & 27 deletions 1k/dist.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,18 +25,18 @@ g++ -std=c++17 1k/copy1k.cpp -o build/copy1k
PATH=`pwd`/build:$PATH

# The dist flags
DISTF_WIN32=1
DISTF_WINRT=2
DISTF_WIN=$(($DISTF_WIN32|$DISTF_WINRT))
DISTF_WIN=1
DISTF_UWP=2
DISTF_WINALL=$(($DISTF_WIN|$DISTF_UWP))
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_WINRT=$(($DISTF_WIN32|$DISTF_LINUX|$DISTF_ANDROID|$DISTF_APPL))
DISTF_ALL=$(($DISTF_WIN|$DISTF_LINUX|$DISTF_ANDROID|$DISTF_APPL))
DISTF_NO_UWP=$(($DISTF_WIN|$DISTF_LINUX|$DISTF_ANDROID|$DISTF_APPL))
DISTF_ALL=$(($DISTF_WINALL|$DISTF_LINUX|$DISTF_ANDROID|$DISTF_APPL))

function parse_yaml {
local prefix=$2
Expand Down Expand Up @@ -91,8 +91,8 @@ function dist_lib {
# copy common headers
if [ ! $(($DIST_FLAGS & $DISTF_MAC)) = 0 ]; then
cp -rf install_osx_x64/${LIB_NAME}/include/${INC_DIR} ${DIST_DIR}/include/${INC_DIR}
elif [ ! $(($DIST_FLAGS & $DISTF_WIN)) = 0 ]; then
cp -rf install_windows_x64/${LIB_NAME}/include/${INC_DIR} ${DIST_DIR}/include/${INC_DIR}
elif [ ! $(($DIST_FLAGS & $DISTF_WINALL)) = 0 ]; then
cp -rf install_win_x64/${LIB_NAME}/include/${INC_DIR} ${DIST_DIR}/include/${INC_DIR}
fi

if [ "$CONF_HEADER" != "" ] ; then
Expand All @@ -107,8 +107,8 @@ function dist_lib {

# copy platform spec config header file
if [ "$CONF_TEMPLATE" = "config.h.in" ] ; then
cp install_windows_x86/${LIB_NAME}/include/${INC_DIR}${CONF_HEADER} ${DIST_DIR}/include/win32/${INC_DIR}
cp install_windows_x64/${LIB_NAME}/include/${INC_DIR}${CONF_HEADER} ${DIST_DIR}/include/win64/${INC_DIR}
cp install_win_x86/${LIB_NAME}/include/${INC_DIR}${CONF_HEADER} ${DIST_DIR}/include/win32/${INC_DIR}
cp install_win_x64/${LIB_NAME}/include/${INC_DIR}${CONF_HEADER} ${DIST_DIR}/include/win64/${INC_DIR}
cp install_linux_x64/${LIB_NAME}/include/${INC_DIR}${CONF_HEADER} ${DIST_DIR}/include/linux/${INC_DIR}
cp install_osx_x64/${LIB_NAME}/include/${INC_DIR}${CONF_HEADER} ${DIST_DIR}/include/mac/${INC_DIR}
# cp install_ios_arm/${LIB_NAME}/include/${INC_DIR}${CONF_HEADER} ${DIST_DIR}/include/ios-arm/${INC_DIR}
Expand All @@ -122,31 +122,31 @@ function dist_lib {
cp install_android_x64/${LIB_NAME}/include/${INC_DIR}${CONF_HEADER} ${DIST_DIR}/include/android-x86_64/${INC_DIR}

elif [ "$CONF_TEMPLATE" = "config_ab.h.in" ] ; then
cp install_windows_x86/${LIB_NAME}/include/${INC_DIR}${CONF_HEADER} ${DIST_DIR}/include/win32/${INC_DIR}
cp install_win_x86/${LIB_NAME}/include/${INC_DIR}${CONF_HEADER} ${DIST_DIR}/include/win32/${INC_DIR}
cp install_linux_x64/${LIB_NAME}/include/${INC_DIR}${CONF_HEADER} ${DIST_DIR}/include/unix/${INC_DIR}
fi
fi
fi

# create prebuilt dirs
if [ ! $(($DIST_FLAGS & $DISTF_WIN32)) = 0 ]; then
mkdir -p ${DIST_DIR}/prebuilt/windows/x86
copy1k "install_windows_x86/${LIB_NAME}/lib/*.lib" ${DIST_DIR}/prebuilt/windows/x86/
copy1k "install_windows_x86/${LIB_NAME}/bin/*.dll" ${DIST_DIR}/prebuilt/windows/x86/

mkdir -p ${DIST_DIR}/prebuilt/windows/x64
copy1k "install_windows_x64/${LIB_NAME}/lib/*.lib" ${DIST_DIR}/prebuilt/windows/x64/
copy1k "install_windows_x64/${LIB_NAME}/bin/*.dll" ${DIST_DIR}/prebuilt/windows/x64/
if [ ! $(($DIST_FLAGS & $DISTF_WIN)) = 0 ]; then
mkdir -p ${DIST_DIR}/prebuilt/win/x86
copy1k "install_win_x86/${LIB_NAME}/lib/*.lib" ${DIST_DIR}/prebuilt/win/x86/
copy1k "install_win_x86/${LIB_NAME}/bin/*.dll" ${DIST_DIR}/prebuilt/win/x86/

mkdir -p ${DIST_DIR}/prebuilt/win/x64
copy1k "install_win_x64/${LIB_NAME}/lib/*.lib" ${DIST_DIR}/prebuilt/win/x64/
copy1k "install_win_x64/${LIB_NAME}/bin/*.dll" ${DIST_DIR}/prebuilt/win/x64/
fi

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/
if [ ! $(($DIST_FLAGS & $DISTF_UWP)) = 0 ]; then
mkdir -p ${DIST_DIR}/prebuilt/uwp/x64
copy1k "install_uwp_x64/${LIB_NAME}/lib/*.lib" ${DIST_DIR}/prebuilt/uwp/x64/
copy1k "install_uwp_x64/${LIB_NAME}/bin/*.dll" ${DIST_DIR}/prebuilt/uwp/x64/

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/
mkdir -p ${DIST_DIR}/prebuilt/uwp/arm64
copy1k "install_uwp_arm64/${LIB_NAME}/lib/*.lib" ${DIST_DIR}/prebuilt/uwp/arm64/
copy1k "install_uwp_arm64/${LIB_NAME}/bin/*.dll" ${DIST_DIR}/prebuilt/uwp/arm64/
fi

if [ ! $(($DIST_FLAGS & $DISTF_LINUX)) = 0 ]; then
Expand Down Expand Up @@ -185,8 +185,8 @@ function dist_lib {
verinfo_file=
ver=

if [ -f "install_windows_x64/${LIB_NAME}/bw_version.yml" ] ; then
verinfo_file="install_windows_x64/${LIB_NAME}/bw_version.yml"
if [ -f "install_win_x64/${LIB_NAME}/bw_version.yml" ] ; then
verinfo_file="install_win_x64/${LIB_NAME}/bw_version.yml"
elif [ -f "install_osx_x64/${LIB_NAME}/bw_version.yml" ] ; then
verinfo_file="install_osx_x64/${LIB_NAME}/bw_version.yml"
elif [ -f "install_linux_x64/${LIB_NAME}/bw_version.yml" ] ; then
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@ https://chromiumdash.appspot.com/fetch_releases?channel=Stable&platform=Windows&
- arm64
- x86
- x86_64
- windows
- win (Windows Desktop Apps)
- x86
- x86_64
- winrt
- uwp (Windows Universal Apps)
- x86_64
- arm64
2 changes: 1 addition & 1 deletion src/angle/dist1.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ DIST_ROOT=$1
LIB_NAME=angle
DIST_DIR="${DIST_ROOT}/${LIB_NAME}"

dist_lib ${LIB_NAME} ${DIST_DIR} ${DISTF_WIN}
dist_lib ${LIB_NAME} ${DIST_DIR} ${DISTF_WINALL}
2 changes: 1 addition & 1 deletion src/jpeg-turbo/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ ver: 2.1.5.1
tag_prefix: ''
tag_dot2ul: false
cb_tool: cmake
bw_targets: windows,osx,linux,ios,android,tvos
bw_targets: win,osx,linux,ios,android,tvos
config_options_unix: -DWITH_SIMD=ON -DWITH_JPEG8=ON -DENABLE_SHARED=OFF -DWITH_TURBOJPEG=OFF -DWITH_TESTS=OFF -DWITH_TOOLS=OFF
config_options_embed: ''
config_options_msw: -DWITH_SIMD=ON -DWITH_JPEG8=ON -DENABLE_SHARED=OFF -DWITH_TURBOJPEG=OFF -DWITH_CRT_DLL=ON -DWITH_TESTS=OFF -DWITH_TOOLS=OFF
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_WINRT jconfig.h config_ab.h.in
dist_lib ${LIB_NAME} ${DIST_DIR} $DISTF_NO_UWP 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/llvm/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ tag_prefix: llvmorg-
tag_dot2ul: false
cb_tool: cmake
cb_target: libclang
bw_targets: windows,linux,osx
bw_targets: win,linux,osx
bw_archs: x64
config_options_unix: -S llvm -DLLVM_ENABLE_PROJECTS=clang -DCMAKE_BUILD_TYPE=Release -DCMAKE_PLATFORM_NO_VERSIONED_SONAME=1
config_options_embed:
Expand Down
2 changes: 1 addition & 1 deletion src/llvm/dist1.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ DIST_ROOT=$1
LIB_NAME=llvm
DIST_DIR="${DIST_ROOT}/${LIB_NAME}"

dist_lib ${LIB_NAME} ${DIST_DIR} $(($DISTF_WIN32|$DISTF_LINUX|$DISTF_MAC|$DISTF_NO_INC))
dist_lib ${LIB_NAME} ${DIST_DIR} $(($DISTF_WIN|$DISTF_LINUX|$DISTF_MAC|$DISTF_NO_INC))


copy1k install_osx_x64/${LIB_NAME}/lib/libclang.dylib ${DIST_DIR}/prebuilt/mac/
2 changes: 1 addition & 1 deletion src/luajit/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ tag_prefix: v
tag_dot2ul: false
cb_script: msvcbuild.bat
cb_tool: make
bw_targets: windows,linux,android,osx,ios,tvos
bw_targets: win,linux,android,osx,ios,tvos
cb_dir: .\src
config_options_unix:
config_options_embed:
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_WINRT
dist_lib ${LIB_NAME} ${DIST_DIR} $DISTF_NO_UWP

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

0 comments on commit d8d1722

Please sign in to comment.