Commit 3c72fea1 authored by Alex Valavanis's avatar Alex Valavanis

Merge branch 'master' of gitlab.com:inkscape/inkscape

parents 7eda3cc0 96b241fb
Pipeline #65436175 passed with stages
in 7 minutes and 26 seconds
......@@ -123,16 +123,16 @@ if(WIN32)
${MINGW_BIN}/tcl[0-9]*.dll
${MINGW_BIN}/tk[0-9]*.dll
${MINGW_BIN}/zlib1.dll)
INSTALL(FILES ${MINGW_LIBS} DESTINATION .)
INSTALL(FILES ${MINGW_LIBS} DESTINATION bin)
# There are differences for 64-Bit and 32-Bit build environments.
if(HAVE_MINGW64)
install(FILES
${MINGW_BIN}/libgcc_s_seh-1.dll
DESTINATION .)
DESTINATION bin)
else()
install(FILES
${MINGW_BIN}/libgcc_s_dw2-1.dll
DESTINATION .)
DESTINATION bin)
endif()
# Install hicolor/index.theme to avoid bug 1635207
......@@ -223,26 +223,26 @@ if(WIN32)
install(FILES
${MINGW_BIN}/gspawn-win64-helper.exe
${MINGW_BIN}/gspawn-win64-helper-console.exe
DESTINATION .)
DESTINATION bin)
else()
install(FILES
${MINGW_BIN}/gspawn-win32-helper.exe
${MINGW_BIN}/gspawn-win32-helper-console.exe
DESTINATION .)
DESTINATION bin)
endif()
# Python (a bit hacky for backwards compatibility with devlibs at this point)
install(FILES
${MINGW_BIN}/python2.exe
RENAME python.exe
DESTINATION .)
DESTINATION bin)
install(FILES
${MINGW_BIN}/python2w.exe
RENAME pythonw.exe
DESTINATION .)
DESTINATION bin)
install(FILES
${MINGW_BIN}/libpython2.7.dll
DESTINATION .)
DESTINATION bin)
install(DIRECTORY ${MINGW_LIB}/python2.7
DESTINATION lib
PATTERN "python2.7/site-packages" EXCLUDE # specify individual packages to install below
......
......@@ -68,14 +68,14 @@ appveyor SetVariable -Name APPVEYOR_SAVE_CACHE_ON_ERROR -Value true # build succ
# install
message "--- Installing the project"
ninja install || error "installation failed"
python ../buildtools/msys2checkdeps.py check inkscape/ || error "missing libraries in installed project"
python ../buildtools/msys2checkdeps.py check inkscape -w inkscape/bin || error "missing libraries in installed project"
# test
message "--- Running tests"
# check if the installed executable works
inkscape/inkscape.exe -V || error "installed executable won't run"
PATH= inkscape/inkscape.exe -V >/dev/null || error "installed executable won't run with empty PATH (missing dependencies?)"
err=$(PATH= inkscape/inkscape.exe -V 2>&1 >/dev/null)
inkscape/bin/inkscape.exe -V || error "installed executable won't run"
PATH= inkscape/bin/inkscape.exe -V >/dev/null || error "installed executable won't run with empty PATH (missing dependencies?)"
err=$(PATH= inkscape/bin/inkscape.exe -V 2>&1 >/dev/null)
if [ -n "$err" ]; then warning "installed executable produces output on stderr:"; echo "$err"; fi
# check if the uninstalled executable works
ninja inkscape_datadir_symlink
......
......@@ -2,24 +2,13 @@
# ------------------------------------------------------------------------------------------------------------------
# list or check dependencies for binary distributions based on MSYS2 (requires the package mingw-w64-ntldd)
#
# Usage:
# python msys2checkdeps.py MODE PATH
#
# MODE
# list - list dependencies in human-readable form with full path and list of dependents
# list-compact - list dependencies in compact form (as a plain list of filenames)
# check - check for missing or unused dependencies (see below for details)
# check-missing - check if all required dependencies are present in PATH
# exits with error code 2 if missing dependencies are found and prints the list to stderr
# check-unused - check if any of the libraries in the root of PATH are unused and prints the list to stderr
#
# PATH
# full or relative path to a single file or a directory to work on (directories will be checked recursively)
# run './msys2checkdeps.py --help' for usage information
# ------------------------------------------------------------------------------------------------------------------
from __future__ import print_function
import argparse
import os
import subprocess
import sys
......@@ -101,10 +90,8 @@ def collect_dependencies(path):
# - the corresponding value is an instance of class Dependency (containing full path and dependents)
deps = {}
if os.path.isfile(path):
os.chdir(os.path.dirname(path))
deps = get_dependencies(path, deps)
elif os.path.isdir(path):
os.chdir(path)
extensions = ['.exe', '.pyd', '.dll']
exclusions = ['python2.7/distutils/command/wininst']
for base, dirs, files in os.walk(path):
......@@ -118,22 +105,46 @@ def collect_dependencies(path):
if __name__ == '__main__':
# get mode from command line
mode = sys.argv[1]
modes = ['list', 'list-compact', 'check', 'check-missing', 'check-unused']
if mode not in modes:
error("First argument needs to be a valid mode (" + (', ').join(modes) + ").")
# get path from command line
path = sys.argv[2]
path = os.path.abspath(path)
if not os.path.exists(path):
error("Can't find file/folder '" + path + "'")
root = path if os.path.isdir(path) else os.path.dirname(path)
# parse arguments from command line
parser = argparse.ArgumentParser(description="List or check dependencies for binary distributions based on MSYS2.\n"
"(requires the package 'mingw-w64-ntldd')",
formatter_class=argparse.RawTextHelpFormatter)
parser.add_argument('mode', metavar="MODE", choices=modes,
help="One of the following:\n"
" list - list dependencies in human-readable form\n"
" with full path and list of dependents\n"
" list-compact - list dependencies in compact form (as a plain list of filenames)\n"
" check - check for missing or unused dependencies (see below for details)\n"
" check-missing - check if all required dependencies are present in PATH\n"
" exits with error code 2 if missing dependencies are found\n"
" and prints the list to stderr\n"
" check-unused - check if any of the libraries in the root of PATH are unused\n"
" and prints the list to stderr")
parser.add_argument('path', metavar='PATH',
help="full or relative path to a single file or a directory to work on\n"
"(directories will be checked recursively)")
parser.add_argument('-w', '--working-directory', metavar="DIR",
help="Use custom working directory (instead of 'dirname PATH')")
args = parser.parse_args()
# check if path exists
args.path = os.path.abspath(args.path)
if not os.path.exists(args.path):
error("Can't find file/folder '" + args.path + "'")
# get root and set it as working directory (unless one is explicitly specified)
if args.working_directory:
root = os.path.abspath(args.working_directory)
elif os.path.isdir(args.path):
root = args.path
elif os.path.isfile(args.path):
root = os.path.dirname(args.path)
os.chdir(root)
# get dependencies for path recursively
deps = collect_dependencies(path)
deps = collect_dependencies(args.path)
# print output / prepare exit code
exit_code = 0
......@@ -141,19 +152,19 @@ if __name__ == '__main__':
location = deps[dep].location
dependents = deps[dep].dependents
if mode == 'list':
if args.mode == 'list':
if (location is None):
location = '---MISSING---'
print(dep + " - " + location + " (" + ", ".join(dependents) + ")")
elif mode == 'list-compact':
elif args.mode == 'list-compact':
print(dep)
elif mode in ['check', 'check-missing']:
elif args.mode in ['check', 'check-missing']:
if ((location is None) or (root not in os.path.abspath(location))):
warning("Missing dependency " + dep + " (" + ", ".join(dependents) + ")")
exit_code = 2
# check for unused libraries
if mode in ['check', 'check-unused']:
if args.mode in ['check', 'check-unused']:
installed_libs = [file for file in os.listdir(root) if file.endswith(".dll")]
deps_lower = [dep.lower() for dep in deps]
top_level_libs = [lib for lib in installed_libs if lib.lower() not in deps_lower]
......
......@@ -89,6 +89,7 @@ void PathIntersectionGraph::_prepareArguments()
for (std::size_t i = _pv[w].size(); i > 0; --i) {
if (_pv[w][i-1].empty()) {
_pv[w].erase(_pv[w].begin() + (i-1));
continue;
}
for (std::size_t j = _pv[w][i-1].size(); j > 0; --j) {
if (_pv[w][i-1][j-1].isDegenerate()) {
......
......@@ -379,22 +379,10 @@ target_link_libraries(inkview inkscape_base)
#Define the installation
if(NOT WIN32)
install(TARGETS
inkscape
inkview
RUNTIME DESTINATION bin)
if(BUILD_SHARED_LIBS)
install(TARGETS inkscape inkview RUNTIME DESTINATION bin)
if(WIN32)
install(TARGETS inkscape_com inkview_com)
endif()
if(BUILD_SHARED_LIBS)
install(TARGETS inkscape_base LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}/inkscape)
endif()
else()
install(TARGETS
inkscape
inkscape_com
inkview
inkview_com
RUNTIME DESTINATION .)
if(BUILD_SHARED_LIBS)
install(TARGETS inkscape_base RUNTIME DESTINATION .)
endif()
endif()
......@@ -30,9 +30,6 @@
#include <io/resource.h>
#ifdef _WIN32
#ifndef _WIN32_WINDOWS // Allow use of features specific to Windows 98 or later. Required for correctly including icm.h
#define _WIN32_WINDOWS 0x0410
#endif
#include <windows.h>
#endif
......
......@@ -18,10 +18,7 @@
#include "filedialogimpl-gtkmm.h"
#include "inkgc/gc-core.h"
// define WINVER high enough so we get the correct OPENFILENAMEW size
#ifndef WINVER
#define WINVER 0x0500
#endif
#include <windows.h>
......
This diff is collapsed.
......@@ -59,13 +59,14 @@ public:
// Monitor all objects for addition/removal/attribute change
class NodeWatcher;
enum SelectorType { CLASS, ID, TAG };
void fixCSSSelectors(Glib::ustring &selector);
std::vector<SelectorDialog::NodeWatcher*> _nodeWatchers;
void _nodeAdded( Inkscape::XML::Node &repr );
void _nodeRemoved( Inkscape::XML::Node &repr );
void _nodeChanged( Inkscape::XML::Node &repr );
// Data structure
enum coltype { OBJECT, SELECTOR, UNHANDLED };
enum coltype { OBJECT, SELECTOR };
class ModelColumns : public Gtk::TreeModel::ColumnRecord {
public:
ModelColumns() {
......@@ -133,8 +134,12 @@ public:
Glib::ustring _getIdList(std::vector<SPObject *>);
std::vector<SPObject *> _getObjVec(Glib::ustring selector);
void _insertClass(const std::vector<SPObject *>& objVec, const Glib::ustring& className);
void _selectObjects(int, int);
void _insertClass(SPObject *obj, const Glib::ustring &className);
void _removeClass(const std::vector<SPObject *> &objVec, const Glib::ustring &className, bool all = false);
void _removeClass(SPObject *obj, const Glib::ustring &className, bool all = false);
void _selectObjects(int, int);
// Variables
bool _updating; // Prevent cyclic actions: read <-> write, select via dialog <-> via desktop
Inkscape::XML::Node *_textNode; // Track so we know when to add a NodeObserver.
......
......@@ -40,7 +40,6 @@
*/
#ifdef _WIN32
#undef DATADIR
#include <windows.h>
struct echo_thread_info {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment