Iexpress is extracting to %temp% folder... How do I prevent this? - iexpress

Basically I've binded two files, one of them works fine because it can be run from any directory on the computer, however the other one requires .DLL dependencies found in the folder that the binded file is in... However when you run the binded file (made in express) it extracts both the programs to the %temp% folder, so the program cannot find the .DLL dependencies and therefore doesn't work.
Is there anyway to make it extract the files into the directory it's being ran from?

I already answered this question here:
Iexpress - extraction path
It's actually a bit of a pain, since the current directory while IExpress is running an install program is something like %temp%\IXP000.TMP and there's very little clue where it was originally started without reverse traversing the "process tree".
Having said that, the extraction location (eg %temp%\IXP000.TMP) should contain both the executable and the .dll there, so the DLL should be easy for the executable to find. You might check the usual suspects: (1) is long file name (LFN) support enabled? and (2) is the .dll actually in the archive? More info on another answer here:
jar file not found iexpress

Related

Unable to use correct file paths in R/RStudio

Disclaimer: I am very new here.
I am trying to learn R via RStudio through a tutorial and very early have encountered an extremely frustrating issue: when I am trying to use the read.table function, the program consistently reads my files (written as "~/Desktop/R/FILENAME") as going through the path "C:/Users/Chris/Documents/Desktop/R/FILENAME". Note that the program is considering my Desktop folder to be through my documents folder, which is preventing me from reading any files. I have already set and re-set my working directory multiple times and even re-downloaded R and RStudio and I still encounter this error.
When I enter the entire file path instead of using the "~" shortcut, the program is successfully able to access the files, but I don't want to have to type out the full file path every single time I need to access a file.
Does anyone know how to fix this issue? Is there any further internal issue with how my computer is viewing the desktop in relation to my other files?
I've attached a pic.
Best,
Chris L.
The ~ will tell R to look in your default directory, which in Windows is your Documents folder, this is why you are getting this error. You can change the default directory in the RStudio settings or your R profile. It just depends on how you want to set up your project. For example:
Put all the files in the working directory (getwd() will tell you the working directory for the project). Then you can just call the files with the filename, and you will get tab completion (awesome!). You can change the working directory with setwd(), but remember to use the full path not just ~/XX. This might be the easiest for you if you want to minimise typing.
If you use a lot of scripts, or work on multiple computers or cross-platform, the above solution isn't quite as good. In this situation, you can keep all your files in a base directory, and then in your script use the file.path function to construct the paths:
base_dir <- 'C:/Desktop/R/'
read.table(file.path(base_dir, "FILENAME"))
I actually keep the base_dir assignemnt as a code snippet in RStudio, so I can easily insert it into scripts and know explicitly what is going on, as opposed to configuring it in RStudio or R profile. There is a conditional in the code snippet which detects the platform and assigns the directory correctly.
When R reports "cannot open the connection" it means either of two things:
The file does not exist at that location - you can verify whether the file is there by pasting the full path echoed back in the error message into windows file manager. Sometimes the error is as simple as an extra subdirectory. (This seems to be the problem with your current code - Windows Desktop is never nested in Documents).
If the file exists at the location, then R does not have permission to access the folder. This requires changing Windows folder permissions to grant R read and write permission to the folder.
In windows, if you launch RStudio from the folder you consider the "project workspace home", then all path references can use the dot as "relative to workspace home", e.g. "./data/inputfile.csv"

.Rproj file disapeared but project files remain (git shows no changes)

I've been building an R package via an R project file (.Rproj) in R studio with the project file linked to my github. When I was working on it this morning, all was as it should be, but when I returned to it this afternoon, the .Rproj file had mysteriously vanished. All other files and folders associated with the package are where they should be (e.g., the "R" folder with the scripts for the package's functions, the DESCRIPTION file, the man folder, etc.) but the .Rproj file is gone. I have not deleted it and it is not in my trash can, nor does git have any record of it for some reason.
If I do a search for the file name in the windows search bar (I'm suing windows 7, btw) the file shows up and says that it is in the correct location, but if I click on it, I get an error message saying that the file has been moved or deleted. Similarly, if I try to navigate to where the file should be via "open project" in R, there is a greyed out ".Rproj.user" folder that I don't recall having seen before, but no project file.
I'm at my wits end for what is going on. The package on github appears to all still be correct (as do the files on my computer), but without being able to find or access the .Rproj file I can't easily edit the package and push the changes to github.
Does anyone have any idea what is going on or how to retrieve my package file? Since I have all the source files for it, I could always build a new project using the source files, but then I need that to link up to my github which is linked to a now non-existent project file, and everything becomes really messy and tedious quickly.
PS I have restarted both my computer and R. It didn't help.
You can probably just create a "new" project in the existing folder to generate a new .Rproj file.
The .Rproj file doesn't actually do that much. It mostly lets RStudio know that "this folder is the root directory of a project named X". Git keeps its own hidden files in the directory to track things (that RStudio will look for if it's a project).
If you haven't done this, I'd also recommend adding your .Rproj files to your .gitignore file - Rproj files are user-specific so shouldn't be tracked in version control. (If you used RStudio to create the git repo, this will be done automatically.)

Qt online installers list all repos

I'm learning the Qt Installer Framework and creating repositories on a web server to be used by the online installers. My problem is that even though each repository and installer is treated separately in the creation process, when I run any of the installers they list ALL the programs/repos on our server and check each of them for install. It is of course possible to manually uncheck them, but really I want an installer specific to each program as different departments at my work use different programs and shouldn't have to go through the full list.
I don't understand why the installers are listing everything: each program/package has an individual repository on the server and an individual installer created using a config.xml, installscript.qs, and package.xml specific to that program. Nowhere in any of those files is there a reference to any other program or repository, and I've used the repogen and binarycreator for each individual program rather than as a batch. The only thing I can think of that might be affecting it is that the individual packages are subfolders under the same "package" folder in one unified installer framework folder. I just point the repogen.exe and binarycreator.exe at the desired subfolder. Could this be causing my problem? Do I really need to have a separate installer folder with config and package subfolders for each program?
There's obviously a lot of moving parts to this so I'm not sure what specific code/info I should post, but please feel free to ask me for something that may be helpful and I will provide.
I'm not sure of the details of why, but the answer appears to be that every program needs its own installer folder. It seems that everything under a single "packages" directory is consider a component of the same program, regardless of subfolders or arguments passed to the binarycreator. So if you have multiple programs they each need their own installer folder with config and packages directories. That is unless you want a full list of available programs associated with each installer; and then what's the point of separate installers?

Iexpress for large files (corrupted Cabinet file)

I wish to combine many installers and make an exe using Iexpress. Total size of installers is 750MB. I tried combine and generated using Iexpress but the created exe file size is only 80MB. And when i double click and attempt to run the exe, its stated that its corrupted cabinet file and cannot be executed. After that i rebuild two exe files by separated installers into two groups and each group file size is around 300++MB. Both exe files are executed successfully. So i suspect that i cannot build all installers into one exe due to its large size. May i ask whether it is correct that iexpress will restrict the exe file size or i am doing something wrong on this?
I think a IExpress package is limited to about the size of a CD-ROM. If you look at the auto-generated DDF file that IExpress generates, one of the directives it gives is:
.Set MaxDiskSize=CDROM
Probably this means ~650MB.
I tried to find a way to change it, but I don’t see how, sorry.

QFileSystemWatcher locks directory on Windows

I am watching a directory recursively using QFileSystemWatcher. And I am not able to rename/delete the parent directory either programmatically or manually if its sub directories are being watched.
When trying to rename manually through system i get a message box saying "The action cannot be completed because the folder/ file in it is opened in another program" and on renaming programmatically it fails.
I got these similar bugs, but no resolution:
http://qt-project.org/forums/viewthread/10530
https://bugreports.qt-project.org/browse/QTBUG-7905
I am not watching . and .. as said in the above link, but still the directory is locked.
In case of programmatically renaming.. I tried a workaround:
1. Remove all the subdirectory paths from watcher before renaming the parent.
2. Rename parent.
3. Add subdirectory paths again.
But here too my program fails on first step. QFileSystemWatcher::removePath() returns false when trying to remove the subdirectory path, and QFileSystemWatcher::directories() show that directory in the paths being watched. Same as posted here https://bugreports.qt-project.org/browse/QTBUG-10846
Since step 1 fails here, step 2 also fails and i cannot rename the parent dir.
I am using Qt5.2.1 and Windows 7.
Kindly help me with a resolution.
This is a bug in QFileSystemWatcher as discussed here
After days of trying, I am finally able to find the solution of my problem by using Win32 API for watching directories on Windows platform. I wrote a blog post on How to use Win32 Api to monitor directory changes. I would like to share the link so it may help others who land up here to find the solution of the same problem.
Win32 API to monitor Directory Changes

Resources