How do I copy files from a CD-ROM in [Files] using Flags: external? - external

I'm writing a new installer for an old cd-rom game that has a 16-bit installer, the installer will need to be on the hard disk and be able to copy files from the original disc. I already have a script set up that can install the game if all the game files are packed in the installer, this is fine for personal use but I want to be able to redistribute the installer so others can use it.
I want to have a separate selection box for the CD-ROM source drive like this script: http://www.vincenzo.net/isxkb/index.php?title=Ask_for_a_drive_to_install but instead of it being the destination, I want it to be the source and also be able to select the destination directory. All the files I need are currently listed in the [Files] section, I would like to set them as Flags: external but I have no idea how to copy them from the CD-ROM instead of the inno setup's setup.exe folder.

You can the {src} constant, which gives you the directory the Setup is located.
{src}
The directory in which the Setup files are located.
For example: If you used {src}\MYPROG.EXE on an entry and the
user is installing from "S:\", Setup
will translate it to "S:\MYPROG.EXE".
Example:
Files: Source: "{src}\readme.txt"; DestDir: "{app}"; Flags: external

Related

How to open a project in PhpStorm using command line

I am using Git Command Line, Homestead, Windows 10, PhpStorm 2017.3.
I want to open any project in PhpStorm using git bash /command line.
Just pass FULL path to the project root folder as parameter to PhpStorm executable file -- IDE will either open existing project (if .idea subfolder exist) or will create brand new project from those files.
It works the same as if you would use Open from within PhpStorm and point to such folder.
An example:
"C:\Program Files\JetBrains\PhpStorm\bin\phpstorm64.exe" "C:\Projects\MyProject"
phpstorm64.exe is for 64-bit Java
For 32-bit Java you should use phpstorm.exe
You can add path to PhpStorm executable into system's PATH variable so there will be no need to use the full path. But then you have to install new versions into the same folder or update PATH as needed. The you could just use phpstorm64.exe "C:\Projects\MyProject".
You can also create some alias/batch file (similar idea to what Mac/Linux user have -- there IDE creates that for them) so it's easier to use. It's a bit more initial work but easier to keep the path up to date.
You may want to specify another path for your program but if nothing else just use this I guess.

add a existing javascript file to netbeans project, is it possible

I want to try netbeans for web development. I created a new local project. I have my remote server files (javascript, php etc) accessible locally on my computer using sftp in linux, now I just want to add these files to the project but there is no 'add files' possibility. Have Oracle forgotten something so obvious as add existing files? I can't believe it.
To add an external file to your NetBeans project:
Select the file in the file system that you want to add to your NetBeans project using a file manager (such as File Explorer on Windows).
Right-click and select Copy from the popup menu.
Within NetBeans go to your project and position the mouse over the target directory to which you want to copy the file. You can do this in the Projects panel or the Files panel as appropriate.
Right-click and select Paste.
That's all there is to it. This works on Linux and Windows. You can also do drag and drop, though on Linux the file is copied whereas on Windows the file is moved.
There is no menu option in NetBeans such as File -> Import existing file to do this. Just use an external file manager.
Update/clarification:
The instructions above only specify how to copy an existing file into an existing project.
There is no way to include an individual file that is external to the structure of a NetBeans project.
However, it is possible to create a symbolic link (junction) from a NetBeans project directory to an external directory. To do that open a Command Prompt window as an administrator and enter a command similar to this:
mklink /J D:\NetBeansProjects\HTML5DemoCss\nbProject\MyLink2 C:\sftp
That will create a new directory in your NetBeans project named MyLink2 which maps to an external directory named c:\sftp. You can then process files in that external directory C:\sftp as though they were within your project directory MyLink.

How to browse zip files in vifm

