mirror of
https://github.com/rozniak/xfce-winxp-tc.git
synced 2026-05-03 12:41:27 +00:00
Cleaning: Fixes #85, General tidy up: documentation packaging
This commit is contained in:
18
packaging/deb/cursors/README.MD
Normal file
18
packaging/deb/cursors/README.MD
Normal file
@@ -0,0 +1,18 @@
|
||||
# Cursor Theme Packaging (.deb)
|
||||
This directory contains the cursor theme packaging script for Debian and derivatives (e.g. Ubuntu).
|
||||
|
||||
## Usage
|
||||
Simply run the script, and pass in the path of the theme(s) you would like to build, relative to the `/cursors` directory.
|
||||
|
||||
For example:
|
||||
```bash
|
||||
./packcurs.sh no-shadow/standard shadow/standard
|
||||
```
|
||||
|
||||
This will build and output packages for the standard cursor theme with, and without, pointer shadows. You can then install the package(s) with:
|
||||
```bash
|
||||
sudo dpkg -i <cursor-theme-xxx-yyy.deb>
|
||||
```
|
||||
|
||||
## Any Problems?
|
||||
If you have problems running the script, feel free to [submit an issue](https://github.com/rozniak/xfce-winxp-tc/issues) and include the generated log file. 😁
|
||||
@@ -83,6 +83,31 @@ do
|
||||
theme_shadows="${BASH_REMATCH[1]}"
|
||||
theme_scheme="${BASH_REMATCH[2]}"
|
||||
|
||||
log_path="${CURDIR}/${theme_scheme}-${theme_shadows}.log"
|
||||
|
||||
if [[ ! -d "${theme_cfg_dir}" ]]
|
||||
then
|
||||
echo "Cannot find xcursorgen configs for ${themestr}, skipping."
|
||||
continue
|
||||
fi
|
||||
|
||||
if [[ ! -f "${theme_map_path}" ]]
|
||||
then
|
||||
echo "Cannot find mappings file for ${themestr}, skipping."
|
||||
continue
|
||||
fi
|
||||
|
||||
if [[ -f "${log_path}" ]]
|
||||
then
|
||||
rm -f "${log_path}"
|
||||
|
||||
if [[ $? -gt 0 ]]
|
||||
then
|
||||
echo "Failed to delete ${log_path}, skipping."
|
||||
continue
|
||||
fi
|
||||
fi
|
||||
|
||||
# Set up our package's working directory
|
||||
#
|
||||
pkg_theme_dir="${PKG_DIR}/usr/share/icons/${theme_scheme}-${theme_shadows}"
|
||||
@@ -95,17 +120,18 @@ do
|
||||
rm -rf "${PKG_DIR}"
|
||||
fi
|
||||
|
||||
mkdir "${PKG_DIR}"
|
||||
mkdir -p "${PKG_DIR}"
|
||||
mkdir -p "${pkg_cursor_dir}"
|
||||
mkdir -p "${pkg_curres_dir}"
|
||||
mkdir "${pkg_debian_dir}"
|
||||
mkdir -p "${pkg_debian_dir}"
|
||||
|
||||
# Generate X cursors, shift them to our working dir and remove the '.out' ext
|
||||
#
|
||||
cd "${theme_dir}"
|
||||
|
||||
find "${theme_cfg_dir}" -type f -exec xcursorgen '{}' '{}.out' \; > /dev/null 2>&1
|
||||
mv "${theme_cfg_dir}"/*.out "${pkg_curres_dir}"
|
||||
find "${pkg_curres_dir}" -type f -execdir rename 's/(.*)\.cfg\.out/\1/' '{}' \; > /dev/null 2>&1
|
||||
find "${theme_cfg_dir}" -type f -exec xcursorgen '{}' '{}.out' \; > "${log_path}" 2>&1
|
||||
mv "${theme_cfg_dir}"/*.out "${pkg_curres_dir}" > "${log_path}" 2>&1
|
||||
find "${pkg_curres_dir}" -type f -execdir rename 's/(.*)\.cfg\.out/\1/' '{}' \; > "${log_path}" 2>&1
|
||||
|
||||
# Create symbolic links
|
||||
#
|
||||
@@ -123,45 +149,52 @@ do
|
||||
pkg_res_target="res/${resname}"
|
||||
pkg_xcur_source="${pkg_cursor_dir}/${xcurname}"
|
||||
|
||||
ln -s "${pkg_res_target}" "${pkg_xcur_source}"
|
||||
ln -s "${pkg_res_target}" "${pkg_xcur_source}" > "${log_path}" 2>&1
|
||||
|
||||
if [[ $? -gt 0 ]]
|
||||
then
|
||||
"Failed to create symlink for ${xcurname} in ${themestr}."
|
||||
continue
|
||||
fi
|
||||
else
|
||||
echo "Invalid mapping '${mapping}' in ${theme_map_path}."
|
||||
continue
|
||||
fi
|
||||
done
|
||||
|
||||
# Copy across index.theme
|
||||
# Copy files
|
||||
#
|
||||
cp "${theme_dir}/index.theme" "${pkg_theme_dir}"
|
||||
pkg_setup_result=0
|
||||
|
||||
# Create CONTROL file
|
||||
cp "${theme_dir}/index.theme" "${pkg_theme_dir}" >> "${log_path}" 2>&1
|
||||
((pkg_setup_result+=$?))
|
||||
|
||||
cp "${theme_dir}/debian-control" "${pkg_debian_dir}/control" >> "${log_path}" 2>&1
|
||||
((pkg_setup_result+=$?))
|
||||
|
||||
# Check package setup good
|
||||
#
|
||||
# FIXME: One day this should probably read the description and maintainer(?)
|
||||
# from a file in the cursor theme's directory
|
||||
#
|
||||
debian_control=`cat <<EOF
|
||||
Package: cursor-theme-${theme_shadows}-${theme_scheme}
|
||||
Version: 0.0.1
|
||||
Maintainer: Rory Fewell <roryf@oddmatics.uk>
|
||||
Architecture: all
|
||||
Section: non-free
|
||||
Description: A Windows XP cursor theme.
|
||||
EOF
|
||||
`
|
||||
echo "${debian_control}" > "${pkg_debian_dir}/control"
|
||||
if [[ $pkg_setup_result -gt 0 ]]
|
||||
then
|
||||
echo "Failed to copy files for ${themestr}, see ${log_path} for output."
|
||||
rm -rf "${PKG_DIR}"
|
||||
continue
|
||||
fi
|
||||
|
||||
# Compile package
|
||||
#
|
||||
cd "${CURDIR}"
|
||||
|
||||
fakeroot dpkg-deb -v --build "${PKG_DIR}" > /dev/null 2>&1
|
||||
fakeroot dpkg-deb -v --build "${PKG_DIR}" >> "${log_path}" 2>&1
|
||||
|
||||
if [[ $? -gt 0 ]]
|
||||
then
|
||||
"Failed to build package for ${themestr}."
|
||||
"Failed to build package for ${themestr}, see ${log_path} for output."
|
||||
continue
|
||||
fi
|
||||
|
||||
# Tidy
|
||||
#
|
||||
mv "${PKG_DIR}.deb" "cursor-theme-${theme_shadows}-${theme_scheme}.deb"
|
||||
|
||||
rm -rf "${PKG_DIR}"
|
||||
|
||||
20
packaging/deb/libs/README.MD
Normal file
20
packaging/deb/libs/README.MD
Normal file
@@ -0,0 +1,20 @@
|
||||
# Shared Library Packaging (.deb)
|
||||
This directory contains the shared library packaging script for Debian and derivatives (e.g. Ubuntu).
|
||||
|
||||
## Usage
|
||||
Simply run the script, and pass in the name of the library/libraries you would like to build.
|
||||
|
||||
For example:
|
||||
```bash
|
||||
./packlibs.sh comgtk exec
|
||||
```
|
||||
|
||||
This will build and output packages for `libwintc-comgtk` and `libwintc-exec`. You can then install the package(s) with:
|
||||
```bash
|
||||
sudo dpkg -i <libname.deb>
|
||||
```
|
||||
|
||||
## Any Problems?
|
||||
You may encounter issues if you have not already installed dependencies for the library/libraries you are building. A log file is generated as part of the script's build process, review it, and see if you are missing dependencies.
|
||||
|
||||
If you have any other problems, feel free to [submit an issue](https://github.com/rozniak/xfce-winxp-tc/issues) and include the generated log file. 😁
|
||||
@@ -85,7 +85,7 @@ do
|
||||
fi
|
||||
fi
|
||||
|
||||
# Set up working directory
|
||||
# Set up build directory
|
||||
#
|
||||
build_dir="${lib_dir}/build"
|
||||
|
||||
@@ -121,6 +121,13 @@ do
|
||||
pkg_lib_dir="${PKG_DIR}${libdir}"
|
||||
pkg_pkgconfig_dir="${PKG_DIR}${pkgconfigdir}"
|
||||
|
||||
if [[ -d "${PKG_DIR}" ]]
|
||||
then
|
||||
rm -rf "${PKG_DIR}"
|
||||
fi
|
||||
|
||||
cd "${CURDIR}"
|
||||
|
||||
mkdir -p "${pkg_debian_dir}"
|
||||
mkdir -p "${pkg_include_dir}"
|
||||
mkdir -p "${pkg_lib_dir}"
|
||||
@@ -128,12 +135,28 @@ do
|
||||
|
||||
# Copy files
|
||||
#
|
||||
cd "${CURDIR}"
|
||||
pkg_setup_result=0
|
||||
|
||||
cp "${build_dir}/debian-control" "${pkg_debian_dir}/control"
|
||||
cp "${build_dir}/"*.h "${pkg_include_dir}"
|
||||
cp "${build_dir}/"*.so* "${pkg_lib_dir}"
|
||||
cp "${build_dir}/"*.pc "${pkg_pkgconfig_dir}"
|
||||
cp "${build_dir}/debian-control" "${pkg_debian_dir}/control" >> "${log_path}" 2>&1
|
||||
((pkg_setup_result+=$?))
|
||||
|
||||
cp "${build_dir}/"*.h "${pkg_include_dir}" >> "${log_path}" 2>&1
|
||||
((pkg_setup_result+=$?))
|
||||
|
||||
cp "${build_dir}/"*.so* "${pkg_lib_dir}" >> "${log_path}" 2>&1
|
||||
((pkg_setup_result+=$?))
|
||||
|
||||
cp "${build_dir}/"*.pc "${pkg_pkgconfig_dir}" >> "${log_path}" 2>&1
|
||||
((pkg_setup_result+=$?))
|
||||
|
||||
# Check package setup good
|
||||
#
|
||||
if [[ $pkg_setup_result -gt 0 ]]
|
||||
then
|
||||
echo "Failed to copy files for ${libstr}, see ${log_path} for output."
|
||||
rm -rf "${PKG_DIR}"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Compile package
|
||||
#
|
||||
|
||||
20
packaging/deb/panel/README.MD
Normal file
20
packaging/deb/panel/README.MD
Normal file
@@ -0,0 +1,20 @@
|
||||
# XFCE Panel Plugin Packaging (.deb)
|
||||
This directory contains the XFCE panel plugin packaging script for Debian and derivatives (e.g. Ubuntu).
|
||||
|
||||
## Usage
|
||||
Simply run the script, and pass in the name of the panel plugin you would like to build, relative to the repository's root.
|
||||
|
||||
For example:
|
||||
```bash
|
||||
./packplug.sh shell/start shell/systray
|
||||
```
|
||||
|
||||
This will build and output packages for the Start menu and notification area panel plugins. You can then install the package(s) with:
|
||||
```bash
|
||||
sudo dpkg -i <xxx-yyy-plugin.deb>
|
||||
```
|
||||
|
||||
## Any Problems?
|
||||
You may encounter issues if you have not already installed dependencies for the panel plugins you are building. A log file is generated as part of the script's build process, review it, and see if you are missing dependencies.
|
||||
|
||||
If you have any other problems, feel free to [submit an issue](https://github.com/rozniak/xfce-winxp-tc/issues) and include the generated log file. 😁
|
||||
194
packaging/deb/panel/packplug.sh
Executable file
194
packaging/deb/panel/packplug.sh
Executable file
@@ -0,0 +1,194 @@
|
||||
#!/bin/bash
|
||||
|
||||
#
|
||||
# packplug.sh - XFCE Panel Plugin 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
|
||||
#
|
||||
CORE_COUNT=`nproc`
|
||||
CURDIR=`realpath -s "./"`
|
||||
PKG_DIR=`realpath -s "./tmp.plug-pkg"`
|
||||
REQUIRED_PACKAGES=(
|
||||
'cmake'
|
||||
'fakeroot'
|
||||
'make'
|
||||
)
|
||||
SCRIPTDIR=`dirname "$0"`
|
||||
|
||||
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: packplug.sh [<name>]...'
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
||||
|
||||
#
|
||||
# MAIN SCRIPT
|
||||
#
|
||||
|
||||
# The arguments passed to this script should specify the panel plugins to build, for
|
||||
# example:
|
||||
#
|
||||
# ./packplug.sh shell/start shell/systray
|
||||
#
|
||||
for plugstr in "$@"
|
||||
do
|
||||
plug_dir="${REPO_ROOT}/${plugstr}"
|
||||
plug_safename=${plugstr/\//-}
|
||||
log_path="${CURDIR}/${plug_safename}-build.log"
|
||||
|
||||
if [[ ! -d "${plug_dir}" ]]
|
||||
then
|
||||
echo "Can't find plugin: ${plugstr}."
|
||||
continue
|
||||
fi
|
||||
|
||||
if [[ -f "${log_path}" ]]
|
||||
then
|
||||
rm -f "${log_path}"
|
||||
|
||||
if [[ $? -gt 0 ]]
|
||||
then
|
||||
echo "Failed to delete ${log_path}, skipping."
|
||||
continue
|
||||
fi
|
||||
fi
|
||||
|
||||
# Set up build directory
|
||||
#
|
||||
build_dir="${plug_dir}/build"
|
||||
|
||||
cd "${plug_dir}"
|
||||
|
||||
if [[ -d "${build_dir}" ]]
|
||||
then
|
||||
rm -rf "${build_dir}"
|
||||
|
||||
if [[ $? -gt 0 ]]
|
||||
then
|
||||
echo "Failed to delete ${build_dir}, skipping."
|
||||
continue
|
||||
fi
|
||||
fi
|
||||
|
||||
mkdir "${build_dir}"
|
||||
cd "${build_dir}"
|
||||
|
||||
# Compile the source
|
||||
#
|
||||
cmake .. >> "${log_path}" 2>&1
|
||||
make -j${CORE_COUNT} >> "${log_path}" 2>&1
|
||||
|
||||
if [[ $? -gt 0 ]]
|
||||
then
|
||||
echo "Compilation failed for ${plugstr}, see ${log_path} for output."
|
||||
continue
|
||||
fi
|
||||
|
||||
# Set up our package's working directory
|
||||
#
|
||||
pkg_debian_dir="${PKG_DIR}/DEBIAN"
|
||||
pkg_desktop_dir="${PKG_DIR}/usr/share/xfce4/panel/plugins"
|
||||
pkg_plug_dir="${PKG_DIR}/usr/lib/x86_64-linux-gnu/xfce4/panel/plugins"
|
||||
pkg_res_dir="${PKG_DIR}/usr/share/winxp/shell-res"
|
||||
|
||||
if [[ -d "${PKG_DIR}" ]]
|
||||
then
|
||||
rm -rf "${PKG_DIR}"
|
||||
|
||||
if [[ $? -gt 0 ]]
|
||||
then
|
||||
echo "Failed to clear temp dir: ${PKG_DIR}, see ${log_path} for output."
|
||||
continue
|
||||
fi
|
||||
fi
|
||||
|
||||
cd "${CURDIR}"
|
||||
|
||||
mkdir -p "${PKG_DIR}"
|
||||
mkdir -p "${pkg_debian_dir}"
|
||||
mkdir -p "${pkg_desktop_dir}"
|
||||
mkdir -p "${pkg_plug_dir}"
|
||||
|
||||
# Copy files
|
||||
#
|
||||
pkg_setup_result=0
|
||||
|
||||
cp "${plug_dir}/debian-control" "${pkg_debian_dir}/control" >> "${log_path}" 2>&1
|
||||
((pkg_setup_result+=$?))
|
||||
|
||||
cp "${plug_dir}/"*.desktop "${pkg_desktop_dir}" >> "${log_path}" 2>&1
|
||||
((pkg_setup_result+=$?))
|
||||
|
||||
cp "${build_dir}/"*.so "${pkg_plug_dir}" >> "${log_path}" 2>&1
|
||||
((pkg_setup_result+=$?))
|
||||
|
||||
if [[ -d "${plug_dir}/res" ]]
|
||||
then
|
||||
mkdir -p ${pkg_res_dir}
|
||||
|
||||
cp "${plug_dir}/res/"* "${pkg_res_dir}" >> "${log_path}" 2>&1
|
||||
((pkg_setup_result+=$?))
|
||||
fi
|
||||
|
||||
# Check package setup good
|
||||
#
|
||||
if [[ $pkg_setup_result -gt 0 ]]
|
||||
then
|
||||
echo "Failed to copy files for ${plugstr}, see ${log_path} for output."
|
||||
rm -rf "${PKG_DIR}"
|
||||
continue
|
||||
fi
|
||||
|
||||
# Compile package
|
||||
#
|
||||
fakeroot dpkg-deb -v --build "${PKG_DIR}" >> "${log_path}" 2>&1
|
||||
|
||||
if [[ $? -gt 0 ]]
|
||||
then
|
||||
echo "Failed to build package for ${plugdir}, see ${log_path} for output."
|
||||
rm -rf "${PKG_DIR}"
|
||||
continue
|
||||
fi
|
||||
|
||||
# Tidy
|
||||
#
|
||||
mv "${PKG_DIR}.deb" "${plug_safename}-plugin.deb"
|
||||
|
||||
rm -rf "${PKG_DIR}"
|
||||
|
||||
echo "Built ${plugstr}."
|
||||
done
|
||||
|
||||
echo "Packaging complete."
|
||||
20
packaging/deb/programs/README.MD
Normal file
20
packaging/deb/programs/README.MD
Normal file
@@ -0,0 +1,20 @@
|
||||
# Program Packaging (.deb)
|
||||
This directory contains the program packaging script for Debian and derivatives (e.g. Ubuntu).
|
||||
|
||||
## Usage
|
||||
Simply run the script and pass in the name of the program you would like to build, relative to the repository's root.
|
||||
|
||||
For example:
|
||||
```bash
|
||||
./packprog.sh shell/run shell/winver
|
||||
```
|
||||
|
||||
This will build and output packages for the `run` and `winver` programs. You can then install the package(s) with:
|
||||
```bash
|
||||
sudo dpkg -i <xxx-yyy.deb>
|
||||
```
|
||||
|
||||
## Any Problems?
|
||||
You may encounter issues if you have not already installed dependencies for the progams you are building. A log file is generated as part of the script's build process, review it, and see if you are missing dependencies.
|
||||
|
||||
If you have any other problems, feel free to [submit an issue](https://github.com/rozniak/xfce-winxp-tc/issues) and include the generated log file. 😁
|
||||
207
packaging/deb/programs/packprog.sh
Executable file
207
packaging/deb/programs/packprog.sh
Executable file
@@ -0,0 +1,207 @@
|
||||
#!/bin/bash
|
||||
|
||||
#
|
||||
# packprog.sh - Program 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
|
||||
#
|
||||
CORE_COUNT=`nproc`
|
||||
CURDIR=`realpath -s "./"`
|
||||
PKG_DIR=`realpath -s "./tmp.prog-pkg"`
|
||||
REQUIRED_PACKAGES=(
|
||||
'cmake'
|
||||
'fakeroot'
|
||||
'make'
|
||||
)
|
||||
SCRIPTDIR=`dirname "$0"`
|
||||
|
||||
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: packprog.sh [<name>]...'
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
||||
|
||||
#
|
||||
# MAIN SCRIPT
|
||||
#
|
||||
|
||||
# The arguments passed to this script should specify the program to build, for
|
||||
# example:
|
||||
#
|
||||
# ./packprog.sh shell/run windows/paint
|
||||
#
|
||||
for progstr in "$@"
|
||||
do
|
||||
prog_dir="${REPO_ROOT}/${progstr}"
|
||||
prog_name=""
|
||||
prog_safename=${progstr/\//-}
|
||||
prog_section=""
|
||||
log_path="${CURDIR}/${prog_safename}-build.log"
|
||||
|
||||
if [[ ! -d "${prog_dir}" ]]
|
||||
then
|
||||
echo "Can't find program: ${progstr}."
|
||||
continue
|
||||
fi
|
||||
|
||||
if [[ -f "${log_path}" ]]
|
||||
then
|
||||
rm -rf "${log_path}"
|
||||
|
||||
if [[ $? -gt 0 ]]
|
||||
then
|
||||
echo "Failed to delete ${log_path}, skipping."
|
||||
continue
|
||||
fi
|
||||
fi
|
||||
|
||||
if [[ "$progstr" =~ ([A-Za-z0-9._-]+)/([A-Za-z0-9._-]+) ]]
|
||||
then
|
||||
prog_section="${BASH_REMATCH[1]}"
|
||||
prog_name="${BASH_REMATCH[2]}"
|
||||
else
|
||||
echo "Unrecognised program: ${progstr}"
|
||||
continue
|
||||
fi
|
||||
|
||||
# Set up build directory
|
||||
#
|
||||
build_dir="${prog_dir}/build"
|
||||
|
||||
cd "${prog_dir}"
|
||||
|
||||
if [[ -d "${build_dir}" ]]
|
||||
then
|
||||
rm -rf "${build_dir}"
|
||||
|
||||
if [[ $? -gt 0 ]]
|
||||
then
|
||||
echo "Failed to delete ${build_dir}, skipping."
|
||||
continue
|
||||
fi
|
||||
fi
|
||||
|
||||
mkdir "${build_dir}"
|
||||
cd "${build_dir}"
|
||||
|
||||
# Compile the source
|
||||
#
|
||||
cmake .. >> "${log_path}" 2>&1
|
||||
make -j${CORE_COUNT} >> "${log_path}" 2>&1
|
||||
|
||||
if [[ $? -gt 0 ]]
|
||||
then
|
||||
echo "Compilation failed for ${progstr}, see ${log_path} for output."
|
||||
continue
|
||||
fi
|
||||
|
||||
# Set up our packages working directory
|
||||
#
|
||||
pkg_debian_dir="${PKG_DIR}/DEBIAN"
|
||||
pkg_desktop_dir="${PKG_DIR}/usr/share/applications"
|
||||
pkg_prog_dir="${PKG_DIR}/usr/bin"
|
||||
pkg_res_dir="${PKG_DIR}/usr/share/winxp/shell-res"
|
||||
|
||||
if [[ -d "${PKG_DIR}" ]]
|
||||
then
|
||||
rm -rf "${PKG_DIR}"
|
||||
|
||||
if [[ $? -gt 0 ]]
|
||||
then
|
||||
echo "Failed to clear temp dir: ${PKG_DIR}, see ${log_path} for output."
|
||||
continue
|
||||
fi
|
||||
fi
|
||||
|
||||
cd "${CURDIR}"
|
||||
|
||||
mkdir -p "${PKG_DIR}"
|
||||
mkdir -p "${pkg_debian_dir}"
|
||||
mkdir -p "${pkg_prog_dir}"
|
||||
|
||||
# Copy files
|
||||
#
|
||||
pkg_setup_result=0
|
||||
|
||||
cp "${prog_dir}/debian-control" "${pkg_debian_dir}/control" >> "${log_path}" 2>&1
|
||||
((pkg_setup_result+=$?))
|
||||
|
||||
cp "${build_dir}/${prog_name}" "${pkg_prog_dir}" >> "${log_path}" 2>&1
|
||||
((pkg_setup_result+=$?))
|
||||
|
||||
if [[ -f "${prog_dir}/${prog_name}.desktop" ]]
|
||||
then
|
||||
mkdir -p "${pkg_desktop_dir}"
|
||||
|
||||
cp "${prog_dir}/${prog_name}.desktop" "${pkg_desktop_dir}" >> "${log_path}" 2>&1
|
||||
((pkg_setup_result+=$?))
|
||||
fi
|
||||
|
||||
if [[ -d "${prog_dir}/res" ]]
|
||||
then
|
||||
mkdir -p "${pkg_res_dir}"
|
||||
|
||||
cp "${prog_dir}/res/"* "${pkg_res_dir}" >> "${log_path}" 2>&1
|
||||
((pkg_setup_result+=$?))
|
||||
fi
|
||||
|
||||
# Check package setup was good
|
||||
#
|
||||
if [[ $pkg_setup_result -gt 0 ]]
|
||||
then
|
||||
echo "Failed to copy files for ${progstr}, see ${log_path} for output."
|
||||
rm -rf "${PKG_DIR}"
|
||||
continue
|
||||
fi
|
||||
|
||||
# Compile package
|
||||
#
|
||||
fakeroot dpkg-deb -v --build "${PKG_DIR}" >> "${log_path}" 2>&1
|
||||
|
||||
if [[ $? -gt 0 ]]
|
||||
then
|
||||
echo "Failed to build package for ${progstr}, see ${log_path} for output."
|
||||
rm -rf "${PKG_DIR}"
|
||||
continue
|
||||
fi
|
||||
|
||||
# Tidy
|
||||
#
|
||||
mv "${PKG_DIR}.deb" "${prog_safename}.deb"
|
||||
|
||||
rm -rf "${PKG_DIR}"
|
||||
|
||||
echo "Built ${progstr}"
|
||||
done
|
||||
18
packaging/deb/themes/README.MD
Normal file
18
packaging/deb/themes/README.MD
Normal file
@@ -0,0 +1,18 @@
|
||||
# Desktop Theme Packaging (.deb)
|
||||
This directory contains the desktop theme packaging script for Debian and derivatives (e.g. Ubuntu).
|
||||
|
||||
## Usage
|
||||
Simply run the script. At the moment it will specifically build the Luna (Blue) theme.
|
||||
```bash
|
||||
./packthem.sh
|
||||
```
|
||||
|
||||
This will build and output the Luna (Blue) theme. You can then install the package with:
|
||||
```bash
|
||||
sudo dpkg -i xfce-theme-luna-blue.deb
|
||||
```
|
||||
|
||||
## Any Problems?
|
||||
The theme is still a WIP, and a lot of work is due (along with other themes). It's usable though.
|
||||
|
||||
If you come across a bug, [check the issues](https://github.com/rozniak/xfce-winxp-tc/issues), and if your particular problem is not there then file a new issue. 😁
|
||||
128
packaging/deb/themes/packthem.sh
Executable file
128
packaging/deb/themes/packthem.sh
Executable file
@@ -0,0 +1,128 @@
|
||||
#!/bin/bash
|
||||
|
||||
#
|
||||
# packthem.sh - Desktop Theme 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 "./"`
|
||||
PKG_DIR=`realpath -s "./tmp.theme-pkg"`
|
||||
REQUIRED_PACKAGES=(
|
||||
'fakeroot'
|
||||
'ruby-sass'
|
||||
)
|
||||
SCRIPTDIR=`dirname "$0"`
|
||||
|
||||
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 [[ $# -gt 0 ]]
|
||||
then
|
||||
echo 'This script only builds Luna (Blue) currently! No args needed.'
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
||||
#
|
||||
# MAIN SCRIPT
|
||||
#
|
||||
|
||||
# This script is simply a reworking of the old build-deb.sh for now. We just build a
|
||||
# package for Luna (Blue).
|
||||
#
|
||||
# This will change once themes are improved to separate base XP structure vs. the
|
||||
# visual style specific stuff (bitmaps, colours, etc.)
|
||||
#
|
||||
|
||||
# Prepare working dir
|
||||
#
|
||||
debian_dir="${PKG_DIR}/DEBIAN"
|
||||
theme_dir="${PKG_DIR}/usr/share/themes/Luna"
|
||||
theme_gtk3_dir="${theme_dir}/gtk-3.0"
|
||||
|
||||
if [[ -d "${PKG_DIR}" ]]
|
||||
then
|
||||
rm -rf "${PKG_DIR}"
|
||||
fi
|
||||
|
||||
mkdir "${PKG_DIR}"
|
||||
mkdir -p "${debian_dir}"
|
||||
mkdir -p "${theme_dir}"
|
||||
mkdir -p "${theme_gtk3_dir}"
|
||||
|
||||
# Copy static content straight into package
|
||||
#
|
||||
pkg_setup_result=0
|
||||
theme_root="${REPO_ROOT}/themes/luna/blue"
|
||||
|
||||
cp -r "${theme_root}/gtk-2.0" "${theme_dir}/gtk-2.0"
|
||||
((pkg_setup_result+=$?))
|
||||
|
||||
cp -r "${theme_root}/Resources" "${theme_dir}/Resources"
|
||||
((pkg_setup_result+=$?))
|
||||
|
||||
cp -r "${theme_root}/xfwm4" "${theme_dir}/xfwm4"
|
||||
((pkg_setup_result+=$?))
|
||||
|
||||
# Compile SASS for GTK 3 theme
|
||||
#
|
||||
scss "${theme_root}/gtk-3.0/main.scss" "${theme_gtk3_dir}/gtk.css" --sourcemap=none >> "luna-blue.log" 2>&1
|
||||
((pkg_setup_result+=$?))
|
||||
|
||||
# Add CONTROL file
|
||||
#
|
||||
cp "${theme_root}/debian-control" "${debian_dir}/control"
|
||||
((pkg_setup_result+=$?))
|
||||
|
||||
# Check package setup is good
|
||||
#
|
||||
if [[ $pkg_setup_result -gt 0 ]]
|
||||
then
|
||||
echo "Failed to copy files for Luna (Blue), see ${log_path} for output."
|
||||
rm -rf "${PKG_DIR}"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Compile package
|
||||
#
|
||||
fakeroot dpkg-deb -v --build "${PKG_DIR}" >> "luna-blue.log" 2>&1
|
||||
|
||||
if [[ $? -gt 0 ]]
|
||||
then
|
||||
echo "Failed to build package for Luna (Blue), see luna-blue.log for output."
|
||||
rm -rf "${PKG_DIR}"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Tidy
|
||||
#
|
||||
mv "${PKG_DIR}.deb" "xfce-theme-luna-blue.deb"
|
||||
|
||||
rm -rf "${PKG_DIR}"
|
||||
|
||||
echo "Build Luna (Blue)"
|
||||
Reference in New Issue
Block a user