Convert iOS project to 64 bit using ConvertCocoa64 script - ios

I need to convert my iOS project to 64-bit friendly (to get rid of compiler warnings, as in this question. The solution apparently is to run ConvertCocoa64.
I've managed to locate ConvertCocoa64 (which is no longer included in /Developer/Extras/64BitConversion/ConvertCocoa64) as the Apple docs suggest, but here (search for Auxiliary Tools)
So I've download the script. But my question is, how do I run this on my project? Please assume a total newbie level of knowledge here when it comes to the terminal and running scripts. Do I drop the script inside my project folder and just double click it? Or do I access it from the terminal? The docs say run this command:
/Developer/Extras/64BitConversion/ConvertCocoa64 `find . -name '*.[hm]' | xargs`
But since that folder doesn't exist, where do I run it?. I tried dropping the script in the Developer folder, but when I type ConvertCocoa64 it says command not found.

Find where the command is located now. You'll want to run it in the terminal using the full path to the command, as in your example, just with the real path.
A good way to get the full path is to locate the command in the Finder and drag it to an open terminal window - this also "escapes" any spaces in the path for you. The easiest way to hit all your files as arguments to the command is to cd (change directory) to your project first (in the terminal).
This should get you set up to follow the directions you have.

If I'm not mistaking, to run script, you should place dot . before command. Doesn't really matters, where script is situated as long, as it doesn't rely on it heavily
> cd ~/path/to/script/dir/
> ./ConvertCocoa64 ...

Related

How do I determine if an application is built by Electron or not?

How do I determine if an application is built by Electron or not?
Could I always find specific file or binary on Electron apps?
Please give me some advice, thanks.
There are a few "non-futureproof" ways to check if an app was built on Electron and they vary depending of the OS.
You will need to go in your application folder (for example Applications for macOS, Program Files for Windows or /usr/share for Linux...
Here are some examples of the files/directory you may find in your application folder:
 Linux / Win32
These two OS have basically the same structure, so it's pretty easy to check what you want
locales/
resources/
blink_image_resources_200_percent.pak
chrome_100_percent.pak
chrome_200_percent.pak
content_resources_200_percent.pak
content_shell.pak
icudtl.dat
vkswiftshader.dll
vkswiftshader_icd.json
There are also some files like
libffmpeg.so / ffmpeg.dll
libnode.so / node.dll
depending of the OS you're on.
 macOS
It's a bit more complicated here. You might need to check the Info.plist file to see if there is any reference to Electron.
As unseen_damage said, you can also check in [app folder]/Contents/Resources if there is an app.asar as .asar files are specifically created for Electron.
Anyway, all those files may see their names changes someday, so don't consider them as a reliable way to check if "any" app is built on Electron, it's more of a manual way to check it.
MacOs
To find all Electron apps by finding the .asar file on your mac, use this.
open Terminal
run this command
find /Applications -name '*.asar' -print
MAC:
open a terminal type cd /Applications, then, change directory (cd) into the name of the application you want to check. For example, if it is iTunes, you would do the following /Applications/iTunes.app/Contents/Resources. If you see an app.asar file, or something similar with the .asar suffix, it is most likely an Electron App.
Windows:
Open up the program files directory of the application you are wondering about, and check the file folder for any file with .asar suffix. This can be done via the search, terminal, etc.
Bottom line- Electron apps, when packaged, are bundled into an asar file, and you can search for this file extension to see if the program was built with electron.
Documentation- http://electron.atom.io/docs/tutorial/application-packaging/
macOS
You can also run the following terminal command:
find /Applications -name "*Electron Framework*" | cut -d/ -f3 | sort -u | cut -d. -f1
This will output an alphabetized and cleaned up list of just the application names.
Source: https://talk.macpowerusers.com/t/why-the-dislike-of-electron-apps/20697/20

Installing Arc on OS X

When I tried the instructions at https://arclanguage.github.io/, after I entered "racket -f as.scm" I got "-bash: racket: command not found".
I also tried these instructions for downloading Arc on Linux:
https://sites.google.com/site/arclanguagewiki/getting-started/install-arc
I installed racket from download.racket-lang.org, and when I got to "./arc" in the Arc/Nu section, the output from the terminal was "env: racket: No such file or directory".
The Arc Language Wiki (linked to above) indicates that the official installation instructions are out of date, and says little about how to install Arc on OS X. I tried googling for a general solution to "command not found" and "No such file or directory" problems but couldn't find anything that let me fix the problem. I also tried moving my racket and arc downloads to different combinations of places.
Arc runs on top of Racket, which although you've downloaded it, does not appear to be in PATH, the environment variable containing the list of folders that Bash searches for executables.
The immediate fix is to, instead of running Arc as racket -f as.scm, run it as /path/to/racket/bin/racket -f as.scm. (The Racket documentation points out that the Racket executable is in the bin folder of the Racket folder you downloaded).
Assuming that works, the fix is to add the Racket bin folder to your PATH variable. Open up ~/.bashrc in your favorite text editor, and add a line export PATH=/path/to/racket/bin:"$PATH".
Once you do this, you'll have to open a new Terminal before this change will take effect. But once you do, you should be able to just run racket -f as.scm, and it will work.

How to change pyscripter to use Python installed in non-standard directory

I'm trying configure PyScripter 2.5.3 to use a version of Python that is installed in a non-standard install location (i.e., c:\MyProj\Python27).
NOTE: I also have ActivePython 26 and 27 also installed, in the default locations c:\python26 and c:\python27)
I have a short program that simply dumps the python path to verify that I have the correct version:
import sys; print( "\n".join(sys.path) )
When I'm using the "desired version", I'll see "c:\MyProj\Python27\lib" show up on the path.
I've looked at several postings (one is How to change the version of python that pyscripter uses) and most just say the defaults work and the defaults do work. I'm trying to use a non-default directory.
I've used Tools | Configure Tools to set the Python Interpreter, and Command Prompt to run "MyProj" version of python.
So Tools | Python Interpreter, starts c:\MyProj\Python27\python.exe
Also Tools | Command Prompt, starts c:\MyProj\Python27\python.exe version.
But I can't get the Python IDE to use the desired version when I use "Run | Debug (F9)".
I've configured Tools | Options | IDE Options | Python engine type = peRemote.
I've also tried internal.
I've tried starting PyScripter from the command line with the following options (none of these examples worked)
...\PyScripter.exe --python27 --pythondllpath=C:\MyProj\Python27
...\PyScripter.exe --python27 --pythondllpath=C:\MyProj\Python27\python27.dll
...\PyScripter.exe --python27 --pythondllpath C:\MyProj\Python27
...\PyScripter.exe --python27 --pythondllpath C:\MyProj\Python27\python27.dll
I've tried having only my version of python on the windows PATH (removing c:\Python27)
set PATH=C:\MyProj\Python27;%PATH%
...\PyScripter.exe
This has also failed to work.
Has anyone had success at using a non-standard location? If so what steps were followed?
I don't know if this is the best way to do it, but those are the two ways I did it:
WAY 1 (The best of two)
Go to PyScripter>>Tools>>Options...>>Custom Parameters... and add the following values
1. PythonDir = C:\Program Files\CustomPythonInstallation
2. PythonExe = C:\Program Files\CustomPythonInstallation\python.exe
3. PythonVer = 3.3.3
Note: Adapt the Name = Value pairs above to your case.
And close the window with OK button.
Now select PyScripter>>Run>>Python Engine>>Remote and your are ready to go.
WAY 2 (The more temporary solution)
Go to PyScripter>>Run>>Configure External Run...
set the "Application:" field to your python.exe file
Close the window with OK button.
Make sure you run your scripts with PyScripter>>Run>>External Run (Alt+F9)
I hope this helped, good luck.
I'm using two different pythons, tried to use pyscripter with both, but it kept messing up. My simple solution was to download the standalone pyscripter that doesn't use the registry, put copies into two different directories, then set each up for the different py. You can then right click on their icons and set them to start in the proper directories. You can also make two cmd icons and set them respectively so you have a command line. The command line icon can also be set to start in your working directory, although that's normally one level below python, and if it isn't on the path, you have to type ../python to get it (or use a keyboard macro for that.) This works trouble free.
I did delete both pythons and removed them from the system path just in case pyscripter looked for them. Then I installed 2.7 and set up the first scripter. I installed 34 and set up the second. Oddly, the scripters found the correct py each time - I imagine they go for the highest one. But you can also set that in scripter options. And frankly, it may not be necessary to delete py**. If not deleting them doesn't work you can just make a fresh copy of scripter and try again, since that will be a new standalone. For all I know you can reinstall python on the path once pyscripter is set up for each. I haven't tried that. Fiddle around. You can always make a new copy of the pyscripter standalone directory if things don't work out ;')
The interactions between the registry, the path, and the installed pyscripter just led to too many headaches.
Oh, pyscripter doesn't seem to play well with 3.4 but there's a fixed exe for your 3.4 standalone, here - just replace the 3.4 standalone python.exe with this one:
https://pyscripter.googlecode.com/issues/attachment?aid=7680027000&name=PyScripter-Updated.7z&token=ABZ6GAd40xS88r5vwgY9m8Y18vSFKN8q3g%3A1421517339924

