Merge pull request #490 from jonls/windows-resources
Add icon for Windows build
This commit is contained in:
+14
-13
@@ -10,19 +10,20 @@ build:
|
||||
verbosity: detailed
|
||||
|
||||
build_script:
|
||||
- if [%arch%]==[x86_64] (
|
||||
SET "ADD_PATH_CMD=C:\mingw-w64\x86_64-6.3.0-posix-seh-rt_v5-rev1\mingw64\bin"
|
||||
)
|
||||
- if [%arch%]==[i686] (
|
||||
SET "ADD_PATH_CMD=C:\mingw-w64\i686-6.3.0-posix-dwarf-rt_v5-rev1\mingw32\bin"
|
||||
)
|
||||
- set PATH=C:\msys64\usr\bin;%ADD_PATH_CMD%;%PATH%
|
||||
- set CONFIGURE_FLAGS=--disable-drm --disable-randr --disable-vidmode --enable-wingdi --disable-quartz --disable-geoclue --disable-geoclue2 --disable-corelocation --disable-gui --disable-ubuntu --disable-nls --host=%arch%-w64-mingw32
|
||||
- bash -lc "mkdir $APPVEYOR_BUILD_FOLDER/root"
|
||||
- bash -lc "cd $APPVEYOR_BUILD_FOLDER && ./bootstrap"
|
||||
- bash -lc "cd $APPVEYOR_BUILD_FOLDER && ./configure --prefix=\"$APPVEYOR_BUILD_FOLDER/root\" $CONFIGURE_FLAGS"
|
||||
- bash -lc "cd $APPVEYOR_BUILD_FOLDER && make distcheck DISTCHECK_CONFIGURE_FLAGS=\"$CONFIGURE_FLAGS\""
|
||||
- bash -lc "cd $APPVEYOR_BUILD_FOLDER && make install"
|
||||
- ps: |
|
||||
If ($env:arch -Match "x86_64") {
|
||||
$env:MSYSTEM = "MINGW64"
|
||||
} Else {
|
||||
$env:MSYSTEM = "MINGW32"
|
||||
}
|
||||
|
||||
$env:CONFIGURE_FLAGS = "--disable-drm --disable-randr --disable-vidmode --enable-wingdi --disable-quartz --disable-geoclue --disable-geoclue2 --disable-corelocation --disable-gui --disable-ubuntu --disable-nls --host=$env:arch-w64-mingw32"
|
||||
|
||||
- ps: md (Join-Path $env:APPVEYOR_BUILD_FOLDER root)
|
||||
- C:\msys64\usr\bin\bash -lc "cd $APPVEYOR_BUILD_FOLDER && ./bootstrap"
|
||||
- C:\msys64\usr\bin\bash -lc "cd $APPVEYOR_BUILD_FOLDER && ./configure --prefix=\"$APPVEYOR_BUILD_FOLDER/root\" $CONFIGURE_FLAGS"
|
||||
- C:\msys64\usr\bin\bash -lc "cd $APPVEYOR_BUILD_FOLDER && make distcheck DISTCHECK_CONFIGURE_FLAGS=\"$CONFIGURE_FLAGS\""
|
||||
- C:\msys64\usr\bin\bash -lc "cd $APPVEYOR_BUILD_FOLDER && make install"
|
||||
|
||||
after_build:
|
||||
- ps: |
|
||||
|
||||
+23
-2
@@ -18,6 +18,27 @@ AC_LANG([C])
|
||||
|
||||
AC_PROG_INTLTOOL([0.50])
|
||||
|
||||
AC_CANONICAL_HOST
|
||||
|
||||
# Test host platform
|
||||
build_windows=no
|
||||
case "${host_os}" in
|
||||
mingw*)
|
||||
build_windows=yes
|
||||
;;
|
||||
esac
|
||||
|
||||
# Test whether to compile Windows resources
|
||||
AC_CHECK_TOOL([WINDRES], [windres], [])
|
||||
AS_IF([test "x$build_windows" = "xyes" -a -n "x$WINDRES"], [
|
||||
enable_windows_resource=yes
|
||||
], [
|
||||
enable_windows_resource=no
|
||||
])
|
||||
AM_CONDITIONAL([ENABLE_WINDOWS_RESOURCE],
|
||||
[test "x$enable_windows_resource" = xyes])
|
||||
|
||||
|
||||
# Test whether Objective C compiler works
|
||||
AC_MSG_CHECKING([whether Objective C compiler works])
|
||||
AC_LANG_PUSH([Objective C])
|
||||
@@ -128,7 +149,7 @@ AS_IF([test "x$enable_randr" != xno], [
|
||||
])
|
||||
AM_CONDITIONAL([ENABLE_RANDR], [test "x$enable_randr" = xyes])
|
||||
|
||||
# Check VidMode method
|
||||
# Check VidMode method
|
||||
AC_MSG_CHECKING([whether to enable VidMode method])
|
||||
AC_ARG_ENABLE([vidmode], [AC_HELP_STRING([--enable-vidmode],
|
||||
[enable VidMode method])],
|
||||
@@ -180,7 +201,7 @@ AM_CONDITIONAL([ENABLE_QUARTZ], [test "x$enable_quartz" = xyes])
|
||||
AC_SUBST([QUARTZ_CFLAGS])
|
||||
AC_SUBST([QUARTZ_LIBS])
|
||||
|
||||
# Check Windows GDI method
|
||||
# Check Windows GDI method
|
||||
AC_MSG_CHECKING([whether to enable WinGDI method])
|
||||
AC_ARG_ENABLE([wingdi], [AC_HELP_STRING([--enable-wingdi],
|
||||
[enable WinGDI method])],
|
||||
|
||||
+13
-2
@@ -25,11 +25,13 @@ EXTRA_redshift_SOURCES = \
|
||||
gamma-vidmode.c gamma-vidmode.h \
|
||||
gamma-quartz.c gamma-quartz.h \
|
||||
gamma-w32gdi.c gamma-w32gdi.h \
|
||||
location-geoclue.c location-geoclue.h
|
||||
location-geoclue.c location-geoclue.h \
|
||||
windows/appicon.rc \
|
||||
windows/versioninfo.rc
|
||||
|
||||
AM_CFLAGS =
|
||||
redshift_LDADD = @LIBINTL@
|
||||
EXTRA_DIST =
|
||||
EXTRA_DIST = windows/redshift.ico
|
||||
|
||||
if ENABLE_DRM
|
||||
redshift_SOURCES += gamma-drm.c gamma-drm.h
|
||||
@@ -99,3 +101,12 @@ liblocation_corelocation_la_LIBADD = \
|
||||
$(CORELOCATION_CFLAGS) $(CORELOCATION_LIBS)
|
||||
redshift_LDADD += liblocation-corelocation.la
|
||||
endif
|
||||
|
||||
|
||||
# Windows resources
|
||||
if ENABLE_WINDOWS_RESOURCE
|
||||
redshift_SOURCES += windows/appicon.rc windows/versioninfo.rc
|
||||
endif
|
||||
|
||||
.rc.o:
|
||||
$(AM_V_GEN)$(WINDRES) -I$(top_builddir) -i $< -o $@
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
AppIcon ICON redshift.ico
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 86 KiB |
@@ -0,0 +1,20 @@
|
||||
#include "config.h"
|
||||
|
||||
1 VERSIONINFO
|
||||
BEGIN
|
||||
BLOCK "StringFileInfo"
|
||||
BEGIN
|
||||
BLOCK "040904E4"
|
||||
BEGIN
|
||||
VALUE "CompanyName", "Redshift Open Source Project"
|
||||
VALUE "FileDescription", "Redshift"
|
||||
VALUE "OriginalFilename", "redshift.exe"
|
||||
VALUE "ProductName", "Redshift"
|
||||
VALUE "ProductVersion", PACKAGE_VERSION
|
||||
END
|
||||
END
|
||||
BLOCK "VarFileInfo"
|
||||
BEGIN
|
||||
VALUE "Translation", 0x409, 1252
|
||||
END
|
||||
END
|
||||
Reference in New Issue
Block a user