amake / innosetup-docker

Docker image to create Windows installer executables with Inno Setup
https://hub.docker.com/r/amake/innosetup
Creative Commons Zero v1.0 Universal
71 stars 32 forks source link

ISSC script not able to access the script file. #2

Closed hash3liZer closed 3 years ago

hash3liZer commented 3 years ago

Hi, the ISSC.exe file isn't able to access the script file supplied as an argument. The build command:

$ docker built -t check/issc:latest .

But when i run the commands:

$ docker run --rm -v $PWD:/work check/issc ./helloworld.iss

It gives me the following error:

Inno Setup 6 Command-Line Compiler
Copyright (C) 1997-2020 Jordan Russell. All rights reserved.
Portions Copyright (C) 2000-2020 Martijn Laan. All rights reserved.
Portions Copyright (C) 2001-2004 Alex Yackimoff. All rights reserved.
https://www.innosetup.com

Compiler engine version: Inno Setup 6.1.2

Preprocessing
   Reading file: C:\Program Files\Inno Setup 6\ISPPBuiltins.iss
Parsing [Setup] section, line 2
Parsing [Setup] section, line 3
Parsing [Setup] section, line 4
Parsing [Setup] section, line 5
Parsing [Setup] section, line 6
Parsing [Setup] section, line 7
Parsing [Setup] section, line 8
Creating output directory: Z:\work\Output
Error in Z:\work\helloworld.iss: File access denied.
Compile aborted.

How can i fix it?

amake commented 3 years ago

I can't reproduce the issue. I used your exact sample commands (except substituted build for built in the first one) and got

% docker run --rm -v $PWD:/work check/issc ./helloworld.iss
Inno Setup 6 Command-Line Compiler
Copyright (C) 1997-2020 Jordan Russell. All rights reserved.
Portions Copyright (C) 2000-2020 Martijn Laan. All rights reserved.
Portions Copyright (C) 2001-2004 Alex Yackimoff. All rights reserved.
https://www.innosetup.com

Compiler engine version: Inno Setup 6.1.2

Preprocessing
   Reading file: C:\Program Files\Inno Setup 6\ISPPBuiltins.iss
Parsing [Setup] section, line 2
Parsing [Setup] section, line 3
Parsing [Setup] section, line 4
Parsing [Setup] section, line 5
Parsing [Setup] section, line 6
Parsing [Setup] section, line 7
Parsing [Setup] section, line 8
Reading file (WizardImageFile)
   Reading file: C:\Program Files\Inno Setup 6\WIZMODERNIMAGE.BMP
Reading file (WizardSmallImageFile)
   Reading file: C:\Program Files\Inno Setup 6\WIZMODERNSMALLIMAGE.BMP
Preparing Setup program executable
   Updating version info (SETUP.E32)
Determining language code pages
   Reading file: C:\Program Files\Inno Setup 6\Default.isl
   Messages in script file
Reading default messages from Default.isl
Parsing [LangOptions], [Messages], and [CustomMessages] sections
   Reading file: C:\Program Files\Inno Setup 6\Default.isl
   Messages in script file
Reading [Code] section
Compiling [Code] section
Deleting HelloWorld.exe from output directory
Creating setup files
   Compressing Setup program executable
   Updating version info (SETUP.EXE)

Successful compile (1.544 sec). Resulting Setup program filename is:
Z:\work\Output\HelloWorld.exe

What was your $PWD when you invoked the run command?

hash3liZer commented 3 years ago

Thanks for replying @amake . Nevermind, i got it solved. The problem was from my host machine Ubuntu. I just had to change permissions on my $PWD:

$ chmod 777 -R $PWD

And solved it out.

One question i had in mind though. Why use wine, when you have windows images on docker?

amake commented 3 years ago

Thanks for letting me know. I am primarily on macOS where permissions haven't been a problem. But I know that I've had more issues with permissions and Docker on Linux in CI, so I can imagine there might be some friction. If I had a better idea of what specific guidance to offer in this area, I would add it to the readme.

Why use wine, when you have windows images on docker?

Because Windows images on Docker can't run anywhere but on a Windows host.

hash3liZer commented 3 years ago

Ah, got it. My bad. Closing it out now. And i can do a pull request in meanwhile regarding the permissions thing on Linux.