Enhancement: Fixes #192, Implement full build - don't require libraries to be installed

This commit is contained in:
Rory Fewell
2023-06-28 19:42:17 +01:00
parent 2811c5b071
commit c23e7bb08d
48 changed files with 1067 additions and 287 deletions

View File

@@ -19,15 +19,7 @@ I used to use Luna theme ports on Windows 7, which has now lost support, and cus
There are themes that aim to replicate the Windows XP visual styles already, however as anyone who has tried this stuff knows, themes are either lacking or only go so far. This project differs in that I aim for as close to pixel-perfect as possible, and write programs to recreate the complete Windows XP environment (themes alone cannot reproduce the Start menu in the screenshots above).
## Building / Installation
Make sure to clone this repository recursively so that `/submodules` is populated! (use `git clone <url> --recurse-submodules`)
This project is componentised, so you can compile/install each thing individually (each cursor theme, desktop theme, program, library, etc.). The components are built using CMake (so for developing you can `make`, or if you're on an unsupported distro and desperate, `make install`).
The typical install process involves packaging for each component, and then installing those packages. At the moment, I have only implemented `.deb` packaging, though I have [issue #35](https://github.com/rozniak/xfce-winxp-tc/issues/35) open to sort out other package managers eventually.
The packaging [lives under `/packaging`](https://github.com/rozniak/xfce-winxp-tc/tree/master/packaging) per format (except for `/submodules`). In general, have a poke around in this repository, there are `README`s in each directory that will explain what things are, and how to install them. 😁
*Please note, if you came from YouTube, the packaging process differs now in that it has been simplified to a single script rather than a script per type of component.*
Please refer to `/packaging/README.MD` for build instructions. 😁
## The theme(s) are buggy!
This is almost certainly true, especially seeing as [theming GTK isn't really a supported feature](https://stopthemingmy.app/). If you're using themes from this repository and programs look broken, you should file issues here rather than pestering the developers of said program.

2
cursors/deps Normal file
View File

@@ -0,0 +1,2 @@
bt:xcursorgen
bt:python3-venv

View File

@@ -4,6 +4,7 @@ project(
wintc-cursor-theme-standard-no-shadow
VERSION 1.0
DESCRIPTION "Windows Total Conversion Windows XP standard cursor theme (without shadows)."
LANGUAGES C
)
set(PROJECT_ANYARCH true)

View File

@@ -0,0 +1 @@
../../deps

View File

@@ -4,6 +4,7 @@ project(
wintc-cursor-theme-standard-with-shadow
VERSION 1.0
DESCRIPTION "Windows Total Conversion Windows XP standard cursor theme (with shadows)."
LANGUAGES C
)
set(PROJECT_ANYARCH true)

View File

@@ -0,0 +1 @@
../../deps

View File

@@ -4,6 +4,7 @@ project(
wintc-fonts-xp
VERSION 1.0
DESCRIPTION "Windows Total Conversion Windows XP fonts."
LANGUAGES C
)
set(PROJECT_ANYARCH true)

1
icons/deps Normal file
View File

@@ -0,0 +1 @@
bt:python3-venv

View File

@@ -4,6 +4,7 @@ project(
wintc-icon-theme-luna
VERSION 1.0
DESCRIPTION "Windows Total Conversion Windows XP icon theme."
LANGUAGES C
)
set(PROJECT_ANYARCH true)

1
icons/luna/deps Symbolic link
View File

@@ -0,0 +1 @@
../deps

View File

@@ -6,9 +6,29 @@ The contents of this directory is as follows:
`cmake-inc/` - common CMake scripts to be included by components in their builds
`deb/` - Debian (`.deb`) packaging
`deb/` - Debian (`.deb`) packaging implementation
`build.sh` - build script for compiling a single component
`buildall.sh` - build script for compiling all components in the project
`chkdeps.sh` - script for checking dependencies for building components are installed
`distid.sh` - helper script for identifying the distribution in use
`targets` - default build list for all components in the project
## TL;DR on Building
If you are new and simply want to compile everything, you should:
- Ensure you have the typical tools installed: `cmake`, `fakeroot`, `gcc`, `make`, `python3`
- Run `./chkdeps.sh -l` - this will inform you if you're missing any build-time dependencies
- This script should output the package names, so you can bung it straight into your package manager, eg. `apt install $(./chkdeps.sh -l | cut -d':' -f2 | tr '\n' ' ')`
- Run `./buildall.sh` - this should build the entire project by default under the `xpclient-pro` SKU, outputting in `./xptc`
This is intended to *Just Work(TM)*, if you have any problems, please raise an issue!
## Support?
At the moment you'll notice there is only a `deb` subdirectory. I personally use Debian, so I have got Debian packaging functional - if you're also a Debian user, or you use a derivative such as Ubuntu, then you should be good to go.
Supported distros/package formats:
- Debian (`.deb`)
For users on Linux distributions that use other package managers, I will get around to supporting those one day, it just takes a lot of work and a lot of testing. This `README` will be updated to reflect the status of package manager support when the work is done.
Please check under the `packaging` tag to see if there is an open issue for your favourite distro/package format. You can help speed up the process by providing a simple example package script or TL;DR so that the porting process is easier (I'm not familiar with every distro out there!)

140
packaging/build.sh Executable file
View File

@@ -0,0 +1,140 @@
#!/bin/bash
#
# build.sh - Build Single Component
#
# This source-code is part of Windows XP stuff for XFCE:
# <<https://www.oddmatics.uk>>
#
# Author(s): Rory Fewell <roryf@oddmatics.uk>
#
#
# CONSTANTS
#
CURDIR=`realpath -s "./"`
SCRIPTDIR=`dirname "$0"`
REPO_ROOT=`realpath -s "${SCRIPTDIR}/.."`
SH_DISTID="${SCRIPTDIR}/distid.sh"
#
# ARGUMENTS
#
OPT_BUILD_ROOT="${CURDIR}/build"
OPT_SKU="xpclient-pro"
OPT_USE_LOCAL_LIBS=0
while getopts "b:hls:" opt;
do
case "${opt}" in
b)
OPT_BUILD_ROOT="${OPTARG}"
;;
h)
echo "Usage: build.sh [-bhls] <dir>"
echo ""
echo " -b : specify the directory to build relative to"
echo " -h : display this help screen"
echo " -l : use wintc libraries compiled here, not system"
echo " -s : specify SKU to build (default xpclient-pro)"
echo ""
exit 0
;;
l)
OPT_USE_LOCAL_LIBS=1
;;
s)
OPT_SKU="${OPTARG}"
;;
esac
done
shift $((OPTIND-1))
if [[ $# -ne 1 ]]
then
echo "Should specify single component to build."
exit 1
fi
#
# MAIN SCRIPT
#
rel_component_dir="${1}"
full_component_dir="${REPO_ROOT}/${rel_component_dir}"
if [[ ! -f "${SH_DISTID}" ]]
then
echo "distid.sh not found - this should never happen!!"
exit 1
fi
# Check component exists
#
if [[ ! -d "${full_component_dir}" ]]
then
echo "No such component at ${full_component_dir}"
exit 1
fi
# Identify distro build
#
dist_id=`"${SH_DISTID}"`
if [[ $? -gt 0 ]]
then
"Failed to identify distribution."
exit 1
fi
# Ensure the build dir exists
#
full_build_dir="${OPT_BUILD_ROOT}/${rel_component_dir}"
mkdir -p "${full_build_dir}"
if [[ $? -gt 0 ]]
then
echo "Unable to ensure the build directory exists, aborting."
exit 1
fi
# Compile component
#
build_result=0
cd "${full_build_dir}"
cmake --fresh \
-DBUILD_SHARED_LIBS=ON \
-DCMAKE_INSTALL_PREFIX=/usr \
-DWINTC_SKU="${OPT_SKU}" \
-DWINTC_PKGMGR="${dist_id}" \
-DWINTC_USE_LOCAL_LIBS="${OPT_USE_LOCAL_LIBS}" \
-DWINTC_LOCAL_LIBS_ROOT="${OPT_BUILD_ROOT}" \
"${full_component_dir}"
((build_result+=$?))
rm -rf ./out
make DESTDIR=./out all install
((build_result+=$?))
cd "${CURDIR}"
if [[ $build_result -gt 0 ]]
then
echo "Failed build for ${rel_component_dir}"
exit 1
fi
echo "Built ${rel_component_dir}"

245
packaging/buildall.sh Executable file
View File

@@ -0,0 +1,245 @@
#!/bin/bash
#
# buildall.sh - Build Entire System
#
# This source-code is part of Windows XP stuff for XFCE:
# <<https://www.oddmatics.uk>>
#
# Author(s): Rory Fewell <roryf@oddmatics.uk>
#
#
# CONSTANTS
#
CURDIR=`realpath -s "./"`
SCRIPTDIR=`dirname "$0"`
REPO_ROOT=`realpath -s "${SCRIPTDIR}/.."`
TARGETS_PATH="${SCRIPTDIR}/targets"
SH_BUILD="${SCRIPTDIR}/build.sh"
SH_CHKDEPS="${SCRIPTDIR}/chkdeps.sh"
SH_DISTID="${SCRIPTDIR}/distid.sh"
#
# ARGUMENTS
#
OPT_BUILDLIST="${TARGETS_PATH}"
OPT_OUTPUT_DIR=""
OPT_SKU="xpclient-pro"
while getopts "c:ho:s:" opt;
do
case "${opt}" in
c)
OPT_BUILDLIST="${OPTARG}"
;;
h)
echo "Usage: buildall.sh [-chos]"
echo " -c : provide a list of components (default 'targets')"
echo " -h : display this help screen"
echo " -o : specify output directory for packages"
echo " -s : specify SKU to build (default xpclient-pro)"
echo ""
exit 0
;;
o)
OPT_OUTPUT_DIR="${OPTARG}"
;;
s)
OPT_SKU="${OPTARG}"
;;
esac
done
#
# FUNCTIONS
#
g_checked_pkg_sh=0
declare -a g_built_libs
build_component()
{
local dist="${1}"
local rel_dir="${2}"
local target_dir="${REPO_ROOT}/${rel_dir}"
local deps_path="${target_dir}/deps"
# Ensure package script available
#
local sh_package="${SCRIPTDIR}/${dist}/package.sh"
if [[ g_checked_pkg_sh -eq 0 ]]
then
if [[ ! -f "${sh_package}" ]]
then
echo "package.sh missing for ${dist}, cannot continue."
exit 1
fi
g_checked_pkg_sh=1
fi
# All good, continue build
#
echo "buildall: Building ${rel_dir}"
# Ensure we build library dependencies first
#
local deps_fd=0
if [[ -f "${deps_path}" ]]
then
while IFS= read -u "${deps_fd}" -r dep_listing
do
# Looks like one of ours? (wintc-*)
#
if [[ "${dep_listing}" =~ wintc-(.+) ]]
then
local lib_shortname="${BASH_REMATCH[1]}"
# Check we haven't already built this
#
check_already_built "${lib_shortname}"
if [[ $? -eq 1 ]]
then
continue
fi
# Check it's actually a library
#
if [[ -d "${REPO_ROOT}/shared/${lib_shortname}" ]]
then
build_component "${dist}" "shared/${lib_shortname}"
g_built_libs+=("${lib_shortname}")
fi
fi
done {deps_fd}<"${deps_path}"
fi
# Now build the component
#
"${SH_BUILD}" -l -s "${OPT_SKU}" "${rel_dir}"
if [[ $? -gt 0 ]]
then
echo "buildall: Compile failure, bailing."
exit 1
fi
# Package the component
#
"${sh_package}" -o "${OPT_OUTPUT_DIR}" "${rel_dir}"
if [[ $? -gt 0 ]]
then
echo "buildall: Package failure, bailing."
exit 1
fi
}
check_already_built()
{
local check_lib="${1}"
for lib_name in "${g_built_libs[@]}"
do
if [[ "${lib_name}" == "${check_lib}" ]]
then
return 1
fi
done
return 0
}
#
# MAIN SCRIPT
#
if [[ ! -f "${SH_BUILD}" ]]
then
echo "build.sh not found - this should never happen!!"
exit 1
fi
if [[ ! -f "${SH_CHKDEPS}" ]]
then
echo "chkdeps.sh not found - this should never happen!!"
exit 1
fi
if [[ ! -f "${SH_DISTID}" ]]
then
echo "distid.sh not found - this should never happen!!"
exit 1
fi
if [[ ! -f "${OPT_BUILDLIST}" ]]
then
echo "Build list not found or readable: ${OPT_BUILDLIST}"
exit 1
fi
# Identify our distro
#
dist_id=`${SH_DISTID}`
if [[ $? -gt 0 ]]
then
echo "Failed to identify distribution."
exit 1
fi
# Generate build tag
#
cur_arch=`uname -m | xargs echo -n`
cur_branch=`git branch --show-current | xargs echo -n`
cur_hash=`git rev-parse --short HEAD | xargs echo -n`
cur_user=`whoami | xargs echo -n`
tag="${cur_hash}.${cur_arch}.${cur_branch}.${OPT_SKU}(${cur_user},${dist_id})"
echo "Doing full system build for ${tag}"
if [[ "${OPT_OUTPUT_DIR}" == "" ]]
then
OPT_OUTPUT_DIR="${CURDIR}/xptc/${cur_hash}.${cur_branch}/${cur_arch}/${dist_id}"
mkdir -p "${OPT_OUTPUT_DIR}"
fi
if [[ ! -d "${OPT_OUTPUT_DIR}" ]]
then
echo "Cannot ensure output directory "${OPT_OUTPUT_DIR}" exists."
exit 1
fi
# Check system deps
#
"${SH_CHKDEPS}" -c "${OPT_BUILDLIST}" -l
if [[ $? -gt 0 ]]
then
echo "Dependencies check unsatisfied or failed."
exit 1
fi
# Building the whole thing
#
while IFS= read -u "${targets_fd}" -r rel_target_dir
do
build_component "${dist_id}" "${rel_target_dir}"
done {targets_fd}<"${OPT_BUILDLIST}"
echo "Build complete for ${tag}"

