From 9aa07d46aa69ad4c03568cd6554f1147266c71f6 Mon Sep 17 00:00:00 2001 From: Manuel Dobusch Date: Thu, 24 Nov 2016 16:18:37 +0100 Subject: [PATCH] utility: windows setup update Changed windows setup folder layout and added readme file --- .../windows/wixSetup/Setup/src/main.cpp | 4 +- deployment/windows/wixSetup/build.bat | 5 +- deployment/windows/wixSetup/readme.txt | 106 ++---------------- deployment/windows/wixSetup/wixReadme.txt | 104 +++++++++++++++++ 4 files changed, 116 insertions(+), 103 deletions(-) create mode 100644 deployment/windows/wixSetup/wixReadme.txt diff --git a/deployment/windows/wixSetup/Setup/src/main.cpp b/deployment/windows/wixSetup/Setup/src/main.cpp index fbb67374..f754d862 100644 --- a/deployment/windows/wixSetup/Setup/src/main.cpp +++ b/deployment/windows/wixSetup/Setup/src/main.cpp @@ -10,13 +10,13 @@ int main() { std::cout << "Coati found" << std::endl; std::cout << "Performing upgrade" << std::endl; - system("msiexec /i coati.msi REINSTALL=ALL REINSTALLMODE=vomus"); + system("msiexec /i bin/coati.msi REINSTALL=ALL REINSTALLMODE=vomus"); } else { std::cout << "Coati not found" << std::endl; std::cout << "Performing initial installation" << std::endl; - system("msiexec /i coati.msi"); + system("msiexec /i bin/coati.msi"); } return 0; diff --git a/deployment/windows/wixSetup/build.bat b/deployment/windows/wixSetup/build.bat index f529477f..6b47a0b3 100644 --- a/deployment/windows/wixSetup/build.bat +++ b/deployment/windows/wixSetup/build.bat @@ -14,12 +14,12 @@ mkdir build rm -rf bin mkdir bin - +mkdir bin\bin candle.exe -dprojectVersion="$VERSION_STRING" coati.wxs customActions.wxs dialogShortcuts.wxs installDir.wxs appDataDir.wxs -out build/ > build/compileLog.txt light.exe -ext WixUIExtension build/coati.wixobj build/customActions.wixobj build/dialogShortcuts.wixobj build/installDir.wixobj build/appDataDir.wixobj -out build/coati.msi > build/linkLog.txt -cp -u -r build/coati.msi bin +cp -u -r build/coati.msi bin/bin cp -u -r build/Setup.exe bin cp -u -r lib/api-ms-win-crt-heap-l1-1-0.dll bin cp -u -r lib/api-ms-win-crt-locale-l1-1-0.dll bin @@ -28,3 +28,4 @@ cp -u -r lib/api-ms-win-crt-runtime-l1-1-0.dll bin cp -u -r lib/api-ms-win-crt-stdio-l1-1-0.dll bin cp -u -r lib/msvcp140.dll bin cp -u -r lib/vcruntime140.dll bin +cp -u -r readme.txt bin \ No newline at end of file diff --git a/deployment/windows/wixSetup/readme.txt b/deployment/windows/wixSetup/readme.txt index 171ad84c..1f15cd44 100644 --- a/deployment/windows/wixSetup/readme.txt +++ b/deployment/windows/wixSetup/readme.txt @@ -1,104 +1,12 @@ -------------------- -Build the installer -------------------- +=============== +||Coati Setup|| +=============== --Prerequisites - -configure for build - -make sure the Visual Studio IDE directory is in you OS path variable ('../Microsoft Visual Studio14/Common7/IDE/') - -Install the WiX toolset... - - http://wixtoolset.org/releases/ - -I used stable version 3.10.3 for development - -make sure the WiX directory is in you OS path variable ('..\WiX Toolset v3.10\bin') - -Coati has to be built with the 'deploy' flag - -installer would still build if the deploy flag wasnt set, but the Coati wont run properly on a user machine +To install Coati simply run 'setup.exe' --Execute build.bat - -This will build coati.msi file, all needed custom action dlls and the setup.exe file - -setup.exe and coati.msi are needed to install - -setup.exe checks whether coati is installed and will either start the initial installation or the upgrade installation +If you have a previous version installed, setup.exe will attempt to upgrade*. +Your previous application specific settings will be maintained. ---------------------- -Clean the project ---------------------- --Just delete the "bin" and "build" folders - ---------------------- -Update Version Number ---------------------- --See below ('chapter' Create new Version) - - ---------------------------------------------------- -Add new components (e.g. files) to the installation ---------------------------------------------------- - -[description] --xml elements are described as follows: - -To do X use tag - -attribute: attribute description - -... - - -Generel - -to add a file create a element - -mind the tags, they define where the component will be installed. Add new directories if necessary - -Id: the directory will be refered to within the wix project using this id - -Name: the name of the folder that will be created on the user machine - -Id: is used to refer to the component within the wix project - -Guid: GUIDs are unique id's used by windows to identify and refer to installed files, applications and so on. You need to create a new GUID for every new component - Visual Studio can create GUIDs (Tools->Create GUID), or just google for a tool - It's reasonably safe to assume that every newly created GUID is unique - -Add a file to component using the tag - -Id: guess what... - -Name: the name that the file will have on the user machine, may be different from the file name on the source machine - -Source: the path and name to the file on the source machine, relative to the current .wxs file - -KeyPath: depends on where you want to install the file, see below in 'Add new file to...' - -usually there is one component for each single file. Multiple files can be added to a component, this might make sense if the files are considered 100% unseperable. The recommended way however is one file per component - - -Add new file to the installation directory (installDir.wxs) - -static files that must not be changed go here - -just like above, with KeyPath='yes' - -if there are more files in a component, only one file has the KeyPath attribute - - -Add new file to the user folder (appDataDir.wxs) - -files that will be changed by coati or the user should be put here - -needs a RegistryKey element within the component element to provide the KeyPath - - - - - - -Not quite done yet! (coati.wxs) - -components need to be added to a feature (a feature is part of a software, consisting of components, that may or may not be installed during setup) - -right now we only have the Complete/Program feature, so no part of coati is optional right now - -to add a component to a feature use the tag - -Id: id of the component you want to refere to - - ------------------- -Create new version ------------------- - -Version Number - -is now a preprocessor variable - -is defined in build.bat - -candle.exe -dprojectVersion="0.7.0" ... - -replace 0.7.0 with the desired version number - -Minor upgrage (coati.wxs) - -for when only a few files are to be updated - -update the version number in build.bat script - -do NOT change the product GUID - -the package GUID has to change, that happens automatically though so don't worry 'bout it - - -Major upgrade (coati.wxs) - -for big changes, like a new major version - -update the version number in build.bat script - -DO change the product GUID - -insert the same GUID into the uninstall_wix.bat script - -package GUID changes too, but thats again done automatically \ No newline at end of file +*Upgrades work for Coati versions newer than 0.9.0 \ No newline at end of file diff --git a/deployment/windows/wixSetup/wixReadme.txt b/deployment/windows/wixSetup/wixReadme.txt new file mode 100644 index 00000000..171ad84c --- /dev/null +++ b/deployment/windows/wixSetup/wixReadme.txt @@ -0,0 +1,104 @@ +------------------- +Build the installer +------------------- + +-Prerequisites + -configure for build + -make sure the Visual Studio IDE directory is in you OS path variable ('../Microsoft Visual Studio14/Common7/IDE/') + -Install the WiX toolset... + - http://wixtoolset.org/releases/ + -I used stable version 3.10.3 for development + -make sure the WiX directory is in you OS path variable ('..\WiX Toolset v3.10\bin') + -Coati has to be built with the 'deploy' flag + -installer would still build if the deploy flag wasnt set, but the Coati wont run properly on a user machine + +-Execute build.bat + -This will build coati.msi file, all needed custom action dlls and the setup.exe file + -setup.exe and coati.msi are needed to install + -setup.exe checks whether coati is installed and will either start the initial installation or the upgrade installation + + +--------------------- +Clean the project +--------------------- +-Just delete the "bin" and "build" folders + + +--------------------- +Update Version Number +--------------------- +-See below ('chapter' Create new Version) + + +--------------------------------------------------- +Add new components (e.g. files) to the installation +--------------------------------------------------- + +[description] +-xml elements are described as follows: + -To do X use tag + -attribute: attribute description + -... + + +Generel + -to add a file create a element + -mind the tags, they define where the component will be installed. Add new directories if necessary + -Id: the directory will be refered to within the wix project using this id + -Name: the name of the folder that will be created on the user machine + -Id: is used to refer to the component within the wix project + -Guid: GUIDs are unique id's used by windows to identify and refer to installed files, applications and so on. You need to create a new GUID for every new component + Visual Studio can create GUIDs (Tools->Create GUID), or just google for a tool + It's reasonably safe to assume that every newly created GUID is unique + -Add a file to component using the tag + -Id: guess what... + -Name: the name that the file will have on the user machine, may be different from the file name on the source machine + -Source: the path and name to the file on the source machine, relative to the current .wxs file + -KeyPath: depends on where you want to install the file, see below in 'Add new file to...' + -usually there is one component for each single file. Multiple files can be added to a component, this might make sense if the files are considered 100% unseperable. The recommended way however is one file per component + + +Add new file to the installation directory (installDir.wxs) + -static files that must not be changed go here + -just like above, with KeyPath='yes' + -if there are more files in a component, only one file has the KeyPath attribute + + +Add new file to the user folder (appDataDir.wxs) + -files that will be changed by coati or the user should be put here + -needs a RegistryKey element within the component element to provide the KeyPath + - + + + + +Not quite done yet! (coati.wxs) + -components need to be added to a feature (a feature is part of a software, consisting of components, that may or may not be installed during setup) + -right now we only have the Complete/Program feature, so no part of coati is optional right now + -to add a component to a feature use the tag + -Id: id of the component you want to refere to + + +------------------ +Create new version +------------------ + +Version Number + -is now a preprocessor variable + -is defined in build.bat + -candle.exe -dprojectVersion="0.7.0" ... + -replace 0.7.0 with the desired version number + +Minor upgrage (coati.wxs) + -for when only a few files are to be updated + -update the version number in build.bat script + -do NOT change the product GUID + -the package GUID has to change, that happens automatically though so don't worry 'bout it + + +Major upgrade (coati.wxs) + -for big changes, like a new major version + -update the version number in build.bat script + -DO change the product GUID + -insert the same GUID into the uninstall_wix.bat script + -package GUID changes too, but thats again done automatically \ No newline at end of file