mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Windows installer: Add some extra info to the registry
This commit is contained in:
parent
bf46edf785
commit
49bca5e19b
@ -11,12 +11,11 @@ from distutils.spawn import find_executable
|
||||
|
||||
from PyQt4 import pyqtconfig
|
||||
|
||||
from setup import isosx, iswindows, islinux
|
||||
from setup import isosx, iswindows, islinux, is64bit
|
||||
|
||||
OSX_SDK = '/Developer/SDKs/MacOSX10.5.sdk'
|
||||
|
||||
os.environ['MACOSX_DEPLOYMENT_TARGET'] = '10.5'
|
||||
is64bit = sys.maxsize > 2**32
|
||||
|
||||
NMAKE = RC = msvc = MT = win_inc = win_lib = win_ddk = win_ddk_lib_dirs = None
|
||||
if iswindows:
|
||||
|
@ -31,6 +31,7 @@
|
||||
</Upgrade>
|
||||
<CustomAction Id="PreventDowngrading" Error="Newer version already installed."/>
|
||||
|
||||
<Property Id="ApplicationFolderName" Value="{appfolder}" />
|
||||
<Property Id="APPLICATIONFOLDER">
|
||||
<RegistrySearch Id='calibreInstDir' Type='raw'
|
||||
Root='HKLM' Key="Software\{app}{x64}\Installer" Name="InstallPath" />
|
||||
@ -38,7 +39,7 @@
|
||||
|
||||
<Directory Id='TARGETDIR' Name='SourceDir'>
|
||||
<Directory Id='{ProgramFilesFolder}' Name='PFiles'>
|
||||
<Directory Id='APPLICATIONFOLDER' Name='{app}' />
|
||||
<Directory Id='APPLICATIONFOLDER' Name="{appfolder}" />
|
||||
</Directory>
|
||||
<Directory Id="ProgramMenuFolder">
|
||||
<Directory Id="ApplicationProgramsFolder" Name="{app}{x64} - E-book Management"/>
|
||||
@ -122,6 +123,10 @@
|
||||
<!-- Add icon to entry in Add/Remove programs -->
|
||||
<Icon Id="main_icon" SourceFile="{main_icon}"/>
|
||||
<Property Id="ARPPRODUCTICON" Value="main_icon" />
|
||||
<Property Id="ARPURLINFOABOUT" Value="http://calibre-ebook.com" />
|
||||
<Property Id='ARPHELPLINK' Value="http://calibre-ebook.com/help" />
|
||||
<Property Id='ARPURLUPDATEINFO' Value="http://calibre-ebook.com/download_windows" />
|
||||
<SetProperty Id="ARPINSTALLLOCATION" Value="[APPLICATIONFOLDER]" After="CostFinalize" />
|
||||
|
||||
<Condition
|
||||
Message="This application is only supported on {minverhuman}, or higher.">
|
||||
@ -166,7 +171,6 @@
|
||||
(i.e. per user installs should work) but left this way as I
|
||||
dont want to deal with the complications
|
||||
-->
|
||||
<Property Id="ApplicationFolderName" Value="Calibre2" />
|
||||
<Property Id="WixAppFolder" Value="WixPerMachineFolder" />
|
||||
<Property Id="ALLUSERS" Value="1" />
|
||||
<WixVariable Id="WixUISupportPerUser" Value="0" />
|
||||
|
@ -37,6 +37,7 @@ class WixMixIn:
|
||||
components = self.get_components_from_files()
|
||||
wxs = template.format(
|
||||
app = __appname__,
|
||||
appfolder = 'Calibre2',
|
||||
version = __version__,
|
||||
upgrade_code = UPGRADE_CODE,
|
||||
ProgramFilesFolder = 'ProgramFiles64Folder' if is64bit else 'ProgramFilesFolder',
|
||||
@ -118,7 +119,20 @@ class WixMixIn:
|
||||
(fid, f, x, checksum),
|
||||
'</Component>'
|
||||
]
|
||||
components.append(''.join(c))
|
||||
if x.endswith('.exe'):
|
||||
# Add the executable to app paths so that users can
|
||||
# launch it from the run dialog even if it is not on
|
||||
# the path. See http://msdn.microsoft.com/en-us/library/windows/desktop/ee872121(v=vs.85).aspx
|
||||
c[-1:-1] = [
|
||||
('<RegistryValue Root="HKLM" '
|
||||
'Key="SOFTWARE\Microsoft\Windows\CurrentVersion\App '
|
||||
'Paths\%s" Value="[#file_%d]" Type="string" />'%(x, fid)),
|
||||
('<RegistryValue Root="HKLM" '
|
||||
'Key="SOFTWARE\Microsoft\Windows\CurrentVersion\App '
|
||||
'Paths\{0}" Name="Path" Value="[APPLICATIONFOLDER]" '
|
||||
'Type="string" />'.format(x)),
|
||||
]
|
||||
components.append('\n'.join(c))
|
||||
return components
|
||||
|
||||
components = process_dir(os.path.abspath(self.base))
|
||||
|
@ -28,7 +28,7 @@ isunix = isosx or islinux
|
||||
isportable = os.environ.get('CALIBRE_PORTABLE_BUILD', None) is not None
|
||||
ispy3 = sys.version_info.major > 2
|
||||
isxp = iswindows and sys.getwindowsversion().major < 6
|
||||
is64bit = sys.maxint > (1 << 32)
|
||||
is64bit = sys.maxsize > (1 << 32)
|
||||
isworker = os.environ.has_key('CALIBRE_WORKER') or os.environ.has_key('CALIBRE_SIMPLE_WORKER')
|
||||
if isworker:
|
||||
os.environ.pop('CALIBRE_FORCE_ANSI', None)
|
||||
|
Loading…
x
Reference in New Issue
Block a user