New windows freeze and packaging
git-svn-id: http://comictagger.googlecode.com/svn/trunk@31 6c5673fe-1810-88d6-992b-cd32ca31540c
This commit is contained in:
parent
140b7e84fb
commit
8d9145602d
25
windows/Makefile
Normal file
25
windows/Makefile
Normal file
@ -0,0 +1,25 @@
|
||||
TAGGER_BASE:= c:\Users\tony\Dropbox\tagger\comictagger
|
||||
DIST_DIR := $(TAGGER_BASE)\windows\dist
|
||||
NSIS_CMD := "C:\Program Files (x86)\NSIS\makensis.exe"
|
||||
|
||||
all: clean
|
||||
|
||||
win_dist:
|
||||
cd "$(TAGGER_BASE)" &
|
||||
"C:\Python27\Scripts\cxfreeze.bat" $(TAGGER_BASE)\tagger.py --icon nsis\app.ico --base-name=Win32GUI
|
||||
cp -R C:\Python27\Lib\site-packages\PyQt4\plugins\imageformats $(DIST_DIR)
|
||||
cp "$(TAGGER_BASE)\UnRAR2\UnRARDLL\unrar.dll" $(DIST_DIR)
|
||||
cp "$(TAGGER_BASE)\*.ui" $(DIST_DIR)
|
||||
cp "$(TAGGER_BASE)\nocover.png" $(DIST_DIR)
|
||||
cp "$(TAGGER_BASE)\app.png" $(DIST_DIR)
|
||||
|
||||
rm "$(DIST_DIR)\QtWebKit4.dll"
|
||||
rm "$(DIST_DIR)\PyQt4.QtWebKit.pyd"
|
||||
|
||||
$(NSIS_CMD) "$(TAGGER_BASE)\windows\nsis\comictagger.nsi"
|
||||
mv "$(TAGGER_BASE)\windows\nsis\ComicTagger*.exe" "$(TAGGER_BASE)\windows"
|
||||
|
||||
clean:
|
||||
rm -rf dist
|
||||
-rm -f "*~" *.pyc *.pyo
|
||||
-rm "$(TAGGER_BASE)\windows\*.exe"
|
1
windows/build.bat
Normal file
1
windows/build.bat
Normal file
@ -0,0 +1 @@
|
||||
make clean win_dist
|
1
windows/clean.bat
Normal file
1
windows/clean.bat
Normal file
@ -0,0 +1 @@
|
||||
make clean
|
BIN
windows/nsis/app.ico
Normal file
BIN
windows/nsis/app.ico
Normal file
Binary file not shown.
After Width: | Height: | Size: 62 KiB |
171
windows/nsis/comictagger.nsi
Normal file
171
windows/nsis/comictagger.nsi
Normal file
@ -0,0 +1,171 @@
|
||||
;ComicTagger Installer
|
||||
!addplugindir .
|
||||
|
||||
!include release.nsh
|
||||
|
||||
;--------------------------------
|
||||
;Include Modern UI
|
||||
|
||||
!include "MUI2.nsh"
|
||||
|
||||
;--------------------------------
|
||||
|
||||
;General
|
||||
;file name
|
||||
OutFile "ComicTagger v${RELEASE_STR}.exe"
|
||||
|
||||
;Default installation folder
|
||||
InstallDir "$PROGRAMFILES\ComicTagger"
|
||||
|
||||
;Request application privileges for Windows Vista
|
||||
RequestExecutionLevel admin
|
||||
|
||||
InstallDirRegKey HKLM "Software\ComicTagger" ""
|
||||
|
||||
;Show all languages, despite user's codepage
|
||||
;!define MUI_LANGDLL_ALLLANGUAGES
|
||||
|
||||
;--------------------------------
|
||||
;Variables
|
||||
|
||||
Var StartMenuFolder
|
||||
|
||||
;--------------------------------
|
||||
;Interface Configuration
|
||||
|
||||
!define MUI_ICON "installer.ico"
|
||||
!define MUI_WELCOMEFINISHPAGE_BITMAP "side_graphic.bmp" ;shoukd be 164x314
|
||||
!define MUI_HEADERIMAGE
|
||||
!define MUI_HEADERIMAGE_BITMAP "top_graphic.bmp" ; ;should be 150x57
|
||||
;!define MUI_ABORTWARNING
|
||||
!define MUI_WELCOMEPAGE_TITLE $(app_WelcomePageTitle)
|
||||
!define MUI_WELCOMEPAGE_TEXT $(app_WelcomePageText)
|
||||
|
||||
!define MUI_LICENSEPAGE_TEXT_TOP $(app_LicensePageTextTop)
|
||||
;!define MUI_LICENSEPAGE_TEXT_BOTTOM $(app_LicensePageTextBottom)
|
||||
;!define MUI_LICENSEPAGE_CHECKBOX
|
||||
|
||||
!define MUI_FINISHPAGE_NOAUTOCLOSE
|
||||
|
||||
!define MUI_FINISHPAGE_SHOWREADME "todo.txt"
|
||||
!define MUI_FINISHPAGE_SHOWREADME_TEXT "Show Release Notes"
|
||||
!define MUI_FINISHPAGE_SHOWREADME_NOTCHECKED
|
||||
|
||||
!define MUI_FINISHPAGE_TITLE $(app_FinishPageTitle)
|
||||
!define MUI_FINISHPAGE_TEXT $(app_FinishPageText)
|
||||
|
||||
!define MUI_FINISHPAGE_LINK $(app_FinishPageLink)
|
||||
!define MUI_FINISHPAGE_LINK_LOCATION "http://code.google.com/p/comictagger/"
|
||||
|
||||
;Start Menu Folder Page Configuration
|
||||
!define MUI_STARTMENUPAGE_REGISTRY_ROOT "HKLM"
|
||||
!define MUI_STARTMENUPAGE_REGISTRY_KEY "Software\ComicTagger"
|
||||
!define MUI_STARTMENUPAGE_REGISTRY_VALUENAME "Start Menu Folder"
|
||||
!define MUI_STARTMENUPAGE_DEFAULTFOLDER "ComicTagger"
|
||||
|
||||
;--------------------------------
|
||||
;Pages
|
||||
|
||||
!insertmacro MUI_PAGE_WELCOME
|
||||
|
||||
!insertmacro MUI_PAGE_LICENSE "license.txt"
|
||||
|
||||
!insertmacro MUI_PAGE_DIRECTORY
|
||||
!insertmacro MUI_PAGE_STARTMENU Application $StartMenuFolder
|
||||
!insertmacro MUI_PAGE_INSTFILES
|
||||
!insertmacro MUI_PAGE_FINISH
|
||||
|
||||
;--------------------------------
|
||||
;Languages
|
||||
!include "languages.nsh"
|
||||
|
||||
;--------------------------------
|
||||
;Reserve Files
|
||||
|
||||
;If you are using solid compression, files that are required before
|
||||
;the actual installation should be stored first in the data block,
|
||||
;because this will make your installer start faster.
|
||||
|
||||
!insertmacro MUI_RESERVEFILE_LANGDLL
|
||||
|
||||
;--------------------------------
|
||||
;App Name and file
|
||||
Name "$(app_AppName) ${RELEASE_STR}"
|
||||
|
||||
;Installer Sections
|
||||
|
||||
Section "Install Section" SecInstall
|
||||
|
||||
SetOutPath "$INSTDIR"
|
||||
File /r ..\dist\*
|
||||
File ..\..\todo.txt
|
||||
|
||||
;Store installation folder
|
||||
WriteRegStr HKLM "Software\ComicTagger" "" $INSTDIR
|
||||
|
||||
; Add registry entries for Control Panel Uninstall
|
||||
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\ComicTagger" \
|
||||
"DisplayName" "ComicTagger"
|
||||
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\ComicTagger" \
|
||||
"UninstallString" "$\"$INSTDIR\uninstall.exe$\""
|
||||
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\ComicTagger" \
|
||||
"QuietUninstallString" "$\"$INSTDIR\uninstall.exe$\" /S"
|
||||
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\ComicTagger" \
|
||||
"DisplayVersion" "${RELEASE_STR}"
|
||||
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\ComicTagger" \
|
||||
"Publisher" "ComicTagger"
|
||||
|
||||
;Create uninstaller
|
||||
WriteUninstaller "$INSTDIR\Uninstall.exe"
|
||||
|
||||
!insertmacro MUI_STARTMENU_WRITE_BEGIN Application
|
||||
|
||||
;Create shortcuts
|
||||
CreateDirectory "$SMPROGRAMS\$StartMenuFolder"
|
||||
CreateShortCut "$SMPROGRAMS\$StartMenuFolder\Uninstall.lnk" "$INSTDIR\Uninstall.exe"
|
||||
CreateShortCut "$SMPROGRAMS\$StartMenuFolder\ComicTagger.lnk" "$INSTDIR\tagger.exe"
|
||||
|
||||
!insertmacro MUI_STARTMENU_WRITE_END
|
||||
|
||||
CreateShortCut "$DESKTOP\ComicTagger.lnk" "$INSTDIR\tagger.exe" ""
|
||||
|
||||
|
||||
SectionEnd
|
||||
|
||||
;--------------------------------
|
||||
;Installer Functions
|
||||
|
||||
Function .onInit
|
||||
|
||||
!insertmacro MUI_LANGDLL_DISPLAY
|
||||
|
||||
FunctionEnd
|
||||
|
||||
|
||||
;--------------------------------
|
||||
;Uninstaller Section
|
||||
|
||||
Section "Uninstall"
|
||||
|
||||
Delete "$INSTDIR\*"
|
||||
RMDir /r "$INSTDIR\imageformats"
|
||||
RMDir /r "$INSTDIR\PyQt4.uic.widget-plugins"
|
||||
|
||||
Delete "$INSTDIR\Uninstall.exe"
|
||||
|
||||
RMDir "$INSTDIR"
|
||||
|
||||
Delete "$DESKTOP\ComicTagger.lnk"
|
||||
|
||||
!insertmacro MUI_STARTMENU_GETFOLDER Application $StartMenuFolder
|
||||
|
||||
Delete "$SMPROGRAMS\$StartMenuFolder\Uninstall.lnk"
|
||||
Delete "$SMPROGRAMS\$StartMenuFolder\ComicTagger.lnk"
|
||||
RMDir "$SMPROGRAMS\$StartMenuFolder"
|
||||
|
||||
DeleteRegKey /ifempty HKLM "Software\ComicTagger"
|
||||
DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\ComicTagger"
|
||||
|
||||
SectionEnd
|
||||
|
||||
|
BIN
windows/nsis/installer.ico
Normal file
BIN
windows/nsis/installer.ico
Normal file
Binary file not shown.
After Width: | Height: | Size: 62 KiB |
31
windows/nsis/languages.nsh
Normal file
31
windows/nsis/languages.nsh
Normal file
@ -0,0 +1,31 @@
|
||||
;--------------------------------------------------------------------------------------
|
||||
;------------ ENGLISH -----------------------------------------------------------------
|
||||
;--------------------------------------------------------------------------------------
|
||||
!insertmacro MUI_LANGUAGE "English" ;first language is the default language
|
||||
|
||||
LangString app_AppName ${LANG_ENGLISH} "ComicTagger"
|
||||
LangString app_WelcomePageTitle ${LANG_ENGLISH} \
|
||||
"ComicTagger Installer"
|
||||
LangString app_WelcomePageText ${LANG_ENGLISH} \
|
||||
"Release: ${RELEASE_STR}$\n$\r$\n$\r\
|
||||
This installer will guide you through the process of installing ComicTagger.$\n$\r $\n$\r"
|
||||
LangString app_LicensePageTextTop ${LANG_ENGLISH} "ComicTagger End-user License Agreement"
|
||||
LangString app_FinishPageTitle ${LANG_ENGLISH} \
|
||||
"ComicTagger Installer"
|
||||
LangString app_FinishPageText ${LANG_ENGLISH} \
|
||||
"Installation complete!"
|
||||
LangString app_FinishPageLink ${LANG_ENGLISH} "ComicTagger development site"
|
||||
|
||||
LangString LicenseFile ${LANG_ENGLISH} "license.txt" ;;these two should be the same
|
||||
LicenseLangString LicenseRTF ${LANG_ENGLISH} "license.txt"
|
||||
|
||||
;--------------------------------------------------------------------------------------
|
||||
;------------ SPANISH -----------------------------------------------------------------
|
||||
;--------------------------------------------------------------------------------------
|
||||
;!insertmacro MUI_LANGUAGE "Spanish"
|
||||
|
||||
;LangString app_AppName ${LANG_SPANISH} "ComicTagger Actualización"
|
||||
;LangString app_WelcomePageTitle ${LANG_SPANISH} "ComicTagger Actualización$"
|
||||
;LangString app_WelcomePageText ${LANG_SPANISH} "ES: Release: ${RELEASE_STR}$\n$\rBuild date: "
|
||||
|
||||
|
13
windows/nsis/license.txt
Normal file
13
windows/nsis/license.txt
Normal file
@ -0,0 +1,13 @@
|
||||
Copyright 2012 Anthony Beville
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
1
windows/nsis/release.nsh
Normal file
1
windows/nsis/release.nsh
Normal file
@ -0,0 +1 @@
|
||||
!define RELEASE_STR "1.0"
|
BIN
windows/nsis/side_graphic.bmp
Normal file
BIN
windows/nsis/side_graphic.bmp
Normal file
Binary file not shown.
After Width: | Height: | Size: 201 KiB |
BIN
windows/nsis/top_graphic.bmp
Normal file
BIN
windows/nsis/top_graphic.bmp
Normal file
Binary file not shown.
After Width: | Height: | Size: 34 KiB |
Loading…
Reference in New Issue
Block a user