From 787db196ad3c4e945792997111d759f82110775a Mon Sep 17 00:00:00 2001 From: spicyjpeg Date: Mon, 14 Oct 2024 17:44:12 +0200 Subject: Deprecate CPack packages and old changelog, fix ldscripts --- cpack/convert_images.sh | 45 ---------- cpack/description.txt | 27 ------ cpack/fakeroot_fix.cmake | 32 ------- cpack/icon.ico | Bin 194619 -> 0 bytes cpack/icon.svg | 164 ------------------------------------ cpack/nsis_banner.bmp | Bin 42622 -> 0 bytes cpack/nsis_banner.svg | 162 ----------------------------------- cpack/nsis_header.bmp | Bin 4220 -> 0 bytes cpack/nsis_header.svg | 66 --------------- cpack/setup.cmake | 214 ----------------------------------------------- cpack/uninstall.ico | Bin 194619 -> 0 bytes cpack/uninstall.svg | 164 ------------------------------------ 12 files changed, 874 deletions(-) delete mode 100644 cpack/convert_images.sh delete mode 100644 cpack/description.txt delete mode 100644 cpack/fakeroot_fix.cmake delete mode 100644 cpack/icon.ico delete mode 100644 cpack/icon.svg delete mode 100644 cpack/nsis_banner.bmp delete mode 100644 cpack/nsis_banner.svg delete mode 100644 cpack/nsis_header.bmp delete mode 100644 cpack/nsis_header.svg delete mode 100644 cpack/setup.cmake delete mode 100644 cpack/uninstall.ico delete mode 100644 cpack/uninstall.svg (limited to 'cpack') diff --git a/cpack/convert_images.sh b/cpack/convert_images.sh deleted file mode 100644 index 3816dec..0000000 --- a/cpack/convert_images.sh +++ /dev/null @@ -1,45 +0,0 @@ -#!/bin/bash -# This script generates Windows bitmaps from the SVGs in this directory. The -# bitmaps are displayed by the NSIS installers generated using CPack. Inkscape -# and ImageMagick must be installed for this script to work. - -INDEXED_SIZES=(16 24 32 48) -RGB_ONLY_SIZES=(64 96 128 256) -DITHER_OPTIONS="-dither riemersma" -OUTPUT_OPTIONS="+compress -strip" - -svg_to_bitmap() { - inkscape -z -e rgb.png $1 - - # There seems to be no way to tell ImageMagick to generate an 8-bit indexed - # BMP directly, so the image has to be converted to indexed PNG first. NSIS - # seems to reject all BMP versions other than "bmp3". - convert $DITHER_OPTIONS -colors 256 +remap rgb.png png8:i8.png - convert i8.png $OUTPUT_OPTIONS bmp3:$2 - rm -f rgb.png i8.png -} - -# https://stackoverflow.com/a/52636645 -svg_to_icon() { - for size in ${INDEXED_SIZES[@]} ${RGB_ONLY_SIZES[@]}; do - inkscape -z -e $size.png -w $size -h $size $1 - done - - # Windows expects some of the smaller sizes to be available in 4- and 8-bit - # indexed color formats, as well as RGB. - for size in ${INDEXED_SIZES[@]}; do - convert $DITHER_OPTIONS -colors 256 +remap $size.png png8:$size-i8.png - convert $DITHER_OPTIONS -colors 16 +remap $size.png png8:$size-i4.png - done - - icons="${INDEXED_SIZES[@]/%/.png} ${INDEXED_SIZES[@]/%/-i8.png} ${INDEXED_SIZES[@]/%/-i4.png} ${RGB_ONLY_SIZES[@]/%/.png}" - convert $icons $OUTPUT_OPTIONS $2 - rm -f $icons -} - -rm -f *.ico *.bmp - -svg_to_icon icon.svg icon.ico -svg_to_icon uninstall.svg uninstall.ico -svg_to_bitmap nsis_banner.svg nsis_banner.bmp -svg_to_bitmap nsis_header.svg nsis_header.bmp diff --git a/cpack/description.txt b/cpack/description.txt deleted file mode 100644 index 240b7d1..0000000 --- a/cpack/description.txt +++ /dev/null @@ -1,27 +0,0 @@ -PSn00bSDK is a 100% free and open source SDK project for the original Sony -PlayStation for developing homebrew applications and games for the console -100% freely. This SDK can be used for freeware, commercial, and open source -homebrew projects. - -The SDK is composed mainly of libraries (libpsn00b) and some utilities that -provide a basic framework for developing software for the PlayStation -hardware, the compiler is separate (GCC) and should be acquired from GNU. -The library API is intentionally written to resemble the library API of the -official libraries as closely as possible. This design decision is not only -for familiarity reasons to experienced programmers, but also so that existing -sample code and tutorials would still apply to this SDK, as well as making -the process of porting over existing homebrew originally made with official -SDKs easier with minimal modification, provided it doesn't use libgs. - -PSn00bSDK is currently a work in progress and cannot really be considered -production ready, but what is currently implemented should be enough to -produce some interesting homebrew with the SDK, especially with its extensive -support for the GPU and GTE hardware. There's no reason not to fully support -hardware features of a target platform when said hardware features have been -fully documented for years (nocash's PSX specs document in this case). - -Most of libpsn00b is written mostly in MIPS assembly, moreso functions that -interface with the hardware. Many of the standard C functions are implemented -in custom MIPS assembly instead of equivalents found in the BIOS ROM, for both -stability (the BIOS libc implementation of the PlayStation is actually buggy) -and performance reasons. diff --git a/cpack/fakeroot_fix.cmake b/cpack/fakeroot_fix.cmake deleted file mode 100644 index e34baa0..0000000 --- a/cpack/fakeroot_fix.cmake +++ /dev/null @@ -1,32 +0,0 @@ -# This script works around a bug in CPack's DEB/RPM generator, which causes -# files installed by subprojects (not by the main CMake script) to end up in -# packages alongside the "real" installation directory. It probably happens due -# to CMake running under fakeroot (when invoked by CPack to prepare the files -# to be packaged) and referencing absolute paths, which would explain why the -# entire build directory tree is replicated inside the packages. What this -# script does is simply finding and deleting all directories that do not match -# the installation prefix before CPack generates the package. - -cmake_minimum_required(VERSION 3.21) - -set(_prefix ${CPACK_TEMPORARY_INSTALL_DIRECTORY}${CPACK_PACKAGING_INSTALL_PREFIX}) - -file( - GLOB_RECURSE _entries - LIST_DIRECTORIES ON - ${CPACK_TEMPORARY_INSTALL_DIRECTORY}/* -) - -foreach(_entry IN LISTS _entries) - # Skip the entry if it (or its parent directory) has already been deleted. - if(NOT EXISTS ${_entry}) - continue() - endif() - - # Delete anything whose path doesn't start with the expected prefix. - string(FIND ${_entry} ${_prefix} _index) - if(NOT _index EQUAL 0) - message(NOTICE "Deleting unneeded entry from package: ${_entry}") - file(REMOVE_RECURSE ${_entry}) - endif() -endforeach() diff --git a/cpack/icon.ico b/cpack/icon.ico deleted file mode 100644 index 6759d23..0000000 Binary files a/cpack/icon.ico and /dev/null differ diff --git a/cpack/icon.svg b/cpack/icon.svg deleted file mode 100644 index 70d400d..0000000 --- a/cpack/icon.svg +++ /dev/null @@ -1,164 +0,0 @@ - - - PSn00bSDK icon - - - - - - - - - - - - - - - - - - - - - - - - - image/svg+xml - - PSn00bSDK icon - - - - - - - - - - - - - - - - - - - diff --git a/cpack/nsis_banner.bmp b/cpack/nsis_banner.bmp deleted file mode 100644 index 831c8f9..0000000 Binary files a/cpack/nsis_banner.bmp and /dev/null differ diff --git a/cpack/nsis_banner.svg b/cpack/nsis_banner.svg deleted file mode 100644 index 499bb94..0000000 --- a/cpack/nsis_banner.svg +++ /dev/null @@ -1,162 +0,0 @@ - - - PSn00bSDK installer banner - - - - - - - - - - - - - - - - - - - - - - - - - image/svg+xml - - PSn00bSDK installer banner - - - - - - - - - - - - - - - - - - - diff --git a/cpack/nsis_header.bmp b/cpack/nsis_header.bmp deleted file mode 100644 index d677e8c..0000000 Binary files a/cpack/nsis_header.bmp and /dev/null differ diff --git a/cpack/nsis_header.svg b/cpack/nsis_header.svg deleted file mode 100644 index 19ae01a..0000000 --- a/cpack/nsis_header.svg +++ /dev/null @@ -1,66 +0,0 @@ - - - PSn00bSDK installer header - - - - - - - - - - - - - - - diff --git a/cpack/setup.cmake b/cpack/setup.cmake deleted file mode 100644 index 1d66066..0000000 --- a/cpack/setup.cmake +++ /dev/null @@ -1,214 +0,0 @@ -# This script sets up all CPack-related variables and generates installation -# rules to bundle the GCC toolchain and CMake in packages. It is included by -# the main CMakeLists.txt script. - -## Settings - -# These can be set from the command line to completely disable bundling CMake -# and GCC in packages built by CPack. They have no effect on installing the SDK -# normally. -# TODO: BUNDLE_CMAKE should not be used, needs more testing -set( - BUNDLE_TOOLCHAIN OFF - CACHE BOOL "Include the GCC toolchain in installer packages" -) -set( - BUNDLE_NINJA OFF - CACHE BOOL "Include Ninja in installer packages" -) -#set( - #BUNDLE_CMAKE OFF - #CACHE BOOL "Include CMake in installer packages (Windows only)" -#) - -## Bundled components - -# "Install" the toolchain and CMake (by pulling files from their install -# locations). This is only useful when building installers, as CPack will pick -# up these installation rules and bundle the toolchain in the installers. -# NOTE: unfortunately there is no easy way to reuse the toolchain finding logic -# in sdk.cmake, so I had to copypaste it here. -if(BUNDLE_TOOLCHAIN) - find_program( - _gcc ${PSN00BSDK_TARGET}-gcc - HINTS - ${PSN00BSDK_TC}/bin - ${PSN00BSDK_TC}/../bin - PATHS - "C:/Program Files/${PSN00BSDK_TARGET}/bin" - "C:/Program Files (x86)/${PSN00BSDK_TARGET}/bin" - "C:/${PSN00BSDK_TARGET}/bin" - /opt/${PSN00BSDK_TARGET}/bin - /usr/local/${PSN00BSDK_TARGET}/bin - /usr/${PSN00BSDK_TARGET}/bin - NO_CACHE REQUIRED - ) - cmake_path(GET _gcc PARENT_PATH _bin) - cmake_path(GET _bin PARENT_PATH _toolchain) - - # Check if the toolchain is actually part of an existing PSn00bSDK install. - # If so, disable bundling as we can't determine which files are part of the - # toolchain and which ones are part of the SDK. - if(EXISTS ${_bin}/elf2x${CMAKE_EXECUTABLE_SUFFIX}) - message(FATAL_ERROR "${_toolchain} contains a full PSn00bSDK installation. To bundle the toolchain, set PSN00BSDK_TC to point to a directory containing only the toolchain files.") - else() - install( - DIRECTORY ${_toolchain}/ - DESTINATION . - COMPONENT toolchain - USE_SOURCE_PERMISSIONS - #EXCLUDE_FROM_ALL - ) - endif() -endif() - -if(BUNDLE_NINJA) - find_program(_ninja ninja NO_CACHE REQUIRED) - execute_process( - COMMAND ${_ninja} --version - OUTPUT_VARIABLE _ninja_version - OUTPUT_STRIP_TRAILING_WHITESPACE - COMMAND_ERROR_IS_FATAL ANY - ) - - install( - PROGRAMS ${_ninja} - TYPE BIN - COMPONENT ninja - ) -endif() - -if(BUNDLE_CMAKE) - cmake_path(GET CMAKE_COMMAND PARENT_PATH _bin) - cmake_path(GET _bin PARENT_PATH _cmakedir) - - # Bundling CMake is only allowed on Windows, both because finding CMake - # installation files is difficult on Linux and because it's better to - # specify CMake as a DEB/RPM dependency anyway. - if(NOT WIN32) - message(FATAL_ERROR "Bundling CMake into installers is only supported (and should only be done) on Windows.") - else() - install( - DIRECTORY ${_cmakedir}/ - DESTINATION . - COMPONENT cmake - USE_SOURCE_PERMISSIONS - #EXCLUDE_FROM_ALL - ) - endif() -endif() - -## Variables common to all package types - -if(NOT DEFINED CPACK_GENERATOR) - #if(WIN32) - #set(CPACK_GENERATOR ZIP NSIS) - #elseif(APPLE) - # TODO: add a macOS installer and related options - #set(CPACK_GENERATOR ZIP) - #elseif(CMAKE_SYSTEM_NAME STREQUAL "Linux") - #set(CPACK_GENERATOR ZIP DEB RPM) - #else() - set(CPACK_GENERATOR ZIP) - #endif() -endif() - -set(CPACK_VERBATIM_VARIABLES ON) -set(CPACK_ARCHIVE_THREADS 0) -set(CPACK_PACKAGE_DIRECTORY ${PROJECT_BINARY_DIR}/packages) -set(CPACK_PACKAGE_NAME PSn00bSDK) -set(CPACK_PACKAGE_VENDOR Lameguy64) -set(CPACK_PACKAGE_CONTACT Lameguy64) -set(CPACK_RESOURCE_FILE_README ${PROJECT_SOURCE_DIR}/README.md) -set(CPACK_RESOURCE_FILE_LICENSE ${PROJECT_SOURCE_DIR}/LICENSE.md) -set(CPACK_PACKAGE_ICON ${CMAKE_CURRENT_LIST_DIR}/icon.ico) -set(CPACK_PACKAGE_DESCRIPTION_FILE ${CMAKE_CURRENT_LIST_DIR}/description.txt) -set(CPACK_PRE_BUILD_SCRIPTS ${CMAKE_CURRENT_LIST_DIR}/fakeroot_fix.cmake) -set(CPACK_PACKAGE_INSTALL_DIRECTORY PSn00bSDK) - -## DEB/RPM variables - -set(CPACK_DEBIAN_PACKAGE_DEPENDS "libc6 (>= 2.28), cmake (>= 3.21)") -set(CPACK_DEBIAN_PACKAGE_RECOMMENDS "ninja-build (>= 1.10)") -set(CPACK_DEBIAN_PACKAGE_SUGGESTS "git (>= 2.25)") -set(CPACK_DEBIAN_PACKAGE_SECTION devel) -set(CPACK_RPM_PACKAGE_REQUIRES "cmake >= 3.21") -set(CPACK_RPM_PACKAGE_SUGGESTS "ninja-build >= 1.10, git >= 2.25") -#set(CPACK_RPM_PACKAGE_RELOCATABLE ON) - -## NSIS variables - -set(CPACK_NSIS_MUI_ICON ${CMAKE_CURRENT_LIST_DIR}/icon.ico) -set(CPACK_NSIS_MUI_UNIICON ${CMAKE_CURRENT_LIST_DIR}/uninstall.ico) -set(CPACK_NSIS_MUI_HEADERIMAGE ${CMAKE_CURRENT_LIST_DIR}/nsis_header.bmp) -set(CPACK_NSIS_MUI_WELCOMEFINISHPAGE_BITMAP ${CMAKE_CURRENT_LIST_DIR}/nsis_banner.bmp) -set(CPACK_NSIS_MUI_UNWELCOMEFINISHPAGE_BITMAP ${CMAKE_CURRENT_LIST_DIR}/nsis_banner.bmp) -set(CPACK_NSIS_BRANDING_TEXT "PSn00bSDK ${PROJECT_VERSION} - Meido-Tek Productions") -set(CPACK_NSIS_URL_INFO_ABOUT "${PROJECT_HOMEPAGE_URL}") -set(CPACK_NSIS_MODIFY_PATH ON) -set(CPACK_NSIS_ENABLE_UNINSTALL_BEFORE_INSTALL ON) -set( - CPACK_NSIS_MENU_LINKS - "${PROJECT_HOMEPAGE_URL}" "About PSn00bSDK" - "https://github.com/Lameguy64/PSn00bSDK" "GitHub repo" - "Uninstall.exe" "Uninstall PSn00bSDK" -) - -# Paths in CPACK_NSIS_* variables are not converted to native paths by CMake -# for some reason (and NSIS doesn't like paths with forward slashes), so we -# have to do it manually. -foreach( - _var IN ITEMS - CPACK_NSIS_MUI_ICON - CPACK_NSIS_MUI_UNIICON - CPACK_NSIS_MUI_HEADERIMAGE - CPACK_NSIS_MUI_WELCOMEFINISHPAGE_BITMAP - CPACK_NSIS_MUI_UNWELCOMEFINISHPAGE_BITMAP -) - cmake_path(NATIVE_PATH ${_var} ${_var}) -endforeach() - -## Component setup - -# This must be done after setting CPack-related variables. -include(CPack) - -cpack_add_component( - sdk - DISPLAY_NAME "SDK libraries and tools" - DESCRIPTION "These files are always required and their installation cannot be skipped." - REQUIRED -) -cpack_add_component( - docs - DISPLAY_NAME "SDK documentation" - DESCRIPTION "Select to install additional documentation files and a project template (recommended)." -) -cpack_add_component( - examples - DISPLAY_NAME "SDK examples" - DESCRIPTION "Select to copy the examples' source code to the documentation folder (recommended)." -) - -if(BUNDLE_TOOLCHAIN) - cpack_add_component( - toolchain - DISPLAY_NAME "GCC MIPS toolchain" - DESCRIPTION "Do not skip unless you already have a toolchain that targets ${PSN00BSDK_TARGET} installed." - ) -endif() -if(BUNDLE_NINJA) - cpack_add_component( - ninja - DISPLAY_NAME "Ninja ${_ninja_version}" - DESCRIPTION "Skip this if you have Ninja installed already. Note that Ninja will be installed in the same directory as PSn00bSDK." - ) -endif() -if(BUNDLE_CMAKE) - cpack_add_component( - cmake - DISPLAY_NAME "CMake ${CMAKE_VERSION}" - DESCRIPTION "Select this if you do not have CMake installed already. Note that CMake will be installed in the same directory as PSn00bSDK." - DISABLED - ) -endif() diff --git a/cpack/uninstall.ico b/cpack/uninstall.ico deleted file mode 100644 index 6759d23..0000000 Binary files a/cpack/uninstall.ico and /dev/null differ diff --git a/cpack/uninstall.svg b/cpack/uninstall.svg deleted file mode 100644 index 70d400d..0000000 --- a/cpack/uninstall.svg +++ /dev/null @@ -1,164 +0,0 @@ - - - PSn00bSDK icon - - - - - - - - - - - - - - - - - - - - - - - - - image/svg+xml - - PSn00bSDK icon - - - - - - - - - - - - - - - - - - - -- cgit v1.2.3