196
packaging/chkdeps.sh Executable file
View File

@@ -0,0 +1,196 @@
#!/bin/bash
#
# chkdeps.sh - Check Dependencies for Build
#
# This source-code is part of Windows XP stuff for XFCE:
# <<https://www.oddmatics.uk>>
#
# Author(s): Rory Fewell <roryf@oddmatics.uk>
#
#
# CONSTANTS
#
CURDIR=`realpath -s "./"`
SCRIPTDIR=`dirname "$0"`
REPO_ROOT=`realpath -s "${SCRIPTDIR}/.."`
SH_DISTID="${SCRIPTDIR}/distid.sh"
DEPMAP_PY="${REPO_ROOT}/tools/bldutils/depmap/depmap.py"
#
# ARGUMENTS
#
OPT_BUILDLIST="${SCRIPTDIR}/targets"
OPT_USE_LOCAL_LIBS=0
while getopts "c:hl" opt;
do
case "${opt}" in
c)
OPT_BUILDLIST="${OPTARG}"
;;
h)
echo "Usage: chkdeps.sh [-chl]"
echo ""
echo " -c : provide a list of components (default 'targets')"
echo " -h : display this help screen"
echo " -l : use wintc libraries compiled here, not system"
echo ""
exit 0
;;
l)
OPT_USE_LOCAL_LIBS=1
;;
esac
done
#
# FUNCTIONS
#
declare -a g_needed_pkgs
check_deps()
{
local rel_dir="${1}"
local full_target_dir="${REPO_ROOT}/${rel_dir}"
local full_deps_path="${full_target_dir}/deps"
# If there are dependencies to check, then call the depsmap tool
#
if [[ ! -f "${full_deps_path}" ]]
then
return 0
fi
local required_deps
required_deps=`python3 ${DEPMAP_PY} ${full_deps_path} ${dist_id}`
if [[ $? -gt 0 ]]
then
echo "Failed to map dependencies."
exit 1
fi
# Check what we have
#
while IFS= read -r mapping;
do
local pkg_name=""
if [[ "${mapping}" =~ ^(bt|bt,rt):(.+)$ ]]
then
pkg_name="${BASH_REMATCH[2]}"
else
continue
fi
# Is this one of ours?
#
if [[ "${pkg_name}" =~ wintc-(.+) ]]
then
# If this is a lib, we need to check deps
#
local chk_lib_rel_dir="shared/${BASH_REMATCH[1]}"
if [[ -d "${REPO_ROOT}/${chk_lib_rel_dir}" ]]
then
check_deps "${chk_lib_rel_dir}"
fi
# If we're building our own libs locally instead of system installed
# then do not add them to dependencies
#
if [[ $OPT_USE_LOCAL_LIBS -eq 1 ]]
then
continue
fi
fi
# Check we haven't already got this dep in our list
#
for list_pkg in "${g_needed_pkgs[@]}"
do
if [[ "${list_pkg}" == "${pkg_name}" ]]
then
continue 2
fi
done
# It's a new dep, check whether it is already installed
#
case "${dist_id}" in
deb)
dpkg -s "${pkg_name}" >/dev/null 2>&1
if [[ $? -gt 0 ]]
then
g_needed_pkgs+=("${pkg_name}")
fi
esac
done <<< "${required_deps}"
}
#
# MAIN SCRIPT
#
if [[ ! -f "${SH_DISTID}" ]]
then
echo "distid.sh not found - this should never happen!!"
exit 1
fi
if [[ ! -f "${DEPMAP_PY}" ]]
then
echo "depmap tool not found - this should never happen!!"
exit 1
fi
if [[ ! -f "${OPT_BUILDLIST}" ]]
then
echo "Build list not found or readable: ${OPT_BUILDLIST}"
exit 1
fi
# Identify our distro
#
dist_id=`"${SH_DISTID}"`
if [[ $? -gt 0 ]]
then
echo "Failed to identify distribution."
exit 1
fi
# Iterate through components to build now, identify their deps
#
while IFS= read -u "${buildlist_fd}" -r rel_target_dir
do
check_deps "${rel_target_dir}"
done {buildlist_fd}<"${OPT_BUILDLIST}"
# Output what needs to be installed
#
if [[ "${#g_needed_pkgs[@]}" -eq 0 ]]
then
echo "All dependencies verified."
exit 0
fi
for pkg_not_installed in "${g_needed_pkgs[@]}"
do
echo "needed:${pkg_not_installed}"
done
exit 2

