Skip to content

Commit

Permalink
Merging installer branch r314 to 318. Added icon, changed makefile, a…
Browse files Browse the repository at this point in the history
…nd created nsi
  • Loading branch information
neaveru committed Feb 7, 2010
1 parent 5f398e2 commit 52f22e7
Show file tree
Hide file tree
Showing 7 changed files with 442 additions and 2 deletions.
339 changes: 339 additions & 0 deletions COPYING

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions Makefile
Expand Up @@ -61,6 +61,10 @@ install: $(TARGETS)
for dir in $(SUBDIRS); do \
make -C "$$dir" $@ || exit 1; \
done
for dir in 16 22 48; do \
(install -m 0755 -d $(PURPLE_PROTOCOL_PIXMAP_DIR)/$$dir && \
install -m 0644 data/prpltwtr$$dir.png $(PURPLE_PROTOCOL_PIXMAP_DIR)/$$dir/prpltwtr.png ) \
done

uninstall:
rm -f $(PURPLE_PLUGIN_DIR)/libpurple-twitter-protocol$(PLUGIN_SUFFIX)
Expand Down
Binary file added data/prpltwtr16.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added data/prpltwtr22.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added data/prpltwtr48.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 1 addition & 2 deletions twitter.c
Expand Up @@ -604,8 +604,7 @@ static void twitter_get_rate_limit_status_cb(TwitterRequestor *r, xmlnode *node,
*/
static const char *twitter_list_icon(PurpleAccount *account, PurpleBuddy *buddy)
{
/* shamelessly steal (er, borrow) the meanwhile protocol icon. it's cute! */
return "meanwhile";
return "prpltwtr";
}

static char *twitter_status_text(PurpleBuddy *buddy) {
Expand Down
98 changes: 98 additions & 0 deletions twitter.nsi
@@ -0,0 +1,98 @@
; Script based on the facebook-chat nsi file


SetCompress off

; todo: SetBrandingImage
; HM NIS Edit Wizard helper defines
!define PRODUCT_NAME "prpltwtr"
!define PRODUCT_VERSION "0.40"
!define PRODUCT_PUBLISHER "Neaveru"
!define PRODUCT_WEB_SITE "http://code.google.com/p/libpurple-twitter-protocol/"
!define PRODUCT_UNINST_KEY "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}"
!define PRODUCT_UNINST_ROOT_KEY "HKLM"

; MUI 1.67 compatible ------
!include "MUI.nsh"

; MUI Settings
!define MUI_ABORTWARNING
!define MUI_ICON "${NSISDIR}\Contrib\Graphics\Icons\modern-install.ico"
!define MUI_UNICON "${NSISDIR}\Contrib\Graphics\Icons\modern-uninstall.ico"

; Welcome page
!insertmacro MUI_PAGE_WELCOME
; License page
!insertmacro MUI_PAGE_LICENSE "COPYING"
; Instfiles page
!insertmacro MUI_PAGE_INSTFILES
!define MUI_FINISHPAGE_RUN
!define MUI_FINISHPAGE_RUN_TEXT "Run Pidgin"
!define MUI_FINISHPAGE_RUN_FUNCTION "RunPidgin"
!insertmacro MUI_PAGE_FINISH

; Uninstaller pages
;!insertmacro MUI_UNPAGE_INSTFILES

; Language files
!insertmacro MUI_LANGUAGE "English"

; MUI end ------

Name "${PRODUCT_NAME} ${PRODUCT_VERSION}"
OutFile "${PRODUCT_NAME}.exe"

Var "PidginDir"

ShowInstDetails show
ShowUnInstDetails show

Section "MainSection" SEC01
;Check for pidgin installation
Call GetPidginInstPath

SetOverwrite try

SetOutPath "$PidginDir\pixmaps\pidgin"
File "/oname=protocols\16\prpltwtr.png" "data\prpltwtr16.png"
File "/oname=protocols\22\prpltwtr.png" "data\prpltwtr22.png"
File "/oname=protocols\48\prpltwtr.png" "data\prpltwtr48.png"

;SetOutPath "$PidginDir\ca-certs"
;File "login.facebook.com.pem"

SetOverwrite try
copy:
ClearErrors
Delete "$PidginDir\plugins\libpurple-twitter-protocol.dll"
IfErrors dllbusy
SetOutPath "$PidginDir\plugins"
File "libpurple-twitter-protocol.dll"
Goto after_copy
dllbusy:
MessageBox MB_RETRYCANCEL "libpurple-twitter-protocol.dll is busy. Please close Pidgin (including tray icon) and try again" IDCANCEL cancel
Goto copy
cancel:
Abort "Installation of prpltwtr aborted"
after_copy:

;SetOutPath "$PidginDir"
;File "libjson-glib-1.0.dll"

SectionEnd

Function GetPidginInstPath
Push $0
ReadRegStr $0 HKLM "Software\pidgin" ""
IfFileExists "$0\pidgin.exe" cont
ReadRegStr $0 HKCU "Software\pidgin" ""
IfFileExists "$0\pidgin.exe" cont
MessageBox MB_OK|MB_ICONINFORMATION "Failed to find Pidgin installation."
Abort "Failed to find Pidgin installation. Please install Pidgin first."
cont:
StrCpy $PidginDir $0
FunctionEnd

Function RunPidgin
ExecShell "" "$PidginDir\pidgin.exe"
FunctionEnd

0 comments on commit 52f22e7

Please sign in to comment.