From 043cb41d6ee792379cbbbbb8be873b26ced9944c Mon Sep 17 00:00:00 2001
From: cgeek <contact@zertimail.net>
Date: Fri, 6 May 2016 14:22:20 +0200
Subject: [PATCH 1/9] Windows Installer

---
 appveyor.yml          | 10 ++++++-
 ci/appveyor/sakia.iss | 63 +++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 72 insertions(+), 1 deletion(-)
 create mode 100644 ci/appveyor/sakia.iss

diff --git a/appveyor.yml b/appveyor.yml
index 06098367..4b50efe2 100644
--- a/appveyor.yml
+++ b/appveyor.yml
@@ -48,9 +48,17 @@ build_script:
   - ".\\ci\\appveyor\\tests.cmd"
   - echo %errorlevel%
 
+  # Windows Installer
+  - if [%APPVEYOR_REPO_TAG_NAME%] neq [] choco install -y InnoSetup
+  - if [%APPVEYOR_REPO_TAG_NAME%] neq [] set PATH="C:\Program Files (x86)\Inno Setup 5";%PATH%
+  - if [%APPVEYOR_REPO_TAG_NAME%] neq [] iscc %cd%\ci\appveyor\sakia.iss /DROOT_PATH=%cd%
+  - if [%APPVEYOR_REPO_TAG_NAME%] neq [] move %cd%\sakia.exe %cd%\sakia-%APPVEYOR_REPO_TAG_NAME%-win%PYTHON_ARCH%.exe
+
 artifacts:
   - path: dist
     name: sakia-win$(PYTHON_ARCH)
+  - path: sakia*.exe
+    name: sakia-exe
 # upload to releases
 deploy:
   tag: $(APPVEYOR_REPO_TAG_NAME)
@@ -58,7 +66,7 @@ deploy:
   provider: GitHub
   auth_token:
     secure: wbzlh6nx1zY1J1avlB0C3hKGm1abFNHBdM60u/U09i5Nam//D6kazvnv5ZBKdR89
-  artifact: sakia-win$(PYTHON_ARCH)
+  artifact: /sakia-/
   draft: true
   prerelease: true
   on:
