Compare commits

..

31 Commits
dev ... master

Author SHA1 Message Date
c18b49149f Add new builds 2019-06-20 16:39:50 +02:00
7016c2e665 Update version string 2019-06-20 16:32:26 +02:00
72d228de52 Update instructions in .cfg files 2019-06-20 16:31:44 +02:00
c31868d320 Update README to include build instructions 2019-06-20 16:30:58 +02:00
8a42245e4f Upgraded python and modules 2019-06-20 14:55:29 +02:00
655d61ea84 Merge branch 'dev' 2019-06-20 11:36:12 +02:00
b9561ef60f Del builds 2019-06-20 10:55:43 +02:00
461d969f92 Merge branch 'dev' 2019-04-02 17:22:49 +02:00
3e35e6fb05 New builds 2019-04-02 12:09:54 +02:00
48465446ec Increment version to 3.1-1 2019-04-02 12:05:21 +02:00
971bf846ab Merge branch 'dev' 2019-04-02 12:03:37 +02:00
8138ebd95c Add builds 2019-03-25 09:49:35 +01:00
483d7e2f6f Fixed con files 2019-03-22 13:02:15 +01:00
e7f78e6e39 Increment version to 3.1 2019-03-22 12:51:33 +01:00
622ad63e0a Merge branch 'dev' 2019-03-22 12:27:09 +01:00
029f0c1396 Update binaries to 3.0-1 2019-03-05 14:39:00 +01:00
e19a9b5820 Remove previous builds 2019-03-05 14:26:05 +01:00
7513a2d2fb Increment version to 3.0-1 2019-03-05 13:30:17 +01:00
dcb4caacc6 Correct bug print card 2019-03-05 13:29:37 +01:00
bb7d96e5e0 Include builds 2019-03-05 10:23:08 +01:00
32300d81e4 Updates depenencies 2019-03-05 10:16:37 +01:00
cf625f5398 Edit version 2019-03-05 09:42:57 +01:00
5cf50a04dd Merge branch 'dev' 2019-03-05 09:40:29 +01:00
1dffdbeecd Added PyMuPDF dependency 2019-03-01 11:09:18 +01:00
56ea8c83bc Add exception .gitignore for builds 2019-02-20 15:04:06 +01:00
ad748edc81 Merge branch 'dev' 2019-02-08 12:41:42 +01:00
66ae8f4196 updated installers version to 2.5 2019-02-08 11:50:23 +01:00
bf1f125da1 updated version to 2.5 2019-02-08 11:43:57 +01:00
da302a3cd5 Merge branch 'dev' 2019-02-08 11:40:33 +01:00
6333ce531d created build.sh to build x86 and x64 2019-02-07 18:04:48 +01:00
7585d09f41 add distribution files in master 2019-02-07 17:54:26 +01:00
10 changed files with 316 additions and 3 deletions

6
.gitignore vendored
View File

