Compare commits
No commits in common. "3a087ad581f2e15451bfc12d8ad520422a92f4a8" and "cbe23b7bb6dc42563cc6438d394e31ed7d1b4530" have entirely different histories.
3a087ad581
...
cbe23b7bb6
@ -1,5 +1,5 @@
|
|||||||
# The last version with Windows XP support is 3.13, we want to keep that
|
# The last version with Windows XP support is 3.13, we want to keep that
|
||||||
cmake_minimum_required (VERSION 3.10)
|
cmake_minimum_required (VERSION 3.9)
|
||||||
project (logdiag VERSION 0.2.1 LANGUAGES C)
|
project (logdiag VERSION 0.2.1 LANGUAGES C)
|
||||||
|
|
||||||
# Options
|
# Options
|
||||||
@ -333,7 +333,8 @@ if (WIN32)
|
|||||||
install (DIRECTORY
|
install (DIRECTORY
|
||||||
${WIN32_DEPENDS_PATH}/bin/
|
${WIN32_DEPENDS_PATH}/bin/
|
||||||
DESTINATION .
|
DESTINATION .
|
||||||
FILES_MATCHING PATTERN "*.dll")
|
FILES_MATCHING PATTERN "*.dll"
|
||||||
|
PATTERN "libgettext*" EXCLUDE)
|
||||||
install (DIRECTORY
|
install (DIRECTORY
|
||||||
${WIN32_DEPENDS_PATH}/etc/
|
${WIN32_DEPENDS_PATH}/etc/
|
||||||
DESTINATION etc)
|
DESTINATION etc)
|
||||||
@ -365,8 +366,6 @@ if (WIN32)
|
|||||||
DESTINATION share/locale)
|
DESTINATION share/locale)
|
||||||
endif (translation_found GREATER -1)
|
endif (translation_found GREATER -1)
|
||||||
endforeach (locale)
|
endforeach (locale)
|
||||||
|
|
||||||
install (SCRIPT Win32Cleanup.cmake)
|
|
||||||
else (WIN32)
|
else (WIN32)
|
||||||
install (TARGETS logdiag DESTINATION bin)
|
install (TARGETS logdiag DESTINATION bin)
|
||||||
install (FILES share/logdiag.desktop DESTINATION share/applications)
|
install (FILES share/logdiag.desktop DESTINATION share/applications)
|
||||||
@ -380,11 +379,11 @@ endif (WIN32)
|
|||||||
|
|
||||||
install (DIRECTORY share/gui share/library DESTINATION share/${PROJECT_NAME})
|
install (DIRECTORY share/gui share/library DESTINATION share/${PROJECT_NAME})
|
||||||
install (FILES ${GSETTINGS_SCHEMAS} DESTINATION share/glib-2.0/schemas)
|
install (FILES ${GSETTINGS_SCHEMAS} DESTINATION share/glib-2.0/schemas)
|
||||||
install (CODE " # DESTDIR is not in use on Windows (WIN32 is only native here!)
|
install (CODE " # DESTDIR is not in use on Windows
|
||||||
if (WIN32 OR \"\$ENV{DESTDIR}\" STREQUAL \"\")
|
if (WIN32 OR \"\$ENV{DESTDIR}\" STREQUAL \"\")
|
||||||
execute_process (COMMAND \"${GLIB_COMPILE_SCHEMAS_EXECUTABLE}\"
|
execute_process (COMMAND \"${GLIB_COMPILE_SCHEMAS_EXECUTABLE}\"
|
||||||
\"\${CMAKE_INSTALL_PREFIX}/share/glib-2.0/schemas\")
|
\"\${CMAKE_INSTALL_PREFIX}/share/glib-2.0/schemas\")
|
||||||
endif ()")
|
endif (WIN32 OR \"\$ENV{DESTDIR}\" STREQUAL \"\")")
|
||||||
|
|
||||||
# CPack
|
# CPack
|
||||||
set (CPACK_PACKAGE_DESCRIPTION_SUMMARY "Schematic editor")
|
set (CPACK_PACKAGE_DESCRIPTION_SUMMARY "Schematic editor")
|
||||||
@ -410,23 +409,19 @@ set (CPACK_PACKAGE_INSTALL_REGISTRY_KEY "${PROJECT_NAME}")
|
|||||||
|
|
||||||
set (CPACK_PACKAGE_ICON "${PROJECT_SOURCE_DIR}/share\\\\header.bmp")
|
set (CPACK_PACKAGE_ICON "${PROJECT_SOURCE_DIR}/share\\\\header.bmp")
|
||||||
set (CPACK_NSIS_INSTALLED_ICON_NAME "logdiag.exe")
|
set (CPACK_NSIS_INSTALLED_ICON_NAME "logdiag.exe")
|
||||||
set (CPACK_NSIS_CREATE_ICONS_EXTRA [[
|
set (CPACK_NSIS_CREATE_ICONS_EXTRA "
|
||||||
CreateShortCut '$SMPROGRAMS\\$STARTMENU_FOLDER\\logdiag.lnk' '$INSTDIR\\logdiag.exe'
|
CreateShortCut '\$SMPROGRAMS\\\\$STARTMENU_FOLDER\\\\logdiag.lnk' '\$INSTDIR\\\\logdiag.exe'")
|
||||||
]])
|
set (CPACK_NSIS_DELETE_ICONS_EXTRA "
|
||||||
set (CPACK_NSIS_DELETE_ICONS_EXTRA [[
|
Delete '\$SMPROGRAMS\\\\$MUI_TEMP\\\\logdiag.lnk'")
|
||||||
Delete '$SMPROGRAMS\\$MUI_TEMP\\logdiag.lnk'
|
set (CPACK_NSIS_EXTRA_INSTALL_COMMANDS "
|
||||||
]])
|
|
||||||
set (CPACK_NSIS_EXTRA_INSTALL_COMMANDS [[
|
|
||||||
WriteRegStr HKCR '.ldd' '' 'logdiag.Diagram'
|
WriteRegStr HKCR '.ldd' '' 'logdiag.Diagram'
|
||||||
WriteRegStr HKCR 'logdiag.Diagram' '' 'logdiag Diagram'
|
WriteRegStr HKCR 'logdiag.Diagram' '' 'logdiag Diagram'
|
||||||
WriteRegStr HKCR 'logdiag.Diagram\\shell\\open\\command' '' '\"$INSTDIR\\logdiag.exe\" \"%1\"'
|
WriteRegStr HKCR 'logdiag.Diagram\\\\shell\\\\open\\\\command' '' '\\\"\$INSTDIR\\\\logdiag.exe\\\" \\\"%1\\\"'
|
||||||
WriteRegStr HKCR 'logdiag.Diagram\\shell\\edit\\command' '' '\"$INSTDIR\\logdiag.exe\" \"%1\"'
|
WriteRegStr HKCR 'logdiag.Diagram\\\\shell\\\\edit\\\\command' '' '\\\"\$INSTDIR\\\\logdiag.exe\\\" \\\"%1\\\"'
|
||||||
System::Call 'shell32::SHChangeNotify(i,i,i,i) (0x08000000, 0x1000, 0, 0)'
|
System::Call 'shell32::SHChangeNotify(i,i,i,i) (0x08000000, 0x1000, 0, 0)'")
|
||||||
]])
|
set (CPACK_NSIS_EXTRA_UNINSTALL_COMMANDS "
|
||||||
set (CPACK_NSIS_EXTRA_UNINSTALL_COMMANDS [[
|
|
||||||
DeleteRegKey HKCR 'logdiag.Diagram'
|
DeleteRegKey HKCR 'logdiag.Diagram'
|
||||||
System::Call 'shell32::SHChangeNotify(i,i,i,i) (0x08000000, 0x1000, 0, 0)'
|
System::Call 'shell32::SHChangeNotify(i,i,i,i) (0x08000000, 0x1000, 0, 0)'")
|
||||||
]])
|
|
||||||
|
|
||||||
string (REPLACE "https://" "https:\\\\\\\\" project_URL_NSIS "${project_URL}")
|
string (REPLACE "https://" "https:\\\\\\\\" project_URL_NSIS "${project_URL}")
|
||||||
set (CPACK_NSIS_URL_INFO_ABOUT "${project_URL_NSIS}")
|
set (CPACK_NSIS_URL_INFO_ABOUT "${project_URL_NSIS}")
|
||||||
|
@ -15,7 +15,7 @@ a package with the latest development version from Archlinux's AUR.
|
|||||||
Requirements
|
Requirements
|
||||||
------------
|
------------
|
||||||
Runtime dependencies: GTK+ >= 3.8, json-glib >= 0.10.4, lua >= 5.2 +
|
Runtime dependencies: GTK+ >= 3.8, json-glib >= 0.10.4, lua >= 5.2 +
|
||||||
Build dependencies: CMake >= 3.10
|
Build dependencies: CMake >= 3.9
|
||||||
|
|
||||||
Build from source on Unix-like systems
|
Build from source on Unix-like systems
|
||||||
--------------------------------------
|
--------------------------------------
|
||||||
|
@ -1,37 +0,0 @@
|
|||||||
# To be run from cmake_install.cmake, eradicates all unreferenced libraries.
|
|
||||||
# CMake 3.9.6 has a parsing bug with ENCODING UTF-8.
|
|
||||||
cmake_minimum_required (VERSION 3.10)
|
|
||||||
|
|
||||||
# CPack runs this almost without any CMake variables at all
|
|
||||||
# (cmStateSnapshot::SetDefaultDefinitions(), CMAKE_INSTALL_PREFIX, [DESTDIR])
|
|
||||||
set (installdir "${CMAKE_INSTALL_PREFIX}")
|
|
||||||
if (NOT installdir OR installdir MATCHES "^/usr(/|$)")
|
|
||||||
return ()
|
|
||||||
endif ()
|
|
||||||
|
|
||||||
# The function is recursive and CMake has tragic scoping behaviour;
|
|
||||||
# environment variables are truly global there, in the absence of a cache
|
|
||||||
unset (ENV{seen})
|
|
||||||
function (expand path)
|
|
||||||
set (seen $ENV{seen})
|
|
||||||
if (path IN_LIST seen OR NOT EXISTS "${path}")
|
|
||||||
return ()
|
|
||||||
endif ()
|
|
||||||
|
|
||||||
set (ENV{seen} "$ENV{seen};${path}")
|
|
||||||
file (STRINGS "${path}" strings REGEX "[.][Dd][Ll][Ll]$" ENCODING UTF-8)
|
|
||||||
foreach (string ${strings})
|
|
||||||
string (REGEX MATCH "[-.+_a-zA-Z0-9]+$" word "${string}")
|
|
||||||
expand ("${installdir}/${word}")
|
|
||||||
endforeach ()
|
|
||||||
endfunction ()
|
|
||||||
|
|
||||||
file (GLOB roots LIST_DIRECTORIES false "${installdir}/*.[Ee][Xx][Ee]"
|
|
||||||
"${installdir}/lib/gdk-pixbuf-2.0/2.10.0/loaders/*.[Dd][Ll][Ll]")
|
|
||||||
foreach (binary ${roots})
|
|
||||||
expand ("${binary}")
|
|
||||||
endforeach ()
|
|
||||||
|
|
||||||
file (GLOB libraries LIST_DIRECTORIES false "${installdir}/*.[Dd][Ll][Ll]")
|
|
||||||
list (REMOVE_ITEM libraries $ENV{seen})
|
|
||||||
file (REMOVE ${libraries})
|
|
Loading…
x
Reference in New Issue
Block a user