简体   繁体   English

使用 Inno Setup 安装时,Python/Qt/SQLite3 应用程序不运行

[英]Python/Qt/SQLite3 application does not run when installed with Inno Setup

I have a program in Qt.我在 Qt 中有一个程序。 So I created the release with windeployqt.exe . --quick所以我用windeployqt.exe . --quick创建了这个版本windeployqt.exe . --quick windeployqt.exe . --quick It has an SQLite3 database, some modules I compiled in Python, a help folder with a User guide... it looks like this: windeployqt.exe . --quick它有一个 SQLite3 数据库,一些我用 Python 编译的模块,一个带有用户指南的帮助文件夹......它看起来像这样:

文件夹视图 Now, if I run pymepos.exe directly from here, everything works fine.现在,如果我直接从这里运行pymepos.exe ,一切正常。 The DB is clean and the Python modules are called and executed successfully.数据库是干净的,并且成功调用并执行了 Python 模块。 If I create an installer with Inno Setup for this files, after installing my own program I noticed I have some old stuff it used to be in the database.如果我使用 Inno Setup 为这些文件创建安装程序,在安装我自己的程序后,我注意到我有一些旧的东西,它曾经在数据库中。 Also it doesn't run my Python modules at all.它也根本不运行我的 Python 模块。 I'm walking blind here since I can't know what's going on (i don't have any log file or anything), if I check my modules separately they seem to work fine, but the main Qt program can't run them.我在这里瞎走,因为我不知道发生了什么(我没有任何日志文件或任何东西),如果我单独检查我的模块,它们似乎工作正常,但主 Qt 程序无法运行它们.

So at this point I reinstalled Inno Setup (thinking it might have a cache somewhere), moved my release files somewhere else, readded files to the .iss.所以此时我重新安装了 Inno Setup(认为它可能在某处有缓存),将我的发布文件移到其他地方,将文件读取到 .iss。 Compile and nothing, same thing.编译并没有,同样的事情。

Also, I did notice that running the installed pymepos.exe as administrator it will use the clean database that it is supposed to use, but still the modules don't seem to work.此外,我确实注意到以管理员身份运行已安装的pymepos.exe它将使用它应该使用的干净数据库,但这些模块似乎仍然不起作用。 Any Ideas?有任何想法吗?

Here's my .iss file:这是我的 .iss 文件:

; Script generated by the Inno Setup Script Wizard.
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!

[Setup]
; NOTE: The value of AppId uniquely identifies this application.
; Do not use the same AppId value in installers for other applications.
; (To generate a new GUID, click Tools | Generate GUID inside the IDE.)
AppId={{0BA2A484-5F5E-49F5-94AC-5C7410C70B30}
AppName=PYMEPOS
AppVersion=1.0.5
;AppVerName=PYMEPOS 1.0.5
AppPublisher=Cubix Softworks
DefaultDirName={pf}\Cubix506/PYMEPOS
DisableProgramGroupPage=yes
OutputDir=F:\installer_leon
SetupIconFile=D:\Proyectos\QT\PymePOS\project\res\icon.ico
Compression=lzma
SolidCompression=yes

[Languages]
Name: "spanish"; MessagesFile: "compiler:Languages\Spanish.isl"

[Tasks]
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked

[Files]
Source: "F:\release_leon\pymepos.exe"; DestDir: "{app}"; Flags: ignoreversion
Source: "F:\release_leon\D3Dcompiler_47.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "F:\release_leon\libEGL.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "F:\release_leon\libgcc_s_dw2-1.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "F:\release_leon\libGLESV2.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "F:\release_leon\libstdc++-6.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "F:\release_leon\libwinpthread-1.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "F:\release_leon\opengl32sw.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "F:\release_leon\Qt5Core.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "F:\release_leon\Qt5Gui.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "F:\release_leon\Qt5Network.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "F:\release_leon\Qt5Qml.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "F:\release_leon\Qt5Quick.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "F:\release_leon\Qt5Sql.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "F:\release_leon\Qt5Svg.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "F:\release_leon\Qt5Widgets.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "F:\release_leon\Qt5Xml.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "F:\release_leon\db\*"; DestDir: "{app}\db"; Flags: ignoreversion recursesubdirs createallsubdirs
Source: "F:\release_leon\help\*"; DestDir: "{app}\help"; Flags: ignoreversion recursesubdirs createallsubdirs
Source: "F:\release_leon\iconengines\*"; DestDir: "{app}\iconengines"; Flags: ignoreversion recursesubdirs createallsubdirs
Source: "F:\release_leon\imageformats\*"; DestDir: "{app}\imageformats"; Flags: ignoreversion recursesubdirs createallsubdirs
Source: "F:\release_leon\modules\*"; DestDir: "{app}\modules"; Flags: ignoreversion recursesubdirs createallsubdirs
Source: "F:\release_leon\platforms\*"; DestDir: "{app}\platforms"; Flags: ignoreversion recursesubdirs createallsubdirs
Source: "F:\release_leon\qmltooling\*"; DestDir: "{app}\qmltooling"; Flags: ignoreversion recursesubdirs createallsubdirs
Source: "F:\release_leon\sqldrivers\*"; DestDir: "{app}\sqldrivers"; Flags: ignoreversion recursesubdirs createallsubdirs
Source: "F:\release_leon\translations\*"; DestDir: "{app}\translations"; Flags: ignoreversion recursesubdirs createallsubdirs
; NOTE: Don't use "Flags: ignoreversion" on any shared system files

[Icons]
Name: "{commonprograms}\PYMEPOS"; Filename: "{app}\pymepos.exe"
Name: "{commondesktop}\PYMEPOS"; Filename: "{app}\pymepos.exe"; Tasks: desktopicon

[Run]
Filename: "{app}\pymepos.exe"; Description: "{cm:LaunchProgram,PYMEPOS}"; Flags: nowait postinstall skipifsilent

This is pretty vague question.这是一个很模糊的问题。 But to give you some possibilities:但给你一些可能性:

  • Your application is not designed to be run from a path with a space in the file name ( Program Files )您的应用程序并非设计为从文件名中包含空格的路径( Program Files )运行
  • Your application needs a write access to its installation folder.您的应用程序需要对其安装文件夹的写访问权限。 What it does not have, when run from Program Files .Program Files运行时,它没有什么。 The fact that you have less problems, when running the application as an Administrator suggests this is (one of) the problem.以管理员身份运行应用程序时,您遇到的问题较少,这一事实表明这是(之一)问题。

For a test, try to install the application to say C:\\PYMEPOS .对于测试,尝试安装应用程序以显示C:\\PYMEPOS


Ntb, Inno Setup does not cache any files. Ntb,Inno Setup 不缓存任何文件。 Reinstalling the Inno Setup won't fix anything.重新安装 Inno Setup 不会解决任何问题。 I do not think your problem has anything to do with the Inno Setup actually.我认为您的问题实际上与 Inno Setup 无关。


See also Application does not work when installed with Inno Setup .另请参阅使用 Inno Setup 安装时应用程序不起作用

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM