UDK DLLBind how to - unreal-development-kit

I'm trying to use UDK's DLLBind feature in UDK version 9953.
To start out, I've downloaded the DLLBind_Example project from http://udn.epicgames.com/Three/DLLBind.html
I've built the dll and placed it in UDK root\Binaries\Win32\UserCode
I've copied the UnrealScript classes into UDK root\Developement\Src\MyMod\Classes
Next, the ReadMe file that came with the example says I need to edit UTGame\Config\UTEngine.ini to remove the semicolon from the line that says ModEditPackages=MyMod.
However, that file does not exist in my UDK.
Can anyone tell me what the equivalent is in the latest UDK version?

I found the answer.
The file you have to edit is UDK root\UDKGame\Config\UDKEngine.ini.
There is no commented out ModEditPackages=MyMod line in the file already, so you have to add it to the [UnrealEd.EditorEngine] section.

Related

Qt VS Tools Generating Incorrect MOC Command

I've been struggling all afternoon to track down an issue with the Qt VS Tools in Visual Studio 2013. I'm trying to update an existing .vcxproj file that used a home-grown mechanism for generating MOC, UIC, etc. files to use the Qt VS Tools mechanism instead.
The problem I'm having is in the MOC command that's getting generated for .h files that include the Q_OBJECT macro. A sample line (reduced for brevity) is here:
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">"$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" "-I$(QTDIR)\include\QtGui" "-I$(NOINHERIT)"</Command>
The problem is that NOINHERIT doesn't exist, so the "-I$(NOINHERIT)" gets evaluated to "-I" without a value, and the MOC compiler complains and doesn't generate the MOC file. I've tried cleaning up inherited paths, checking and unchecking the "Inherit from parent or project defaults", and the only change I sometimes see is that it has "-I" without the NOINHERIT macro.
Completely starting over with a new .vcxproj file is beginning to feel like my only hope, but that's a much larger task than I'd like to take since there's a significant number of them with interdependencies that I'd rather not create again.
I'm using the latest Qt VS Tools, which is version 2.3.2. Any ideas on how to resolve this?
Naturally, five minutes after I post, I found the issue. An included property file had this:
<AdditionalIncludeDirectories></AdditionalIncludeDirectories>
Rather than this, which solved the problem:
<AdditionalIncludeDirectories>%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
Interestingly, and for what it's worth, this did not work:
<AdditionalIncludeDirectories />
Add the %(AdditionalIncludeDirectories) at project->C/C++ -> General -> Additional Include Directories.
%(AdditionalIncludeDirectories) is added by default, but if for some reason, this is overwrite by mistake, then we will get an error as such.
Moc'ing XXXXXXX.h...
Missing value after '-I'.

Copy and paste an image from clipboard to Rmarkdown / .rmd code

How can I copy an image to the clipboard and then directly insert/paste it in an .Rmd file?
See also here: https://github.com/rstudio/rstudio/issues/4038
Spoiler: I wanted to post this question and then decided to give it a shot myself.
(It is a bit weird asking a question and answering it yourself, but when i read this i felt motivated enough :) https://stackoverflow.com/help/self-answer)
So far i got a workaround via python (see answer below), but it works and saved me quite some silly work. So i decided i might not be the only one googling that question and share my result.
I wrote a little RStudio addin and shared it here: https://github.com/Timag/imageclipr.
Edit: It works now without Python across plattforms (Mac, Windows, Linux), thanks to great contributions.
Walkthrough:
Basically i started here: How do I read a jpg or png from the windows clipboard in python and vice versa?.
I use this code to save the image:
from PIL import ImageGrab
im = ImageGrab.grabclipboard()
im.save('somefile.png','PNG')
Then i wrote a wrapper with library(reticulate) to run the python code from R.
Thats what covers the "right part" of the gif: To copy the image to a directory.
For the "left part" I use library(rstudioapi).
I take the current
file: getActiveDocumentContext()$id
line: getActiveDocumentContext()$selection[[1]]$range$start
directory: getActiveDocumentContext()$path
And then wrote a small RStudio addin: https://rstudio.github.io/rstudioaddins/.

ng2 bootstrap issue during build Cannot find type definition file for 'core-js'

ERROR in C:\projects\xxxx\node_modules#ng-bootstrap\ng-bootstrap\modal\modal-ref.d.ts
(1,1): error TS2688: Cannot find type definition file for 'core-js'.
There was a bug in the #ng-bootstrap 1.0.0-alpha.12 release that was corrected in 1.0.0-alpha.13. More details are available in https://github.com/ng-bootstrap/ng-bootstrap/issues/1027
In short: 1.0.0-alpha.12 release is broken, use 1.0.0-alpha.13 release
I got the same issue after switching to the #ng-bootstrap 1.0.0-alpha.12.
After switching to alpha.13 the error disappeared.

