Compare commits
No commits in common. "49ee551b9bff0bace277e416a4c4e2d1cd445036" and "19913a5e4880503dd06a73c03584e77d3cf504a0" have entirely different histories.
49ee551b9b
...
19913a5e48
@ -65,15 +65,14 @@ Windows
|
|||||||
~~~~~~~
|
~~~~~~~
|
||||||
'fiv' can be cross-compiled for Windows, provided that you install a bunch of
|
'fiv' can be cross-compiled for Windows, provided that you install a bunch of
|
||||||
dependencies listed at the beginning of 'msys2-configure.sh',
|
dependencies listed at the beginning of 'msys2-configure.sh',
|
||||||
plus rsvg-convert from librsvg2, icotool from icoutils, and msitools ≥ 0.102.
|
plus rsvg-convert from librsvg2, and icotool from icoutils.
|
||||||
Beware that the build will take up about a gigabyte of disk space.
|
Beware that the build will take up about a gigabyte of disk space.
|
||||||
|
|
||||||
$ sh -e msys2-configure.sh builddir
|
$ sh -e msys2-configure.sh builddir
|
||||||
$ meson install -C builddir
|
$ meson install -C builddir
|
||||||
|
|
||||||
If everything succeeds, you will find a portable build of the application
|
If everything succeeds, you will find a portable build of the application
|
||||||
in the 'builddir/package' subdirectory, and a very basic MSI installation
|
in the 'builddir/package' subdirectory. No installer is provided yet.
|
||||||
package in 'builddir'.
|
|
||||||
|
|
||||||
Faster colour management
|
Faster colour management
|
||||||
^^^^^^^^^^^^^^^^^^^^^^^^
|
^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
@ -100,16 +100,7 @@ mark_thumbnail_lq(cairo_surface_t *surface)
|
|||||||
static gchar *
|
static gchar *
|
||||||
fiv_thumbnail_get_root(void)
|
fiv_thumbnail_get_root(void)
|
||||||
{
|
{
|
||||||
#ifdef G_OS_WIN32
|
|
||||||
// We can do better than GLib with FOLDERID_InternetCache,
|
|
||||||
// and we don't want to place .cache directly in the user's home.
|
|
||||||
// TODO(p): Register this thumbnail path using the installer:
|
|
||||||
// https://learn.microsoft.com/en-us/windows/win32/lwef/disk-cleanup
|
|
||||||
gchar *cache_dir =
|
|
||||||
g_build_filename(g_get_user_data_dir(), PROJECT_NAME, NULL);
|
|
||||||
#else
|
|
||||||
gchar *cache_dir = get_xdg_home_dir("XDG_CACHE_HOME", ".cache");
|
gchar *cache_dir = get_xdg_home_dir("XDG_CACHE_HOME", ".cache");
|
||||||
#endif
|
|
||||||
gchar *thumbnails_dir = g_build_filename(cache_dir, "thumbnails", NULL);
|
gchar *thumbnails_dir = g_build_filename(cache_dir, "thumbnails", NULL);
|
||||||
g_free(cache_dir);
|
g_free(cache_dir);
|
||||||
return thumbnails_dir;
|
return thumbnails_dir;
|
||||||
|
69
fiv.wxs.in
69
fiv.wxs.in
@ -1,69 +0,0 @@
|
|||||||
<?xml version='1.0' encoding='utf-8'?>
|
|
||||||
<Wix xmlns='http://schemas.microsoft.com/wix/2006/wi'>
|
|
||||||
<?define FullName = "@ProjectName@ @ProjectVersion@" ?>
|
|
||||||
<?if $(sys.BUILDARCH) = x64 ?>
|
|
||||||
<?define ProgramFilesFolder = "ProgramFiles64Folder" ?>
|
|
||||||
<?else?>
|
|
||||||
<?define ProgramFilesFolder = "ProgramFilesFolder" ?>
|
|
||||||
<?endif?>
|
|
||||||
|
|
||||||
<Product Id='*'
|
|
||||||
Name='$(var.FullName)'
|
|
||||||
UpgradeCode='a3e64e2d-4310-4c5f-8562-bb0e0b3e0a53'
|
|
||||||
Language='1033'
|
|
||||||
Codepage='1252'
|
|
||||||
Version='@ProjectVersion@'
|
|
||||||
Manufacturer='Premysl Eric Janouch'>
|
|
||||||
|
|
||||||
<Package Id='*'
|
|
||||||
Keywords='Installer,Image,Viewer'
|
|
||||||
Description='$(var.FullName) Installer'
|
|
||||||
Manufacturer='Premysl Eric Janouch'
|
|
||||||
InstallerVersion='200'
|
|
||||||
Compressed='yes'
|
|
||||||
Languages='1033'
|
|
||||||
SummaryCodepage='1252' />
|
|
||||||
|
|
||||||
<Media Id='1' Cabinet='data.cab' EmbedCab='yes' />
|
|
||||||
<Icon Id='fiv.ico' SourceFile='fiv.ico' />
|
|
||||||
<Property Id='ARPPRODUCTICON' Value='fiv.ico' />
|
|
||||||
<Property Id='ARPURLINFOABOUT' Value='https://git.janouch.name/p/fiv' />
|
|
||||||
|
|
||||||
<UIRef Id='WixUI_Minimal' />
|
|
||||||
<!-- This isn't supported by msitools, but is necessary for WiX.
|
|
||||||
<WixVariable Id='WixUILicenseRtf' Value='License.rtf' />
|
|
||||||
-->
|
|
||||||
|
|
||||||
<Directory Id='TARGETDIR' Name='SourceDir'>
|
|
||||||
<Directory Id='$(var.ProgramFilesFolder)' Name='Files'>
|
|
||||||
<Directory Id='INSTALLDIR' Name='$(var.FullName)' />
|
|
||||||
</Directory>
|
|
||||||
|
|
||||||
<Directory Id='ProgramMenuFolder' Name='Programs'>
|
|
||||||
<Directory Id='ProgramMenuDir' Name='$(var.FullName)'>
|
|
||||||
<Component Id='ProgramMenuDir' Guid='*'>
|
|
||||||
<Shortcut Id='ProgramsMenuShortcut'
|
|
||||||
Name='@ProjectName@'
|
|
||||||
Target='[INSTALLDIR]\fiv.exe'
|
|
||||||
WorkingDirectory='INSTALLDIR'
|
|
||||||
Arguments='"%USERPROFILE%"'
|
|
||||||
Icon='fiv.ico' />
|
|
||||||
<RemoveFolder Id='ProgramMenuDir' On='uninstall' />
|
|
||||||
<RegistryValue Root='HKCU'
|
|
||||||
Key='Software\[Manufacturer]\[ProductName]'
|
|
||||||
Type='string'
|
|
||||||
Value=''
|
|
||||||
KeyPath='yes' />
|
|
||||||
</Component>
|
|
||||||
</Directory>
|
|
||||||
</Directory>
|
|
||||||
|
|
||||||
<Directory Id='DesktopFolder' Name='Desktop' />
|
|
||||||
</Directory>
|
|
||||||
|
|
||||||
<Feature Id='Complete' Level='1'>
|
|
||||||
<ComponentGroupRef Id='CG.fiv' />
|
|
||||||
<ComponentRef Id='ProgramMenuDir' />
|
|
||||||
</Feature>
|
|
||||||
</Product>
|
|
||||||
</Wix>
|
|
13
meson.build
13
meson.build
@ -338,19 +338,6 @@ elif meson.is_cross_build()
|
|||||||
msys2_root = meson.get_external_property('msys2_root')
|
msys2_root = meson.get_external_property('msys2_root')
|
||||||
meson.add_install_script('msys2-install.sh', msys2_root)
|
meson.add_install_script('msys2-install.sh', msys2_root)
|
||||||
|
|
||||||
# TODO: If we used DESTDIR instead of the prefix, this could probably
|
|
||||||
# be a custom target that invokes "meson install --destdir $(pwd)/package"
|
|
||||||
# through "meson compile -C builddir msi". Try it out, also in MSYS2.
|
|
||||||
meson.add_install_script('msys2-package.sh', host_machine.cpu())
|
|
||||||
configure_file(
|
|
||||||
input : 'fiv.wxs.in',
|
|
||||||
output : 'fiv.wxs',
|
|
||||||
configuration : configuration_data({
|
|
||||||
'ProjectName' : meson.project_name(),
|
|
||||||
'ProjectVersion' : meson.project_version(),
|
|
||||||
}),
|
|
||||||
)
|
|
||||||
|
|
||||||
# This is the minimum to run targets from msys2-configure.sh builds.
|
# This is the minimum to run targets from msys2-configure.sh builds.
|
||||||
meson.add_devenv({
|
meson.add_devenv({
|
||||||
'WINEPATH' : msys2_root / 'bin',
|
'WINEPATH' : msys2_root / 'bin',
|
||||||
|
@ -19,7 +19,7 @@ then
|
|||||||
wine64() { "$@"; }
|
wine64() { "$@"; }
|
||||||
awk() { command awk -v RS='\r?\n' "$@"; }
|
awk() { command awk -v RS='\r?\n' "$@"; }
|
||||||
pacman -S --needed libarchive $pkg-ca-certificates $pkg-gcc $pkg-icoutils \
|
pacman -S --needed libarchive $pkg-ca-certificates $pkg-gcc $pkg-icoutils \
|
||||||
$pkg-librsvg $pkg-meson $pkg-msitools $pkg-pkgconf
|
$pkg-librsvg $pkg-meson $pkg-pkgconf
|
||||||
fi
|
fi
|
||||||
|
|
||||||
status() {
|
status() {
|
||||||
|
@ -1,30 +0,0 @@
|
|||||||
#!/bin/sh -e
|
|
||||||
export LC_ALL=C.UTF-8
|
|
||||||
cd "$MESON_BUILD_ROOT"
|
|
||||||
|
|
||||||
txt2rtf() {
|
|
||||||
iconv -f utf-8 -t ascii//translit "$@" | awk 'BEGIN {
|
|
||||||
print "{\\rtf1\\ansi\\ansicpg1252\\deff0{\\fonttbl{\\f0 Tahoma;}}"
|
|
||||||
print "\\f0\\fs24{\\pard\\sa240"
|
|
||||||
} {
|
|
||||||
gsub(/\\/, "\\\\"); gsub(/{/, "\\{"); gsub(/}/, "\\}")
|
|
||||||
if (!$0) { print "\\par}{\\pard\\sa240"; prefix = "" }
|
|
||||||
else { print prefix $0; prefix = " " }
|
|
||||||
} END {
|
|
||||||
print "\\par}}"
|
|
||||||
}'
|
|
||||||
}
|
|
||||||
|
|
||||||
# We're being passed host_machine.cpu(), which will be either x86 or x86_64.
|
|
||||||
[ "$1" = "x86" ] && arch=x86 || arch=x64
|
|
||||||
|
|
||||||
wxs=fiv.wxs files=fiv-files.wxs msi=fiv.msi
|
|
||||||
|
|
||||||
txt2rtf "$MESON_SOURCE_ROOT/LICENSE" > License.rtf
|
|
||||||
find "$MESON_INSTALL_DESTDIR_PREFIX" -type f \
|
|
||||||
| wixl-heat --prefix "$MESON_INSTALL_DESTDIR_PREFIX/" \
|
|
||||||
--directory-ref INSTALLDIR --component-group CG.fiv \
|
|
||||||
--var var.SourceDir > "$files"
|
|
||||||
|
|
||||||
wixl --verbose --arch "$arch" -D SourceDir="$MESON_INSTALL_DESTDIR_PREFIX" \
|
|
||||||
--ext ui --output "$msi" "$wxs" "$files"
|
|
Loading…
x
Reference in New Issue
Block a user