./create: No such file or directory error in terminal window

I am very new to iPhone development and I am looking to work with the PhoneGap framework to create iPhone apps. I installed Phonegap on Mac OS X Lion. I got this error in the terminal window for ./create <project_folder_path> <bundle_id> <project_name>:
./create: No such file or directory
I have searched Google to solve this error, but I can't find any idea from there. Could you please help me solve this issue and run the project? Thanks in advance. Looking forward to your answers.
You probably need to check your current directory with the pwd command, which is what the . is shorthand for. The create executable sits in the Cordova bin directory, not your project directory.
For example, this site shows the required command line to be (spread across multiple lines for readability):
./path/to/cordova-ios/bin/create
/path/to/my_new_cordova_project
com.example.cordova_project_name
CordovaProjectName
In other words, create is separate from your project.
The solution is probably to fully specify the path name of create.
./path/to/cordova-ios/bin ./create
~/<project_folder_path> <bundle_id> <project_name>
This works for me :
Download cordova-3.0.0 and put the folder in your document folder. Expand cordova-ios.zip inside.
Create a folder CordovaTestProject inside your document folder.
Then, open the terminal and try :
./Documents/cordova-3.0.0/cordova-ios/bin/create /Users/<username>/Documents/CordovaXY/HelloWorld org.apache.cordova.HelloWorld HelloWorld
replace <username> by your username. You can get it with pwd in terminal. In terminal, type "pwd" and you will get your username
Make sure that you are inside \phonegap-2.7.0\lib\ios\bin before entering ./create command. Refer the Blog Tutorial for a simple and straight forward explanation of PhoneGap instalation in Mac for iOS and creating a new project.

