我在Qt有一个程序。所以我用windeployqt.exe . --quick
创建了这个版本它有一个SQLite3数据库,一些我用Python编译的模块,一个带有用户指南的帮助文件夹...它看起来像这样:
现在,如果我直接从这里运行pymepos.exe
,一切正常。数据库很干净,Python模块被调用并成功执行。
如果我使用Inno Setup为这些文件创建一个安装程序,在安装我自己的程序后,我注意到我有一些旧的东西,它曾经在数据库中。它也根本不运行我的Python模块。因为我不知道发生了什么(我没有任何日志文件或其他任何东西),我在这里盲目行走,如果我单独检查我的模块它们似乎工作正常,但主Qt程序无法运行它们
所以在这一点上我重新安装了Inno Setup(认为它可能在某个地方有一个缓存),将我的发布文件移动到其他地方,将文件读回到.iss。编译没什么,同样的事情。
另外,我确实注意到以管理员身份运行已安装的pymepos.exe
它将使用它应该使用的干净数据库,但模块似乎仍然不起作用。
有任何想法吗?
这是我的.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
答案 0 :(得分:1)
这是一个非常模糊的问题。但为了给你一些可能性:
Program Files
)C:\PYMEPOS
开始运行时没有的内容。当您以管理员身份运行应用程序时,您遇到的问题较少,这表明这是(其中一个)问题。对于测试,请尝试安装应用程序以说出from cache.models import Cache
Cache.clear()
。
Ntb,Inno Setup不会缓存任何文件。重新安装Inno Setup无法修复任何问题。我不认为你的问题与Inno Setup实际上有任何关系。