In a .LST file for my VB6 installer there are two lines as follow:
File1=#VB6STKIT.DLL,$(WinSysPathSysFile),......
File2=#wshom.ocx,$(WinSysPath),.....
After installing my application, I found out that both go to the same \Windows\System32 folder. Do you know what is the difference between both paths?
Thanks
This dates back from VB4, I think, a version that could still generate 16-bit executables. Where the system directory was c:\windows\system, the synonym of $(WinSysPath). $(WinSysPathSysFile) is c:\windows\system32. There should be no difference on a 32-bit operating system, but worth a check. wshom.ocx really does belong in system32. It is already there on any recent operating system.
They both go to the same system folder (The windows folder if it's not writable). The latter just marks it as a system file so it's not uninstalled.
Snippets from Setup1.bas in the PDW:
fSystem As Boolean 'whether the file is a system file (i.e. should be installed but never removed)
If InStr(strInitialDestDir, gstrWINSYSDESTSYSFILE) Then
sFile.fSystem = True
End If
Case gstrWINSYSDEST, gstrWINSYSDESTSYSFILE
strResolved = gstrWinSysDir
Related
I'm looking to compile OCCT 7.5 in Windows 10 (x64 via VS2019) for use with FreeCAD, to enable exporting glTF files, which requires RapidJSON support (in OCCT). I've checked out OCCT 7.5.3 and RapidJSON 1.1.0 from their git repos, then grabbed the FreeCAD libpack 12.5.2 (for OCCT 7.5). I started from FreeCAD's build docs, then attempted to follow OCCT's build docs.
When configuring the OCCT project in CMake-GUI, I've been able to find what I think are correct values for some variables (e.g. those regarding FREETYPE) within the FreeCAD libpack, as well as RapidJSON, but still get some errors in the config, seemingly no matter what values I try:
Could not find headers of used third-party products:
3RDPARTY_TCL_INCLUDE_DIR 3RDPARTY_TK_INCLUDE_DIR
...
Could not find DLLs of used third-party products: 3RDPARTY_TCL_DLL_DIR
3RDPARTY_TK_DLL_DIR
I've tried using *.lib, *.h and *.dll files found within the FreeCAD Libpack (and their corresponding directories) for *_LIBRARY/INCLUDE/DLL variables, but nothing is found. I see
Info: TCL is used by OCCT
Could NOT find Tclsh (missing: TCL_TCLSH)
even though tclsh86t.exe exists in the libpack/bin directory.
What should the 3RDPARTY_TCL_* & 3RDPARTY_TK_* CMake variables be set to, to use the FreeCAD libpack?
The problem was my lack of familiarity with CMake and Cmake-gui: the gui opened a dialog for a FILEPATH when specifying a PATH variable. I naively thought, "I don't know CMake, so I'll trust the gui". Totally wrong.
I manually edited the 3RDPARTY_* variable entries to point to the correct directories (or libs, when needed) in the FreeCAD libpack, using the variable name and description/hint for each to determine what the variable's value should be. Below are my entries, for reference:
I did need to check "Advanced", to edit the FREETYPE_LIBRARY_DEBUG & FREETYPE_LIBRARY_RELEASE variables (CMake set them to separate libs found in a jdk directory, presumably because it was added to the system path at some point).
I downloaded Gurobi and verified that my license is working.
I'm trying to add the Gurobi package to Julia, but it seems that the dll file can't be found, even though my GUROBI_HOME variable is okay.
Here is the output of Pkg.build("Gurobi") :
Found GUROBI_HOME = C:\gurobi902\win64
Does this point to the correct install location?
on Windows, this might be C:\Program Files\gurobi810\win64\
alternatively, on Windows, this might be C:/Program Files/gurobi810/win64/
on OSX, this might be /Library/gurobi810/mac64/
on Unix, this might be /home/my_user/gurobi810/linux64/
Note: this has to be a full path, not a path relative to your current
directory or your home directory.
We're going to look for the Gurobi library in this directory:
C:\gurobi902\win64\bin
That directory has the following files:
C:\gurobi902\win64\bin\grbcluster.exe
C:\gurobi902\win64\bin\grbgetkey.exe
C:\gurobi902\win64\bin\grbprobe.exe
C:\gurobi902\win64\bin\grbtune.exe
C:\gurobi902\win64\bin\grb_ts.exe
C:\gurobi902\win64\bin\gurobi.bat
C:\gurobi902\win64\bin\gurobi.env
C:\gurobi902\win64\bin\gurobi90.dll
C:\gurobi902\win64\bin\Gurobi90.NET.dll
C:\gurobi902\win64\bin\Gurobi90.NET.XML
C:\gurobi902\win64\bin\gurobi90_light.dll
C:\gurobi902\win64\bin\GurobiJni90.dll
C:\gurobi902\win64\bin\gurobi_cl.exe
C:\gurobi902\win64\bin\pysetup.bat
C:\gurobi902\win64\bin\vslauncher.exe
C:\gurobi902\win64\bin\vswhere.exe
We were looking for (but could not find) a file named like
libgurobiXXX.so, libgurobiXXX.dylib, or gurobiXXX.dll. You
should update your GUROBI_HOME environment variable to point to the
correct location.
Have you tried to look for the specific dll in your hard disk and update the GARUBI_HOME accordingly, as per error message? Did you double-check that this specific dll exists on that folder?
I am using an API called Piepan, which allows me to write Lua scripts for Mumble bots. For context, it is written in Golang using an alternative mumble implementation called Gumble. Piepan scripts are executed via cmd prompt through a piepan.exe.
I can require most libraries, like inspect.lua, and I can easily require luasocket in non-piepan scripts (scripts executed via lua.exe), but if I try to require luasocket (or what I really want, a redis library that depends on luasocket), I get an error. This is less of an error and more of a missing feature from the API, which the creator acknowledges. The creator suggests to someone else with this problem that they simply use Gumble, but I cannot do that as I am only a Lua programmer.
Here's the code of me just trying to require luasocket:
local socket = require ("include-test.socket")
(I've also tried include-test.socket.core and just socket.core)
In accordance with this stackoverflow answer, I moved my files to resemble the user's own directory, so it looks like this:
Piepan folder
-piepan exe and dlls (not luasocket dlls)
-include-test (folder)
--Script for piepan
--socket.lua
--socket folder
---core.dll
Despite the directory looking how I imagine it should based on other users' Q/As, I get this error:
.\include-test\socket.lua:13: module socket.core not found:
no field package.preload['socket.core']
Lstat : The system cannot find the path specified.
GetFileAttributesEx .\socket\core.lua: The system cannot find the path specified.
GetFileAttributesEx C:\Users\Michael\piepan\lua\socket\core.lua: The system cannot find the path specified.
GetFileAttributesEx C:\Users\Michael\piepan\lua\socket\core\init.lua: The system cannot find the path specified.
GetFileAttributesEx C:\Program Files (x86)\Lua\5.1\lua\socket\core.luac: The system cannot find the path specified.,
I've also tried including the following line, inspired by this stackoverflow answer.
package.cpath = package.cpath .. ';include-test/?.dll'
to no avail.
I am looking for any available solution, whether that be moving around dlls or compiling the original Piepan w/ extra files as needed.
(To clarify, I need a workaround that allows me to require the redis library within the same script I run through piepan. Using an outside script with the redis library to then, say, launch piepan and do something there, is not helpful to me.)
I'm trying to make a standalone .exe packaged Ruby Shoes app that uses images dynamically, meaning whichever images is found in the folder of the .exe file.
Shoes.app() {
background "bg.jpg"
}
This code works if the image is in the same folder when the .exe is packaged, and the image seems to be packaged into the .exe since it's not needed in the same folder as the .exe for it to display when running the exe. But when you want it to load the file in the same folder as the .exe, packaging the app without the image, it does not show. I've tried different ways at finding absolute path to the current directory where the .exe is launched from, but they all seem to point to some temporary directory under AppData and not where the .exe file is located.
Edit: my first answer was incomplete. Windows is a little odd in Shoes for packaged apps. Write a little test script.
Shoes.app do
stack do
para "DIR: #{DIR}"
para "LIB_DIR: #{LIB_DIR}"
cdir = Dir.getwd
para "CWD: #{cdir}"
end
end
Dir.getwd is probably what you want.
Calling pwd should get you what you want
Nope, Ok sorry get it now !:-)
Shoes is opening your exe/shy into AppData/temp so working directory and __FILE__ both point there !
Someone, some time ago proposed this : Trying to access the "current dir" in a packaged Shoes app
must be a better way !
EDIT:
you probably want custom packager (check "i want advanced install options")
check "Expand shy in users directory"
Do as you done for regular packaging.
Now when launching the exe, it will ask you( or the user) to choose where to install your app, proceed, note the directory.
Now before launching the installed app feed the noted directory with your resources and you should be ok
Some references : https://github.com/Shoes3/shoes3/wiki/Custom-Install-Scripts
(there's a lot more to it)
https://github.com/Shoes3/shoes3/issues/247#issuecomment-213919829
Say I am creating an application bundle with some scripts, maybe a daemon, or even a helper binary... When compiling such a binary.. is it feasible to ./configure/make it with only relative paths? For example, a more conscientious Makefile will include for provisions such as...
--bindir=DIR user executables [EPREFIX/bin]
--sbindir=DIR system admin executables [EPREFIX/sbin]
--libexecdir=DIR program executables [EPREFIX/libexec]
--sysconfdir=DIR read-only single-machine data [PREFIX/etc]
--sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
--localstatedir=DIR modifiable single-machine data [PREFIX/var]
--libdir=DIR object code libraries [EPREFIX/lib]
--includedir=DIR C header files [PREFIX/include]
--oldincludedir=DIR C header files for non-gcc [/usr/include]
--datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
--datadir=DIR read-only architecture-independent data [DATAROOTDIR]
--infodir=DIR info documentation [DATAROOTDIR/info]
--localedir=DIR locale-dependent data [DATAROOTDIR/locale]
--mandir=DIR man documentation [DATAROOTDIR/man]
--docdir=DIR documentation root [DATAROOTDIR/doc/hiawatha]
--htmldir=DIR html documentation [DOCDIR]
--dvidir=DIR dvi documentation [DOCDIR]
--pdfdir=DIR pdf documentation [DOCDIR]
--psdir=DIR ps documentation [DOCDIR]
This is great, you can install everything to /opt/local instead of /usr/local. Maybe even go crazy, and rename the binaries via sed.. I get it..
But what remains unclear in my tiny brain, is if the ability to arbitrarily set paths in such a manner extends to the ability to map the directories relative to the executable, in a manner similar to...
--prefix=PREFIX install architecture-independent files in PREFIX [/usr/local]
--prefix=./ aka [../relative/to/binary]
So, for example, no matter where you launched the bin from, it would always know that it's .conf file was going to be up one folder, in the that relative ../etc folder, or possibly even right next to it, in the same directory, ./. Similarly, you could guarantee write access to log and pid files, etc, without wondering about your target's permissions/directory structure...
This would enable a completely portable /bin /etc /lib /var directory structure, within a PATH to which I can guarantee some semblance of predictability... but I don't think it just "works" like that.. And I am unsure if simply "linking statically" or otherwise ? truly creates binaries that are able to be moved to another system (albeit, for this scenario, to ones with the same support libs in the same places, so as not to muddle the issue) Is it possibly to cross-compile in this manner? And can you build for multiple architectures in the same build cycle? (For example i386 AND x86_64 at the same time)
Maybe I could just use a recommendation of a good GNU/GCC primer ( CC, CFLAGS, LDFLAGS, -l, , -I , and CPP 101, etc.) but that wasn't written for (and by) Math teachers - in the 70's?
In full generality, no, that won't work. There are things in /etc for example that are expected to be shared by the whole system and won't work correctly if you're trying to keep a private copy for one app.
With that said, your app probably isn't using every single shared resource on the system. Either using a local /bin and /sbin, or symlinking to the real ones from a relative path within your app's directory should be fine. /var seems less likely as something that your app needs to know about directly - anything stopping you from storing logs your own way, or using syslogd?