@ -5,4 +5,8 @@ Clients_IFPass_backup.csv
IFPass.conf
Templates/IFPass_PDF_Template.pdf
Templates/IFPass_PNG_Template.png
build
build/x86/*
build/x64/*
# Except builds:
!build/x86/*x86.exe
!build/x64/*x64.exe

BIN
IF.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

View File

@ -23,7 +23,7 @@ from colorama import init
from termcolor import colored
version = '3.1-1' # dev/devnocam
version = '3.2' # dev/devnocam
configdir = os.path.join(os.getenv('PROGRAMDATA'), 'IFPass')
config = os.path.join(configdir, 'IFPass.conf')

189
Installer_Template.nsi Normal file
View File

@ -0,0 +1,189 @@
!define PRODUCT_NAME "[[ib.appname]]"
!define PRODUCT_VERSION "[[ib.version]]"
!define PY_VERSION "[[ib.py_version]]"
!define PY_MAJOR_VERSION "[[ib.py_major_version]]"
!define BITNESS "[[ib.py_bitness]]"
!define ARCH_TAG "[[arch_tag]]"
!define INSTALLER_NAME "[[ib.installer_name]]"
!define PRODUCT_ICON "[[icon]]"
; Marker file to tell the uninstaller that it's a user installation
!define USER_INSTALL_MARKER _user_install_marker
Unicode true
InstallDir "C:\IFPass"
SetCompressor lzma
[% block modernui %]
; Modern UI installer stuff
!include "MUI2.nsh"
!define MUI_ABORTWARNING
!define MUI_ICON "[[icon]]"
!define MUI_UNICON "[[icon]]"
; UI pages
[% block ui_pages %]
!insertmacro MUI_PAGE_WELCOME
[% if license_file %]
!insertmacro MUI_PAGE_LICENSE [[license_file]]
[% endif %]
!insertmacro MUI_PAGE_INSTFILES
!insertmacro MUI_PAGE_FINISH
[% endblock ui_pages %]
!insertmacro MUI_LANGUAGE "French"
[% endblock modernui %]
Name "${PRODUCT_NAME} ${PRODUCT_VERSION}"
OutFile "${INSTALLER_NAME}"
ShowInstDetails show
Section -SETTINGS
SetOutPath "$INSTDIR"
SetOverwrite ifnewer
SectionEnd
[% block sections %]
Section "!${PRODUCT_NAME}" sec_app
SetRegView [[ib.py_bitness]]
SetShellVarContext all
SectionIn RO
File ${PRODUCT_ICON}
SetOutPath "$INSTDIR\pkgs"
File /r "pkgs\*.*"
SetOutPath "$INSTDIR"
[% block install_files %]
; Install files
[% for destination, group in grouped_files %]
SetOutPath "[[destination]]"
[% for file in group %]
File "[[ file ]]"
[% endfor %]
[% endfor %]
; Install directories
[% for dir, destination in ib.install_dirs %]
SetOutPath "[[ pjoin(destination, dir) ]]"
File /r "[[dir]]\*.*"
[% endfor %]
[% endblock install_files %]
[% block install_shortcuts %]
; Install shortcuts
; The output path becomes the working directory for shortcuts
SetOutPath "$INSTDIR"
[% if single_shortcut %]
[% for scname, sc in ib.shortcuts.items() %]
CreateShortCut "$SMPROGRAMS\[[scname]].lnk" "[[sc['target'] ]]" \
'[[ sc['parameters'] ]]' "$INSTDIR\[[ sc['icon'] ]]"
CreateShortCut "$DESKTOP\[[scname]].lnk" "[[sc['target'] ]]" \
'[[ sc['parameters'] ]]' "$INSTDIR\[[ sc['icon'] ]]"
[% endfor %]
[% else %]
[# Multiple shortcuts: create a directory for them #]
CreateDirectory "$SMPROGRAMS\${PRODUCT_NAME}"
[% for scname, sc in ib.shortcuts.items() %]
CreateShortCut "$SMPROGRAMS\${PRODUCT_NAME}\[[scname]].lnk" "[[sc['target'] ]]" \
'[[ sc['parameters'] ]]' "$INSTDIR\[[ sc['icon'] ]]"
[% endfor %]
[% endif %]
SetOutPath "$INSTDIR"
[% endblock install_shortcuts %]
[% block install_commands %]
[% if has_commands %]
DetailPrint "Setting up command-line launchers..."
nsExec::ExecToLog '[[ python ]] -Es "$INSTDIR\_assemble_launchers.py" "$INSTDIR\bin"'
[% endif %]
[% endblock install_commands %]
; Byte-compile Python files.
DetailPrint "Byte-compiling Python modules..."
nsExec::ExecToLog '[[ python ]] -m compileall -q "$INSTDIR\pkgs"'
WriteUninstaller $INSTDIR\uninstall.exe
; Add ourselves to Add/remove programs
WriteRegStr SHCTX "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}" \
"DisplayName" "${PRODUCT_NAME}"
WriteRegStr SHCTX "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}" \
"UninstallString" '"$INSTDIR\uninstall.exe"'
WriteRegStr SHCTX "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}" \
"InstallLocation" "$INSTDIR"
WriteRegStr SHCTX "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}" \
"DisplayIcon" "$INSTDIR\${PRODUCT_ICON}"
[% if ib.publisher is not none %]
WriteRegStr SHCTX "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}" \
"Publisher" "[[ib.publisher]]"
[% endif %]
WriteRegStr SHCTX "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}" \
"DisplayVersion" "${PRODUCT_VERSION}"
WriteRegDWORD SHCTX "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}" \
"NoModify" 1
WriteRegDWORD SHCTX "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}" \
"NoRepair" 1
; Check if we need to reboot
IfRebootFlag 0 noreboot
MessageBox MB_YESNO "A reboot is required to finish the installation. Do you wish to reboot now?" \
/SD IDNO IDNO noreboot
Reboot
noreboot:
SectionEnd
Section "Uninstall"
SetRegView [[ib.py_bitness]]
SetShellVarContext all
Delete $INSTDIR\uninstall.exe
Delete "$INSTDIR\${PRODUCT_ICON}"
RMDir /r "$INSTDIR\pkgs"
; Remove ourselves from %PATH%
[% block uninstall_commands %]
[% if has_commands %]
nsExec::ExecToLog '[[ python ]] -Es "$INSTDIR\_system_path.py" remove "$INSTDIR\bin"'
[% endif %]
[% endblock uninstall_commands %]
[% block uninstall_files %]
; Uninstall files
[% for file, destination in ib.install_files %]
Delete "[[pjoin(destination, file)]]"
[% endfor %]
; Uninstall directories
[% for dir, destination in ib.install_dirs %]
RMDir /r "[[pjoin(destination, dir)]]"
[% endfor %]
[% endblock uninstall_files %]
[% block uninstall_shortcuts %]
; Uninstall shortcuts
[% if single_shortcut %]
[% for scname in ib.shortcuts %]
Delete "$SMPROGRAMS\[[scname]].lnk"
Delete "$DESKTOP\[[scname]].lnk"
[% endfor %]
[% else %]
RMDir /r "$SMPROGRAMS\${PRODUCT_NAME}"
[% endif %]
[% endblock uninstall_shortcuts %]
RMDir $INSTDIR
DeleteRegKey SHCTX "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}"
SectionEnd
[% endblock sections %]
; Functions
Function .onMouseOverSection
; Find which section the mouse is over, and set the corresponding description.
FindWindow $R0 "#32770" "" $HWNDPARENT
GetDlgItem $R0 $R0 1043 ; description item (must be added to the UI)
[% block mouseover_messages %]
StrCmp $0 ${sec_app} "" +2
SendMessage $R0 ${WM_SETTEXT} 0 "STR:${PRODUCT_NAME}"
[% endblock mouseover_messages %]
FunctionEnd

View File

@ -10,4 +10,3 @@ It allows to manage a subscriber database and print member cards.
3. Install the modules with `sudo -H pip install pynsist PyPDF2 termcolor`
4. If pynsist version < 2.4, replace `/usr/lib/python3.*/site-packages/nsist/__init__.py` with https://raw.githubusercontent.com/takluyver/pynsist/master/nsist/__init__.py
5. Run `./build.sh`

3
build.sh Normal file
View File

@ -0,0 +1,3 @@
#!/usr/bin/bash
pynsist installer-x86.cfg
pynsist installer-x64.cfg

Binary file not shown.

Binary file not shown.

59
installer-x64.cfg Normal file
View File

@ -0,0 +1,59 @@
[Application]
name=IFPass
version=3.2
entry_point=IFPass:main
icon=IF.ico
console=true
license_file=LICENSE
[Python]
version=3.7.3
bitness=64
[Include]
# Packages from PyPI that your application requires, one per line
# These must have wheels on PyPI:
# https://pypi.org/project/code128/
# https://pypi.org/project/colorama/
# https://pypi.org/project/pyfiglet/
# https://pypi.org/project/numpy/
# https://pypi.org/project/opencv-python/
# https://pypi.org/project/Pillow/
# https://pypi.org/project/pywin32/
# https://pypi.org/project/six/
# https://pypi.org/project/setuptools/
# https://pypi.org/project/PyMuPDF/
# https://pypi.org/project/pywinauto/
pypi_wheels=code128==0.3
colorama==0.4.1
pyfiglet==0.8.post1
numpy==1.16.4
opencv-python==4.1.0.25
Pillow==6.0.0
pywin32==224
six==1.12.0
setuptools==41.0.1
PyMuPDF==1.14.16
pywinauto==0.6.6
# Must check if future updates of the following packages provide .whl files
# Packages without wheels (Must be installed locally):
packages=PyPDF2
termcolor
# Other files and folders that should be installed
files = LICENSE
Templates
# This optional section adds a command which can be run from the Windows
# command prompt.
[Command IFPass]
entry_point=IFPass:main
[Build]
directory=build/x64
installer_name=${PRODUCT_NAME}_${PRODUCT_VERSION}-x64.exe
# Custom Installer :
# Added Desktop shortcut, modified working directory, modified default install and utf-8...
nsi_template=Installer_Template.nsi

59
installer-x86.cfg Normal file
View File

@ -0,0 +1,59 @@
[Application]
name=IFPass
version=3.2
entry_point=IFPass:main
icon=IF.ico
console=true
license_file=LICENSE
[Python]
version=3.7.3
bitness=32
[Include]
# Packages from PyPI that your application requires, one per line
# These must have wheels on PyPI:
# https://pypi.org/project/code128/
# https://pypi.org/project/colorama/
# https://pypi.org/project/pyfiglet/
# https://pypi.org/project/numpy/
# https://pypi.org/project/opencv-python/
# https://pypi.org/project/Pillow/
# https://pypi.org/project/pywin32/
# https://pypi.org/project/six/
# https://pypi.org/project/setuptools/
# https://pypi.org/project/PyMuPDF/
# https://pypi.org/project/pywinauto/
pypi_wheels=code128==0.3
colorama==0.4.1
pyfiglet==0.8.post1
numpy==1.16.4
opencv-python==4.1.0.25
Pillow==6.0.0
pywin32==224
six==1.12.0
setuptools==41.0.1
PyMuPDF==1.14.16
pywinauto==0.6.6
# Must check if future updates of the following packages provide .whl files
# Packages without wheels (Must be installed locally):
packages=PyPDF2
termcolor
# Other files and folders that should be installed
files = LICENSE
Templates
# This optional section adds a command which can be run from the Windows
# command prompt.
[Command IFPass]
entry_point=IFPass:main
[Build]
directory=build/x86
installer_name=${PRODUCT_NAME}_${PRODUCT_VERSION}-x86.exe
# Custom Installer :
# Added Desktop shortcut, modified working directory, modified default install and utf-8...
nsi_template=Installer_Template.nsi