Using CMakes qt_wrap_ui command

I'm currently trying to change the build system used for a QT project from Visual Studio to CMake and I'm having trouble figuring out the correct usage of the qt_wrap_ui command. Currently, I'm using it like this:
macro(addQtForProject argLibraryName argSourceList)
...
qt_wrap_ui(${argLibraryName} ${argSourceList} ${argSourceList} ${varUiList})
endmacro()
As I handle the source and headers as a single list, I of course want the generated files to end up in the same list. varUiList contains the four .ui files used by the project.
When using CMakes visual studio 2005 generator with this macro, it adds four .h files, one for each .ui file, to the Visual Studio project file but the files themselves does to seem to exist at all so I must be doing something wrong. CMakes documentation is unfortunatly fairly sparse on this subject. This has been tested with CMake 2.8.10.
You probably want to use the more recent FindQt4 module which has much more documentation.
Specifically, it provides the QT4_WRAP_UI macro:
QT4_WRAP_UI(outfiles inputfile ... OPTIONS ...)
create code from a list of Qt designer ui files.
Options may be given to uic, such as those found
when executing "uic -help"

GNAT Programming Suite: Cross-Reference Info Not Up To Date (this is a guess)

I'm trying to get package references resolved during a build, using GNAT Programming Suite (hosted on Win XP). In the Builder Results, I get errors like this one:
file "ac_configuration_s.ada" not found
Clicking on the error takes me to a line like this:
with
Ac_Configuration,
Dispense_Timer,
...
The first item (Ac_Configuration) isn't resolved, but the second item (Dispense_Time) is resolved. I have several others that do or don't resolve. All of the files in question (spec and body) are identified as source files.
When I hover my mouse over the line with the error, a popup shows up that offers this:
(Cross-references info not up to date. This is a guess.)
Ac_Configuration
local package declared at D_Ac_Config_S.Ada:85
The guess is correct, but I don't know how to use this. How do I get this to correctly build?
Update
Here is teh call to gcc
gcc -c "-gnatec=C:\Source\build\GNAT-TEMP-000001.TMP" -I- -gnatA
-x ada "-gnatem=C:\Source\build\GNAT-TEMP-000002.TMP" "C:\Source\C_Cbt_Main_B.Ada"
I don't see a reference to teh "miimal" switch.
In this case, there is no corresponding body file file D_Ac_Config_S.Ada. So the is no body file to compile separately.
When I right click on the package reference inside the with, I can goto the declaration of Ac_Configuration and every other package name that is the source of an error. So these lreferences are being resolved somehow.
By the way, I have not used ADA before, so I'm still trying to understand everything.
It looks as though you're using _s.ada as the suffix for specs, and I'm guessing _b.ada for bodies?
GNAT may have difficulty with this naming convention. It's possible, using a GNAT Project file (.gpr), to alter GNAT's default convention ({unit-name}.ads for specs, {unit-name}.adb for bodies) but the rules (see "Spec_Suffix") say "It cannot start with an underscore followed by an alphanumeric character" (I haven't tried this, but you can see that it would confuse the issue if you had a package Foo_S, for example).
LATER: It turns out that GNAT (GPL, 4.7, 4.8) is quite happy with your suffixes!
If the package Ac_Configuration is really a local package declared at line 85 of D_Ac_Config_S.Ada, then there's your problem; you can only with a library unit, which in this case would be D_Ac_Config.
with D_Ac_Config;
...
package Foo is
...
Bar : D_Ac_Config.Ac_Configuration.Baz;
I wonder whether D_Ac_Config_S.Ada (for example) actually contains multiple Ada units? (if so, compiling that file should result in a compilation error such as end of file expected, file can have only one compilation unit). GNAT doesn't support this at compile time, providing instead a utility gnatchop.
Would it be possible to just gnatchop all the source and be done with it?
Hm, I think it sounds like the compiler's got a bad set of objects/ALIs it's working with, hence the cross-reference not up to date error. (Usually the compiler's good about keeping things up to date; but you may want to check to see if the "minimal recompilation" switch is set for the project.)
Have you tried compiling just the ["owning"] file D_Ac_Config_S.Ada? (i.e. if it were a spec, go to the corresponding body and compile that.) That should force its ALI/object files to be updated.
Then try building as normal.
-- PS: you might have to clean first.

Resources