I want to be able to browse zip files and their subfolders from vifm.
By default(after a clean installation) the vifm does not support such functionality.
If you didn't alter sample vifmrc, then it already contains necessary configuration to open zip files using FUSE. It looks like this:
filetype *.zip,*.jar,*.war,*.ear,*.oxt
\ {Mount with fuse-zip}
\ FUSE_MOUNT|fuse-zip %SOURCE_FILE %DESTINATION_DIR,
As you can see it invokes fuse-zip to mount archive as a directory. FUSE is probably present and working (assuming that you use GNU/Linux, but there is also OS X analogue; Windows seems to had one too, but it's probably incompatible with FUSE mounters out there), so all you need is to install fuse-zip.
The same way you can browse anything if there is a FUSE module for it (tar, rar, iso, 7z).

How to install MySQL Connector/C on Mac OS X?

I'm writing an app in C that requires MySQL interaction, so I downloaded the Connector/C archive from the official website, and it contains bin, lib and include folders, but I don't know where to install them.
I could copy the include files into my project folder, but where can I put the lib file so that my compiled binary (and other binaries) can find it?
Thanks in advance!
This is confusing, isn't it.. don't know why they don't make this more clear.
The lib/ files go in /usr/local/lib
The include/ files go in /usr/local/include
The bin/ files go in /usr/local/bin
The /usr/.. directory isn't visible through finder afaik so you have to go at it via commandline. Best of luck
Also, in your Xcode project, make sure you add a Linked Library by going to your Target's settings, General, then adding Linked Library "libmysqlclient.dylib"
Alternatively, to do everything on the commandline by "mv", you could also execute (on cmdline):
defaults write com.apple.finder AppleShowAllFiles TRUE
and
killall Finder
to make the hidden folder /usr (and everything else) visible.
After placing your connector files (like Nektarios explicitly discribed where) and closing all "hidden folder - finder windows", execute on your cmd:
defaults write com.apple.finder AppleShowAllFiles FALSE
and again
killall Finder
to hide what have to be hidden.

How can I override ~/.vim and ~/.vimrc paths (but no others) in vim?

Let's say I have a tarball of all my vim config - everything normally inside ~/.vim (plugins, autoload, colours, all that stuff), and a vimrc file. I extract this to a directory somewhere. So in the directory where I am ($PWD), there is a "vim" folder and a "vimrc" file. (note: this directory will be read-only, so vim shouldn't try to write into it).
What command-line arguments or environment variables can I give to vim to ensure that all my plugins, syntax, etc is loaded as well as the vimrc, in the same order as they normally would if they were located in ~/.vim and ~/.vimrc
As a bonus, I'd like to ignore the host computer's ~/.vimrc and ~/.vim if possible (but this is not mandatory).
If you're wondering why I don't just chuck the files in ~/.vimrc and ~/,vim, I'm trying to package up my own vim configuration and take it with me. I don't want to clobber the vim config of the computer I'm using, I just want to start a vim session with my config.
I have a portable .vim folder exactly as you described, this is how I have set it up:
Put your portable .vimrc file inside your .vim folder.
Add the following lines to the start of your portable .vim/.vimrc:
" set default 'runtimepath' (without ~/.vim folders)
let &runtimepath = printf('%s/vimfiles,%s,%s/vimfiles/after', $VIM, $VIMRUNTIME, $VIM)
" what is the name of the directory containing this file?
let s:portable = expand('<sfile>:p:h')
" add the directory to 'runtimepath'
let &runtimepath = printf('%s,%s,%s/after', s:portable, &runtimepath, s:portable)
Start vim by using: vim -u /path/to/portable/vim/.vimrc.
On Unix & Linux systems (and maybe Windows) Vim uses the $HOME environment variable to locate the .vimrc file and .vim directory. So you can cd into the directory where you have your custom versions and start vim or gvim like this:
HOME=. vim files....
This "vimrc File and Vim Runtime Directories" screencast might be useful, as well as the vim documentation for 'runtimepath', which states the following:
This is a list of directories which will be searched for runtime files:
filetype.vim filetypes by file name |new-filetype|
scripts.vim filetypes by file contents |new-filetype-scripts|
autoload/ automatically loaded scripts |autoload-functions|
colors/ color scheme files |:colorscheme|
compiler/ compiler files |:compiler|
doc/ documentation |write-local-help|
ftplugin/ filetype plugins |write-filetype-plugin|
indent/ indent scripts |indent-expression|
keymap/ key mapping files |mbyte-keymap|
lang/ menu translations |:menutrans|
menu.vim GUI menus |menu.vim|
plugin/ plugin scripts |write-plugin|
print/ files for printing |postscript-print-encoding|
spell/ spell checking files |spell|
syntax/ syntax files |mysyntaxfile|
tutor/ files for vimtutor |tutor|
And any other file searched for with the |:runtime| command.
The defaults for most systems are setup to search five locations:
1. In your home directory, for your personal preferences.
2. In a system-wide Vim directory, for preferences from the system
administrator.
3. In $VIMRUNTIME, for files distributed with Vim.
*after-directory*
4. In the "after" directory in the system-wide Vim directory. This is
for the system administrator to overrule or add to the distributed
defaults (rarely needed)
5. In the "after" directory in your home directory. This is for
personal preferences to overrule or add to the distributed defaults
or system-wide settings (rarely needed).
My solution isn't quite the same but could be adapted pretty easily.
I have my Vim setup on my workstation and it's shared through regular Windows file sharing. I have this batch file that I can launch from any other computer in the building (and there's an install of Vim on another network share since most workstations don't even have Vim installed). I just run this batch file and am in my happy place.
set MYWORK=\\my_pc\work
set RCBASE=%MYWORK%\personal\utilities\tom.
start \\server\software\vim\vim73\gvim.exe -u %RCBASE%vimrc -U %RCBASE%gvimrc
So basically the adaptation would put the batch file, shell script, or otherwise into the archive you're unpacking and launch the system vim with your local files.