View File

@@ -12,6 +12,13 @@ else()
set(WINTC_COMPILE_OPTIONS -Wall -Wextra -Wpedantic -Werror -Wno-overlength-strings)
endif()
# Build options from user
#
option(
WINTC_USE_LOCAL_LIBS
"Use compiled libraries instead of system installed for libwintc* libs."
)
# Handle SKU stuff
#
set(

View File

@@ -0,0 +1,44 @@
cmake_minimum_required(VERSION 3.0)
find_package(PkgConfig REQUIRED)
# If we're using local libs, then we better have a root dir to look in for em
#
if (${WINTC_USE_LOCAL_LIBS})
if (NOT DEFINED WINTC_LOCAL_LIBS_ROOT)
message(
FATAL_ERROR
"Specify WINTC_LOCAL_LIBS_ROOT for where libs are being built."
)
endif()
endif()
# Macro for setting custom variable name
#
macro(wintc_set SET_NAME SET_VALUE)
set(${SET_NAME} ${SET_VALUE} PARENT_SCOPE)
endmacro()
# Define func for resolving a library for linking
#
function(wintc_resolve_library REQUESTED_LIB REQUESTED_LIB_NICE_NAME)
if (
${WINTC_USE_LOCAL_LIBS} AND
${REQUESTED_LIB} MATCHES "^wintc-(.+)"
)
wintc_set(
"${REQUESTED_LIB_NICE_NAME}_INCLUDE_DIRS"
"${REPO_ROOT}/shared/${CMAKE_MATCH_1}/public"
)
wintc_set(
"${REQUESTED_LIB_NICE_NAME}_LIBRARY_DIRS"
""
)
wintc_set(
"${REQUESTED_LIB_NICE_NAME}_LIBRARIES"
"${WINTC_LOCAL_LIBS_ROOT}/shared/${CMAKE_MATCH_1}/lib${REQUESTED_LIB}.so"
)
else()
pkg_check_modules(${REQUESTED_LIB_NICE_NAME} REQUIRED ${REQUESTED_LIB})
endif()
endfunction()

View File

@@ -1,5 +1,9 @@
cmake_minimum_required(VERSION 3.12)
# Define constants
#
set(DEPMAP_TOOL_DIR ${REPO_ROOT}/tools/bldutils/depmap)
# Emit the project name we're building, this can be pulled out by packaging
# scripts
#
@@ -8,7 +12,7 @@ message(STATUS "CMAKING:${PROJECT_NAME}")
# If no target package format was specified, default to 'raw' (aka we just
# dump the files out)
#
if (NOT DEFINED WINTC_PKGMGR)
if (NOT DEFINED WINTC_PKGMGR OR "${WINTC_PKGMGR}" STREQUAL "")
set(WINTC_PKGMGR raw)
endif()
@@ -92,19 +96,35 @@ function(wintc_configure_and_install_packaging)
# Map dependencies to Debian
#
if (DEFINED PROJECT_DEPENDENCIES)
list(
JOIN
PROJECT_DEPENDENCIES
", "
DEB_DEPENDENCIES
if (EXISTS ${PROJECT_ROOT}/deps)
find_package(PythonInterp 3.0 REQUIRED)
execute_process(
COMMAND ${PYTHON_EXECUTABLE} ${DEPMAP_TOOL_DIR}/depmap.py deps deb
WORKING_DIRECTORY ${PROJECT_ROOT}
OUTPUT_VARIABLE DEB_DEPENDENCIES_RAW
RESULT_VARIABLE DEPMAP_RET
)
string(
PREPEND
DEB_DEPENDENCIES
"Depends: "
)
if (DEPMAP_RET AND NOT DEPMAP_RET EQUAL 0)
message(
FATAL_ERROR
"Failed to map dependencies for packaging."
)
endif()
string(REPLACE "\n" ";" DEB_DEPENDENCIES_RAW ${DEB_DEPENDENCIES_RAW})
foreach(line ${DEB_DEPENDENCIES_RAW})
if (${line} MATCHES "^rt:(.+)$")
list(APPEND DEB_DEPENDENCIES_LIST ${CMAKE_MATCH_1})
endif()
endforeach()
endif()
if (DEFINED DEB_DEPENDENCIES_LIST)
list(JOIN DEB_DEPENDENCIES_LIST ", " DEB_DEPENDENCIES)
string(PREPEND DEB_DEPENDENCIES "Depends: ")
endif()
# Add postinstall script

View File

@@ -1,23 +1,2 @@
# Debian Packaging
This directory contains the packaging script for Debian and derivatives (e.g. Ubuntu).
## Usage
Simply run the script, and pass in the path of the component you would like to build relative to the repo root.
For example:
```bash
./bldnpkg.sh cursors/no-shadow/standard icons/luna themes/professional
```
This will build and output packages for the above components. You can then install the packages with:
```bash
sudo dpkg -i <package>
```
## Any Problems?
Some packages require dependencies, so you may encounter build failures if you do not have them installed. Some dependencies refer to other components inside this repo.
For instance if you attempt to build `libwintc-exec` via `./bldnpkg.sh shared/exec` you will get a build failure if you have not yet installed `libwintc-comgtk` first.
If you have any other problems, feel free to [submit an issue](https://github.com/rozniak/xfce-winxp-tc/issues) with error output details. :grin:
This directory contains the packaging implementation for Debian.

View File

@@ -1,123 +0,0 @@
#!/bin/bash
#
# bldnpkg.sh - Build and Package Script (Debian)
#
# This source-code is part of Windows XP stuff for XFCE:
# <<https://www.oddmatics.uk>>
#
# Author(s): Rory Fewell <roryf@oddmatics.uk>
#
#
# CONSTANTS
#
CURDIR=`realpath -s "./"`
REQUIRED_PACKAGES=(
'cmake'
'fakeroot'
'make'
)
SCRIPTDIR=`dirname "$0"`
CMAKE_LOG_PATH="${CURDIR}/cmake-out.log"
REPO_ROOT=`realpath -s "${SCRIPTDIR}/../.."`
#
# PRE-FLIGHT CHECKS
#
for package in "${REQUIRED_PACKAGES[@]}"
do
dpkg -s $package > /dev/null 2>&1
if [[ $? -gt 0 ]]
then
echo "You are missing package: ${package}"
exit 1
fi
done
#
# ARGUMENTS
#
if [[ $# -eq 0 ]]
then
echo 'Usage: bldnpkg.sh [<dir>]...'
exit 1
fi
#
# MAIN SCRIPT
#
# The arguments passed to this script should specify directories with
# components we can build and package, for example:
#
# ./bldnpkg.sh shell/start themes/luna/blue
#
for component_dir in "$@"
do
full_component_dir="${REPO_ROOT}/${component_dir}"
if [[ ! -d "${full_component_dir}" ]]
then
echo "Can't find component: ${component_dir}, aborting."
exit 1
fi
# Compile component
#
build_result=0
local_build_dir="${CURDIR}/build"
if [[ -d "${local_build_dir}" ]]
then
rm -rf "${local_build_dir}"
fi
mkdir "${local_build_dir}"
cd "${local_build_dir}"
# Default to Pro SKU for now
cmake -DWINTC_SKU=xpclient-pro -DBUILD_SHARED_LIBS=ON -DCMAKE_INSTALL_PREFIX=/usr -DWINTC_PKGMGR=deb "${full_component_dir}" > "${CMAKE_LOG_PATH}"
((build_result+=$?))
cat "${CMAKE_LOG_PATH}" # So the output is still in stdout as well
make DESTDIR=./out all install
((build_result+=$?))
cd "${CURDIR}"
if [[ $build_result -gt 0 ]]
then
echo "Failed build for ${component_dir}, aborting."
exit 1
fi
# Compile package
#
fakeroot dpkg-deb -v --build "${local_build_dir}/out"
if [[ $? -gt 0 ]]
then
echo "Failed to build package for ${component_dir}, aborting."
exit 1
fi
# Tidy
#
package_name=`grep "CMAKING" ${CMAKE_LOG_PATH} | cut -d':' -f2`
mv "${local_build_dir}/out.deb" "${package_name}.deb"
rm -rf "${local_build_dir}"
rm -f "${CMAKE_LOG_PATH}"
echo "Built ${component_dir}"
done

107
packaging/deb/package.sh Executable file
View File

@@ -0,0 +1,107 @@
#!/bin/bash
#
# package.sh - Packaging Script (Debian)
#
# This source-code is part of Windows XP stuff for XFCE:
# <<https://www.oddmatics.uk>>
#
# Author(s): Rory Fewell <roryf@oddmatics.uk>
#
#
# CONSTANTS
#
CURDIR=`realpath -s "./"`
SCRIPTDIR=`dirname "$0"`
REPO_ROOT=`realpath -s "${SCRIPTDIR}/../.."`
#
# ARGUMENTS
#
OPT_BUILD_DIR="${CURDIR}/build"
OPT_OUTPUT_DIR="${CURDIR}/dpkg-out"
while getopts "hi:o:" opt;
do
case "${opt}" in
h)
echo "Usage: package.sh [-hio] <dir>"
echo ""
echo " -h : display this help screen"
echo " -i : specify root build directory"
echo " -o : specify output directory"
echo ""
exit 0
;;
i)
OPT_BUILD_DIR="${OPTARG}"
;;
o)
OPT_OUTPUT_DIR="${OPTARG}"
;;
esac
done
shift $((OPTIND-1))
if [[ $# -ne 1 ]]
then
echo "Should specify single component to package."
exit 1
fi
#
# MAIN SCRIPT
#
# Ensure the output containing dir exists
#
if [[ ! -d "${OPT_OUTPUT_DIR}" ]]
then
mkdir -p "${OPT_OUTPUT_DIR}"
if [[ $? -gt 0 ]]
then
echo "Unable to ensure output directory exists, aborting."
exit 1
fi
fi
# Ensure the built component exists
#
rel_component_dir="${1}"
full_component_dir="${OPT_BUILD_DIR}/${rel_component_dir}"
pkg_dir="${full_component_dir}/out"
if [[ ! -d "${pkg_dir}" ]]
then
"Expected component to be built at ${full_component_dir}, it's missing."
exit 1
fi
# Build package now
#
fakeroot dpkg-deb -v --build "${pkg_dir}"
if [[ $? -gt 0 ]]
then
"Package build failure!"
exit 1
fi
# Move package to output
#
clean_pkg_name=`cat ${full_component_dir}/control | grep 'Package:' | cut -d":" -f2 | xargs echo -n`
mv "${pkg_dir}.deb" "${OPT_OUTPUT_DIR}/${clean_pkg_name}.deb"
echo "Packaged ${clean_pkg_name}"

34
packaging/distid.sh Executable file
View File

@@ -0,0 +1,34 @@
#!/bin/bash
#
# distid.sh - Identify Distro
#
# This source-code is part of Windows XP stuff for XFCE:
# <<https://www.oddmatics.uk>>
#
# Author(s): Rory Fewell <roryf@oddmatics.uk>
#
#
# MAIN SCRIPT
#
if [[ ! -f "/etc/os-release" ]]
then
echo "Unable to identify distribution."
exit 1
fi
# Retrieve distro ID
#
distro_in_use=`cat /etc/os-release | grep "^ID" | cut -d"=" -f2`
case "${distro_in_use}" in
debian)
echo -n "deb"
;;
*)
echo "Unsupported distribution."
exit 1
;;
esac

12
packaging/targets Normal file
View File

@@ -0,0 +1,12 @@
cursors/no-shadow/standard
cursors/with-shadow/standard
fonts
icons/luna
sounds
themes/native
themes/professional
themes/luna/blue
shell/run
shell/taskband
shell/winver
windows/notepad

View File

@@ -4,30 +4,24 @@ project(
libwintc-comgtk
VERSION 1.0
DESCRIPTION "Windows Total Conversion common GLib/GTK utilities."
LANGUAGES C
)
set(PROJECT_ANYARCH false)
set(PROJECT_FREESTATUS true)
set(PROJECT_MAINTAINER "Rory Fewell <roryf@oddmatics.uk>")
set(
PROJECT_DEPENDENCIES
libglib2.0-dev
libgtk-3-dev
)
set(PROJECT_ROOT ${CMAKE_CURRENT_LIST_DIR})
include(GNUInstallDirs)
include(../../packaging/cmake-inc/common/CMakeLists.txt)
include(../../packaging/cmake-inc/libraries/CMakeLists.txt)
include(../../packaging/cmake-inc/linking/CMakeLists.txt)
include(../../packaging/cmake-inc/packaging/CMakeLists.txt)
find_package(PkgConfig REQUIRED)
pkg_check_modules(GLIB REQUIRED glib-2.0)
pkg_check_modules(GTK3 REQUIRED gtk+-3.0)
wintc_resolve_library(glib-2.0 GLIB)
wintc_resolve_library(gtk+-3.0 GTK3)
add_library(
libwintc-comgtk

2
shared/comgtk/deps Normal file
View File

@@ -0,0 +1,2 @@
bt,rt:glib2
bt,rt:gtk3

View File

@@ -4,33 +4,27 @@ project(
libwintc-exec
VERSION 1.0
DESCRIPTION "Windows Total Conversion launcher library."
LANGUAGES C
)
set(PROJECT_ANYARCH false)
set(PROJECT_FREESTATUS true)
set(PROJECT_MAINTAINER "Rory Fewell <roryf@oddmatics.uk>")
set(
PROJECT_DEPENDENCIES
libglib2.0-dev
libgtk-3-dev
libwintc-comgtk
)
set(PROJECT_ROOT ${CMAKE_CURRENT_LIST_DIR})
include(GNUInstallDirs)
include(../../packaging/cmake-inc/common/CMakeLists.txt)
include(../../packaging/cmake-inc/libraries/CMakeLists.txt)
include(../../packaging/cmake-inc/linking/CMakeLists.txt)
include(../../packaging/cmake-inc/packaging/CMakeLists.txt)
find_package(PkgConfig REQUIRED)
pkg_check_modules(GDK REQUIRED gdk-3.0)
pkg_check_modules(GIO REQUIRED gio-2.0)
pkg_check_modules(GLIB REQUIRED glib-2.0)
pkg_check_modules(GTK3 REQUIRED gtk+-3.0)
wintc_resolve_library(gdk-3.0 GDK)
wintc_resolve_library(gio-2.0 GIO)
wintc_resolve_library(glib-2.0 GLIB)
wintc_resolve_library(gtk+-3.0 GTK3)
wintc_resolve_library(wintc-comgtk WINTC_COMGTK)
add_library(
libwintc-exec
@@ -64,6 +58,7 @@ target_include_directories(
PRIVATE ${GIO_INCLUDE_DIRS}
PRIVATE ${GLIB_INCLUDE_DIRS}
PRIVATE ${GTK3_INCLUDE_DIRS}
PRIVATE ${WINTC_COMGTK_INCLUDE_DIRS}
)
target_link_directories(
@@ -72,6 +67,7 @@ target_link_directories(
PRIVATE ${GIO_LIBRARY_DIRS}
PRIVATE ${GLIB_LIBRARY_DIRS}
PRIVATE ${GTK3_LIBRARY_DIRS}
PRIVATE ${WINTC_COMGTK_LIBRARY_DIRS}
)
target_link_libraries(
@@ -80,6 +76,7 @@ target_link_libraries(
PRIVATE ${GIO_LIBRARIES}
PRIVATE ${GLIB_LIBRARIES}
PRIVATE ${GTK3_LIBRARIES}
PRIVATE ${WINTC_COMGTK_LIBRARIES}
)
# Installation

4
shared/exec/deps Normal file
View File

@@ -0,0 +1,4 @@
bt,rt:glib2
bt,rt:gtk3
bt,rt:wintc-comgtk
rt:xdg-mime

View File

@@ -4,33 +4,26 @@ project(
libwintc-shllang
VERSION 1.0
DESCRIPTION "Windows Total Conversion shell language string utilities."
LANGUAGES C
)
set(PROJECT_ANYARCH false)
set(PROJECT_FREESTATUS true)
set(PROJECT_MAINTAINER "Rory Fewell <roryf@oddmatics.uk>")
set(
PROJECT_DEPENDENCIES
libglib2.0-0
libgtk-3-0
libwintc-comgtk
)
set(PROJECT_ROOT ${CMAKE_CURRENT_LIST_DIR})
include(GNUInstallDirs)
include(../../packaging/cmake-inc/common/CMakeLists.txt)
include(../../packaging/cmake-inc/libraries/CMakeLists.txt)
include(../../packaging/cmake-inc/linking/CMakeLists.txt)
include(../../packaging/cmake-inc/locale/CMakeLists.txt)
include(../../packaging/cmake-inc/packaging/CMakeLists.txt)
find_package(PkgConfig REQUIRED)
pkg_check_modules(GLIB REQUIRED glib-2.0)
pkg_check_modules(GTK3 REQUIRED gtk+-3.0)
pkg_check_modules(WINTC_COMGTK REQUIRED wintc-comgtk)
wintc_resolve_library(glib-2.0 GLIB)
wintc_resolve_library(gtk+-3.0 GTK3)
wintc_resolve_library(wintc-comgtk WINTC_COMGTK)
wintc_create_config_h()

4
shared/shllang/deps Normal file
View File

@@ -0,0 +1,4 @@
bt,rt:glib2
bt,rt:gtk3
bt:msgfmt
bt,rt:wintc-comgtk

View File

@@ -4,30 +4,24 @@ project(
libwintc-winbrand
VERSION 1.0
DESCRIPTION "Windows Total Conversion Windows branding library."
LANGUAGES C
)
set(PROJECT_ANYARCH false)
set(PROJECT_FREESTATUS false)
set(PROJECT_MAINTAINER "Rory Fewell <roryf@oddmatics.uk>")
set(
PROJECT_DEPENDENCIES
libgdk-pixbuf-2.0-0
libglib2.0-0
)
set(PROJECT_ROOT ${CMAKE_CURRENT_LIST_DIR})
include(GNUInstallDirs)
include(../../packaging/cmake-inc/common/CMakeLists.txt)
include(../../packaging/cmake-inc/libraries/CMakeLists.txt)
include(../../packaging/cmake-inc/linking/CMakeLists.txt)
include(../../packaging/cmake-inc/packaging/CMakeLists.txt)
find_package(PkgConfig REQUIRED)
pkg_check_modules(GDK_PIXBUF REQUIRED gdk-pixbuf-2.0)
pkg_check_modules(GLIB REQUIRED glib-2.0)
wintc_resolve_library(gdk-pixbuf-2.0 GDK_PIXBUF)
wintc_resolve_library(glib-2.0 GLIB)
configure_file(src/brand.c.in ${PROJECT_ROOT}/src/brand.c @ONLY)

2
shared/winbrand/deps Normal file
View File

@@ -0,0 +1,2 @@
bt,rt:gdk-pixbuf2
bt,rt:glib2

View File

@@ -4,36 +4,28 @@ project(
wintc-shell-run
VERSION 1.0
DESCRIPTION "Windows Total Conversion 'Run...' dialog box."
LANGUAGES C
)
set(PROJECT_ANYARCH false)
set(PROJECT_FREESTATUS true)
set(PROJECT_MAINTAINER "Rory Fewell <roryf@oddmatics.uk>")
set(
PROJECT_DEPENDENCIES
libglib2.0-0
libgtk-3-0
libwintc-comgtk
libwintc-exec
)
set(PROJECT_ROOT ${CMAKE_CURRENT_LIST_DIR})
include(GNUInstallDirs)
include(../../packaging/cmake-inc/common/CMakeLists.txt)
include(../../packaging/cmake-inc/linking/CMakeLists.txt)
include(../../packaging/cmake-inc/locale/CMakeLists.txt)
include(../../packaging/cmake-inc/packaging/CMakeLists.txt)
find_package(PkgConfig REQUIRED)
pkg_check_modules(GDK REQUIRED gdk-3.0)
pkg_check_modules(GLIB REQUIRED glib-2.0)
pkg_check_modules(GTK3 REQUIRED gtk+-3.0)
pkg_check_modules(WINTC_COMGTK REQUIRED wintc-comgtk)
pkg_check_modules(WINTC_EXEC REQUIRED wintc-exec)
pkg_check_modules(WINTC_SHLLANG REQUIRED wintc-shllang)
wintc_resolve_library(gdk-3.0 GDK)
wintc_resolve_library(glib-2.0 GLIB)
wintc_resolve_library(gtk+-3.0 GTK3)
wintc_resolve_library(wintc-comgtk WINTC_COMGTK)
wintc_resolve_library(wintc-exec WINTC_EXEC)
wintc_resolve_library(wintc-shllang WINTC_SHLLANG)
wintc_create_meta_h()

5
shell/run/deps Normal file
View File

@@ -0,0 +1,5 @@
bt,rt:glib2
bt,rt:gtk3
bt,rt:wintc-comgtk
bt,rt:wintc-exec
bt,rt:wintc-shllang

View File

@@ -4,25 +4,13 @@ project(
wintc-taskband
VERSION 1.0
DESCRIPTION "Windows Total Conversion taskband application"
LANGUAGES C
)
set(PROJECT_ANYARCH false)
set(PROJECT_FREESTATUS true)
set(PROJECT_MAINTAINER "Rory Fewell <roryf@oddmatics.uk>")
set(
PROJECT_DEPENDENCIES
libgarcon-1-0
libgarcon-gtk3-1-0
libgdk-pixbuf-2.0-0
libglib2.0-0
libgtk-3-0
libwintc-comgtk
libwintc-exec
libwintc-shllang
xdg-utils
)
set(PROJECT_ROOT ${CMAKE_CURRENT_LIST_DIR})
set(WINTC_NO_PEDANTIC_COMPILE true) # Necessary because we use dlsym()
@@ -30,21 +18,19 @@ set(WINTC_NO_PEDANTIC_COMPILE true) # Necessary because we use dlsym()
include(GNUInstallDirs)
include(../../packaging/cmake-inc/common/CMakeLists.txt)
include(../../packaging/cmake-inc/linking/CMakeLists.txt)
include(../../packaging/cmake-inc/locale/CMakeLists.txt)
include(../../packaging/cmake-inc/packaging/CMakeLists.txt)
include(../../packaging/cmake-inc/resources/CMakeLists.txt)
find_package(PkgConfig REQUIRED)
pkg_check_modules(GARCON REQUIRED garcon-1)
pkg_check_modules(GARCON_GTK3 REQUIRED garcon-gtk3-1)
pkg_check_modules(GDK REQUIRED gdk-3.0)
pkg_check_modules(GDK_PIXBUF REQUIRED gdk-pixbuf-2.0)
pkg_check_modules(GLIB REQUIRED glib-2.0)
pkg_check_modules(GTK3 REQUIRED gtk+-3.0)
pkg_check_modules(WINTC_COMGTK REQUIRED wintc-comgtk)
pkg_check_modules(WINTC_EXEC REQUIRED wintc-exec)
pkg_check_modules(WINTC_SHLLANG REQUIRED wintc-shllang)
wintc_resolve_library(garcon-1 GARCON)
wintc_resolve_library(garcon-gtk3-1 GARCON_GTK3)
wintc_resolve_library(gdk-pixbuf-2.0 GDK_PIXBUF)
wintc_resolve_library(glib-2.0 GLIB)
wintc_resolve_library(gtk+-3.0 GTK3)
wintc_resolve_library(wintc-comgtk WINTC_COMGTK)
wintc_resolve_library(wintc-exec WINTC_EXEC)
wintc_resolve_library(wintc-shllang WINTC_SHLLANG)
wintc_compile_resources()
wintc_create_meta_h()
@@ -97,12 +83,26 @@ target_compile_options(
PRIVATE ${WINTC_COMPILE_OPTIONS}
)
message(
STATUS
"Include dirs: ${GARCON_INCLUDE_DIRS}"
)
message(
STATUS
"Link dirs: ${GARCON_LIBRARY_DIRS}"
)
message(
STATUS
"Link libs: ${GARCON_LIBRARIES}"
)
target_include_directories(
wintc-taskband
SYSTEM
PRIVATE ${GARCON_INCLUDE_DIRS}
PRIVATE ${GARCON_GTK3_INCLUDE_DIRS}
PRIVATE ${GDK_INCLUDE_DIRS}
PRIVATE ${GDK_PIXBUF_INCLUDE_DIRS}
PRIVATE ${GLIB_INCLUDE_DIRS}
PRIVATE ${GTK3_INCLUDE_DIRS}
@@ -115,7 +115,6 @@ target_link_directories(
wintc-taskband
PRIVATE ${GARCON_LIBRARY_DIRS}
PRIVATE ${GARCON_GTK3_LIBRARY_DIRS}
PRIVATE ${GDK_LIBRARY_DIRS}
PRIVATE ${GDK_PIXBUF_LIBRARY_DIRS}
PRIVATE ${GLIB_LIBRARY_DIRS}
PRIVATE ${GTK3_LIBRARY_DIRS}
@@ -129,7 +128,6 @@ target_link_libraries(
PRIVATE ${CMAKE_DL_LIBS}
PRIVATE ${GARCON_LIBRARIES}
PRIVATE ${GARCON_GTK3_LIBRARIES}
PRIVATE ${GDK_LIBRARIES}
PRIVATE ${GDK_PIXBUF_LIBRARIES}
PRIVATE ${GLIB_LIBRARIES}
PRIVATE ${GTK3_LIBRARIES}

8
shell/taskband/deps Normal file
View File

@@ -0,0 +1,8 @@
bt,rt:garcon
bt,rt:garcon-gtk3
bt,rt:gdk-pixbuf2
bt,rt:glib2
bt,rt:gtk3
bt,rt:wintc-comgtk
bt,rt:wintc-exec
bt,rt:wintc-shllang

View File

@@ -4,35 +4,26 @@ project(
wintc-shell-winver
VERSION 1.0
DESCRIPTION "Windows Total Conversion 'About Windows' utility."
LANGUAGES C
)
set(PROJECT_ANYARCH false)
set(PROJECT_FREESTATUS true)
set(PROJECT_MAINTAINER "Rory Fewell <roryf@oddmatics.uk>")
set(
PROJECT_DEPENDENCIES
libgdk-pixbuf-2.0-0
libglib2.0-0
libgtk-3-0
libwintc-comgtk
libwintc-winbrand
)
set(PROJECT_ROOT ${CMAKE_CURRENT_LIST_DIR})
include(GNUInstallDirs)
include(../../packaging/cmake-inc/common/CMakeLists.txt)
include(../../packaging/cmake-inc/linking/CMakeLists.txt)
include(../../packaging/cmake-inc/packaging/CMakeLists.txt)
find_package(PkgConfig REQUIRED)
pkg_check_modules(GDK_PIXBUF REQUIRED gdk-pixbuf-2.0)
pkg_check_modules(GLIB REQUIRED glib-2.0)
pkg_check_modules(GTK3 REQUIRED gtk+-3.0)
pkg_check_modules(WINTC_COMGTK REQUIRED wintc-comgtk)
pkg_check_modules(WINTC_WINBRAND REQUIRED wintc-winbrand)
wintc_resolve_library(gdk-pixbuf-2.0 GDK_PIXBUF)
wintc_resolve_library(glib-2.0 GLIB)
wintc_resolve_library(gtk+-3.0 GTK3)
wintc_resolve_library(wintc-comgtk WINTC_COMGTK)
wintc_resolve_library(wintc-winbrand WINTC_WINBRAND)
add_executable(
wintc-shell-winver

5
shell/winver/deps Normal file
View File

@@ -0,0 +1,5 @@
bt,rt:gdk-pixbuf2
bt,rt:glib2
bt,rt:gtk3
bt,rt:wintc-comgtk
bt,rt:wintc-winbrand

View File

@@ -4,6 +4,7 @@ project(
wintc-sound-theme-xp
VERSION 1.0
DESCRIPTION "Windows Total Conversion Windows XP sound theme."
LANGUAGES C
)
set(PROJECT_ANYARCH true)

1
themes/build-common/deps Normal file
View File

@@ -0,0 +1 @@
bt:sass

View File

@@ -4,6 +4,7 @@ project(
wintc-theme-luna-blue
VERSION 1.0
DESCRIPTION "Windows Total Conversion Windows XP style (Blue) theme."
LANGUAGES C
)
set(PROJECT_ANYARCH true)

1
themes/luna/blue/deps Symbolic link
View File

@@ -0,0 +1 @@
../../build-common/deps

View File

@@ -4,6 +4,7 @@ project(
wintc-theme-native
VERSION 1.0
DESCRIPTION "Windows Total Conversion Windows Classic theme."
LANGUAGES C
)
set(PROJECT_ANYARCH true)

1
themes/native/deps Symbolic link
View File

@@ -0,0 +1 @@
../build-common/deps

View File

@@ -4,6 +4,7 @@ project(
wintc-theme-professional
VERSION 1.0
DESCRIPTION "Windows Total Conversion Professional theme."
LANGUAGES C
)
set(PROJECT_ANYARCH true)

1
themes/professional/deps Symbolic link
View File

@@ -0,0 +1 @@
../build-common/deps

View File

@@ -0,0 +1,19 @@
garcon-->bt-->libgarcon-1-dev
garcon-->rt-->libgarcon-1-0
garcon-gtk3-->bt-->libgarcon-gtk3-1-dev
garcon-gtk3-->rt-->libgarcon-gtk3-1-0
gdk-pixbuf2-->bt-->libgdk-pixbuf-2.0-dev
gdk-pixbuf2-->rt-->libgdk-pixbuf-2.0-0
glib2-->bt-->libglib2.0-dev
glib2-->rt-->libglib2.0-0
gtk3-->bt-->libgtk-3-dev
gtk3-->rt-->libgtk-3-0
msgfmt-->bt,rt-->gettext
python3-venv-->bt,rt-->python3-venv
sass-->bt,rt-->ruby-sass
wintc-comgtk-->bt,rt-->libwintc-comgtk
wintc-exec-->bt,rt-->libwintc-exec
wintc-shllang-->bt,rt-->libwintc-shllang
wintc-winbrand-->bt,rt-->libwintc-winbrand
xcursorgen-->bt,rt-->x11-apps
xdg-mime-->bt,rt-->xdg-utils

View File

@@ -0,0 +1,85 @@
import argparse
from pathlib import Path
def main():
VALID_DISTROS=["deb"]
parser = argparse.ArgumentParser(
prog="Dependency Mapper Utility",
description="Maps dependency names to their distro package names.",
epilog="See ./README.MD for details."
)
parser.add_argument("depsfile", help="the 'deps' file with names to map")
parser.add_argument("distro", help="the distro ID to map to")
args = parser.parse_args()
depsfile = Path(args.depsfile)
distro = args.distro
if not distro in VALID_DISTROS:
raise KeyError(f"{distro} not a known distro")
# Read mappings
#
# Maps in the form: [nice name]-->[bt|rt|bt,rt]-->[pkg name]
#
distro_maps = dict()
scriptdir = Path(__file__).parent.absolute()
maps_file = open(scriptdir / f"{distro}-maps")
maps_txt = maps_file.readlines()
maps_file.close()
for mapping in maps_txt:
map_split = mapping.split("-->")
if len(map_split) != 3:
raise ValueError(f"Invalid mapping: {mapping}")
nice_name = map_split[0]
dep_stage = map_split[1]
pkg_name = map_split[2].rstrip()
if dep_stage == "bt" or dep_stage == "bt,rt":
distro_maps[f"bt-{nice_name}"] = pkg_name
if dep_stage == "rt" or dep_stage == "bt,rt":
distro_maps[f"rt-{nice_name}"] = pkg_name
# Perform mappings
#
# Maps in the form: [bt|rt|bt,rt]:[nice name]
#
deps_file = open(depsfile)
deps_txt = deps_file.readlines()
deps_file.close()
for dep in deps_txt:
dep_split = dep.split(":")
if len(dep_split) != 2:
raise ValueError(f"Invalid dep: {dep}")
dep_stage = dep_split[0]
dep_name = dep_split[1].rstrip()
if dep_stage == "bt" or dep_stage == "bt,rt":
if not f"bt-{dep_name}" in distro_maps:
raise ValueError(f"No build-time mapping for dep: {dep_name}")
print("bt:" + distro_maps[f"bt-{dep_name}"])
if dep_stage == "rt" or dep_stage == "bt,rt":
if not f"rt-{dep_name}" in distro_maps:
raise ValueError(f"No run-time mapping for dep: {dep_name}")
print("rt:" + distro_maps[f"rt-{dep_name}"])
if __name__ == "__main__":
main()

View File

@@ -4,35 +4,27 @@ project(
wintc-notepad
VERSION 1.0
DESCRIPTION "Windows Total Conversion Notepad application."
LANGUAGES C
)
set(PROJECT_ANYARCH false)
set(PROJECT_FREESTATUS true)
set(PROJECT_MAINTAINER "Rory Fewell <roryf@oddmatics.uk>")
set(
PROJECT_DEPENDENCIES
libglib2.0-0
libgtk-3-0
libwintc-comgtk
libwintc-shllang
)
set(PROJECT_ROOT ${CMAKE_CURRENT_LIST_DIR})
include(GNUInstallDirs)
include(../../packaging/cmake-inc/common/CMakeLists.txt)
include(../../packaging/cmake-inc/linking/CMakeLists.txt)
include(../../packaging/cmake-inc/locale/CMakeLists.txt)
include(../../packaging/cmake-inc/packaging/CMakeLists.txt)
include(../../packaging/cmake-inc/resources/CMakeLists.txt)
find_package(PkgConfig REQUIRED)
pkg_check_modules(GLIB REQUIRED glib-2.0)
pkg_check_modules(GTK3 REQUIRED gtk+-3.0)
pkg_check_modules(WINTC_COMGTK REQUIRED wintc-comgtk)
pkg_check_modules(WINTC_SHLLANG REQUIRED wintc-shllang)
wintc_resolve_library(glib-2.0 GLIB)
wintc_resolve_library(gtk+-3.0 GTK3)
wintc_resolve_library(wintc-comgtk WINTC_COMGTK)
wintc_resolve_library(wintc-shllang WINTC_SHLLANG)
wintc_compile_resources()
wintc_create_meta_h()

4
windows/notepad/deps Normal file
View File

@@ -0,0 +1,4 @@
bt,rt:glib2
bt,rt:gtk3
bt,rt:wintc-comgtk
bt,rt:wintc-shllang