build: align window mac names with community norms
This commit is contained in:
parent
ddf6450486
commit
170b4251f3
3 changed files with 21 additions and 20 deletions
5
.github/workflows/ci.yml
vendored
5
.github/workflows/ci.yml
vendored
|
|
@ -231,7 +231,7 @@ jobs:
|
|||
sudo -u build makepkg -s
|
||||
export OSNAME=$(cat /etc/os-release | grep ^ID= | sed 's/ID=//g')
|
||||
export ARCH=$(uname -m)
|
||||
mv *.pkg.tar.zst deskflow-${{env.DESKFLOW_PACKAGE_VERSION}}_${OSNAME}_${ARCH}.pkg.tar.zst
|
||||
mv *.pkg.tar.zst deskflow-${{env.DESKFLOW_PACKAGE_VERSION}}-${OSNAME}-${ARCH}.pkg.tar.zst
|
||||
cd ..
|
||||
fi
|
||||
|
||||
|
|
@ -322,7 +322,8 @@ jobs:
|
|||
repo_token: "${{ secrets.GITHUB_TOKEN }}"
|
||||
automatic_release_tag: "continuous"
|
||||
prerelease: true
|
||||
title: "Continuous Build: ${{env.DESKFLOW_VERSION}}"
|
||||
title: "Continuous Build"
|
||||
body: "build: ${{env.DESKFLOW_VERSION}}"
|
||||
files: |
|
||||
package-*/*
|
||||
|
||||
|
|
|
|||
|
|
@ -34,10 +34,10 @@ macro(configure_packaging)
|
|||
configure_linux_packaging()
|
||||
elseif(${CMAKE_SYSTEM_NAME} MATCHES "|.*BSD")
|
||||
message(STATUS "BSD packaging not yet supported")
|
||||
set(OS_STRING ${CMAKE_SYSTEM_NAME}_${CMAKE_SYSTEM_PROCESSOR})
|
||||
set(OS_STRING ${CMAKE_SYSTEM_NAME}-${CMAKE_SYSTEM_PROCESSOR})
|
||||
endif()
|
||||
|
||||
set(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}-${PACKAGE_VERSION_LABEL}_${OS_STRING}")
|
||||
set(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}-${PACKAGE_VERSION_LABEL}-${OS_STRING}")
|
||||
message(STATUS "Package Basename: ${CPACK_PACKAGE_FILE_NAME}")
|
||||
|
||||
include(CPack)
|
||||
|
|
@ -65,10 +65,12 @@ macro(configure_windows_packaging)
|
|||
configure_files(${PROJECT_SOURCE_DIR}/res/dist/wix
|
||||
${PROJECT_BINARY_DIR}/installer)
|
||||
|
||||
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
|
||||
set(OS_STRING "win64")
|
||||
elseif(CMAKE_SIZEOF_VOID_P EQUAL 4)
|
||||
set(OS_STRING "win32")
|
||||
if(CMAKE_SYSTEM_PROCESSOR MATCHES AMD64)
|
||||
set(OS_STRING "win-x64")
|
||||
elseif(CMAKE_SYSTEM_PROCESSOR MATCHES ARM64)
|
||||
set(OS_STRING "win-arm64")
|
||||
else()
|
||||
set(OS_STRING "win-${CMAKE_SYSTEM_PROCESSOR}")
|
||||
endif()
|
||||
|
||||
endmacro()
|
||||
|
|
@ -87,7 +89,8 @@ macro(configure_mac_packaging)
|
|||
set(DESKFLOW_BUNDLE_BINARY_DIR ${DESKFLOW_BUNDLE_DIR}/Contents/MacOS)
|
||||
|
||||
configure_files(${DESKFLOW_BUNDLE_SOURCE_DIR} ${DESKFLOW_BUNDLE_DIR})
|
||||
set(OS_STRING "macos")
|
||||
|
||||
set(OS_STRING "macos-${CMAKE_SYSTEM_PROCESSOR}")
|
||||
|
||||
file(RENAME ${DESKFLOW_BUNDLE_DIR}/Contents/Resources/App.icns
|
||||
${DESKFLOW_BUNDLE_DIR}/Contents/Resources/${DESKFLOW_APP_NAME}.icns)
|
||||
|
|
@ -156,14 +159,14 @@ macro(configure_linux_package_name)
|
|||
|
||||
# Determain the code name to be used if any
|
||||
if(NOT "${DISTRO_VERSION_ID}" STREQUAL "")
|
||||
set(CN_STRING "${DISTRO_VERSION_ID}_")
|
||||
set(CN_STRING "${DISTRO_VERSION_ID}-")
|
||||
endif()
|
||||
|
||||
if(NOT "${DISTRO_CODENAME}" STREQUAL "")
|
||||
set(CN_STRING "${DISTRO_CODENAME}_")
|
||||
set(CN_STRING "${DISTRO_CODENAME}-")
|
||||
endif()
|
||||
|
||||
set(OS_STRING "${DISTRO_NAME}_${CN_STRING}${CMAKE_SYSTEM_PROCESSOR}")
|
||||
set(OS_STRING "${DISTRO_NAME}-${CN_STRING}${CMAKE_SYSTEM_PROCESSOR}")
|
||||
|
||||
endmacro()
|
||||
|
||||
|
|
|
|||
|
|
@ -84,17 +84,14 @@ def get_filename_base(version, prefix):
|
|||
# Some Windows users get confused by 'amd64' and think it's 'arm64',
|
||||
# so we'll use Intel's 'x64' branding (even though it's wrong).
|
||||
# Also replace 'x86_64' with 'x64' for consistency.
|
||||
os_part= "win"
|
||||
if machine == "amd64" or machine == "x86_64":
|
||||
os_part = "win64"
|
||||
machine = "x64"
|
||||
elif os == "mac":
|
||||
if machine == "amd64" or machine == "x86_64":
|
||||
os_part = "mac_x64"
|
||||
else:
|
||||
os_part = "mac_arm64"
|
||||
os_part = "macos"
|
||||
# Add '-' between our name parts we do not want spaces in the filename
|
||||
return f"{prefix}-{version}-{os_part}-{machine}"
|
||||
|
||||
# Underscore is used to delimit different parts of the filename (e.g. version, OS, etc).
|
||||
# Dashes are used to delimit spaces, e.g. "debian-trixie" for "Debian Trixie".
|
||||
return f"{prefix}-{version}_{os_part}"
|
||||
|
||||
|
||||
def windows_package(filename_base, project_build_dir, dist_dir):
|
||||
|
|
|
|||
Loading…
Reference in a new issue