[tor-commits] [tor-messenger-build/master] Use NSIS Installer for Tor Messenger
boklm at torproject.org
boklm at torproject.org
Sun Apr 26 07:53:35 UTC 2015
commit e1cec92aac1a050b4e10369217e72b4c858abaa9
Author: Nicolas Vigier <boklm at torproject.org>
Date: Sun Apr 26 09:49:15 2015 +0200
Use NSIS Installer for Tor Messenger
---
projects/tor-messenger/build | 5 +++++
projects/tor-messenger/config | 17 ++++++++++++++-
projects/tor-messenger/tor-messenger.nsi | 33 +++++++++++++++---------------
3 files changed, 38 insertions(+), 17 deletions(-)
diff --git a/projects/tor-messenger/build b/projects/tor-messenger/build
index 4cceecc..133a2a2 100644
--- a/projects/tor-messenger/build
+++ b/projects/tor-messenger/build
@@ -37,7 +37,12 @@ mv tor-browser_en-US/Browser/TorBrowser/Data/Tor tor-launcher at torproject.org/Tor
rm -Rf tor-browser_en-US
cd ../../../
mv bundle tor-messenger
+[% IF c('var/windows') -%]
+makensis tor-messenger.nsi
+mv tor-messenger-install.exe [% dest_dir _ '/' _ c('filename') %]
+[% ELSE -%]
[% c('tar', {
tar_src => [ 'tor-messenger' ],
tar_args => '-cJf ' _ dest_dir _ '/' _ c('filename'),
}) %]
+[% END -%]
diff --git a/projects/tor-messenger/config b/projects/tor-messenger/config
index d8bd789..e5aec36 100644
--- a/projects/tor-messenger/config
+++ b/projects/tor-messenger/config
@@ -1,6 +1,6 @@
# vim: filetype=yaml
version: 0.0.5
-filename: 'tor-messenger-[% c("version") %]-[% c("var/osname") %]-[% c("var/build_id") %].tar.xz'
+filename: 'tor-messenger-[% c("version") %]-[% c("var/osname") %]-[% c("var/build_id") %].[% c("var/filename_ext") %]'
input_files:
- name: instantbird
project: instantbird
@@ -14,6 +14,10 @@ input_files:
name: gcc
enable: '[% c("var/linux") %]'
- filename: start-tor-messenger
+ - filename: tor-messenger.nsi
+ enable: '[% c("var/windows") %]'
+ - filename: tor-messenger.ico
+ enable: '[% c("var/windows") %]'
- project: docker-image
remote_docker: 1
@@ -22,6 +26,17 @@ lsb_release:
release: 12.04
codename: precise
var:
+ filename_ext: 'tar.xz'
deps:
- p7zip-full
- bzip2
+targets:
+ windows-i686:
+ lsb_release:
+ id: Ubuntu
+ release: 14.10
+ codename: utopic
+ var:
+ filename_ext: 'exe'
+ arch_deps:
+ - nsis
diff --git a/projects/tor-messenger/tor-messenger.nsi b/projects/tor-messenger/tor-messenger.nsi
index e1862d1..eabe6f3 100644
--- a/projects/tor-messenger/tor-messenger.nsi
+++ b/projects/tor-messenger/tor-messenger.nsi
@@ -1,4 +1,5 @@
-;NSIS Installer for Tor Browser Bundle
+;NSIS Installer for Tor Messenger
+;Based on NSIS Installer for Tor Browser Bundle
;Written by Moritz Bartl
;released under Public Domain
@@ -10,14 +11,14 @@
;--------------------------------
;General
- ; location of Tor Browser bundle to put into installer
- !define TBBSOURCE ".\Tor Browser\"
+ ; location of Tor Messenger to put into installer
+ !define TBBSOURCE ".\tor-messenger\"
- Name "Tor Browser"
- OutFile "torbrowser-install.exe"
+ Name "Tor Messenger"
+ OutFile "tor-messenger-install.exe"
;Default installation folder
- InstallDir "$DESKTOP\Tor Browser"
+ InstallDir "$DESKTOP\Tor Messenger"
;Best (but slowest) compression
SetCompressor /SOLID lzma
@@ -29,14 +30,14 @@
;--------------------------------
;Interface Configuration
- !define MUI_ICON "torbrowser.ico"
+ !define MUI_ICON "tor-messenger.ico"
!define MUI_ABORTWARNING
;--------------------------------
;Modern UI settings
!define MUI_FINISHPAGE_NOREBOOTSUPPORT ; we don't require a reboot
!define MUI_FINISHPAGE_RUN
- !define MUI_FINISHPAGE_RUN_FUNCTION "StartTorBrowser"
+ !define MUI_FINISHPAGE_RUN_FUNCTION "StartTorMessenger"
!define MUI_FINISHPAGE_SHOWREADME ; misuse for option to create shortcut; less ugly than MUI_PAGE_COMPONENTS
!define MUI_FINISHPAGE_SHOWREADME_TEXT "&Add Start Menu && Desktop shortcuts"
!define MUI_FINISHPAGE_SHOWREADME_FUNCTION "CreateShortCuts"
@@ -125,19 +126,19 @@
;--------------------------------
;Installer Sections
-Section "Tor Browser Bundle" SecTBB
+Section "Tor Messenger" SecTBB
SetOutPath "$INSTDIR"
File /r "${TBBSOURCE}\*.*"
- SetOutPath "$INSTDIR\Browser"
- CreateShortCut "$INSTDIR\Start Tor Browser.lnk" "$INSTDIR\Browser\firefox.exe"
+ SetOutPath "$INSTDIR\Messenger"
+ CreateShortCut "$INSTDIR\Start Tor Messenger.lnk" "$INSTDIR\Messenger\instantbird.exe"
SectionEnd
Function CreateShortcuts
- CreateShortCut "$SMPROGRAMS\Start Tor Browser.lnk" "$INSTDIR\Browser\firefox.exe"
- CreateShortCut "$DESKTOP\Start Tor Browser.lnk" "$INSTDIR\Browser\firefox.exe"
+ CreateShortCut "$SMPROGRAMS\Start Tor Messenger.lnk" "$INSTDIR\Messenger\instantbird.exe"
+ CreateShortCut "$DESKTOP\Start Tor Messenger.lnk" "$INSTDIR\Messenger\instantbird.exe"
FunctionEnd
;--------------------------------
@@ -154,14 +155,14 @@ FunctionEnd
Function CheckIfTargetDirectoryExists
${If} ${FileExists} "$INSTDIR\*.*"
- MessageBox MB_YESNO "The destination directory already exists. You can try to upgrade the Tor Browser Bundle, but if you run into any problems, use a new directory instead. Continue?" IDYES NoAbort
+ MessageBox MB_YESNO "The destination directory already exists. You can try to upgrade Tor Messenger, but if you run into any problems, use a new directory instead. Continue?" IDYES NoAbort
Abort
NoAbort:
${EndIf}
FunctionEnd
-Function StartTorBrowser
-ExecShell "open" "$INSTDIR/Start Tor Browser.lnk"
+Function StartTorMessenger
+ExecShell "open" "$INSTDIR/Start Tor Messenger.lnk"
FunctionEnd
More information about the tor-commits
mailing list