diff --git a/windows/krita_installer/README.txt b/windows/krita_installer/README.txt --- a/windows/krita_installer/README.txt +++ b/windows/krita_installer/README.txt @@ -1,70 +1,88 @@ -c2winstaller README +Krita installer README ------------------- -This includes instructions for preparing your environment to build an MSI installer for Calligra on Windows. +This includes instructions for preparing your environment to build an MSI installer for Krita 3 on Windows. Preparation ----------- You will need to have a working KDE Windows environment which lets you build Calligra on the Windows platform. -The recommended folder structure is: -parent -+-c2winstaller -+-c2winstaller-input (receives a packaged version of Calligra + KDE, output from package.bat) -+-c2winstaller-output (intermediate and complete MSI written by build_msi.bat process) -+-c2winstaller-temp (temp folder used by the package.bat process) +The default folder structure is: +parent ($PACKAGER_ROOT) ++-krita ++-installer-input (receives a packaged version of Krita + KDE, output from package.ps1) ++-installer-output (intermediate and complete MSI written by build_msi.ps1 process) ++-installer-temp (temp folder used by the package.ps1 process) +-deps (stores 3rd party dependencies - Visual C++ runtime components for the installer) +-vcredist +-DLLs +-MergeModules (stores .msm files distrubuted with Visual Studio) -+-wix36 (install wix 3.6 here) ++-wix310 (install wix 3.10 here) -You will require the latest copy of the Wix toolset, 3.6 beta. +You will require the Wix toolset. Currently tested with 3.10. This may be downloaded from http://wixtoolset.org/ +Extract the .zip into the installation folder -Checking the Environment +Setting up the environment ------------------------ -You will need to ensure some paths are set prior to calling package.bat or build_msi.bat -To choose how/whether to distribute the VC++ runtime files, you must set C2WINSTALL_VC2010_DISTRIBUTE to point to the process you intend to use. - DLL - informs wix that you want to distribute DLLs with it +The following script sets the necessary shell variables. + +> .\env.ps1 + +You will need to customize the script to, at a minimum, update the version +number. You should also ensure that the variables inside match your directory +structure. Check whether it worked correctly with the command: + +> dir variables: + +To choose how/whether to distribute the VC++ runtime files, you must set +KRITA_VC2015_DISTRIBUTE to point to the process you intend to use. + + DLL - informs wix that you want to distribute DLLs with it MSM - informs wix that you want to use the MergeModule - (any other value is ignored and causes an error message to be displayed if it is not found, but a value must be set) + +Any other value is ignored and causes an error message to be displayed if it is +not found. -If wix has been installed anywhere other than ..\wix36, then you must set C2WINSTALL_WIX_BIN to point to it +If wix has been installed anywhere other than ..\wix36, then you must set +KRITA_WIX_BIN to point to it. + +KRITA_VERSION - the version number of the package. This must consist of four +sets of digits separate by periods (e.g. 2.3.87.1). Currently the numbering +convention for KRITA_VERSION uses the first three to identify the last main +tagged release of calligra, and the fourth for subsequent builds from master. -You must set CALLIGRA_INST to point to the inst folder of the Calligra installation. -KDEROOT is set by kdeenv, so should not need to be explicitly declared. +KRITA_GITREV - the intention is for this to take a git revision identifier. +This needs to be set in advance, and would normally be set by the build process +which created the Calligra installation. -C2WINSTALL_GITREV - the intention is for this to take a git revision identifier. This needs to be set in advance, and would normally be set by the build process which created the Calligra installation. -C2WINSTALL_VERSION - the version number of the package. This must consist of four sets of digits separate by periods (e.g. 2.3.87.1) +PACKAGER_ROOT - working path for package.ps1 and build_msi.ps1 + +You must set CALLIGRA_INST to point to the inst folder of the Calligra +installation. KDEROOT is set by kdeenv, so should not need to be explicitly +declared. -Currently the numbering convention for C2WINSTALL_VERSION uses the first three to identify the last main tagged release of calligra, and the fourth for subsequent builds from master. Packaging Calligra ------------------ -You will need to run the following within a working KDE for Windows environment. -From the c2winstaller directory, call: -env - -This sets most of the required environment variables, using defaults unless you have overriden these previously. -You will need to set CALLIGRA_INST if you intend to package -You will need to set C2WINSTALL_VERSION Now you can run: -package +.\package.ps1 -This will copy files from CALLIGRA_INST and KDEROOT in to C2WISNTALL_INPUT, packaging the Windows distribution of Calligra with the required KDE files. -The C2WINSTALL_TEMP folder contains some files that package touches, but it should clean this up on completion. -This should complete without errors (although you may need to prompt it to overwrite files ...may need to review this behaviour) +This will copy files from KRITA_INST and KDEROOT in to KRITA_INPUT, +packaging the Windows distribution of Calligra with the required KDE files. The +KRITA_TEMP folder contains some files that package touches, but it should clean +this up on completion. This should complete without errors (although you may +need to prompt it to overwrite files ...may need to review this behaviour) Once this has completed, you are ready to run: -build_msi +.\build_msi.ps1 -This will fun all the required steps: - heat to read the C2WINSTALL_INPUT directory in order to generate HeatFragment.wxs +This will run all the required steps: + heat to read the KRITA_INPUT directory in order to generate HeatFragment.wxs candle to build the intermediate obj files fromm the xml sources light to build the msi file. diff --git a/windows/krita_installer/build_msi.ps1 b/windows/krita_installer/build_msi.ps1 new file mode 100644 --- /dev/null +++ b/windows/krita_installer/build_msi.ps1 @@ -0,0 +1,60 @@ +# Copyright (c) 2011-2012 KO GmbH. All rights reserved. +# Copyright (c) 2011-2012 Stuart Dickson +# Copyright (c) 2015 Michael Abrahams + + +# The use and distribution terms for this software are covered by the +# Common Public License 1.0 (http://opensource.org/licenses/cpl1.0.php) +# which can be found in the file CPL.TXT at the root of this distribution. +# By using this software in any fashion, you are agreeing to be bound by +# the terms of this license. + +# You must not remove this notice, or any other, from this software. +# ------------------------------------------------------------------------ + +# build_msi.bat + + +# TODO: disable UpdateMimeDB and KBuildSycoca in krita.wxs +# TODO: look into xdg and etc directories to see what's needed + +# Clean up from last time. +del "$env:KRITA_OUTPUT\*.wixobj" + +$KRITA_INSTALLER_FILENAME="$env:KRITA_OUTPUT\krita_$env:KRITA_VERSION" + +# Collects contents of $KRITA_INPUT. "KRITADIR" is a tag for the installation directory used inside the wxs file +echo "Locating files..." +."$env:KRITA_WIX_BIN\heat.exe" dir "$env:KRITA_INPUT" -cg CalligraBaseFiles -gg -scom -sreg -sfrag -srd -dr KRITADIR -var env.KRITA_INPUT -out "HeatFragment.wxs" + + +# Configures installation instructions & metadata. x64 only, for now. This uses +# the XML configuration files contained in in res\, and bakes in paths using +# res\package\env.bat + +# This uses x64 architecture. +# To make it work for 32 bits, I believe you want to change these things: +# -Remove "-arch x64" and change "ProgramFiles64Folder" + +$KRITA_ARCH = "x64" + +echo "Building metadata..." +."$env:KRITA_WIX_BIN\candle.exe" -arch x64 ` + HeatFragment.wxs krita.wxs ` + res\wix_snippets\BundleVC2015x64.wxs ` + res\UIExtension\CustomUI_Mondo.wxs ` + res\UIExtension\CustomProgressDlg.wxs ` + res\UIExtension\CustomWelcomeDlg.wxs ` + res\UIExtension\CustomMaintenanceWelcomeDlg.wxs ` + res\UIExtension\CustomResumeDlg.wxs -out $env:KRITA_OUTPUT\\ + + +echo "Creating executable..." +."$env:KRITA_WIX_BIN\light.exe" -nologo "$env:KRITA_OUTPUT\*.wixobj" ` + -out "$KRITA_INSTALLER_FILENAME.msi" -ext WixUIExtension + + +Get-FileHash -Algorithm SHA1 "$KRITA_INSTALLER_FILENAME.msi" > "$KRITA_INSTALLER_FILENAME.sha1" + + +echo "Complete." diff --git a/windows/krita_installer/env.ps1 b/windows/krita_installer/env.ps1 --- a/windows/krita_installer/env.ps1 +++ b/windows/krita_installer/env.ps1 @@ -11,107 +11,90 @@ # You must not remove this notice, or any other, from this software. # ------------------------------------------------------------------------ # -# C2W Installer +# Krita Windows Installer # Environment settings # # This file checks for the presence of environment variables # and sets default values if they do not exist. # +# See README.txt for more details. +# # wix process # ----------- -# C2WINSTALL_WIX_BIN - location of the Wix binaries -# C2WINSTALL_OUTPUT - destination for generated installers -# C2WINSTALL_INPUT - source directory of packaged KDEROOT+CALLIGRA_INST -# C2WINSTALL_MERGEMODS - directory where we should look for Merge Modules +# KRITA_WIX_BIN - location of the Wix binaries +# KRITA_OUTPUT - destination for generated installers +# KRITA_INPUT - source directory of packaged KDEROOT+CALLIGRA_INST +# KRITA_MERGEMODS - directory where we should look for Merge Modules # # package process # --------------- -# CALLIGRA_INST - the Calligra installation directory +# CALLIGRA_INST - the Krita installation directory (TODO: rename) # KDEROOT - the root of the KDE on Windows emerge based distribution # # Build options (defined elsewhere) # --------------------------------- -# C2WINSTALL_VC2010_DISTRIBUTE: -# DLL - bundle DLLs -# MSM - use Merge Modules -# - display error message # # ...USE_DLL has priority, if neither are defined, an error is displayed # # ----------------------------------------------------------------------- # -$C2WINSTALL_GITREV="last" -$C2WINSTALL_VERSION="2.6.8.0" -$C2WINSTALL_VERSIONSTRING="2.6.8.0" +# WIX reads environment variables, but PowerShell variables are local by +# default, so we have to prefix all variables with $env: +$env:KRITA_VERSION="3.0.0.1" +$env:KRITA_VERSIONSTRING="3.0.0.1" # This could be set to a cute name if you wanted. +$env:KRITA_GITREV="last" + + +## Base installation directories +$env:KDEROOT="r:" +$env:CALLIGRA_INST="r:" +$PACKAGER_ROOT="r:\inst" # Working directory for package.ps1 (script-local) +$env:KRITA_WIX_BIN="r:\inst\wix310" # Location of WIX binaries -## Uncomment these to set manually -$CALLIGRA_INST="r:" -$KDEROOT="r:" -$C2WINSTALL_ROOT="$KDEROOT\inst" -$C2WINSTALL_VC2010_DISTRIBUTE="MSM" +# Method of distributing MSVC 2015 +# DLL - bundle DLLs +# MSM - use Merge Modules +# - error +$env:KRITA_VC2015_DISTRIBUTE="MSM" + +# See MSDN: "Redistributing Components By Using Merge Modules" +# https://msdn.microsoft.com/en-us/library/ms235290.aspx +$env:KRITA_MERGEMODULES="C:\Program Files (x86)\Common Files\Merge Modules" function warn-unset($v) { - # Use this function only when there is no acceptable default + # Use this function only when there is no acceptable default. $val = (Get-Variable $v).value - iex "echo ""Warning: $v not found. Set to default '$val'""" + iex "echo ""Warning: variable $v was not set. Please check your configuration." + Exit } -if ($CALLIGRA_INST -eq $null) { - $CALLIGRA_INST="$PWD..\kde4\inst" +if ($env:CALLIGRA_INST -eq $null) { warn-unset "CALLIGRA_INST" } -if ($C2WINSTALL_ROOT -eq $null) { - $C2WINSTALL_ROOT="$PWD\.." - warn-unset "C2WINSTALL_ROOT" -} - if ($env:KDEROOT -eq $null) { - $env:KDEROOT="$PWD..\kderoot" warn-unset "$env:KDEROOT" } -if ($C2WINSTALL_VERSION -eq $null) { - $C2WINSTALL_VERSION="0.0.0.0" - warn-unset "C2WINSTALL_VERSION" +if ($env:KRITA_VERSION -eq $null) { + warn-unset "KRITA_VERSION" + Exit } -if ($C2WINSTALL_GITREV -eq $null) { - $C2WINSTALL_GITREV="last" - warn-unset "C2WINSTALL_GITREV" +if ($env:KRITA_GITREV -eq $null) { + warn-unset "KRITA_GITREV" } -if ($C2WINSTALL_VC2010_DISTRIBUTE -eq $null) { - $C2WINSTALL_VC2010_DISTRIBUTE="ERROR" - warn-unset "C2WINSTALL_VC2010_DISTRIBUTE" -} - -if ($C2WINSTALL_WIX_BIN -eq $null) { - $C2WINSTALL_WIX_BIN="$C2WINSTALL_ROOT\wix36" -} - -if ($C2WINSTALL_MERGEMODULES -eq $null) { - $C2WINSTALL_MERGEMODULES="$C2WINSTALL_ROOT\deps" -} -if ($C2WINSTALL_VC2010_DLLS -eq $null) { - $C2WINSTALL_VC2010_DLLS="$PWD\..\deps\vcredist\DLLs\Microsoft.VC100.CRT" -} +$env:KRITA_VC2015_DLLS="$PWD\..\deps\vcredist\DLLs\Microsoft.VC140.CRT" +$env:KRITA_TEMP="$PACKAGER_ROOT\installer-temp" +$env:KRITA_INPUT="$PACKAGER_ROOT\installer-input" +$env:KRITA_OUTPUT="$PACKAGER_ROOT\installer-output" -if ($C2WINSTALL_TEMP -eq $null) { - $C2WINSTALL_TEMP="$C2WINSTALL_ROOT\c2winstaller-temp" -} -if ($C2WINSTALL_INPUT -eq $null) { - $C2WINSTALL_INPUT="$C2WINSTALL_ROOT\c2winstaller-input" -} - -if ($C2WINSTALL_OUTPUT -eq $null) { - $C2WINSTALL_OUTPUT="$C2WINSTALL_ROOT\c2winstaller-output" -} -set $env:Path "$($env:Path);$C2WINSTALL_WIX_BIN" +# set $env:Path "$($env:Path);$KRITA_WIX_BIN" diff --git a/windows/krita_installer/krita-files.json b/windows/krita_installer/krita-files.json --- a/windows/krita_installer/krita-files.json +++ b/windows/krita_installer/krita-files.json @@ -7,7 +7,10 @@ "files": [ "lib\\plugins\\calligradocinfopropspage.dll", "lib\\plugins\\kritapresethistory.dll", - "lib\\plugins\\kritathumbnail.dll" + "lib\\plugins\\kritaanimationdocker.dll", + "lib\\plugins\\kritapresethistory.dll", + "lib\\plugins\\kritathumbnail.dll", + "lib\\plugins\\kstyle_oxygen_config.dll" ] }, @@ -21,141 +24,134 @@ }, { - "dir": "lib\\calligra", - "msg": "Copying Calligra libraries", + "dir": "lib\\krita", + "msg": "Copying lib\\krita", "comment": "Double check these, this list was compiled without all modules built.", "files": [ - "lib\\calligra\\calligra_docker_defaults.dll", - "lib\\calligra\\calligra_shape_artistictext.dll", - "lib\\calligra\\calligra_shape_paths.dll", - "lib\\calligra\\calligra_shape_picture.dll", - "lib\\calligra\\calligra_shape_text.dll", - "lib\\calligra\\calligra_shape_vector.dll", - "lib\\calligra\\calligra_textediting_autocorrect.dll", - "lib\\calligra\\calligra_textediting_changecase.dll", - "lib\\calligra\\calligra_textediting_spellcheck.dll", - "lib\\calligra\\calligra_textediting_thesaurus.dll", - "lib\\calligra\\calligra_tool_basicflakes.dll", - "lib\\calligra\\calligra_tool_defaults.dll", - "lib\\calligra\\kolcmsengine.dll", - "lib\\calligra\\krita_colorspaces_extensions.dll", - "lib\\calligra\\krita_raw_import.dll", - "lib\\calligra\\kritaartisticcolorselector.dll", - "lib\\calligra\\kritabigbrother.dll", - "lib\\calligra\\kritablurfilter.dll", - "lib\\calligra\\kritabmpexport.dll", - "lib\\calligra\\kritabmpimport.dll", - "lib\\calligra\\kritachalkpaintop.dll", - "lib\\calligra\\kritachanneldocker.dll", - "lib\\calligra\\kritacolorgenerator.dll", - "lib\\calligra\\kritacolorrange.dll", - "lib\\calligra\\kritacolorselectorng.dll", - "lib\\calligra\\kritacolorsfilters.dll", - "lib\\calligra\\kritacolorslider.dll", - "lib\\calligra\\kritacolorsmudgepaintop.dll", - "lib\\calligra\\kritacolorspaceconversion.dll", - "lib\\calligra\\kritacompositiondocker.dll", - "lib\\calligra\\kritaconvolutionfilters.dll", - "lib\\calligra\\kritacurvepaintop.dll", - "lib\\calligra\\kritadefaultdockers.dll", - "lib\\calligra\\kritadefaultpaintops.dll", - "lib\\calligra\\kritadefaulttools.dll", - "lib\\calligra\\kritadeformpaintop.dll", - "lib\\calligra\\kritadigitalmixer.dll", - "lib\\calligra\\kritadodgeburn.dll", - "lib\\calligra\\kritadynapaintop.dll", - "lib\\calligra\\kritaembossfilter.dll", - "lib\\calligra\\kritaexample.dll", - "lib\\calligra\\kritaexperimentpaintop.dll", - "lib\\calligra\\kritaextensioncolorsfilters.dll", - "lib\\calligra\\kritafastcolortransferfilter.dll", - "lib\\calligra\\kritafilterop.dll", - "lib\\calligra\\kritagridpaintop.dll", - "lib\\calligra\\kritahairypaintop.dll", - "lib\\calligra\\kritahatchingpaintop.dll", - "lib\\calligra\\kritaheightmapexport.dll", - "lib\\calligra\\kritaheightmapimport.dll", - "lib\\calligra\\kritahistogram.dll", - "lib\\calligra\\kritahistorydocker.dll", - "lib\\calligra\\kritaimagedocker.dll", - "lib\\calligra\\kritaimageenhancement.dll", - "lib\\calligra\\kritaimagesize.dll", - "lib\\calligra\\kritaimagesplit.dll", - "lib\\calligra\\kritaindexcolors.dll", - "lib\\calligra\\kritajpegexport.dll", - "lib\\calligra\\kritajpegimport.dll", - "lib\\calligra\\kritalayergroupswitcher.dll", - "lib\\calligra\\kritalayersplit.dll", - "lib\\calligra\\kritalevelfilter.dll", - "lib\\calligra\\kritametadataeditor.dll", - "lib\\calligra\\kritamodifyselection.dll", - "lib\\calligra\\kritanoisefilter.dll", - "lib\\calligra\\kritanormalize.dll", - "lib\\calligra\\kritaodgimport.dll", - "lib\\calligra\\kritaoffsetimage.dll", - "lib\\calligra\\kritaoilpaintfilter.dll", - "lib\\calligra\\kritaoraexport.dll", - "lib\\calligra\\kritaoraimport.dll", - "lib\\calligra\\kritaoverviewdocker.dll", - "lib\\calligra\\kritapalettedocker.dll", - "lib\\calligra\\kritaparticlepaintop.dll", - "lib\\calligra\\kritapatterndocker.dll", - "lib\\calligra\\kritapatterngenerator.dll", - "lib\\calligra\\kritaphongbumpmap.dll", - "lib\\calligra\\kritapixelizefilter.dll", - "lib\\calligra\\kritapngexport.dll", - "lib\\calligra\\kritapngimport.dll", - "lib\\calligra\\kritaposterize.dll", - "lib\\calligra\\kritappmexport.dll", - "lib\\calligra\\kritappmimport.dll", - "lib\\calligra\\kritapresetdocker.dll", - "lib\\calligra\\kritapsdexport.dll", - "lib\\calligra\\kritapsdimport.dll", - "lib\\calligra\\kritaqmlexport.dll", - "lib\\calligra\\kritaraindropsfilter.dll", - "lib\\calligra\\kritarandompickfilter.dll", - "lib\\calligra\\kritaresourcemanager.dll", - "lib\\calligra\\kritarotateimage.dll", - "lib\\calligra\\kritaroundcornersfilter.dll", - "lib\\calligra\\kritarulerassistanttool.dll", - "lib\\calligra\\kritaselectiontools.dll", - "lib\\calligra\\kritaseparatechannels.dll", - "lib\\calligra\\kritashearimage.dll", - "lib\\calligra\\kritasketchpaintop.dll", - "lib\\calligra\\kritasmallcolorselector.dll", - "lib\\calligra\\kritasmalltilesfilter.dll", - "lib\\calligra\\kritasobelfilter.dll", - "lib\\calligra\\kritaspecificcolorselector.dll", - "lib\\calligra\\kritaspraypaintop.dll", - "lib\\calligra\\kritatangentnormalpaintop.dll", - "lib\\calligra\\kritatasksetdocker.dll", - "lib\\calligra\\kritatgaexport.dll", - "lib\\calligra\\kritatgaimport.dll", - "lib\\calligra\\kritatiffexport.dll", - "lib\\calligra\\kritatiffimport.dll", - "lib\\calligra\\kritatoolcrop.dll", - "lib\\calligra\\kritatooldyna.dll", - "lib\\calligra\\kritatoolgrid.dll", - "lib\\calligra\\kritatoolperspectivegrid.dll", - "lib\\calligra\\kritatoolpolygon.dll", - "lib\\calligra\\kritatoolpolyline.dll", - "lib\\calligra\\kritatooltext.dll", - "lib\\calligra\\kritatooltransform.dll", - "lib\\calligra\\kritaunsharpfilter.dll", - "lib\\calligra\\kritawavefilter.dll", - "lib\\calligra\\kritaxcfimport.dll" + "lib\\krita\\calligra_tool_basicflakes.dll", + "lib\\krita\\kritaanimationdocker.dll", + "lib\\krita\\kritaartisticcolorselector.dll", + "lib\\krita\\kritabigbrother.dll", + "lib\\krita\\kritablurfilter.dll", + "lib\\krita\\kritabmpexport.dll", + "lib\\krita\\kritabmpimport.dll", + "lib\\krita\\kritachalkpaintop.dll", + "lib\\krita\\kritachanneldocker.dll", + "lib\\krita\\kritaclonesarray.dll", + "lib\\krita\\kritacolorgenerator.dll", + "lib\\krita\\kritacolorrange.dll", + "lib\\krita\\kritacolorselectorng.dll", + "lib\\krita\\kritacolorsfilters.dll", + "lib\\krita\\kritacolorslider.dll", + "lib\\krita\\kritacolorsmudgepaintop.dll", + "lib\\krita\\kritacolorspaceconversion.dll", + "lib\\krita\\kritacompositiondocker.dll", + "lib\\krita\\kritaconvolutionfilters.dll", + "lib\\krita\\kritacurvepaintop.dll", + "lib\\krita\\kritadefaultdockers.dll", + "lib\\krita\\kritadefaultpaintops.dll", + "lib\\krita\\kritadefaulttools.dll", + "lib\\krita\\kritadeformpaintop.dll", + "lib\\krita\\kritadigitalmixer.dll", + "lib\\krita\\kritadodgeburn.dll", + "lib\\krita\\kritadynapaintop.dll", + "lib\\krita\\kritaembossfilter.dll", + "lib\\krita\\kritaexample.dll", + "lib\\krita\\kritaexperimentpaintop.dll", + "lib\\krita\\kritaextensioncolorsfilters.dll", + "lib\\krita\\kritafastcolortransferfilter.dll", + "lib\\krita\\kritafilterop.dll", + "lib\\krita\\kritagridpaintop.dll", + "lib\\krita\\kritahairypaintop.dll", + "lib\\krita\\kritahatchingpaintop.dll", + "lib\\krita\\kritaheightmapexport.dll", + "lib\\krita\\kritaheightmapimport.dll", + "lib\\krita\\kritahistogram.dll", + "lib\\krita\\kritahistorydocker.dll", + "lib\\krita\\kritaimagedocker.dll", + "lib\\krita\\kritaimageenhancement.dll", + "lib\\krita\\kritaimagesize.dll", + "lib\\krita\\kritaimagesplit.dll", + "lib\\krita\\kritaindexcolors.dll", + "lib\\krita\\kritajpegexport.dll", + "lib\\krita\\kritajpegimport.dll", + "lib\\krita\\kritalayergroupswitcher.dll", + "lib\\krita\\kritalayersplit.dll", + "lib\\krita\\kritalcmsengine.dll", + "lib\\krita\\kritalevelfilter.dll", + "lib\\krita\\kritametadataeditor.dll", + "lib\\krita\\kritamodifyselection.dll", + "lib\\krita\\kritanoisefilter.dll", + "lib\\krita\\kritanormalize.dll", + "lib\\krita\\kritaodgimport.dll", + "lib\\krita\\kritaoffsetimage.dll", + "lib\\krita\\kritaoilpaintfilter.dll", + "lib\\krita\\kritaoraexport.dll", + "lib\\krita\\kritaoraimport.dll", + "lib\\krita\\kritaoverviewdocker.dll", + "lib\\krita\\kritapalettedocker.dll", + "lib\\krita\\kritaparticlepaintop.dll", + "lib\\krita\\kritapatterndocker.dll", + "lib\\krita\\kritapatterngenerator.dll", + "lib\\krita\\kritaphongbumpmap.dll", + "lib\\krita\\kritapixelizefilter.dll", + "lib\\krita\\kritapngexport.dll", + "lib\\krita\\kritapngimport.dll", + "lib\\krita\\kritaposterize.dll", + "lib\\krita\\kritappmexport.dll", + "lib\\krita\\kritappmimport.dll", + "lib\\krita\\kritapresetdocker.dll", + "lib\\krita\\kritapresethistory.dll", + "lib\\krita\\kritapsdexport.dll", + "lib\\krita\\kritapsdimport.dll", + "lib\\krita\\kritaqmlexport.dll", + "lib\\krita\\kritaraindropsfilter.dll", + "lib\\krita\\kritarandompickfilter.dll", + "lib\\krita\\kritaresourcemanager.dll", + "lib\\krita\\kritarotateimage.dll", + "lib\\krita\\kritaroundcornersfilter.dll", + "lib\\krita\\kritarulerassistanttool.dll", + "lib\\krita\\kritaselectiontools.dll", + "lib\\krita\\kritaseparatechannels.dll", + "lib\\krita\\kritashearimage.dll", + "lib\\krita\\kritasketchpaintop.dll", + "lib\\krita\\kritasmallcolorselector.dll", + "lib\\krita\\kritasmalltilesfilter.dll", + "lib\\krita\\kritasobelfilter.dll", + "lib\\krita\\kritaspecificcolorselector.dll", + "lib\\krita\\kritaspraypaintop.dll", + "lib\\krita\\kritatangentnormalpaintop.dll", + "lib\\krita\\kritatasksetdocker.dll", + "lib\\krita\\kritatgaexport.dll", + "lib\\krita\\kritatgaimport.dll", + "lib\\krita\\kritatiffexport.dll", + "lib\\krita\\kritatiffimport.dll", + "lib\\krita\\kritatoolcrop.dll", + "lib\\krita\\kritatooldyna.dll", + "lib\\krita\\kritatoolgrid.dll", + "lib\\krita\\kritatoolperspectivegrid.dll", + "lib\\krita\\kritatoolpolygon.dll", + "lib\\krita\\kritatoolpolyline.dll", + "lib\\krita\\kritatooltext.dll", + "lib\\krita\\kritatooltransform.dll", + "lib\\krita\\kritaunsharpfilter.dll", + "lib\\krita\\kritawavefilter.dll", + "lib\\krita\\kritaxcfimport.dll", + "lib\\krita\\krita_colorspaces_extensions.dll", + "lib\\krita\\krita_docker_defaults.dll", + "lib\\krita\\krita_filtereffects.dll", + "lib\\krita\\krita_flaketools.dll", + "lib\\krita\\krita_karbontools.dll", + "lib\\krita\\krita_shape_artistictext.dll", + "lib\\krita\\krita_shape_paths.dll", + "lib\\krita\\krita_shape_text.dll", + "lib\\krita\\krita_shape_vector.dll" ] }, { - "dir" : "lib\\plugins", - "comment" : "Update this missing part?", - "files" : ["lib\\calligra\\kstyle_oxygen_config.dll"] - }, - - { - "dir" : "lib\\styles", + "dir" : "lib\\plugins\\styles", "files" : ["lib\\plugins\\styles\\oxygen.dll"] }, @@ -194,6 +190,7 @@ "dir": "etc\\dbus-1", "files": ["etc\\"] }, + { "msg" : "Copying Qt plugins", "dir" : "plugins", @@ -245,28 +242,16 @@ }, { - "msg": "Copying directory /share/kf5", - "dir" : "share\\kf5", - "files" : [ - "share\\kf5\\kauth", - "share\\kf5\\kdeui", - "share\\kf5\\widgets", - "share\\kf5\\knewstuff", - "share\\kf5\\kssl" - ] - }, - - { "msg" : "Copying directory /etc/xdg", "dir" : "etc\\xdg", "files" : [ "etc\\xdg\\colors", "etc\\xdg\\ui", "etc\\xdg\\krita*", "etc\\xdg\\kdebug*", "etc\\xdg\\khot*", - "etc\\xdg\\kdebugrc", - "etc\\xdg\\kdeglobals"] + "etc\\xdg\\kdebugrc" + ] }, { @@ -289,7 +274,6 @@ "dir" : "share\\kde4\\services", "files" : [ "share\\kservices5\\calligra", - "share\\kservices5\\kglobalaccel.desktop", "share\\kservices5\\krita_kra_thumbnail.desktop", "share\\kservices5\\kshorturifilter.desktop", "share\\kservices5\\kuriikwsfilter.desktop", @@ -300,7 +284,7 @@ { "msg": "Copying directory share/kservicetypes5", - "dir" : "share\\kservicestypes5", + "dir" : "share\\kservicetypes5", "files" : [ "share\\kservicetypes5\\application.desktop", "share\\kservicetypes5\\calligra*.desktop", diff --git a/windows/krita_installer/krita.wxi b/windows/krita_installer/krita.wxi --- a/windows/krita_installer/krita.wxi +++ b/windows/krita_installer/krita.wxi @@ -13,7 +13,7 @@ --> - + diff --git a/windows/krita_installer/krita.wxs b/windows/krita_installer/krita.wxs --- a/windows/krita_installer/krita.wxs +++ b/windows/krita_installer/krita.wxs @@ -12,27 +12,32 @@ You must not remove this notice, or any other, from this software. --> - + - - + + - - + + - - - + + + @@ -58,17 +63,17 @@ - + - + - + @@ -79,11 +84,11 @@ - - + + +# package_calligra.ps1 # -# Copies relevant files from the calligra inst and kderoot folders +# Copies relevant files from the calligra inst and kderoot folders. +# +# +# Information about the files to copy is contained in krita-files.json. The +# directory structure is specified here. # - -# TODO: check that /etc/dbus-1/ is properly installed -# TODO: check that icons are properly installed -# TODO: check that /share/apps/ is properly installed -# TODO: check share\\kde4\\services is properly installed # Safety check: # Make sure key variables are defined -if ($C2WINSTALL_INPUT -eq $null) { - echo "!!! C2WINSTALL VARIABLES NOT PROPERLY DEFINED !!!" - echo "Operation cancelled." +if (($env:KRITA_INPUT -eq $null) -or ($env:KRITA_OUTPUT -eq $null)) { + echo "!!! ENVIRONMENT VARIABLES NOT PROPERLY DEFINED !!!" + echo "(Did you run env.ps1?)" Exit } -if ($C2WINSTALL_INPUT -eq $null) { - echo "!!! C2WINSTALL VARIABLES NOT PROPERLY DEFINED !!!" - echo "Operation cancelled." - Exit -} - - -# rm -r "$C2WINSTALL_INPUT" -# Create redistribution directories ( ) - -mkdir "$C2WINSTALL_INPUT" -ea SilentlyContinue -mkdir "$C2WINSTALL_OUTPUT" -ea SilentlyContinue -mkdir "$C2WINSTALL_INPUT\bin" -ea SilentlyContinue -mkdir "$C2WINSTALL_INPUT\etc" -ea SilentlyContinue -mkdir "$C2WINSTALL_INPUT\lib" -ea SilentlyContinue -mkdir "$C2WINSTALL_INPUT\lib\kde4" -ea SilentlyContinue -mkdir "$C2WINSTALL_INPUT\plugins" -ea SilentlyContinue -mkdir "$C2WINSTALL_INPUT\share" -ea SilentlyContinue -mkdir "$C2WINSTALL_INPUT\lib\kde4\styles" -ea SilentlyContinue -mkdir "$C2WINSTALL_INPUT\lib\kde4\imageformats" -ea SilentlyContinue -mkdir "$C2WINSTALL_INPUT\lib\kde4\styles\imageformats" -ea SilentlyContinue -mkdir "$C2WINSTALL_INPUT\share\applications\kde4" -ea SilentlyContinue -mkdir "$C2WINSTALL_INPUT\share\applications\kde4\apps" -ea SilentlyContinue -mkdir "$C2WINSTALL_INPUT\share\config" -ea SilentlyContinue -mkdir "$C2WINSTALL_INPUT\etc\dbus-1\" -ea SilentlyContinue -mkdir "$C2WINSTALL_INPUT\share\dbus-1\" -ea SilentlyContinue -mkdir "$C2WINSTALL_INPUT\share\dbus-1\interfaces" -ea SilentlyContinue -mkdir "$C2WINSTALL_INPUT\share\dbus-1\services" -ea SilentlyContinue -mkdir "$C2WINSTALL_INPUT\share\dbus-1\system-services"-ea SilentlyContinue -mkdir "$C2WINSTALL_INPUT\share\kde4\services"-ea SilentlyContinue -mkdir "$C2WINSTALL_INPUT\share\kde4\servicetypes"-ea SilentlyContinue +# Create directories for the installer. +mkdir "$env:KRITA_INPUT" -ea SilentlyContinue +mkdir "$env:KRITA_INPUT\bin" -ea SilentlyContinue +mkdir "$env:KRITA_INPUT\etc" -ea SilentlyContinue +mkdir "$env:KRITA_INPUT\lib" -ea SilentlyContinue +mkdir "$env:KRITA_INPUT\lib\krita" -ea SilentlyContinue +mkdir "$env:KRITA_INPUT\lib\plugins\styles" -ea SilentlyContinue +mkdir "$env:KRITA_INPUT\lib\plugins\imageformats" -ea SilentlyContinue +mkdir "$env:KRITA_INPUT\plugins" -ea SilentlyContinue +mkdir "$env:KRITA_INPUT\share" -ea SilentlyContinue +mkdir "$env:KRITA_INPUT\share\appdata" -ea SilentlyContinue +mkdir "$env:KRITA_INPUT\share\applications" -ea SilentlyContinue +mkdir "$env:KRITA_INPUT\share\krita" -ea SilentlyContinue +mkdir "$env:KRITA_INPUT\share\config" -ea SilentlyContinue +mkdir "$env:KRITA_INPUT\etc\dbus-1\" -ea SilentlyContinue +mkdir "$env:KRITA_INPUT\etc\xdg\" -ea SilentlyContinue +mkdir "$env:KRITA_INPUT\share\dbus-1\" -ea SilentlyContinue +mkdir "$env:KRITA_INPUT\share\dbus-1\interfaces" -ea SilentlyContinue +mkdir "$env:KRITA_INPUT\share\dbus-1\services" -ea SilentlyContinue +mkdir "$env:KRITA_INPUT\share\dbus-1\system-services"-ea SilentlyContinue +mkdir "$env:KRITA_INPUT\share\kde4\services" -ea SilentlyContinue +mkdir "$env:KRITA_INPUT\share\kservicetypes5" -ea SilentlyContinue + +mkdir "$env:KRITA_OUTPUT" -ea SilentlyContinue $installinfo = ConvertFrom-Json ((Get-Content "krita-files.json") -join "`n") +# Helper function - basically an rsync kinda thing. +# Copy items only if they are newer, return error string on failure. function copy-newer($src, $dst) { - # Copy items only if they are newer, return error string on failure Try { $src_item = Get-Item $src -ErrorAction SilentlyContinue if (-not $?) { @@ -65,6 +59,7 @@ $src_update = [datetime](Get-ItemProperty -Path $src -Name LastWriteTime)[0].LastWriteTime $dst_update = [datetime](Get-ItemProperty -Path $dst -Name LastWriteTime)[0].LastWriteTime if ($src_update -le $dst_update) { + # Source file is not newer, skip this file return "" } } @@ -88,18 +83,21 @@ foreach ($i in $installinfo.InstallationInfo) { - #Print messages + # Print messages from JSON data if ($i.msg) { echo "$($i.msg)..." } - #One directory per group - $dst = "$C2WINSTALL_INPUT\$($i.dir)" + # One directory per group in JSON data + $dst = "$env:KRITA_INPUT\$($i.dir)" #Loop through files foreach ($f in $i.files) { - $src = "$CALLIGRA_INST\$f" + $src = "$env:CALLIGRA_INST\$f" + echo "Copying - $src" $errstr = copy-newer $src $dst + + # If we got an error when copying, print something helpful if ( $errstr ) { if ($Error[0].Exception.GetType() -eq [System.IO.IOException]) { echo "INFO: file $dst already exists." @@ -113,11 +111,3 @@ } } } - - -# Had to change: -# share\kde4\services\basicflakesplugin.desktop, share\kde4\services -# - - -# & $C2WINSTALL_INPUT\..\c2winstaller\res\package\env.bat $C2WINSTALL_INPUT diff --git a/windows/krita_installer/res/UIExtension/CustomProgressDlg.wxs b/windows/krita_installer/res/UIExtension/CustomProgressDlg.wxs --- a/windows/krita_installer/res/UIExtension/CustomProgressDlg.wxs +++ b/windows/krita_installer/res/UIExtension/CustomProgressDlg.wxs @@ -106,9 +106,9 @@ - - - + + + diff --git a/windows/krita_installer/res/package/env.bat b/windows/krita_installer/res/package/env.bat --- a/windows/krita_installer/res/package/env.bat +++ b/windows/krita_installer/res/package/env.bat @@ -6,6 +6,7 @@ set XDG_DATA_DIRS=%~dp0share set KDEDIRS=%~dp0 set KDEDIR=%~dp0 -set PATH=%~dp0bin;%~dp0lib;%~dp0lib\kde4;%PATH% +set PATH=%~dp0bin;%~dp0lib;%~dp0lib\krita;%PATH% +set QT_PLUGIN_PATH=%~dp0lib :: Launch application and all additional parameters %* diff --git a/windows/krita_installer/res/wix_snippets/BundleVC2010x86.wxs b/windows/krita_installer/res/wix_snippets/BundleVC2015x64.wxs rename from windows/krita_installer/res/wix_snippets/BundleVC2010x86.wxs rename to windows/krita_installer/res/wix_snippets/BundleVC2015x64.wxs --- a/windows/krita_installer/res/wix_snippets/BundleVC2010x86.wxs +++ b/windows/krita_installer/res/wix_snippets/BundleVC2015x64.wxs @@ -18,19 +18,19 @@ - - - - - - + + + + + + - - + + - + - \ No newline at end of file + diff --git a/windows/krita_installer/res/wix_snippets/FindVC2010ia64.wxi b/windows/krita_installer/res/wix_snippets/FindVC2015ia64.wxi rename from windows/krita_installer/res/wix_snippets/FindVC2010ia64.wxi rename to windows/krita_installer/res/wix_snippets/FindVC2015ia64.wxi --- a/windows/krita_installer/res/wix_snippets/FindVC2010ia64.wxi +++ b/windows/krita_installer/res/wix_snippets/FindVC2015ia64.wxi @@ -16,9 +16,9 @@ http://marklinesdavies.blogware.com/blog/_archives/2011/3/14/4771326.html --> - 4 - - + 4 + + - Installed OR (HASVCPP2010) - \ No newline at end of file + Installed OR (HASVCPP2015) + diff --git a/windows/krita_installer/res/wix_snippets/FindVC2010x64.wxi b/windows/krita_installer/res/wix_snippets/FindVC2015x64.wxi rename from windows/krita_installer/res/wix_snippets/FindVC2010x64.wxi rename to windows/krita_installer/res/wix_snippets/FindVC2015x64.wxi --- a/windows/krita_installer/res/wix_snippets/FindVC2010x64.wxi +++ b/windows/krita_installer/res/wix_snippets/FindVC2015x64.wxi @@ -17,8 +17,8 @@ --> - - + + - Installed OR (HASVCPP2010) - \ No newline at end of file + Installed OR (HASVCPP2010) + diff --git a/windows/krita_installer/res/wix_snippets/FindVC2010x86.wxi b/windows/krita_installer/res/wix_snippets/FindVC2015x86.wxi rename from windows/krita_installer/res/wix_snippets/FindVC2010x86.wxi rename to windows/krita_installer/res/wix_snippets/FindVC2015x86.wxi --- a/windows/krita_installer/res/wix_snippets/FindVC2010x86.wxi +++ b/windows/krita_installer/res/wix_snippets/FindVC2015x86.wxi @@ -16,9 +16,9 @@ http://marklinesdavies.blogware.com/blog/_archives/2011/3/14/4771326.html --> - - - + + + - Installed OR (HASVCPP2010) - \ No newline at end of file + Installed OR (HASVCPP2015) + diff --git a/windows/krita_installer/res/wix_snippets/MergeModules.wxi b/windows/krita_installer/res/wix_snippets/MergeModules_x64.wxi rename from windows/krita_installer/res/wix_snippets/MergeModules.wxi rename to windows/krita_installer/res/wix_snippets/MergeModules_x64.wxi --- a/windows/krita_installer/res/wix_snippets/MergeModules.wxi +++ b/windows/krita_installer/res/wix_snippets/MergeModules_x64.wxi @@ -18,11 +18,11 @@ - - + + - + diff --git a/windows/krita_installer/res/wix_snippets/MergeModules.wxi b/windows/krita_installer/res/wix_snippets/MergeModules_x86.wxi rename from windows/krita_installer/res/wix_snippets/MergeModules.wxi rename to windows/krita_installer/res/wix_snippets/MergeModules_x86.wxi --- a/windows/krita_installer/res/wix_snippets/MergeModules.wxi +++ b/windows/krita_installer/res/wix_snippets/MergeModules_x86.wxi @@ -18,11 +18,11 @@ - - + + - + diff --git a/windows/krita_installer/res/wix_snippets/VC2010DLLs.wxi b/windows/krita_installer/res/wix_snippets/VC2015DLLs.wxi rename from windows/krita_installer/res/wix_snippets/VC2010DLLs.wxi rename to windows/krita_installer/res/wix_snippets/VC2015DLLs.wxi --- a/windows/krita_installer/res/wix_snippets/VC2010DLLs.wxi +++ b/windows/krita_installer/res/wix_snippets/VC2015DLLs.wxi @@ -17,20 +17,20 @@ --> - + - - + + - - + + - - + + - \ No newline at end of file +