diff --git a/ci/appveyor/sakia.iss b/ci/appveyor/sakia.iss
new file mode 100644
index 00000000..a1470e41
--- /dev/null
+++ b/ci/appveyor/sakia.iss
@@ -0,0 +1,63 @@
+#define MyAppName "Sakia"
+#define MyAppPublisher "Sakia team"
+#define MyAppURL "http://sakia-wallet.org"
+#define MyAppExeName "sakia.exe"
+
+#if !Defined(ROOT_PATH)
+#define ROOT_PATH "."
+#endif
+
+#define MyAppSrc ROOT_PATH
+#define MyAppExe ROOT_PATH + "\dist\sakia\" + MyAppExeName
+#pragma message MyAppSrc
+
+#if !FileExists(MyAppExe)
+#error "Unable to find MyAppExe"
+#endif
+
+#define MyAppVerStr "0.20.0dev7"
+
+[Setup]
+AppName={#MyAppName}
+AppVersion={#MyAppVerStr}
+AppPublisher={#MyAppPublisher}
+AppPublisherURL={#MyAppURL}
+AppSupportURL={#MyAppURL}
+AppUpdatesURL={#MyAppURL}
+DefaultDirName={pf}\{#MyAppName}
+DisableDirPage=yes
+DefaultGroupName={#MyAppName}
+DisableProgramGroupPage=yes
+OutputDir={#ROOT_PATH}
+OutputBaseFilename={#MyAppName}
+Compression=lzma
+SolidCompression=yes
+UninstallDisplayIcon={app}\{#MyAppExeName}
+
+[Languages]
+Name: "english"; MessagesFile: "compiler:Default.isl"
+Name: "french"; MessagesFile: "compiler:Languages\French.isl"
+
+[Tasks]
+Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked
+
+[Files]
+Source: "{#MyAppSrc}\dist\sakia\*"; DestDir: "{app}\"; Flags: ignoreversion recursesubdirs
+Source: "{#MyAppSrc}\sakia.ico"; DestDir: "{app}\"; Flags: ignoreversion recursesubdirs
+Source: "{#MyAppSrc}\sakia.png"; DestDir: "{app}\"; Flags: ignoreversion recursesubdirs
+Source: "{#MyAppSrc}\LICENSE"; DestDir: "{app}\"; Flags: ignoreversion recursesubdirs
+
+[Icons]
+Name: "{group}\{#MyAppName}"; IconFilename: "{app}\sakia.ico"; Filename: "{app}\{#MyAppExeName}"
+Name: "{group}\{cm:UninstallProgram,{#MyAppName}}"; Filename: "{uninstallexe}"
+Name: "{commondesktop}\{#MyAppName}"; IconFilename: "{app}\sakia.ico"; Filename: "{app}\{#MyAppExeName}"; Tasks: desktopicon
+
+[Run]
+Filename: "{app}\{#MyAppExeName}"; Description: "{cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}"; Flags: nowait postinstall skipifsilent
+
+[Setup]
+; NOTE: The value of AppId uniquely identifies this application.
+; Do not use the same AppId value in installers for other applications.
+; (To generate a new GUID, click Tools | Generate GUID inside the IDE.)
+AppId={{E01B0960-74D2-8ACD-734E-8B3CB033B07F}
+LicenseFile="{#MyAppSrc}\LICENSE"
-- 
GitLab


From aee264608065f927e0745686920539f8a2ae0cff Mon Sep 17 00:00:00 2001
From: cgeek <contact@zertimail.net>
Date: Fri, 6 May 2016 15:19:43 +0200
Subject: [PATCH 2/9] Try cache deletion on install

---
 appveyor.yml          | 8 ++++----
 ci/appveyor/sakia.iss | 3 +++
 2 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/appveyor.yml b/appveyor.yml
index 4b50efe2..216016c7 100644
--- a/appveyor.yml
+++ b/appveyor.yml
@@ -49,10 +49,10 @@ build_script:
   - echo %errorlevel%
 
   # Windows Installer
-  - if [%APPVEYOR_REPO_TAG_NAME%] neq [] choco install -y InnoSetup
-  - if [%APPVEYOR_REPO_TAG_NAME%] neq [] set PATH="C:\Program Files (x86)\Inno Setup 5";%PATH%
-  - if [%APPVEYOR_REPO_TAG_NAME%] neq [] iscc %cd%\ci\appveyor\sakia.iss /DROOT_PATH=%cd%
-  - if [%APPVEYOR_REPO_TAG_NAME%] neq [] move %cd%\sakia.exe %cd%\sakia-%APPVEYOR_REPO_TAG_NAME%-win%PYTHON_ARCH%.exe
+  - choco install -y InnoSetup
+  - set PATH="C:\Program Files (x86)\Inno Setup 5";%PATH%
+  - iscc %cd%\ci\appveyor\sakia.iss /DROOT_PATH=%cd%
+  - move %cd%\sakia.exe %cd%\sakia-%APPVEYOR_REPO_TAG_NAME%-win%PYTHON_ARCH%.exe
 
 artifacts:
   - path: dist
diff --git a/ci/appveyor/sakia.iss b/ci/appveyor/sakia.iss
index a1470e41..ae52ca90 100644
--- a/ci/appveyor/sakia.iss
+++ b/ci/appveyor/sakia.iss
@@ -52,6 +52,9 @@ Name: "{group}\{#MyAppName}"; IconFilename: "{app}\sakia.ico"; Filename: "{app}\
 Name: "{group}\{cm:UninstallProgram,{#MyAppName}}"; Filename: "{uninstallexe}"
 Name: "{commondesktop}\{#MyAppName}"; IconFilename: "{app}\sakia.ico"; Filename: "{app}\{#MyAppExeName}"; Tasks: desktopicon
 
+[InstallDelete]
+Type: filesandordirs; Name: "{userappdata}\sakia\*\__cache__"
+
 [Run]
 Filename: "{app}\{#MyAppExeName}"; Description: "{cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}"; Flags: nowait postinstall skipifsilent
 
-- 
GitLab


From 6d22d6ef4000f616d751d4551add4e40ecdae11d Mon Sep 17 00:00:00 2001
From: cgeek <contact@zertimail.net>
Date: Fri, 6 May 2016 15:47:50 +0200
Subject: [PATCH 3/9] Try cache deletion on install with manual name

---
 ci/appveyor/sakia.iss | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ci/appveyor/sakia.iss b/ci/appveyor/sakia.iss
index ae52ca90..245f474f 100644
--- a/ci/appveyor/sakia.iss
+++ b/ci/appveyor/sakia.iss
@@ -53,7 +53,7 @@ Name: "{group}\{cm:UninstallProgram,{#MyAppName}}"; Filename: "{uninstallexe}"
 Name: "{commondesktop}\{#MyAppName}"; IconFilename: "{app}\sakia.ico"; Filename: "{app}\{#MyAppExeName}"; Tasks: desktopicon
 
 [InstallDelete]
-Type: filesandordirs; Name: "{userappdata}\sakia\*\__cache__"
+Type: filesandordirs; Name: "{userappdata}\sakia\cgeek\__cache__"
 
 [Run]
 Filename: "{app}\{#MyAppExeName}"; Description: "{cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}"; Flags: nowait postinstall skipifsilent
-- 
GitLab


From efef4a14f4a0350d7108dad61056c94f286f7ae2 Mon Sep 17 00:00:00 2001
From: cgeek <contact@zertimail.net>
Date: Fri, 6 May 2016 16:05:04 +0200
Subject: [PATCH 4/9] Revert

---
 appveyor.yml          | 8 ++++----
 ci/appveyor/sakia.iss | 3 ---
 2 files changed, 4 insertions(+), 7 deletions(-)

diff --git a/appveyor.yml b/appveyor.yml
index 216016c7..4b50efe2 100644
--- a/appveyor.yml
+++ b/appveyor.yml
@@ -49,10 +49,10 @@ build_script:
   - echo %errorlevel%
 
   # Windows Installer
-  - choco install -y InnoSetup
-  - set PATH="C:\Program Files (x86)\Inno Setup 5";%PATH%
-  - iscc %cd%\ci\appveyor\sakia.iss /DROOT_PATH=%cd%
-  - move %cd%\sakia.exe %cd%\sakia-%APPVEYOR_REPO_TAG_NAME%-win%PYTHON_ARCH%.exe
+  - if [%APPVEYOR_REPO_TAG_NAME%] neq [] choco install -y InnoSetup
+  - if [%APPVEYOR_REPO_TAG_NAME%] neq [] set PATH="C:\Program Files (x86)\Inno Setup 5";%PATH%
+  - if [%APPVEYOR_REPO_TAG_NAME%] neq [] iscc %cd%\ci\appveyor\sakia.iss /DROOT_PATH=%cd%
+  - if [%APPVEYOR_REPO_TAG_NAME%] neq [] move %cd%\sakia.exe %cd%\sakia-%APPVEYOR_REPO_TAG_NAME%-win%PYTHON_ARCH%.exe
 
 artifacts:
   - path: dist
diff --git a/ci/appveyor/sakia.iss b/ci/appveyor/sakia.iss
index 245f474f..a1470e41 100644
--- a/ci/appveyor/sakia.iss
+++ b/ci/appveyor/sakia.iss
@@ -52,9 +52,6 @@ Name: "{group}\{#MyAppName}"; IconFilename: "{app}\sakia.ico"; Filename: "{app}\
 Name: "{group}\{cm:UninstallProgram,{#MyAppName}}"; Filename: "{uninstallexe}"
 Name: "{commondesktop}\{#MyAppName}"; IconFilename: "{app}\sakia.ico"; Filename: "{app}\{#MyAppExeName}"; Tasks: desktopicon
 
-[InstallDelete]
-Type: filesandordirs; Name: "{userappdata}\sakia\cgeek\__cache__"
-
 [Run]
 Filename: "{app}\{#MyAppExeName}"; Description: "{cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}"; Flags: nowait postinstall skipifsilent
 
-- 
GitLab


From 374b18d9a26e7160f4b20c5fb484bb129907e79d Mon Sep 17 00:00:00 2001
From: cgeek <contact@zertimail.net>
Date: Fri, 6 May 2016 17:20:14 +0200
Subject: [PATCH 5/9] Try removal

---
 ci/appveyor/sakia.iss | 1 +
 1 file changed, 1 insertion(+)

diff --git a/ci/appveyor/sakia.iss b/ci/appveyor/sakia.iss
index a1470e41..bc0935a2 100644
--- a/ci/appveyor/sakia.iss
+++ b/ci/appveyor/sakia.iss
@@ -54,6 +54,7 @@ Name: "{commondesktop}\{#MyAppName}"; IconFilename: "{app}\sakia.ico"; Filename:
 
 [Run]
 Filename: "{app}\{#MyAppExeName}"; Description: "{cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}"; Flags: nowait postinstall skipifsilent
+Filename: "rd /s /q {userappdata}\sakia"; Description: "Delete existing data of Sakia"; Flags: postinstall nowait skipifsilent unchecked shellexec
 
 [Setup]
 ; NOTE: The value of AppId uniquely identifies this application.
-- 
GitLab


From 29793792cf344fd6175a72a3d62489f335fd7f8f Mon Sep 17 00:00:00 2001
From: cgeek <contact@zertimail.net>
Date: Fri, 6 May 2016 17:30:11 +0200
Subject: [PATCH 6/9] Package testing

---
 appveyor.yml | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/appveyor.yml b/appveyor.yml
index 4b50efe2..216016c7 100644
--- a/appveyor.yml
+++ b/appveyor.yml
@@ -49,10 +49,10 @@ build_script:
   - echo %errorlevel%
 
   # Windows Installer
-  - if [%APPVEYOR_REPO_TAG_NAME%] neq [] choco install -y InnoSetup
-  - if [%APPVEYOR_REPO_TAG_NAME%] neq [] set PATH="C:\Program Files (x86)\Inno Setup 5";%PATH%
-  - if [%APPVEYOR_REPO_TAG_NAME%] neq [] iscc %cd%\ci\appveyor\sakia.iss /DROOT_PATH=%cd%
-  - if [%APPVEYOR_REPO_TAG_NAME%] neq [] move %cd%\sakia.exe %cd%\sakia-%APPVEYOR_REPO_TAG_NAME%-win%PYTHON_ARCH%.exe
+  - choco install -y InnoSetup
+  - set PATH="C:\Program Files (x86)\Inno Setup 5";%PATH%
+  - iscc %cd%\ci\appveyor\sakia.iss /DROOT_PATH=%cd%
+  - move %cd%\sakia.exe %cd%\sakia-%APPVEYOR_REPO_TAG_NAME%-win%PYTHON_ARCH%.exe
 
 artifacts:
   - path: dist
-- 
GitLab


From bb8b42d1f7de3358b4516268b4b4957d405ddd25 Mon Sep 17 00:00:00 2001
From: cgeek <contact@zertimail.net>
Date: Fri, 6 May 2016 17:58:36 +0200
Subject: [PATCH 7/9] After install script

---
 ci/appveyor/after_install.cmd | 3 +++
 ci/appveyor/sakia.iss         | 3 ++-
 2 files changed, 5 insertions(+), 1 deletion(-)
 create mode 100644 ci/appveyor/after_install.cmd

diff --git a/ci/appveyor/after_install.cmd b/ci/appveyor/after_install.cmd
new file mode 100644
index 00000000..41da8214
--- /dev/null
+++ b/ci/appveyor/after_install.cmd
@@ -0,0 +1,3 @@
+@ECHO OFF
+
+mkdir %APPDATA%\sakia\test
\ No newline at end of file
diff --git a/ci/appveyor/sakia.iss b/ci/appveyor/sakia.iss
index bc0935a2..2d1fbcb7 100644
--- a/ci/appveyor/sakia.iss
+++ b/ci/appveyor/sakia.iss
@@ -46,6 +46,7 @@ Source: "{#MyAppSrc}\dist\sakia\*"; DestDir: "{app}\"; Flags: ignoreversion recu
 Source: "{#MyAppSrc}\sakia.ico"; DestDir: "{app}\"; Flags: ignoreversion recursesubdirs
 Source: "{#MyAppSrc}\sakia.png"; DestDir: "{app}\"; Flags: ignoreversion recursesubdirs
 Source: "{#MyAppSrc}\LICENSE"; DestDir: "{app}\"; Flags: ignoreversion recursesubdirs
+Source: "{#MyAppSrc}\ci\appveyor\after_install.cmd"; DestDir: "{app}\"; Flags: ignoreversion
 
 [Icons]
 Name: "{group}\{#MyAppName}"; IconFilename: "{app}\sakia.ico"; Filename: "{app}\{#MyAppExeName}"
@@ -54,7 +55,7 @@ Name: "{commondesktop}\{#MyAppName}"; IconFilename: "{app}\sakia.ico"; Filename:
 
 [Run]
 Filename: "{app}\{#MyAppExeName}"; Description: "{cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}"; Flags: nowait postinstall skipifsilent
-Filename: "rd /s /q {userappdata}\sakia"; Description: "Delete existing data of Sakia"; Flags: postinstall nowait skipifsilent unchecked shellexec
+Filename: "{app}\after_install.cmd"; Description: "Supprimer les données existantes"; Flags: postinstall nowait skipifsilent unchecked
 
 [Setup]
 ; NOTE: The value of AppId uniquely identifies this application.
-- 
GitLab


From 2308d5d6848383752893e0b391e2b25b80ccb703 Mon Sep 17 00:00:00 2001
From: cgeek <contact@zertimail.net>
Date: Fri, 6 May 2016 18:14:49 +0200
Subject: [PATCH 8/9] Delete sakia data after install

---
 ci/appveyor/after_install.cmd | 2 +-
 ci/appveyor/sakia.iss         | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/ci/appveyor/after_install.cmd b/ci/appveyor/after_install.cmd
index 41da8214..4ed2b33c 100644
--- a/ci/appveyor/after_install.cmd
+++ b/ci/appveyor/after_install.cmd
@@ -1,3 +1,3 @@
 @ECHO OFF
 
-mkdir %APPDATA%\sakia\test
\ No newline at end of file
+rd /s /q %APPDATA%\sakia
\ No newline at end of file
diff --git a/ci/appveyor/sakia.iss b/ci/appveyor/sakia.iss
index 2d1fbcb7..6fec5612 100644
--- a/ci/appveyor/sakia.iss
+++ b/ci/appveyor/sakia.iss
@@ -55,7 +55,7 @@ Name: "{commondesktop}\{#MyAppName}"; IconFilename: "{app}\sakia.ico"; Filename:
 
 [Run]
 Filename: "{app}\{#MyAppExeName}"; Description: "{cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}"; Flags: nowait postinstall skipifsilent
-Filename: "{app}\after_install.cmd"; Description: "Supprimer les données existantes"; Flags: postinstall nowait skipifsilent unchecked
+Filename: "{app}\after_install.cmd"; Description: "Delete ALL existing data"; Flags: postinstall nowait skipifsilent unchecked
 
 [Setup]
 ; NOTE: The value of AppId uniquely identifies this application.
-- 
GitLab


From f29547f54744b8a40d3bf5c54da11b3451647f21 Mon Sep 17 00:00:00 2001
From: cgeek <contact@zertimail.net>
Date: Fri, 6 May 2016 18:16:23 +0200
Subject: [PATCH 9/9] InnoSetup process on tag only

---
 appveyor.yml | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/appveyor.yml b/appveyor.yml
index 216016c7..4b50efe2 100644
--- a/appveyor.yml
+++ b/appveyor.yml
@@ -49,10 +49,10 @@ build_script:
   - echo %errorlevel%
 
   # Windows Installer
-  - choco install -y InnoSetup
-  - set PATH="C:\Program Files (x86)\Inno Setup 5";%PATH%
-  - iscc %cd%\ci\appveyor\sakia.iss /DROOT_PATH=%cd%
-  - move %cd%\sakia.exe %cd%\sakia-%APPVEYOR_REPO_TAG_NAME%-win%PYTHON_ARCH%.exe
+  - if [%APPVEYOR_REPO_TAG_NAME%] neq [] choco install -y InnoSetup
+  - if [%APPVEYOR_REPO_TAG_NAME%] neq [] set PATH="C:\Program Files (x86)\Inno Setup 5";%PATH%
+  - if [%APPVEYOR_REPO_TAG_NAME%] neq [] iscc %cd%\ci\appveyor\sakia.iss /DROOT_PATH=%cd%
+  - if [%APPVEYOR_REPO_TAG_NAME%] neq [] move %cd%\sakia.exe %cd%\sakia-%APPVEYOR_REPO_TAG_NAME%-win%PYTHON_ARCH%.exe
 
 artifacts:
   - path: dist
-- 
GitLab