Cannot run Xcode project when copy from pc - windows

I want to copy the xcode project I saved in my pc to my Mac but I can't open it.
All the files in that project was added "._" in the their name.
How can I fix this? I don't have this project on my Mac anymore, only on pc.

Those ._-files contain the extra file attributes that might not be available on other file systems. Typically you get them when you copy a file from your Mac to a file system that does not support extended attributes (like an USB flash drive with FAT). Therefore I expect that those ._ files alreday exist on your PC.
You should be able to simply delete them without any inconvenience; alternatively, you can use the tool dot_clean to merge them back.

Related

Allowing a Macintosh application to write files

We market an application that runs on multiple platforms, including Macintosh. On the Macintosh the software gets packaged into a .dmg file, and when installed everything goes into the /Applications hierarchy.
Some of the files in our application's hierarchy are samples that users are supposed to be able to modify in place or copy to different files in the same directory. The problem is the permissions that seem to get applied within the /Applications hierarchy prevent our application from doing such operations.
So I either need to change the install so the directories and files in question within /Applications allow modification, or I need to segregate the sample files to a different location on the disk where they can be modified.
I've tried making sure the permissions on the files allow writing at the time the .dmg file is pulled together, but then when the product is installed the permissions get changed to more restrictive ones that don't allow file modification or copying.
I've been able to modify the packaging so the sample files get installed to a different location, but so far I haven't been able to find a suitable area on the Macintosh disk to put them so modification is allowed. I haven't been able to figure out how to tell the packaging that these sample files should be installed into the installer's home directory.
Anyone have any suggestions? I'm afraid I'm a bit of an Apple novice. The procedure to build the .dmg file employs a Makefile that invokes commands like pkgbuild and productbuild. The productbuild command uses a --distribution qualifier that references a .xml file. There don't seem to be any scripts invoked.

Can't remove arduino library

I'm trying to remove a library from my arduino IDE. I've read the discussion about why there is no delete button in the GUI. So I have to remove it as files (on my windows machine). But I find libraries in many different folders, and still removing them does not seem to actually remove them from the IDE. How do I do this?
My sketch folder has a libraries folder, and there is one in program files:
C:\Users\MyUsername\Documents\Arduino\libraries
C:\Program Files (x86)\Arduino\libraries
It's not in any of those.
Then I found this:
C:\Users\MyUsername\AppData\Local\Arduino15\staging\libraries
There I found the library as a zipfile, and removed it. I also removed it from the package_index.json that is located two folders up. Started Arduino IDE, and it is still there, and it automatically comes back in the package_index.json file.
How do I get rid of it?
All your third party libraries are stored into your Arduino folder within your home user directory. So you must to delete them from there. They're always decompressed folders, non zipped ones.
Arduino IDE loads automatically them and restore the descriptor file of necessary every time that starts.
Original libraries cannot be deleted from other locations (ok, you'd won't to delete them...).

Visual Studio - File changes not saved to original disk location?

Ok, complete Visual Studio & Windows development noob here - there's gotta be an easy answer to this.
I've just started working on porting a Linux C++ library to Windows. Existing source tree is on the Linux file system, VS is running in a Windows 7 VM, which has the Linux file system mounted.
I added the source tree to a new project - I was initially doing the edits on the linux side, but now I've done a few from the VS IDE. But those edits aren't showing up on the disk?? I've done the typical save: ctrl-s, done the "save all": ctrl-shift-s, saved from the menu, etc. If I look at the file on the disk on the linux side, the changes aren't there.
I've shut down & restarted VS, and it still sees the changes on restart. How do I get the changes back on the actual disk so I can commit to subversion, etc.?
I've confirmed that the files & file system are read/writable from the Windows VM.
I'm sure this made sense to somebody, but I'll be damned if I get it.
Visual Studio Professional 2013 on Windows 7
You shouldn't be reading/writing to the same directory under both environments, imo. Not the least reasons of which is that *nix & windows have different ideas of line endings.
It would be much better to keep a git repository on your host OS (or on a server like github) and pull/push to that repo from your windows VM. Git is smart enough to handle all the line endings, symbolic links, permissions, etc. automagically.
I have seen similar behavior using BC++ IDE.
In my case I was trying to edit files that were hard links to files in a second directory (on the same NTFS file system).
The IDE is using some mechanism to reposition the file to be edited into the _history backup directory.
I.e. the editor unlinks the original file in the original directory and relinks it in the _history subdirectory and creates a completely new directory entry for the edited file.
The hard linked file I created in the second directory is thus then linked to the backup file in the _history directory so when I edit the file in the second directory with notepad, the modifications appear in the _history backup file (or vica versa) but not the file in the originial location.
Its not like a simple text editor (notepad) where the edited file is opened-read-closed and when saved, reopen-written-closed using the same directory entry.
I presume that the IDE is using a low level Windows file system function to rename/link the original file into the _history
directory and that this mechanism does not support/recognize NTFS hard links. I suspect in your case that VS may use a similar relinking mechanism (specific to NTFS) that similarly would not work with the files in the mounted Linux file system.
That VS may be storing edits in a temporary file (may be hidden or in some other temporary directory) so the original file is not lost if the IDE crashes. When the file save is committed it attempts to link the original file to backup and then attempts to relink the temporary edit file into the original directory entry location, but because the NTFS file system linking mechanism is not compatible with the Linux file system, nothing happens.
[I do observe temporary files appear like this when editing MicroSoft Office documents. notepad++ also does this, so I suspect VS is doing the same thing.]

Watch a folder constantly for new files

I have a web folder on a Mac (running MAMP Pro) and have files been added within it on the fly, whose URL is as follows .
http://abc.com/folder/
I have another Windows machine that should constantly watch this folder and download any new file that gets dumped to this web folder to c:\macfolder\ (The files are always tsv's).
I know I can use wget to acquire files and run whatever program that would do this as a scheduler in windows to watch constantly, but whats the best way to watch this folder for the new files.
Thanks
P.S I do not know what are the best tags for this question. Help me out with that too.. :P
Since the directory already is mounted on Windows, your question appears to be a duplicate of this (and related) - assuming you're OK using C# to build such a tool:
Monitoring a directory for new file creation without FileSystemWatcher
If not so keen on the C# tool, there are command line solutions like this one here:
batch file to monitor additions to download folder

Dealing with SVN Renames for an file sync tool (like Dropbox)

I'm working on a simple file sync tool for Windows that works like Dropbox but uses SVN. (I might open source it, it's just toy right not but it works really well.)
PROBLEM: Renaming a file... I can catch the event from the Windows OS with the old name and new name. But how can I register the rename in SVN without actually doing it in the file system?
I know SVN doesn't support that, but I want thinking of some other way. For example a rename is just a copy and a delete.
For example, I could do a server side copy but then the local copy is unversioned. There's got to be a way! Any ideas!?
[And deleting all the old files and reuploading them with new file names doesn't count ;) ]
See how EasySVN deals with it. It is an open source file sync tool for Windows & Mac OS X, with autocommit, based on Subversion.

Resources