"rails" command on windows

So I installed Ruby On Rails using the Windows Installer.
Now the startup guides says I have to start up an Terminal and run the Rails command to make a project. I don't have a terminal, so how do I execute a Rails command and make a project??
The CMD command line in Windows does not recognize "rails"
I don't think it is an PATH problem, because when I'm in the "Bin" directory, there is "rails.bat" and "rails" with no extension. If I run Rails.bat I get "The filename, directory name, or volume label syntax is incorrect."
I get that message with whatever Argument I pass to it.
It seems to be a bug in the rails.bat file because of double-quotes, like:
#"ruby.exe"" "%~dpn0" %*
Remove the double quotes:
http://sepitfalls.blogspot.com/2008/12/updateing-rubygems-broke-gem-command.html
To get a terminal
Start > Run... or Windows key + R
Type "cmd" and hit enter.
To add a folder to the command line's path
On Windows XP (Vista is similar)
Start > Control Panel > System
Click the "Advanced" tab
Click "Environmental Variables"
Under "System Variables" double click on Path and edit accordingly.
You will need to open a new command line in order to get the updated path to take affect. With XP, I've had to reboot to force it to take affect but it shouldn't be necessary.
The Path variable is a semi-colon seperated list of folders in which the Command Line or "terminal" looks for commands.
You'll probably have to find the rails command yourself. I would try looking for a rails.bat or rails.cmd file.
I think they mean the command window. Try running it from a command line.
I dont know where the Windows Ruby on Rails intaller places its files, but the ultimately solution is that you need to make sure that the "rails" command is is your PATH - which you can view/modify by right-clicking My Computer, selecting Properties, going to the Advanced tab and then clicking on "Environment Variables" and then scrolling down until you see "PATH" and adjusting it accordingly. You probably need to find the directory where the "rails" command lives and append to the end of the existing PATH entry, inserting a ";" before you enter the new path to append it to the existing PATH.
So find where "rails" is and add its directory to your PATH.
You probably have to change your PATH in Windows to point to wherever the rails executable has been installed.
The PATH environment variable is used to determine where Windows looks for stuff; when you type, for instance, 'calc' Windows will hunt through its PATH and eventually find and run C:\Windows\calc.exe. In your case, the PATH doesn't include the directory you need, so Windows isn't searching in that directory for rails.exe when you type "rails."
To fix this, right click on "My Computer" -> "Properties" -> "Advanced" -> "Environment Variables" and then modify the PATH one to include the directory your rails.exe is in.
I recommend using cygwin for Rails development on windows - far too much of the community is using *nix. If you install the development tools package you'll automatically have svn, git and other doo-dads that you'll eventually need relating to various rails plugin installation. If you want to deploy using capistrano the installation is identical to all the instructions you find. Plus other tips and tricks people will reference will work exactly the same for you as it does for them, whereas some things are different for native windows and all the accessory tools have to be installed separately.

Resources