2

I have a python program which I have compiled into an exe using nuitka:

python -m nuitka --standalone --follow-imports --enable-plugin=qt-plugins --mingw64 rs_main.py

This creates a exe in a distfolder which contains many dll's and pyd's. This exe works. Also on somebody's else computer (when I send entire dist folder)

Now I used inno setup to create an installer.

#define MyAppName "Test"
#define MyAppVersion "0.1"
#define MyAppPublisher "testcompany"
#define MyAppURL "www.testcompany.nl"
#define MyAppExeName "rs_main.exe"

[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={{65359C01-197B-4EFF-9A75-E048817FD68C}
AppName={#MyAppName}
AppVersion={#MyAppVersion}
;AppVerName={#MyAppName} {#MyAppVersion}
AppPublisher={#MyAppPublisher}
AppPublisherURL={#MyAppURL}
AppSupportURL={#MyAppURL}
AppUpdatesURL={#MyAppURL}
DefaultDirName={pf}\{#MyAppName}
DisableProgramGroupPage=yes
OutputBaseFilename=setup
Compression=lzma
SolidCompression=yes

[Languages]
Name: "english"; MessagesFile: "compiler:Default.isl"

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

[Files]
Source: "D:\Users\user\Documents\1 - Projecten\test\trunk\rs_main.dist\rs_main.exe"; DestDir: "{app}";
Source: "D:\Users\user\Documents\1 - Projecten\test\trunk\rs_main.dist\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs
; NOTE: Don't use "Flags: ignoreversion" on any shared system files

[Icons]
Name: "{commonprograms}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"
Name: "{commondesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; 
Tasks: desktopicon

[Run]
Filename: "{app}\{#MyAppExeName}"; Description: "{cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}"; Flags: nowait postinstall skipifsilent

This inno setup file seems to work fine. It does create a setup.exe. Running this setup.exe does also seem to work fine. It runs the installer and I end up with all the files in the appropiate folder in c:\Program Files(x86)\test

However when I run it from this location it does not work! It crashes.

I found somewhere that this might be due to write permissions (although I would not know what in my program would need those). So I added a dirty fix to my inno setup file (which was suggested there):

[Dirs]
Name: {app}; Permissions: users-full

This did not work (but did I do it correctly?)

Finally I used event viewer to get a little more information and this told me:

Faulting application name: rs_main.exe, version: 0.0.0.0, time stamp: 0x5cb4928c
Faulting module name: python37.dll, version: 3.7.3150.1013, time stamp: 0x5c9954b1
Exception code: 0xc0000005
Fault offset: 0x000000000002324d
Faulting process id: 0x112d8
Faulting application start time: 0x01d4f398767f20e4
Faulting application path: C:\Program Files (x86)\test\rs_main.exe
Faulting module path: C:\Program Files (x86)\test\python37.dll

Does anyone have any idea where I should look next for a solution?

Edit: As mentioned in the comments I found out that it is not an inno setup problem. I will try some other things and come back with a new question if still needed.

user180146
  • 895
  • 2
  • 9
  • 18
  • If you copy the program manually to a subfolder of `Program Files` folder, does it work? – Martin Prikryl Apr 15 '19 at 15:26
  • @MartinPrikryl Yes I tried that as well. It does not work then. – user180146 Apr 15 '19 at 16:22
  • @martinprikyl so do I understand correctly that something is likely still missing? How do I find out what? – user180146 Apr 15 '19 at 17:23
  • Maybe, or there's some of the other problems summarized in my answer to the linked question. Try to copy the files to some other folder, where there's less chance for problems, like `C:\test`. – Martin Prikryl Apr 15 '19 at 18:16
  • @MartinPrikryl unfortunately copying to `c:\test` does not help. The program craches in this location as well. I also tried to copy it to `d:\test`. Here the program also crashes. So I would assume I am indeed missing something. I just dont know how to find out what – user180146 Apr 16 '19 at 07:02
  • I performed another test which makes it even a little weirder. I copied it to `d:\downloads\test` that did not work. However copying it to `d:\downloads\any_folder\test` does work. any_folder is empty except for test – user180146 Apr 16 '19 at 07:24
  • I cannot help you with the Python/Nuitka side of your problem. I suggest you start a new Python/Nuitka-specific question (no mention of Inno Setup not to deter those Python/Nuitka experts, who do not know Inno Setup). – Martin Prikryl Apr 16 '19 at 07:25

0 Answers0