Commit 3dafe898 authored by rgaudin's avatar rgaudin
Browse files

Added support for version metadata in Windows App

parent 4f27cb9e
# -*- mode: python -*-
import os
import sys
import site
sys.path += [os.path.join(os.getcwd(), 'pibox-installer')]
from version import get_version_str, get_short_version_str
# update version number for exe metadata
rsc = os.path.join('windows_bundle', 'resources.rc')
with open(rsc, 'r') as f:
content = f.read().replace("VERSION_TUPLE", get_short_version_str(",")) \
.replace("VERSION_STR", get_version_str())
with open(rsc, 'w') as f:
f.write(content)
block_cipher = None
typelib_path = os.path.join(site.getsitepackages()[1], 'gnome', 'lib', 'girepository-1.0')
......
# -*- mode: python -*-
import os
import sys
import site
sys.path += [os.path.join(os.getcwd(), 'pibox-installer')]
from version import get_version_str, get_short_version_str
# update version number for exe metadata
rsc = os.path.join('windows_bundle', 'resources.rc')
with open(rsc, 'r') as f:
content = f.read().replace("VERSION_TUPLE", get_short_version_str(",")) \
.replace("VERSION_STR", get_version_str())
with open(rsc, 'w') as f:
f.write(content)
block_cipher = None
typelib_path = os.path.join(site.getsitepackages()[1], 'gnome', 'lib', 'girepository-1.0')
......
This directory contains files for windows bundling.
* pibox-installer-sfx-conf.txt: the configuration for 7z SFX Builder
* kiwix-plug_installer.exe: a self extracting empty archive generated with 7z sfx builder using 7zS.sfx.
program run is launcher.exe
* resources.rc: source configuration of exe meta data
* sfxconfig.txt: configuration for 7z SFX creation
* reshack.txt: ResoucesHacker script to insert metadata and icon into exe
;!@Install@!UTF-8!
Title="Kiwix-plug installer"
MiscFlags="4"
RunProgram="launcher.exe"
;Config file generated by 7z SFX Builder v2.1. (http://sourceforge.net/projects/s-zipsfxbuilder/)
;!@InstallEnd@!
7zSFXBuilder_7zArchive=C:\Users\user\Desktop\empty_file.7z
7zSFXBuilder_SFXName=C:\Users\user\Desktop\kiwix-plug_installer.exe
7zSFXBuilder_SFXIcon=C:\Users\user\Pictures\pibox-installer-logo.ico
7zSFXBuilder_UseDefMod=7zsd_All
7zSFXBuilder_UPXCommands=--ultra-brute
7zSFXBuilder_Res_FileVersion=
7zSFXBuilder_Res_CompanyName=Kiwix
7zSFXBuilder_Res_Comments=
7zSFXBuilder_Res_FileDescription=
7zSFXBuilder_Res_ProductVersion=
7zSFXBuilder_Res_ProductName=Kiwix-plug installer
7zSFXBuilder_Res_LegalCopyright=
7zSFXBuilder_Res_LegalTrademarks=
7zSFXBuilder_Res_InternalName=
7zSFXBuilder_Res_OriginalFileName=
7zSFXBuilder_Res_SpecialBuild=
7zSFXBuilder_Res_PrivateBuild=
[FILENAMES]
Exe= kiwix-plug_installer.exe
SaveAs= kiwix-plug_installer.exe
[COMMANDS]
-addoverwrite icon.ico, ICONGROUP,MAINICON,0
-add resources.res,,,
VS_VERSION_INFO VERSIONINFO
FILEVERSION 1,0,0,0
PRODUCTVERSION VERSION_TUPLE,0,0
{
BLOCK "StringFileInfo"
{
BLOCK "040904b0"
{
VALUE "CompanyName", "Kiwix\0"
VALUE "FileDescription", "Kiwix-plug installer\0"
VALUE "FileVersion", "1.0.0.0\0"
VALUE "LegalCopyright", "Association Kiwix\0"
VALUE "OriginalFilename", "kiwix-plug_installer.exe\0"
VALUE "ProductName", "Kiwix-plug installer\0"
VALUE "ProductVersion", "VERSION_STR\0"
}
}
BLOCK "VarFileInfo"
{
VALUE "Translation", 0x409, 1200
}
}
;!@Install@!UTF-8!
Title="Kiwix-plug installer"
MiscFlags="4"
RunProgram="launcher.exe"
;!@InstallEnd@!
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment