Packaging Unreal Build Configurations - packaging

I have integrated the Steam API with my project and I had to add the actual API to the include directories of my DebugGame_Editor Configuration as well as the library directory.
The editor has been building properly for a month and Steam runs in-game, but now I have gotten to packaging my game and I am getting an error:
Cannot open include file: 'steam/steam_api.h': No such file or directory.
I assume that the configuration that it is using to package the game is missing those include directories and the library directory. Which configuration does UE4 use when packaging a game for Win64? There are like 40, and I don't want to try each and every one.
Engine Version: 4.7.6 from source (GitHub)
Edit:
I have gone through all configurations in the configuration manager in Visual Studio and added the two directories to the include and library sections of both Win32 and x64 in all of them (except the ones that say Mac or IOS), but no dice. It still throws that error message when it is trying to build ProjectName.generated.cpp
I'm not sure what to try next.

So I was able to fix this problem by including the files with an absolute path, rather than relying on relative include paths.

Related

how to configure visual studio 2022 C++ project to redirect Dlls

I currently have an application under visual studio 2022, which uses the openworld_470.dll library
the app is working properly.
I would now like in the application to create a libs directory containing the openworld_470.dll libraries
the application no longer works when I move the libraries from the root of the application to the libs directory.
Do you have an idea to solve this linkage problem which seems simple at the base?
I added in the project configuration in the VC++ directories -> references directory $(CommonExecutablePath)\libs;
it still does not work.
By adding in the system PATH the path of my application/libs the app works but I don't have to modify the PATH.
The easiest option is to use SetDllDirectory to add the libs directory to your search path.
And then to set the loading of openworld_470.dll to be delayed. You can do this by adding /DELAYLOAD:openworld_470.dll to your linker settings.

MSBuild GenerateResource task produces resource file names with incomplete namespace, causing our app to crash at runtime

