We have a OSS project and I'm trying to upgrade to Inno Setup 6.0.5. When I compile the build script locally, it works as expected. However, when I try to build it via AppVeyor, it can't find the files. I've tried both:
using full path (this was working with 5.6.1):
#define BuildDir ExtractFileDir(ExtractFileDir(SourcePath)) + "\bin\"
#define IncludesDir SourcePath + "Includes\"
#define GraphicsDir SourcePath + "Graphics\"
...
WizardSmallImageFile={#GraphicsDir}Rubberduck.Duck.Small.55x55.bmp, \
{#GraphicsDir}Rubberduck.Duck.Small.64x68.bmp, \
{#GraphicsDir}Rubberduck.Duck.Small.83x80.bmp, \
{#GraphicsDir}Rubberduck.Duck.Small.92x97.bmp, \
{#GraphicsDir}Rubberduck.Duck.Small.110x106.bmp, \
{#GraphicsDir}Rubberduck.Duck.Small.119x123.bmp, \
{#GraphicsDir}Rubberduck.Duck.Small.138x140.bmp
WizardImageFile={#GraphicsDir}Rubberduck.Duck.164x314.bmp, \
{#GraphicsDir}Rubberduck.Duck.192x386.bmp, \
{#GraphicsDir}Rubberduck.Duck.246x459.bmp, \
{#GraphicsDir}Rubberduck.Duck.273x556.bmp, \
{#GraphicsDir}Rubberduck.Duck.328x604.bmp, \
{#GraphicsDir}Rubberduck.Duck.355x700.bmp
using wildcards:
#define BuildDir ExtractFileDir(ExtractFileDir(SourcePath)) + "\bin\"
#define IncludesDir SourcePath + "Includes\"
#define GraphicsDir SourcePath + "Graphics\"
#define WizardImageFilesDir GraphicsDir + "WizardImageFiles\"
#define WizardSmallImageFilesDir GraphicsDir + "WizardSmallImageFiles\"
...
WizardSmallImageFile={#WizardSmallImageFilesDir}Rubberduck.Duck.Small.*.bmp
WizardImageFile={#WizardImageFilesDir}Rubberduck.Duck.*.bmp
The files exist at the expected location, and are valid bitmaps. However, on AppVeyor we get this error:
Creating output directory: C:\projects\rubberduck\Rubberduck.Deployment\InnoSetup\Installers
Reading file (LicenseFile)
Reading file (WizardImageFile)
File: C:\projects\rubberduck\Rubberduck.Deployment\InnoSetup\Graphics\WizardImageFiles\Rubberduck.Duck.*.bmp
Error on line 81 in C:\projects\rubberduck\Rubberduck.Deployment\InnoSetup\Rubberduck.Installer.Build.iss: Could not read "C:\projects\rubberduck\Rubberduck.Deployment\InnoSetup\Graphics\WizardImageFiles\Rubberduck.Duck.*.bmp".
Error: The filename, directory name, or volume label syntax is incorrect.
Compile aborted.
We install Inno Setup using Chocolately. We found that we had to explicitly specify the version; otherwise, it'd use 5.5.9 instead of 6.0.5:
Original:
- cinst innosetup -version 5.6.1
Modified:
- cinst innosetup --version=6.0.5
Full AppVeyor console output (includes several pragma message) can be seen here.
Full ISS build script can be seen here.
Full Appveyor YML can be seen here.
Why would it work locally but fail on Appveyor?
Although you claim otherwise, you are still using 5.5.9:
Compiler engine version: Inno Setup 5.5.9 (u)
Wildcards in Wizard*ImageFile directives are supported since Inno Setup 5.6 only.
Though your script seems to install 6.0.5. As it is a different major version, it's in a different path, C:\Program Files (x86)\Inno Setup 6\ rather than C:\Program Files (x86)\Inno Setup 5\. AppVeyor comes with 5.5.9 preinstalled, which is probably, why, when time comes to run the build script, 5.5.9 gets executed instead. Try using the full path to the iscc to ensure, that you are running the correct major version of Inno Setup.
Related
I am currently working on a project that requires llvm-hs package. Since this package only supports up to llvm-9, while I do have llvm-13 installed on my machine for other projects, I built llvm-9 from source on my machine, and added its bin to PATH. However, it seems that when the C compiler was resolving the .inc files included in llvm-9's header files (e.g. #include "llvm/IR/Attributes.inc" in llvm/IR/Attributes.h), it incorrectly used those from /usr/include rather than those from the built llvm-9.
My observation is that GHC uses llvm-config to determine the relevant compiler arguments. On this machine, llvm-config-9 --includedir gives me {llvm-9-src-dir}/llvm/include, which is missing {llvm-9-src-dir}/build/include/ (where the correct .inc files are located). How should I build my llvm-9 such that llvm-config gives the correct includedir? The cmake configurations I used for building my llvm-9 was:
cmake ../llvm \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=/opt/llvm90 \
-DLLVM_BUILD_LLVM_DYLIB=ON \
-DLLVM_LINK_LLVM_DYLIB=ON \
-DLLVM_INSTALL_UTILS=ON \
-DLLVM_ENABLE_RTTI=ON \
-DLLVM_ENABLE_FFI=ON \
-DLLVM_BUILD_TESTS=OFF \
-DLLVM_ENABLE_DOXYGEN=OFF \
-DLLVM_ENABLE_PROJECTS=clang
I am working with Linux built with Yocto. I would like to add to the image my app to /bin and some header file to /usr/include. I have no problem with adding the app to /bin, but I am not able to add the header file to my rootfs. The .h file is added to a proper package, but it is not copied to rootfs.
Here is my recipe:
bindir = "${localdir}/bin"
incldir = "${localdir}/usr/include"
FILESEXTRAPATHS_prepend := "${THISDIR}/files/:"
SRC_URI = "file://My_app_dir/* \
\
"
S = "${WORKDIR}"
FILES_${PN} += "${incldir}/*"
do_compile() {
cd My_app_dir/src
make
}
do_install() {
install -d ${D}${bindir}
cp "${S}/My_app_dir/src/my_app" "${D}${bindir}/my_app"
install -d ${D}${incldir}
cp "${S}/My_app_dir/some_lib.h" "${D}${incldir}/some_lib.h"
}
After building the image, the include file exists in /build/tmp/work/<machine>/<my_app>/image/usr/include.
Do you have any idea why I cannot add .h file to /usr/include in rootfs? Thank you in advance for any help.
The header files (among other files like pkgconfig and shared library symlinks) are not added to the main package (say foo), but to the development package (e.g. foo-dev). This is called package split and you can learn more in the Package Splitting of the official documentation. The development packages (and BTW also the debug foo-dbg) are not installed by default.
But please be aware that adding the development package may pull other dependencies (because of various runtime dependencies) and files (there are other files in the development package).
Please note that your line FILES_${PN} += "${incldir}/*" has no effect, as the files in $includedir (i.e. FILES_${PN}-dev) are split before the FILES_${PN} are processed. The order is defined in the variable PACKAGES (check the official documentation).
BTW, there are minor things in the recipe which you can update (unrelated to your question though):
You can use location of standard system paths in the respective variables bindir, includedir etc.
install is preferred over the cp in do_install.
The line FILESEXTRAPATHS_prepend := "${THISDIR}/files/:" is needed only in bbappends. The files directory inside the recipe's directory is in the standard search path of files (among other paths like ${PN} etc.).
I'm building Skia on Windows following this link.
For Windows x64 the build was quite smooth. But not for 32 bit.
1) I tried specifying target_cpu = "x86" instead of target_cpu = "x64", gn gen works fine but ninja throws errors complaining that the paths to visual studio contain spaces. It has all sorts of errors similar to the following:
"C:\Programs " is not a valid path.
2) I tried generating sln files and building from within IDE (which is an alternative as mentioned in the link). However, I can't even get the x64 version to compile this way (a lot of non-zero exit codes from ninja, no further messages observed).
3) I tried using the toolchain that the website claims to be "the only way to support 32 bit builds". The toolchain is to be downloaded using the following command (to be executed in skia dir):
python infra/bots/assets/win_toolchain/download.py -t C:/toolchain
I managed to work around loads of intricacies (gutil conflicts, .py extension omissions, path variables, to google cloud service) and I'm now stuck at this:
Logged in as xxxxxxxxxxxxxxxx
AccessDeniedException: 403 Caller does not have storage.objects.list access to bucket skia-buildbots.
I'm not restricted to the way it is built so long as it generates the "libs" for me. But with a large project having so many external dependencies I don't think it's easy to brew my own way.
One solution I've found:
Open the out\Release\toolchain.ninja text file (or the toolchain.ninja specific to your configuration)
Remove the following string (you can use a "Replace Text" with an empty string in your text editor):
C:/Program Files (x86)/Microsoft Visual Studio 14.0/win_sdk/bin/SetEnv.cmd /x86 && C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/amd64_x86/
from everywhere (in case that you've used the x86, for x64 the string might be different)
And use ninja -C out/Release dm as usual
In this way we are using a toolchain where cl.exe, ml.exe link.exe commands are called directly (accesible from the PATH environment)
An other solution base on #dacap's. But I edit the gn configure instead.
Change file gn/toolchain/BUILD.gn
...
if (msvc == 2015) {
bin = "$win_vc/bin/amd64"
} else {
bin = "$win_vc/Tools/MSVC/$win_toolchain_version/bin/HostX64/$target_cpu"
}
env_setup = ""
if (target_cpu == "x86") {
# Toolchain asset includes a script that configures for x86 building.
# We don't support x86 builds with local MSVC installations.
env_setup = "cmd /c $win_sdk/bin/SetEnv.cmd /x86 && "
}
...
To
...
if (msvc == 2015) {
if (target_cpu == "x86") {
bin = "$win_vc/bin"
} else {
bin = "$win_vc/bin/amd64"
}
} else {
bin = "$win_vc/Tools/MSVC/$win_toolchain_version/bin/HostX64/$target_cpu"
}
env_setup = ""
#if (target_cpu == "x86") {
# # Toolchain asset includes a script that configures for x86 building.
# # We don't support x86 builds with local MSVC installations.
# env_setup = "cmd /c $win_sdk/bin/SetEnv.cmd /x86 && "
#}
.....
It seems that (as of skia m67) #WinCloud's fix is partially merged to upstream (still has to remove env_setup part though).
However, as noted in comments - it will crash during OpenGL initialization.
I've fixed all that (at least to the point where demo apps are runnable), as a little extra - fixed .lib compatibility with Visual Studio's Debug configurations.
Included are .bat files that build "no system libs" configuration with Clang (as the readme explicitly states that VC++ builds may have performance issues). To use those just download latest LLVM from https://releases.llvm.org/download.html and install it into default location (tested with 6.0.0).
If you need DLL runtime linking you'll have to edit gn/BUILD.gn file - add /MD flag by default and change /MTd to /MDd for debug.
Here's patch based on chrome/m67 branch:
https://gist.github.com/Alexx999/39eae9182eecaa3dc06e73fdb3a1e7d9
I want my Inno Setup script to be build using the command line, and I want to pass in the product version number as a parameter. I am trying to implement it like so:
[setup]
VersionInfoVersion={param:version|0.0.0.0}
However the compiler informs me this is invalid for that directive. I have read this post on how to pass in custom parameters from the command line and assume I should just be able to pass in something like:
compil32 /cc "c:\isetup\samples\my script.iss" /version=1.0.0.0
I have also tried the suggestion from this post and tried doing the following:
#define PathToMyBinary "C:\bin\x64\Release"
#define ApplicationVersion GetFileVersion('#PathToMyBinary\MyBinary.dll')
VersionInfoVersion={#ApplicationVersion}
But it doesn't seem to return anything. Both approaches seem valid to me so I'm hoping someone can explain where I am going wrong.
Assuming you define the version via a pre-processor variable like:
[Setup]
VersionInfoVersion={#ApplicationVersion}
To set the version on a command-line, you have to use the ISCC.exe command-line compiler and its /D switch:
ISCC.exe Example1.iss /DApplicationVersion=1.2.3.4
If you want to provide a default value for the version, so the script can compile even without defining the variable on the command line, use #ifndef at the top of the script:
#ifndef ApplicationVersion
#define ApplicationVersion "1.2.3.4"
#endif
To read the version from a binary, you are correctly using the GetFileVersion pre-processor function.
But your syntax to make up the path is wrong.
A correct syntax is PathToMyBinary + '\MyBinary.dll', like:
#define PathToMyBinary "C:\bin\x64\Release"
#define ApplicationVersion GetFileVersion(PathToMyBinary + '\MyBinary.dll')
See Inno Setup Preprocessor: Expression Syntax.
After looking at many different options I found that this worked for me.
This is the command line to compile the setup file
"C:\Program Files (x86)\Inno Setup 5\iscc.exe" "MySetup.iss" /DVersion=1.2.3.4
In the setup file I added these lines, the first lines are to enable you to still run the script in the editor and ensure you would not get the error: Undeclared identifier: "Version"
#ifndef Version
#define Version = '0.0.0.0';
#endif
[Setup]
VersionInfoVersion={#Version}
In order to get my setup script (iss file) to work, I had to remove the #define ApplicationVersion line from my script. Once I did that, it recognized my /DApplicationVersion=8 input parameter.
"C:\Program Files (x86)\Inno Setup 5\iscc.exe" "install.iss" /DApplicationVersion=8
I'm compiling tesseract-android-tools-1.00 by using android-ndk r8b(Tesseract-android-tools contain the android tools for compiling tesseract OCR,Leptonica and Jpeg libraries.)
The README file instructions say that the three libraries are to be put under "external" folder which is under the project folder(here "tesseract-android-tools-1.00" folder).
Then the folder structure would be :
tesseract-android-tools-1.00/external/libjpeg/
tesseract-android-tools-1.00/external/tesseract-3.00/
tesseract-android-tools-1.00/external/leptonlib-1.66/
When I run ndk-build under project folder(tesseract-android-tools-1.00 folder),I got the following error.
G:\eclipse\ws\tesseract-android-tools-1.00>ndk-build
Install : libjpeg.so => libs/armeabi/libjpeg.so
make: * No rule to make target /jni/com_googlecode_lepttonica_android/stdio/open_memstream.c', needed byobj/local/armeabi/objs/lept/jni/com_googlecode_leptonica_android/stdio/open_memstream.o'. Stop.
Before this error,I've come through some errors such as "**No rules to make target..", "**No target found..,needed by ..".
I fixed the errors by modifing the content of tesseract-android-tools-1.00/jni/Android.mk file,
from...
.........
# TESSERACT_PATH :=
# LEPTONICA_PATH :=
# LIBJPEG_PATH := "
.........
to...
............
TESSERACT_PATH := external/tesseract-3.00
LEPTONICA_PATH := eclipse/ws/tesseract-android-tools-1.00/external/leptonlib-1.66
LIBJPEG_PATH := g:/eclipse/ws/tesseract-android-tools-1.00/external/libjpeg
...........
I've to do this because I'm using on Windows7 and cannot perform Linux commands as shown in README file...
export TESSERACT_PATH=${PWD}/tesseract-3.00
export LEPTONICA_PATH=${PWD}/leptonlib-1.66
export LIBJPEG_PATH=${PWD}/libjpeg"
Note:I downloaded libjpeg from github ... as a tag of android-2.2.3_r2.1-0
The tesseract-android-tools-1.00 file in the Downloads section is old and doesn't work.
Instead, you should clone the latest code from the repository using this command:
git clone https://code.google.com/p/tesseract-android-tools/