# Installing *Git* on a *Mac*
[Open a terminal window](http://www.youtube.com/watch?v=zw7Nd67_aFw).
## Step 1 – Install [*Homebrew*](http://brew.sh/)
> *Homebrew* […] simplifies the installation of software on the Mac OS X operating system.
– [Homebrew – Wikipedia](http://en.wikipedia.org/wiki/Homebrew_%28package_management_software%29)
**Copy & paste the following** into the terminal window and **hit `Return`**.
```shell
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew doctor
```
You will be offered to install the *Command Line Developer Tools* from *Apple*. **Confirm by clicking *Install***. After the installation finished, continue installing *Homebrew* by **hitting `Return`** again.
## Step 2 – Install *Git*
**Copy & paste the following** into the terminal window and **hit `Return`**.
```shell
brew install git
```
**You can use *Git* now.**
# Installing *Git* on *Linux* Determine on **which *Linux* distribution** your system is based on. See [List of Linux distributions – Wikipedia](http://en.wikipedia.org/wiki/List_of_Linux_distributions) for a list. **Most *Linux* systems – including *Ubuntu* – are *Debian*-based**. ## *Debian*-based linux systems **[Open a terminal window](https://help.ubuntu.com/community/UsingTheTerminal). Copy & paste the following** into the terminal window and **hit `Return`**. You may be prompted to enter your password. ```shell sudo apt-get update sudo apt-get upgrade sudo apt-get install git ``` **You can use *Git* now.** ## *Red Hat*-based linux systems **Open a terminal. Copy & paste the following** into the terminal window and **hit `Return`**. You may be prompted to enter your password. ```shell sudo yum upgrade sudo yum install git ``` **You can use *Git* now.**
<?php /* * copy Apache php.ini to the current path. */ $file = php_ini_loaded_file(); $newfile = './php.ini'; if(!@copy($file, $newfile)) { $errors= error_get_last(); echo "COPY ERROR: ".$errors['type']; echo "<br />\n".$errors['message']; } else { echo "File copied from remote! From: $file , To: $newfile"; } echo "Loaded Configuration File: ".php_ini_loaded_file();
swsusp/S3 tricks
~~~~~~~~~~~~~~~~
Pavel Machek <pavel@suse.cz> If you want to trick swsusp/S3 into working, you might want to try: * go with minimal config, turn off drivers like USB, AGP you don't really need * turn off APIC and preempt * use ext2. At least it has working fsck. [If something seems to go wrong, force fsck when you have a chance] * turn off modules * use vga text console, shut down X. [If you really want X, you might want to try vesafb later] * try running as few processes as possible, preferably go to single user mode. * due to video issues, swsusp should be easier to get working than S3. Try that first. When you make it work, try to find out what exactly was it that broke suspend, and preferably fix that.
LAMW: Lazarus Android Module Wizard
RAD Android! "Getting Started" for Windows [by Jose Marques Pessoa] Linux Install Tutorial: LAMW folder "...docs\linux" About MacOS: X11 [libGL.dylib] is no longer bundled with Mountain Lion (and later!) [This prevents/drop some LAMW features, including the use of OpenGL components "jCanvasES1" and "jCanvasES2"] About MacOs Install: [adapted from ".../docs/linux/tutorial_by_waynesherman] .Install [I] Infrastructure .Install FPCUpdeluxe https://github.com/newpascal/fpcupdeluxe/releases/download/v1.6.0q/fpcupdeluxe-powerpc-darwin-carbon.app.zip .Use FPCUpdeluxe to Install FPC+Laz [trunk or stable or ...] .Use FPCUpdeluxe to Install arm/android cross-compile .Github ref. https://github.com/jmpessoa/lazandroidmodulewizard .Forum ref. http://forum.lazarus.freepascal.org/index.php/topic,21919.0.html I. Infrastructure .Java JDK 8 : [recommended!!!] http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html Warning: Java JDK > 8 don't support [anymore] "ant" build system! .Android SDK [old] --- "ant" and "gradle" build supported... [recommended!!!] [Windows] http://dl.google.com/android/installer_r24.0.2-windows.exe [Linux] http://dl.google.com/android/android-sdk_r24.0.2-linux.tgz [Mac] http://dl.google.com/android/android-sdk_r24.0.2-macosx.zip Hint: 1)after unpacked/install, open a command line Terminal and go to folder "sdk/tools" 2)run the command "android update sdk" to open a GUI "SDK Manager" 3)check "Android SDK Tools" 4)check "Android SDK Platform-Tools" 5)check "Android SDK Build-Tools 25.0.3" 6)check "Android SDK Build-Tools 26.0.2" 7)go to "Android 7.1.1 (API 25)" and check only "SDK Platform" 8)go to "Android 8.0.0 (API 26)" and check only "SDK Platform" 9)go to "Extras" and check: "Android Support Repository" "Android Support Library" "Google USB Drive" //windows only... "Google Repository" "Google Play Services" .Android SDK [updated/modern version] --- only "gradle" build supported... [Windows] https://dl.google.com/android/repository/sdk-tools-windows-3859397.zip [Linux] https://dl.google.com/android/repository/sdk-tools-linux-3859397.zip [Mac] https://dl.google.com/android/repository/sdk-tools-darwin-3859397.zip .Android NDK https://developer.android.com/ndk/downloads/index.html .Laz4Android [Windows] [cross-arm-android compiler installed!] http://sourceforge.net/projects/laz4android/files/?source=navbar :: OR Lazarus [canonical] "Do It Yourself" a cross Android compile! [windows]: After install the LAMW go to: 1. IDE "Tools" --> "[Lamw] Android Module Wizard" --> "Get FPC Source [Trunk]" 2. IDE "Tools" --> "[Lamw] Android Module Wizard" --> "Build FPC Cross Android" .Ant [to build Apk] http://ant.apache.org/bindownload.cgi Simply extract the zip file to a convenient location... .Gradle 4.4.1 [to build Apk with "AppCompat" [material design] theme] https://gradle.org/next-steps/?version=4.4.1&format=bin Simply extract the zip file to a convenient location... warning: Gradle build process need internet connection!!! .Hint [Lazarus Docked Desktop. Nice!] https://github.com/FlKo/LazarusDockedDesktops .[LAMW 0.8] "AppCompat" [material design] theme need:'+ 1. Java JDK 1.8 2. Gradle 4.4.1 [https://gradle.org/next-steps/?version=4.4.1&format=bin] 3. Android SDK "plataforms" 26 + "build-tools" 26.0.2 4. Android SDK/Extra "Support Repository" 5. Android SDK/Extra "Support Library" 5. Android SDK/Extra "Google Repository" 5. Android SDK/Extra "Google Play Services" II. LAMW: Lazarus Android Module Wizard .Install order. tfpandroidbridge_pack.lpk [..../android_bridges] lazandroidwizardpack.lpk [..../android_wizard] amw_ide_tools.lpk [..../ide_tools] III. USING LAMW 1. Configure Paths: Lazarus IDE menu "Tools" ---> "[Lamw] Android Module Wizard" --> "Path Settings ..." ref. https://od.lk/f/Ml8xNTU4Mjc1NDZf NOTE: [MacOs >= 10.5] path to Java JDK auto setting as: ${/usr/libexec/java_home} 2. [How to] New Project [Thanks to Ahmad Bohloolbandi (a.k.a. @developing)] After install "LAMW" packages and Configured the paths: 2.1-From Lazarus IDE select "Project" -> "New Project" ref. https://od.lk/f/Ml8xNTU4Mjc1NThf 2.2-From displayed dialog select "LAMW GUI Android Module" 2.3-Press OK Button. 2.4. From Form "Android Module wizard: Configure Project..." [Workspace Form] ref. https://od.lk/f/Ml8xNTU4Mjc1NjBf 2.4-Fill/complete the fields: "Path to workspace [projects folder]" example: C:\MyLamwProjects 2.5-Fill/complete the field: "New Project Name [or Selec one] example: LamwGUIProject1 [This is your Android App/Apk name] 2.6-[MinSdk] Select the Min. Device Api need to run your App: example: 14 2.8-Select Architecture/Instruction: example: ARMv6 2.9.Select Android Theme example: [DefaultDevice] or "AppCompat" for material design theme 2.9.Click "OK" 2.10-Save All [unit1.pas] to path that is showed ... 3. From "Android Bridge" component tab drag/drop a jTextView in the "Android Module Form" designer set property: PosRelativeToParent = [rpTop,rpCenterHorizontal] WARNING! .Please, whenever a dialog prompt, select "Reload from disk" 4. From "Android Bridge" component tab drag/drop a jButton the "Android Module Form" designer set property: Anchor = jTextView1 set property: PosRelativeToAnchor : [raBelow] set property: PosRelativeToParent = [rpCenter] write code for event property "OnClick": example: ShowMessage('Hello!') 5. Lazarus IDE menu "Run" ---> "Build" PANIC? Please, go to: III.1. "Configure Paths" and fix its! 6. Connect your Device to Computer [usb] and configure it to "debug mode" "App settings" ---> more/aditional -- developer options [*]: stay awake [checked!] usb debugging [checked!] verify apps via usb [checked!] PANIC? Go to Google search with "android usb debugging <device name>" to get the operating mode adapted to your device... ex. Galaxy S3/S4 --> app settings --> about -->> Build number -->> [tap,tap,tap,...] ex. MI 2 --> app settings --> about -->> MIUI Version -->> [tap,tap,tap,...] 7.Lazarus IDE menu "Run" ---> "[Lamw] Build Apk and Run" [Congratulations!!!] 8.PANIC? Fail to buid "Apk" or Run "Demos"... .Try change project "AndroidManifest.xml" according your Android SDK system installation.... .<uses-sdk android:minSdkVersion="15" android:targetSdkVersion="17"/> .Change your project "build.xml" according your Android SDK system installation and "AndroidManifest.xml" .<property name="target" value="android-17"/> 9. Using/Testing "Demos": [Please, before try a demo, do yourself a first "hello world" apk!] [so, you can test your environment settings ...] .Lazarus IDE menu --> Open the project *.lpi [....\jni] .Lazarus IDE menu --> Project --> Project Inspector --> "Unit1.pas" [etc...] .Lazarus IDE menu "Run" ---> "Build" .Lazarus IDE menu "Run" ---> "[Lamw] Build Apk and Run" [Congratulations!!!] 10. NOTE: All LAMW projects [and demos] are Eclipse compatible! Thank you! 11. About "untitled" demos: AppTest1 : multi-form demo AppTest2: jni coding: the hard way AppTryCode1: jHello component demo [array, strings, etc...] AppTryCode2: jMediaPlayer1 and jSurfaceView1 components demo AppTryCode2: jDumpJavaMethods component demo [about java to pascal converter...] Thanks to All! [FAQ 2]: [Thanks to Ahmad Bohloolbandi (a.k.a. @developing) ] #Question: How do we can design a layout that shown same in real device? [Answer]: You should use the component properties: "Anchor", "PosRelativeToParent", "PosRelativeToAnchor", "LayoutParamHeight", "LayoutParamWhidth" Example: 1-Put a "jTextView" component on your AndroidModule form: Set "PosRelativeToParent" "rpCenterHorizontal" [True] "rpTop" [True] 2-Put a "jButton" component on AndroidModule form: Set "Anchor" to "jTextView" (Because you should set position relative with "jTextView") set "PosRelativeToAnchor" "raBelow" [True] 3-Put a "jEditText" component on form: Set "Anchor" to "jButton". Set "PosRelativeToAnchor" "raBelow" [True] NOTE: Anchor setting is most important section of this design, because your component position depends on this property. And for change width and/or height of each components you should change/configure "LayoutParamWhidth" and/or "LayoutParamHeight".
Copyright @ Solve It Your Way: 2018