We build mobile apps using Xamarin Forms, with macOS building the iOS apps. We ran into an issue today that has left me scratching my head.
A normal build with embedded resource files looks like this:
CoreResGen:
/Library/Frameworks/Mono.framework/Versions/5.16.0/lib/mono/4.5/resgen.exe /useSourcePath
[....all of our references....]
/compile
Resources/HtmlStyleRes.resx,obj/BuildAgentRelease_iOS/ForumApp.Common.Resources.HtmlStyleRes.resources
Resources/TextRes.resx,obj/BuildAgentRelease_iOS/ForumApp.Common.Resources.TextRes.resources
Resources/TextRes.nb.resx,obj/BuildAgentRelease_iOS/ForumApp.Common.Resources.TextRes.nb.resources
So no surprises there; the .resx files are compiled into binary .resources files with the assembly namespace + folder name + resx filename.
However, we made a change to our directory structure on the build server, and this changed the output from CoreResGen:
CoreResGen:
/Library/Frameworks/Mono.framework/Versions/5.16.0/lib/mono/4.5/resgen.exe /useSourcePath
[....all of our references....]
/compile
Resources/HtmlStyleRes.resx,obj/BuildAgentRelease_iOS/ForumApp.Common.HtmlStyleRes.resources
Resources/TextRes.resx,obj/BuildAgentRelease_iOS/ForumApp.Common.TextRes.resources
Resources/TextRes.nb.resx,obj/BuildAgentRelease_iOS/ForumApp.Common.TextRes.nb.resources
Notice how the "Resources" folder was dropped from the .resources filename. When compiled into an app, this causes our app to crash at runtime, since the resource file namespace is now different.
We build our apps using self-hosted Azure agents. All apps are built from the same repository, and as part of an effort to streamline the build servers, we implemented a pipeline task to utilize a common repository folder for all builds. The Azure agent would normally build out of _work/build-id/s, and our pipeline task will symlink this directory to _work/g/repo-id so that multiple builds can share the same repository.
When we build with the repo in _work/build-id/s, everything is fine. When we build with the symlinked repo, the file namespace error occurs.
As far as we can tell, this happens on macOS, but not on Windows.
We have a possibly related issue that happens on macOS, but not on Windows. The following outputs are from macOS using mono:
Path.GetDirectoryName(#"Resources\TextRes.resx") => ""
Path.GetDirectoryName(#"Resources/TextRes.resx") => "Resources"
Path.GetDirectoryName is used in CreateCSharpManifestResourceName to create the output file name from Resources\TextRes.resx, but there appear to be guards replacing \ with / and I can't see why symlinking the source folder would trigger it.
Has anyone experienced this? Am I missing something obvious?

SDL2_ttf can't find entry point unless libfreetype-6.dll is in proj folder

I am working with SDL2 and its add-on libraries SDL2_image and SDL2_ttf, using Visual Studio 2017. The libraries, and the .dll files that come with them, are in another folder (C:\SDL2.0\lib\x86), which is in the system path.
When I run, it fails, with this error message:
The procedure entry point InterlockedCompareExchange#12 could not be located in the dynamic link library C:\SDL2.0\lib\x86\SDL2.ttf.dll.
I can fix this by putting libfreetype-6.dll, which comes with SDL2_ttf, in the same folder as the .vcxproj file; or in the Debug folder. I can also fix it by putting the .dll into c:\windows\SysWOW64. But I want to distribute my code, and I don't want to put that file in each folder or require users to have admin access (to access c:\windows\SysWOW64); I want Windows to find it in the PATH, as it does with the other .dll files it's using here.
A few things I tried as I looked around the web for solution (to no effect):
Recompiling libfreetype-6.dll
Downloading the latest versions of all associated libraries
Rearranging the .lib files in Project Properties, Linker, Input, Additional Dependencies. Admittedly I may not have tried all possible arrangements as there are several dependencies
regsvr32 libfreetype-6.dll. This led to a different error message:
The module "libfreetype-6.dll" may not be compatible with the version of Windows that you're running. Check if the module is compatible with an x86 (32-bit) or x64 (64-bit) version of regsvr32.exe.
I saw here that maybe I should use the version of regsvr32 in the system32 folder; when I do that, I get
The module "libfreetype-6.dll" was loaded but the entry-point DllRegisterServer was not found. Make sure that "libfreetype-6.dll" is a valid DLL or OCX file and then try again.
So: is there a way to get the program to find libfreetype-6.dll in another folder in the PATH, and eliminate the error message about the procedure entry point?
The program I'm testing on now is from the TrueType tutorial from the LazyFoo website (source).

cmake always use my pc installed library instead of my target path

I get a project that was built for x86, and I am trying to make it work with mips. But I encounter problem when modifying the CMakelists.txt.
So here is the problem, the following code always use my PC's x86 library:
PKG_CHECK_MODULES(LIBCRYPTO REQUIRED libcrypto)
IF(LIBCRYPTO_FOUND)
INCLUDE_DIRECTORIES(${LIBCRYPTO_INCLUDE_DIRS})
LINK_DIRECTORIES(${LIBCRYPTO_LIB_DIRS})
ENDIF(LIBCRYPTO_FOUND)
I googled and found they always use system library first and can use find_package with NO_CMAKE_SYSTEM_PATH flag. But its not working and give me the following message. I don't know what its talking about..
Could not find a package configuration file provided by "libcrypto" with
any of the following names:
libcryptoConfig.cmake
libcrypto-config.cmake
Add the installation prefix of "libcrypto" to CMAKE_PREFIX_PATH or set
"libcrypto_DIR" to a directory containing one of the above files. If
"libcrypto" provides a separate development package or SDK, be sure it has
been installed.
My question is how to properly link a library to the path I assigned to and works like original piece of code?

Deploying a JavaFX Application with IntelliJ

Ive gone through tons of documentation and tutorials but nothing seems to work. Heres what i need
I want to package an deploy a desktop JavaFX application as a self contained package for Mac and Windows.
I want the application to have a custom icon (of course)
I want this application to be able to reference a text file that is in a resources folder (that can be modified by the user) to connect to a database.
Here is what i have tried:
Building artifacts in IntelliJ -This creates a jar with related 3rd party jars and a bundle folder with an exe and dmg. The icon is the default java one, and i cant reference by db.config file from the exe or dmg, i can reference it from the jar however
Generating an ANT build file - Once created this file contains errors complaining that various tags are not allowed and that properties are not defined.
Ive tried placing my .ico image which is the same name as my deployed application in every possible folder.
Im in serious need of help.
build.xml : http://tinypic.com/r/2md2zbn/8