Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit 9853d845 authored by Wolthera van Hövell's avatar Wolthera van Hövell 🛍

Merge branch 'master' into wolthera/T1624-pattern-rotation

parents 8c66e587 cc3adcfd
......@@ -12,6 +12,18 @@ ExternalProject_Add( ext_lcms2
UPDATE_COMMAND ""
DEPENDS ext_patch
)
elseif (ANDROID)
ExternalProject_Add( ext_lcms2
DOWNLOAD_DIR ${EXTERNALS_DOWNLOAD_DIR}
URL http://files.kde.org/krita/build/dependencies/lcms2-2.10.tar.gz
URL_MD5 c5f915d681325e0767e40187799f23b1
PATCH_COMMAND ${PATCH_COMMAND} -p1 -i ${CMAKE_CURRENT_SOURCE_DIR}/lcms2-10.diff
INSTALL_DIR ${PREFIX_ext_lcms2}
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${PREFIX_ext_lcms2} -DCMAKE_BUILD_TYPE=${GLOBAL_BUILD_TYPE} ${GLOBAL_PROFILE} -DBUILD_TESTS=FALSE -DBUILD_UTILS=FALSE -DBUILD_STATIC=FALSE -DBUILD_PLUGINS=FALSE
UPDATE_COMMAND ""
)
else ()
ExternalProject_Add( ext_lcms2
DOWNLOAD_DIR ${EXTERNALS_DOWNLOAD_DIR}
......
......@@ -28,6 +28,7 @@
// HACK! please refactor out!
#include "kis_simple_stroke_strategy.h"
#include "kis_abstract_projection_plane.h"
KisNodePropertyListCommand::KisNodePropertyListCommand(KisNodeSP node, KisBaseNode::PropertyList newPropertyList)
......@@ -45,17 +46,17 @@ KisNodePropertyListCommand::KisNodePropertyListCommand(KisNodeSP node, KisBaseNo
void KisNodePropertyListCommand::redo()
{
const KisBaseNode::PropertyList propsBefore = m_node->sectionModelProperties();
const QRect oldExtent = m_node->extent();
const QRect oldExtent = m_node->projectionPlane()->tightUserVisibleBounds();
m_node->setSectionModelProperties(m_newPropertyList);
doUpdate(propsBefore, m_node->sectionModelProperties(), oldExtent | m_node->extent());
doUpdate(propsBefore, m_node->sectionModelProperties(), oldExtent | m_node->projectionPlane()->tightUserVisibleBounds());
}
void KisNodePropertyListCommand::undo()
{
const KisBaseNode::PropertyList propsBefore = m_node->sectionModelProperties();
const QRect oldExtent = m_node->extent();
const QRect oldExtent = m_node->projectionPlane()->tightUserVisibleBounds();
m_node->setSectionModelProperties(m_oldPropertyList);
doUpdate(propsBefore, m_node->sectionModelProperties(), oldExtent | m_node->extent());
doUpdate(propsBefore, m_node->sectionModelProperties(), oldExtent | m_node->projectionPlane()->tightUserVisibleBounds());
}
bool checkOnionSkinChanged(const KisBaseNode::PropertyList &oldPropertyList,
......
......@@ -401,14 +401,13 @@ QDomDocument KisAslLayerStyleSerializer::formXmlDocument() const
w.writeBoolean("enab", outerGlow->effectEnabled());
w.writeEnum("Md ", "BlnM", compositeOpToBlendMode(outerGlow->blendMode()));
if (outerGlow->fillType() == psd_fill_gradient && outerGlow->gradient()) {
KoSegmentGradient *segmentGradient = dynamic_cast<KoSegmentGradient*>(outerGlow->gradient().data());
KoStopGradient *stopGradient = dynamic_cast<KoStopGradient*>(outerGlow->gradient().data());
if (segmentGradient) {
if (segmentGradient && segmentGradient->valid()) {
w.writeSegmentGradient("Grad", segmentGradient);
} else if (stopGradient) {
} else if (stopGradient && stopGradient->valid()) {
w.writeStopGradient("Grad", stopGradient);
} else {
warnKrita << "WARNING: OG: Unknown gradient type!";
......@@ -449,14 +448,13 @@ QDomDocument KisAslLayerStyleSerializer::formXmlDocument() const
w.writeBoolean("enab", innerGlow->effectEnabled());
w.writeEnum("Md ", "BlnM", compositeOpToBlendMode(innerGlow->blendMode()));
if (innerGlow->fillType() == psd_fill_gradient && innerGlow->gradient()) {
KoSegmentGradient *segmentGradient = dynamic_cast<KoSegmentGradient*>(innerGlow->gradient().data());
KoStopGradient *stopGradient = dynamic_cast<KoStopGradient*>(innerGlow->gradient().data());
if (segmentGradient) {
if (segmentGradient && innerGlow->gradient()->valid()) {
w.writeSegmentGradient("Grad", segmentGradient);
} else if (stopGradient) {
} else if (stopGradient && innerGlow->gradient()->valid()) {
w.writeStopGradient("Grad", stopGradient);
} else {
warnKrita << "WARNING: IG: Unknown gradient type!";
......@@ -594,7 +592,7 @@ QDomDocument KisAslLayerStyleSerializer::formXmlDocument() const
KoSegmentGradient *segmentGradient = dynamic_cast<KoSegmentGradient*>(gradientOverlay->gradient().data());
KoStopGradient *stopGradient = dynamic_cast<KoStopGradient*>(gradientOverlay->gradient().data());
if (gradientOverlay->effectEnabled() && (segmentGradient || stopGradient)) {
if (gradientOverlay->effectEnabled() && ((segmentGradient && segmentGradient->valid()) || (stopGradient && stopGradient->valid()))) {
w.enterDescriptor("GrFl", "", "GrFl");
w.writeBoolean("enab", gradientOverlay->effectEnabled());
......@@ -657,13 +655,14 @@ QDomDocument KisAslLayerStyleSerializer::formXmlDocument() const
if (stroke->fillType() == psd_fill_solid_color) {
w.writeColor("Clr ", stroke->color());
} else if (stroke->fillType() == psd_fill_gradient) {
}
else if (stroke->fillType() == psd_fill_gradient) {
KoSegmentGradient *segmentGradient = dynamic_cast<KoSegmentGradient*>(stroke->gradient().data());
KoStopGradient *stopGradient = dynamic_cast<KoStopGradient*>(stroke->gradient().data());
if (segmentGradient) {
if (segmentGradient && segmentGradient->valid()) {
w.writeSegmentGradient("Grad", segmentGradient);
} else if (stopGradient) {
} else if (stopGradient && stopGradient->valid()) {
w.writeStopGradient("Grad", stopGradient);
} else {
warnKrita << "WARNING: Stroke: Unknown gradient type!";
......
......@@ -226,8 +226,6 @@ KoGradientSegment *KoSegmentGradient::segmentAt(qreal t) const
void KoSegmentGradient::colorAt(KoColor& dst, qreal t) const
{
const KoGradientSegment *segment = segmentAt(t);
Q_ASSERT(segment != 0);
if (segment) {
segment->colorAt(dst, t);
}
......
......@@ -359,7 +359,8 @@ void KisAslXmlWriter::writeSegmentGradient(const QString &key, const KoSegmentGr
}
// last segment
{
if (!segments.isEmpty()) {
const KoGradientSegment *lastSeg = segments.last();
QColor color = lastSeg->endColor().toQColor();
......
......@@ -374,28 +374,54 @@ void KisShapeLayerCanvas::repaint()
continue;
}
KIS_SAFE_ASSERT_RECOVER(job.viewUpdateRect.width() <= MASK_IMAGE_WIDTH &&
job.viewUpdateRect.height() <= MASK_IMAGE_HEIGHT) {
continue;
}
image.fill(0);
tempPainter.setTransform(QTransform());
tempPainter.setClipRect(QRect(0,0,MASK_IMAGE_WIDTH,MASK_IMAGE_HEIGHT));
tempPainter.setClipRect(QRect(0,0,job.viewUpdateRect.width(), job.viewUpdateRect.height()));
tempPainter.setTransform(m_viewConverter->documentToView() *
QTransform::fromTranslate(-job.viewUpdateRect.x(), -job.viewUpdateRect.y()));
m_shapeManager->paintJob(tempPainter, job, false);
KoColorSpaceRegistry::instance()->rgb8()
->convertPixelsTo(image.constBits(), dstData, m_projection->colorSpace(),
MASK_IMAGE_WIDTH * MASK_IMAGE_HEIGHT,
KoColorConversionTransformation::internalRenderingIntent(),
KoColorConversionTransformation::internalConversionFlags());
// TODO: use job.viewUpdateRect instead of MASK_IMAGE_WIDTH/HEIGHT
m_projection->writeBytes(dstData,
job.viewUpdateRect.x(),
job.viewUpdateRect.y(),
MASK_IMAGE_WIDTH,
MASK_IMAGE_HEIGHT);
if (image.size() != job.viewUpdateRect.size()) {
const quint8 *imagePtr = image.constBits();
const int imageRowStride = 4 * image.width();
for (int y = 0; y < job.viewUpdateRect.height(); y++) {
KoColorSpaceRegistry::instance()->rgb8()
->convertPixelsTo(imagePtr, dstData, m_projection->colorSpace(),
job.viewUpdateRect.width(),
KoColorConversionTransformation::internalRenderingIntent(),
KoColorConversionTransformation::internalConversionFlags());
m_projection->writeBytes(dstData,
job.viewUpdateRect.x(),
job.viewUpdateRect.y() + y,
job.viewUpdateRect.width(),
1);
imagePtr += imageRowStride;
}
} else {
KoColorSpaceRegistry::instance()->rgb8()
->convertPixelsTo(image.constBits(), dstData, m_projection->colorSpace(),
MASK_IMAGE_WIDTH * MASK_IMAGE_HEIGHT,
KoColorConversionTransformation::internalRenderingIntent(),
KoColorConversionTransformation::internalConversionFlags());
m_projection->writeBytes(dstData,
job.viewUpdateRect.x(),
job.viewUpdateRect.y(),
MASK_IMAGE_WIDTH,
MASK_IMAGE_HEIGHT);
}
repaintRect |= job.viewUpdateRect;
}
......
......@@ -688,7 +688,15 @@ void KisSelectionManager::selectOpaqueOnNode(KisNodeSP node, SelectionAction act
if (!device) return;
QRect rc = device->exactBounds();
if (rc.isEmpty()) return;
if (rc.isEmpty()) {
if (action == SELECTION_REPLACE || action == SELECTION_INTERSECT) {
KUndo2Command *deselectCommand = new KisDeselectActiveSelectionCommand(m_view->selection(), m_view->image());
KisProcessingApplicator::runSingleCommandStroke(m_view->image(), deselectCommand);
}
return;
}
KIS_ASSERT_RECOVER_RETURN(canvas);
......
......@@ -218,13 +218,13 @@ void KisSelectionToolHelper::addSelectionShapes(QList< KoShape* > shapes, Select
}
struct AddSelectionShape : public KisTransactionBasedCommand {
AddSelectionShape(KisView *view, KoShape* shape, SelectionAction action)
AddSelectionShape(KisView *view, QList<KoShape*> shapes, SelectionAction action)
: m_view(view),
m_shape(shape),
m_shapes(shapes),
m_action(action) {}
KisView *m_view;
KoShape* m_shape;
QList<KoShape*> m_shapes;
SelectionAction m_action;
KUndo2Command* paint() override {
......@@ -238,82 +238,88 @@ void KisSelectionToolHelper::addSelectionShapes(QList< KoShape* > shapes, Select
if (shapeSelection) {
QList<KoShape*> existingShapes = shapeSelection->shapes();
if (existingShapes.size() == 1) {
KoShape *currentShape = existingShapes.first();
QPainterPath path1 = currentShape->absoluteTransformation().map(currentShape->outline());
QPainterPath path2 = m_shape->absoluteTransformation().map(m_shape->outline());
QPainterPath path1;
path1.setFillRule(Qt::WindingFill);
Q_FOREACH(KoShape *shape, existingShapes) {
path1 += shape->absoluteTransformation().map(shape->outline());
}
const QTransform booleanWorkaroundTransform =
KritaUtils::pathShapeBooleanSpaceWorkaround(m_view->image());
QPainterPath path2;
path2.setFillRule(Qt::WindingFill);
Q_FOREACH(KoShape *shape, m_shapes) {
path2 += shape->absoluteTransformation().map(shape->outline());
}
path1 = booleanWorkaroundTransform.map(path1);
path2 = booleanWorkaroundTransform.map(path2);
const QTransform booleanWorkaroundTransform =
KritaUtils::pathShapeBooleanSpaceWorkaround(m_view->image());
QPainterPath path = path2;
path1 = booleanWorkaroundTransform.map(path1);
path2 = booleanWorkaroundTransform.map(path2);
switch (m_action) {
case SELECTION_DEFAULT:
case SELECTION_REPLACE:
path = path2;
break;
QPainterPath path = path2;
case SELECTION_INTERSECT:
path = path1 & path2;
break;
switch (m_action) {
case SELECTION_DEFAULT:
case SELECTION_REPLACE:
path = path2;
break;
case SELECTION_ADD:
path = path1 | path2;
break;
case SELECTION_INTERSECT:
path = path1 & path2;
break;
case SELECTION_SUBTRACT:
path = path1 - path2;
break;
case SELECTION_SYMMETRICDIFFERENCE:
path = (path1 | path2) - (path1 & path2);
break;
}
case SELECTION_ADD:
path = path1 | path2;
break;
path = booleanWorkaroundTransform.inverted().map(path);
case SELECTION_SUBTRACT:
path = path1 - path2;
break;
case SELECTION_SYMMETRICDIFFERENCE:
path = (path1 | path2) - (path1 & path2);
break;
}
KoShape *newShape = KoPathShape::createShapeFromPainterPath(path);
newShape->setUserData(new KisShapeSelectionMarker);
path = booleanWorkaroundTransform.inverted().map(path);
KUndo2Command *parentCommand = new KUndo2Command();
KoShape *newShape = KoPathShape::createShapeFromPainterPath(path);
newShape->setUserData(new KisShapeSelectionMarker);
m_view->canvasBase()->shapeController()->removeShape(currentShape, parentCommand);
m_view->canvasBase()->shapeController()->addShape(newShape, 0, parentCommand);
KUndo2Command *parentCommand = new KUndo2Command();
if (path.isEmpty()) {
KisCommandUtils::CompositeCommand *cmd = new KisCommandUtils::CompositeCommand();
cmd->addCommand(parentCommand);
cmd->addCommand(new KisDeselectActiveSelectionCommand(m_view->selection(), m_view->image()));
parentCommand = cmd;
}
m_view->canvasBase()->shapeController()->removeShapes(existingShapes, parentCommand);
m_view->canvasBase()->shapeController()->addShape(newShape, 0, parentCommand);
resultCommand = parentCommand;
if (path.isEmpty()) {
KisCommandUtils::CompositeCommand *cmd = new KisCommandUtils::CompositeCommand();
cmd->addCommand(parentCommand);
cmd->addCommand(new KisDeselectActiveSelectionCommand(m_view->selection(), m_view->image()));
parentCommand = cmd;
}
resultCommand = parentCommand;
}
}
if (!resultCommand) {
/**
* Mark a shape that it belongs to a shape selection
* Mark the shapes that they belong to a shape selection
*/
if(!m_shape->userData()) {
m_shape->setUserData(new KisShapeSelectionMarker);
Q_FOREACH(KoShape *shape, m_shapes) {
if(!shape->userData()) {
shape->setUserData(new KisShapeSelectionMarker);
}
}
resultCommand = m_view->canvasBase()->shapeController()->addShape(m_shape, 0);
resultCommand = m_view->canvasBase()->shapeController()->addShapesDirect(m_shapes, 0);
}
return resultCommand;
}
};
Q_FOREACH (KoShape* shape, shapes) {
applicator.applyCommand(
new KisGuiContextCommand(new AddSelectionShape(view, shape, action), view));
}
applicator.applyCommand(
new KisGuiContextCommand(new AddSelectionShape(view, shapes, action), view));
applicator.end();
}
......
......@@ -29,6 +29,7 @@
#include "KisRunnableStrokeJobData.h"
#include "KisRunnableStrokeJobUtils.h"
#include "KisRunnableStrokeJobsInterface.h"
#include "kis_abstract_projection_plane.h"
MoveStrokeStrategy::MoveStrokeStrategy(KisNodeSelectionRecipe nodeSelection,
......@@ -275,7 +276,7 @@ QRect MoveStrokeStrategy::moveNode(KisNodeSP node, QPoint offset)
QRect dirtyRect;
if (!m_blacklistedNodes.contains(node)) {
dirtyRect = node->extent();
dirtyRect = node->projectionPlane()->tightUserVisibleBounds();
QPoint newOffset = m_initialNodeOffsets[node] + offset;
/**
......
......@@ -23,3 +23,9 @@ install(FILES ${CMAKE_CURRENT_LIST_DIR}/include/FileExists2.nsh
${CMAKE_CURRENT_LIST_DIR}/include/IsFileInUse.nsh
DESTINATION ${CMAKE_INSTALL_PREFIX}/installer/include
)
install(
FILES
${CMAKE_CURRENT_LIST_DIR}/translations/English.nsh
DESTINATION ${CMAKE_INSTALL_PREFIX}/installer/translations
)
......@@ -24,14 +24,14 @@ endif()
# Download and find NSIS
if(NOT DEFINED NO_DOWNLOAD_NSIS)
set(DOWNLOAD_NSIS_VERSION "3.02.1")
set(DOWNLOAD_NSIS_VERSION "3.05")
message(STATUS "Downloading NSIS...")
if(EXISTS "${CMAKE_CURRENT_BINARY_DIR}/nsis-${DOWNLOAD_NSIS_VERSION}")
file(REMOVE_RECURSE "${CMAKE_CURRENT_BINARY_DIR}/nsis-${DOWNLOAD_NSIS_VERSION}")
endif()
file(DOWNLOAD "https://files.kde.org/krita/build/dependencies/nsis-${DOWNLOAD_NSIS_VERSION}.zip"
"${DOWNLOAD_DIR}/nsis-${DOWNLOAD_NSIS_VERSION}.zip"
EXPECTED_HASH SHA1=06c791f9cf668d945564316c9c947ebb4cc469e9
EXPECTED_HASH SHA1=68f9c7025110b95c20431bbce28f3bf2d0ddb1ff
)
execute_process(COMMAND ${CMAKE_COMMAND} -E tar xfz "${DOWNLOAD_DIR}/nsis-${DOWNLOAD_NSIS_VERSION}.zip"
WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}"
......@@ -156,6 +156,7 @@ execute_process(COMMAND "${TOOL_MAKENSIS}"
"${ARG_HAS_FFMPEG}"
"/XSetCompressor /SOLID lzma"
"/V3"
"/INPUTCHARSET" "UTF8"
"${CMAKE_CURRENT_BINARY_DIR}/krita-nsis/installer_krita.nsi"
RESULT_VARIABLE result_makensis
)
......
!define CURRENT_LANG ${LANG_ENGLISH}
# Strings to show in the installation log:
LangString RemovingShellEx ${CURRENT_LANG} "Removing Krita Shell Integration..."
LangString RemoveShellExFailed ${CURRENT_LANG} "Failed to remove Krita Shell Integration."
LangString RemoveShellExDone ${CURRENT_LANG} "Krita Shell Integration removed."
LangString RemovingOldVer ${CURRENT_LANG} "Removing previous version..."
LangString RemoveOldVerFailed ${CURRENT_LANG} "Failed to remove previous version of Krita."
LangString RemoveOldVerDone ${CURRENT_LANG} "Previous version removed."
# Strings for the component selection dialog:
LangString SectionRemoveOldVer ${CURRENT_LANG} "Remove Old Version"
LangString SectionRemoveOldVerDesc ${CURRENT_LANG} "Remove previously installed Krita $KritaNsisVersion ($KritaNsisBitness-bit)."
LangString SectionShellEx ${CURRENT_LANG} "Shell Integration"
LangString SectionShellExDesc ${CURRENT_LANG} "Shell Extension component to provide thumbnails and file properties display for Krita files.$\r$\n$\r$\nVersion: ${KRITASHELLEX_VERSION}"
LangString SectionMainDesc ${CURRENT_LANG} "${KRITA_PRODUCTNAME} ${KRITA_VERSION_DISPLAY}$\r$\n$\r$\nVersion: ${KRITA_VERSION}"
# We don't actually bundle FFmpeg so these are not shown.
LangString SectionBundledFfmpeg ${CURRENT_LANG} "Bundled FFmpeg"
LangString SectionBundledFfmpegDesc ${CURRENT_LANG} "Install a bundled version of FFmpeg for exporting animations."
# Main dialog strings:
LangString SetupLangPrompt ${CURRENT_LANG} "Choose the language to be used for the setup process:"
LangString ShellExLicensePageHeader ${CURRENT_LANG} "License Agreement (Krita Shell Extension)"
LangString ConfirmInstallPageHeader ${CURRENT_LANG} "Confirm Installation"
LangString ConfirmInstallPageDesc ${CURRENT_LANG} "Confirm installation of ${KRITA_PRODUCTNAME} ${KRITA_VERSION_DISPLAY}."
LangString DesktopIconPageDesc2 ${CURRENT_LANG} "You can choose whether to create a shortcut icon on the desktop for launching Krita:"
LangString DesktopIconPageCheckbox ${CURRENT_LANG} "Create a desktop icon"
LangString ConfirmInstallPageDesc2 ${CURRENT_LANG} "Setup is ready to install ${KRITA_PRODUCTNAME} ${KRITA_VERSION_DISPLAY}. You may go back to review the install options before you continue.$\r$\n$\r$\n$_CLICK"
# Misc. message prompts:
LangString MsgRequireWin7 ${CURRENT_LANG} "${KRITA_PRODUCTNAME} ${KRITA_VERSION_DISPLAY} requires Windows 7 or above."
LangString Msg64bitOn32bit ${CURRENT_LANG} "You are running 32-bit Windows, but this installer installs Krita 64-bit which can only be installed on 64-bit Windows. Please download the 32-bit version on https://krita.org/"
LangString Msg32bitOn64bit ${CURRENT_LANG} "You are trying to install 32-bit Krita on 64-bit Windows. You are strongly recommended to install the 64-bit version of Krita instead since it offers better performance.$\nYou can download the 64-bit version on https://krita.org/$\n$\nDo you still wish to install the 32-bit version of Krita?"
# These prompts are used for when Krita 2.9 or earlier, or the 3.0 alpha 1 MSI version is installed.
LangString MsgAncientVerMustBeRemoved ${CURRENT_LANG} "An ancient version of Krita is detected. This program will now attempt to remove any old versions of Krita.$\nDo you wish to continue?"
LangString MsgKrita3alpha1RemoveFailed ${CURRENT_LANG} "Failed to remove Krita 3.0 Alpha 1."
LangString MsgKrita2msi32bitRemoveFailed ${CURRENT_LANG} "Failed to remove old Krita (32-bit)."
LangString MsgKrita2msi64bitRemoveFailed ${CURRENT_LANG} "Failed to remove old Krita (64-bit)."
#
LangString MsgKritaSameVerReinstall ${CURRENT_LANG} "It appears that ${KRITA_PRODUCTNAME} ${KRITA_VERSION_DISPLAY} is already installed.$\nThis setup will reinstall it."
LangString MsgKrita3264bitSwap ${CURRENT_LANG} "It appears that Krita $KritaNsisBitness-bit ($KritaNsisVersion) is currently installed. This setup will replace it with the ${KRITA_INSTALLER_BITNESS}-bit version of Krita ${KRITA_VERSION_DISPLAY}."
LangString MsgKritaNewerAlreadyInstalled ${CURRENT_LANG} "It appears that a newer version of Krita $KritaNsisBitness-bit ($KritaNsisVersion) is currently installed. If you want to downgrade Krita to ${KRITA_VERSION_DISPLAY}, please uninstall the newer version manually before running this setup."
LangString MsgKritaRunning ${CURRENT_LANG} "Krita appears to be running. Please close Krita before running this installer."
LangString MsgUninstallKritaRunning ${CURRENT_LANG} "Krita appears to be running. Please close Krita before uninstalling."
!undef CURRENT_LANG
!define CURRENT_LANG ${LANG_SIMPCHINESE}
# Strings to show in the installation log:
LangString RemovingShellEx ${CURRENT_LANG} "正在删除 Krita 文件资源管理器插件..."
LangString RemoveShellExFailed ${CURRENT_LANG} "无法删除 Krita 文件资源管理器插件。"
LangString RemoveShellExDone ${CURRENT_LANG} "成功删除 Krita 文件资源管理器插件。"
LangString RemovingOldVer ${CURRENT_LANG} "正在卸载旧版软件..."
LangString RemoveOldVerFailed ${CURRENT_LANG} "无法卸载旧版 Krita 软件。"
LangString RemoveOldVerDone ${CURRENT_LANG} "成功卸载旧版 Krita 软件。"
# Strings for the component selection dialog:
LangString SectionRemoveOldVer ${CURRENT_LANG} "卸载旧版软件"
LangString SectionRemoveOldVerDesc ${CURRENT_LANG} "卸载之前安装的 Krita $KritaNsisVersion ($KritaNsisBitness-bit)."
LangString SectionShellEx ${CURRENT_LANG} "文件资源管理器插件"
LangString SectionShellExDesc ${CURRENT_LANG} "安装此插件后,Windows 文件资源管理器即可显示 Krita 文件的缩略图和属性信息。$\r$\n$\r$\n版本: ${KRITASHELLEX_VERSION}"
LangString SectionMainDesc ${CURRENT_LANG} "${KRITA_PRODUCTNAME} ${KRITA_VERSION_DISPLAY}$\r$\n$\r$\n版本: ${KRITA_VERSION}"
# We don't actually bundle FFmpeg so these are not shown.
LangString SectionBundledFfmpeg ${CURRENT_LANG} "FFmpeg 软件包"
LangString SectionBundledFfmpegDesc ${CURRENT_LANG} "安装本安装程序自带的 FFmpeg 软件包,用于导出动画。"
# Main dialog strings:
LangString SetupLangPrompt ${CURRENT_LANG} "请选择安装程序显示的语言:"
LangString ShellExLicensePageHeader ${CURRENT_LANG} "许可证协议 (Krita 文件资源管理器插件)"
LangString ConfirmInstallPageHeader ${CURRENT_LANG} "确认安装"
LangString ConfirmInstallPageDesc ${CURRENT_LANG} "确认安装 ${KRITA_PRODUCTNAME} ${KRITA_VERSION_DISPLAY}。"
LangString DesktopIconPageDesc2 ${CURRENT_LANG} "选择是否在桌面上创建启动 Krita 的图标快捷方式:"
LangString DesktopIconPageCheckbox ${CURRENT_LANG} "创建桌面图标快捷方式"
LangString ConfirmInstallPageDesc2 ${CURRENT_LANG} "安装程序已经准备就绪,即将安装 ${KRITA_PRODUCTNAME} ${KRITA_VERSION_DISPLAY}。在继续前可返回检查安装选项,确保一切无误。$\r$\n$\r$\n$_CLICK"
# Misc. message prompts:
LangString MsgRequireWin7 ${CURRENT_LANG} "${KRITA_PRODUCTNAME} ${KRITA_VERSION_DISPLAY} 只支持 Windows 7 以及更高版本。"
LangString Msg64bitOn32bit ${CURRENT_LANG} "本机正在运行 32 位版本的 Windows,但本安装程序提供的是 64 位版本的 Krita,它只能在 64 位版本的 Windows 下运行。请前往 https://krita.org/ 网站,下载 32 位版本的 Krita 安装程序。"
LangString Msg32bitOn64bit ${CURRENT_LANG} "你正在 64 位版本的 Windows 下面安装 32 位版本的 Krita,这将降低程序性能。我们强烈建议你改而安装 64 位版本的 Krita。$\n请前往 https://krita.org/ 网站,下载 64 位版本的 Krita。$\n$\n仍要继续安装 32 位版本的 Krita 吗?"
# These prompts are used for when Krita 2.9 or earlier, or the 3.0 alpha 1 MSI version is installed.
LangString MsgAncientVerMustBeRemoved ${CURRENT_LANG} "检测到本机已经安装了旧版本的 Krita。本安装程序将在安装前卸载旧版软件。$\n确定要继续吗?"
LangString MsgKrita3alpha1RemoveFailed ${CURRENT_LANG} "无法卸载 Krita 3.0 Alpha 1。"
LangString MsgKrita2msi32bitRemoveFailed ${CURRENT_LANG} "无法卸载旧版 Krita (32 位)。"
LangString MsgKrita2msi64bitRemoveFailed ${CURRENT_LANG} "无法卸载旧版 Krita (64 位)。"
#
LangString MsgKritaSameVerReinstall ${CURRENT_LANG} "检测到本机已经安装了 ${KRITA_PRODUCTNAME} ${KRITA_VERSION_DISPLAY}。$\n本安装程序将重新安装此版本的 Krita。"
LangString MsgKrita3264bitSwap ${CURRENT_LANG} "检测到本机已经安装了$KritaNsisBitness位版本的 Krita ($KritaNsisVersion)。本安装程序将用${KRITA_INSTALLER_BITNESS}位版本的 Krita ${KRITA_VERSION_DISPLAY} 将其覆盖。"
LangString MsgKritaNewerAlreadyInstalled ${CURRENT_LANG} "检测到本机已经安装了$KritaNsisBitness位版本的 Krita ($KritaNsisVersion)。如需安装旧版的 Krita (${KRITA_VERSION_DISPLAY}),请先手动卸载已有版本,然后在此运行此安装程序。"
LangString MsgKritaRunning ${CURRENT_LANG} "检测到 Krita 正在运行。请在关闭 Krita 后再次运行此安装程序。"
LangString MsgUninstallKritaRunning ${CURRENT_LANG} "检测到 Krita 正在运行。请在关闭 Krita 后再次运行此卸载程序。"
!undef CURRENT_LANG
!define CURRENT_LANG ${LANG_TRADCHINESE}
# Strings to show in the installation log:
LangString RemovingShellEx ${CURRENT_LANG} "正在移除 Krita 系統介面整合元件..."
LangString RemoveShellExFailed ${CURRENT_LANG} "無法成功移除 Krita 系統介面整合元件。"
LangString RemoveShellExDone ${CURRENT_LANG} "已移除 Krita 系統介面整合元件。"
LangString RemovingOldVer ${CURRENT_LANG} "正在解除安裝先前版本..."
LangString RemoveOldVerFailed ${CURRENT_LANG} "無法成功解除安裝先前版本的 Krita。"
LangString RemoveOldVerDone ${CURRENT_LANG} "已解除安裝先前版本。"
# Strings for the component selection dialog:
LangString SectionRemoveOldVer ${CURRENT_LANG} "移除先前版本"
LangString SectionRemoveOldVerDesc ${CURRENT_LANG} "解除安裝先前曾安裝的 Krita $KritaNsisVersion ($KritaNsisBitness-bit)."
LangString SectionShellEx ${CURRENT_LANG} "系統介面整合"
LangString SectionShellExDesc ${CURRENT_LANG} "安裝整合元件 (Shell Extension) 以在 Window 檔案總管中顯示 Krita 檔案的縮圖和屬性資訊。$\r$\n$\r$\n版本: ${KRITASHELLEX_VERSION}"
LangString SectionMainDesc ${CURRENT_LANG} "${KRITA_PRODUCTNAME} ${KRITA_VERSION_DISPLAY}$\r$\n$\r$\n版本: ${KRITA_VERSION}"
# We don't actually bundle FFmpeg so these are not shown.
LangString SectionBundledFfmpeg ${CURRENT_LANG} "內置 FFmpeg"
LangString SectionBundledFfmpegDesc ${CURRENT_LANG} "安裝包含在本安裝程式中的 FFmpeg 以用作匯出動畫檔案。"
# Main dialog strings:
LangString SetupLangPrompt ${CURRENT_LANG} "請選擇安裝過程使用的語言:"
LangString ShellExLicensePageHeader ${CURRENT_LANG} "授權協議 (Krita 系統介面整合元件)"
LangString ConfirmInstallPageHeader ${CURRENT_LANG} "確認安裝"
LangString ConfirmInstallPageDesc ${CURRENT_LANG} "確認安裝 ${KRITA_PRODUCTNAME} ${KRITA_VERSION_DISPLAY}。"
LangString DesktopIconPageDesc2 ${CURRENT_LANG} "你可以選擇要否在桌面上建立開啟 Krita 的捷徑:"
LangString DesktopIconPageCheckbox ${CURRENT_LANG} "在桌面建立捷徑"
LangString ConfirmInstallPageDesc2 ${CURRENT_LANG} "本安裝程式已準備好在電腦安裝 ${KRITA_PRODUCTNAME} ${KRITA_VERSION_DISPLAY}。如有需要,你可以返回先前的頁面檢查安裝選項。$\r$\n$\r$\n$_CLICK"
# Misc. message prompts:
LangString MsgRequireWin7 ${CURRENT_LANG} "${KRITA_PRODUCTNAME} ${KRITA_VERSION_DISPLAY} 只支援 Windows 7 或以上版本。"
LangString Msg64bitOn32bit ${CURRENT_LANG} "此電腦正在執行32位元版本的 Windows,但本安裝程式提供64位元版本的 Krita 只能在64位元版本的 Windows 上使用。請到 https://krita.org/ 下載32位元版本的 Krita。"
LangString Msg32bitOn64bit ${CURRENT_LANG} "你正嘗試在64位元版本的 Windows 上安裝32位元版本的 Krita。本安裝程式建議你安裝效能更高的64位元版本的 Krita。$\n請到 https://krita.org/ 下載64位元版本的 Krita。$\n$\n你仍要安裝32位元版本的 Krita嗎?"
# These prompts are used for when Krita 2.9 or earlier, or the 3.0 alpha 1 MSI version is installed.
LangString MsgAncientVerMustBeRemoved ${CURRENT_LANG} "發現電腦上安裝有舊版本的 Krita。本安裝程式會先嘗試將其解除安裝。$\n你確定要繼續嗎?"
LangString MsgKrita3alpha1RemoveFailed ${CURRENT_LANG} "無法成功解除安裝 Krita 3.0 Alpha 1。"
LangString MsgKrita2msi32bitRemoveFailed ${CURRENT_LANG} "無法成功解除安裝舊版 Krita (32-bit)。"
LangString MsgKrita2msi64bitRemoveFailed ${CURRENT_LANG} "無法成功解除安裝舊版 Krita (64-bit)。"
#
LangString MsgKritaSameVerReinstall ${CURRENT_LANG} "發現電腦上已安裝有 ${KRITA_PRODUCTNAME} ${KRITA_VERSION_DISPLAY}。$\n本安裝程式會重新安裝此版本的 Krita。"
LangString MsgKrita3264bitSwap ${CURRENT_LANG} "發現電腦上已安裝有$KritaNsisBitness位元版本的 Krita ($KritaNsisVersion)。本安裝程式會以${KRITA_INSTALLER_BITNESS}位元版本的 Krita ${KRITA_VERSION_DISPLAY} 將其取代。"
LangString MsgKritaNewerAlreadyInstalled ${CURRENT_LANG} "發現電腦上已安裝有$KritaNsisBitness位元版本的 Krita ($KritaNsisVersion)。如需安裝較舊版本的 Krita (${KRITA_VERSION_DISPLAY}),請先自行解除安裝現有版本的 Krita。"
LangString MsgKritaRunning ${CURRENT_LANG} "發現 Krita 正在執行中。使用本安裝程式前請先退出 Krita。"
LangString MsgUninstallKritaRunning ${CURRENT_LANG} "發現 Krita 正在執行中。解除安裝前請先退出 Krita。"
!undef CURRENT_LANG
@echo off
setlocal enableextensions enabledelayedexpansion
if "%WindowsSdkDir%" == "" if not "%ProgramFiles(x86)%" == "" set "WindowsSdkDir=%ProgramFiles(x86)%\Windows Kits\10"
if "%WindowsSdkDir%" == "" set "WindowsSdkDir=%ProgramFiles(x86)%\Windows Kits\10"
if exist "%WindowsSdkDir%\" (
pushd "%WindowsSdkDir%"
for /f "delims=" %%a in ('dir /a:d /b "bin\10.*"') do (
if exist "bin\%%a\x64\makeappx.exe" (
set "MAKEPRI=%WindowsSdkDir%\bin\%%a\x64\makepri.exe"
)
)
if "%MAKEPRI%" == "" if exist "bin\x64\makepri.exe" (
set "MAKEPRI=%WindowsSdkDir%\bin\x64\makepri.exe"
)
popd
)
if "%MAKEPRI%" == "" (
echo ERROR: makepri not found 1>&2
exit /b 1
)
mkdir out
"%MAKEPRI%" new /pr "%~dp0pkg" /mn "%~dp0manifest.xml" /cf "%~dp0priconfig.xml" /o /of "%~dp0out\resources.pri"
if errorlevel 1 (
echo ERROR running makepri 1>&2
exit /B 1
)
echo Done.
@echo off
:: Please edit this to point to the extracted installer files.
set "KRITA_DIR=D:\dev\krita\msix\unpacked\krita-x64-4.3.0-beta2-setup"
set "ASSETS_DIR=%~dp0pkg\Assets"
set "MAPPING_OUT=%~dp0out\mapping.txt"
setlocal enabledelayedexpansion
goto begin
:: Subroutines
:get_rel_path out_variable file_path base_path
setlocal enableextensions
set FULL_PATH=%~f2
set FULL_BASE=%~f3
for /L %%n in (1 1 512) do if "!FULL_BASE:~%%n,1!" neq "" set /a "FULL_BASE_len=%%n+1"
set /a "FULL_BASE_len_plus_one=%FULL_BASE_len%+1"
if not exist "%FULL_PATH%" (