Android On Osx

broken image


Set up IntelliJ for developing Android Studio. Download the latest IJ community edition. Add a JDK to it: Project Structure SDK's Add new JDK with the exact name 'IDEA jdk'. (Note that this SDK should be a standard JDK, NOT an 'IntelliJ Platform Plugin SDK') Please use JDK 1.6, since we are still supporting the IDE running on Java 6. Download OneDrive for your Windows PC or Mac, sign in with your Microsoft OneDrive login, or install the mobile OneDrive app for iOS or Android. Introducing Android 11. Meet the OS that's optimised for how you use your phone. Helping you to manage conversations. And organising your day. With even more tools and privacy controls that put you in charge.

Brother asked me If he could borrow my Android tablet. I said sure, no problem. Unfortunately I had to write small how to for an app we use in the office. Luckily for me, there is a way to install and run Android in OSX via Vmware Fusion. You can also install Android on a Windows via VMware Workstation or VMware Player.


First you have to install VMware Fusion. Then, you have to download the latest Android version from Android-x86.org website.

Once you completed steps above, fun can begin.

There is also an alternative, android emulator:

Install Android on VMware Fusion OSX

When you visit Android-x86.org website, you have to select which version to download. When I created this guide, the latest version was 4.4-RC2, but now 4.4-r1, released in August 2014, is available.

Click on a View hyperlink to download iso image. When download will complete, you can create a new Virtual Machine.

Open VMware Fusion on OS X or VMware Workstation on a Windows PC. Go to File and select New

New window will open, here you can select installation method. Since we have downloaded .ISO image, you can select Install from disc or image option. Click Continue to proceed to the next step.

Click on a Use another disc or disc image button. Select android image and confirm.

Android iso image you have selected will be shown. Click on Continue to proceed to the next step.

VMware Fusion will set machine type as FreeBSD. It's ok. Don't worry about it if you think that it should be Linux instead.

In this days smart phones and tablets come with 2GB Ram by default. You can add 2GB Ram to VM but it will work with 1GB just fine.

By default HDD size is set to 20GB, if you don't have space constraints, you can leave it at 20GB.

To reduce HDD size or change RAM settings, click on a customize Settings button in the last step of configuring your new VM.

When you'll click on Customize settings button, save as dialogue will appear. You have to select location and name of your file. Click on save.

Now, two windows will appear. First is a virtual machine which you can start (I have placed Settings window above VM window for making a screenshot). Second window are settings for this VM (Settings window at the top). If you want to reduce HDD size, you have to click on a Hard disk (HDD) icon.

To set custom HDD size, you can use a slider or you can enter size value by using a keyboard. To confirm new size, click on Apply button.

If you want to change RAM settings, you have to click on Processors & Memory icon, you can change RAM size in a similar way.

Once you are done configuring settings you can close settings window.

Now you can install Android on OS X or a Windows PC. Click on a play icon to begin with installation.

Please note, once you click on a VM, keyboard will be locked to the virtual machine. You won't be able to use mouse to move from Virtual Machine to your OS. To navigate inside the VM you will have to use keys on a keyboard. To release keyboard and mouse press Ctrl and Cmd buttons at the same time. On Windows PC press Ctrl + Alt.

When you will be presented with a boot screen, navigate to Installation – Install Android x86 to hard disk, press enter.

Now we have to create a partition. Navigate to Create/Modify partition, press Enter

To set up a new partition select New (navigate with cursor keys – up, down, left, right.), press Enter.

Now select Primary partition, press Enter.

We have to make partition Bootable, confirm with Enter

It will ask you about partition size, In my case, I used 20GB default size. If you resized you virtual disk to 6GB, you will see 6440.39 MB in size. Press Enter.

In the next step we have to set partition as bootable. Bootable option is selected by default, so just press Enter. Under Flags column, Boot sign will appear. All you have to do is to press Enter. If you have used default HDD size, you will see 20GB partition size, If you have used custom size, you will see custom partition size. For a different size example, I have used 6GB to give you an idea how it will look, but If you have used defaults, 20GB will be shown instead.

Once you made it bootable, we have to write settings to the partition, to do that, navigate with cursor keys to the right bottom side and once selected, press enter.

Last step is to confirm and to create a new partition. You have to type yes and confirm with Enter. When operation is completed, navigate to Quit and press enter.

Now you have to select partition we have just created. Confirm and press enter.

Now we have to select Filesystem to format newly created partition. Choose Ext3 as a Filesystem and confirm by pressing OK with Enter.

It will ask you if you really want to format sda1 (our partition) with ext3 filesystem. Confirm with yes by pressing Enter. It will format a partition.

On the next screen, it will ask you if you wish to install boot loader Grub .

Select yes at Do you want to install boot loader GRUB screen, by pressing Enter.

It will also ask you if you want to install system directory as read-write. Select yes and press Enter.

The last step is to choose whether you want to run Android or if you would like to reboot. Choose reboot.

After system restart, you will boot to the newly installed Android environment. Mouse will start working, but you will still have to release keyboard and mouse when you would like to navigate away from VM.

Setup basic settings. And proceed to the next step.

Android Apps On Mac

You can use your own Gmail account or you can set up new one. Animal crossing ds limited edition. You need Google account to be able to install applications from the Play store. Once you complete all the settings., you will see familiar environment.

We have covered How to install Android on VMware Fusion OSX but you can use the same procedure on Windows with VMware Workstation. If you own EEE PC, Android-X86 provides images which can be used to install Android on your net top.

Linux

Related

Once you have completed your game you surely want to make it available to others. In general you should first create a .love-file which can be either directly distributed (which requires users to have LÖVE installed) or used for platform specific packages.

These are the preferred ways to distribute your game depending on target (all make use of the .love file):

  • Windows → Windows Executable
  • macOS → macOS Application
  • Linux → plain .love file, or Appimages
  • 1Create a .love-file
    • 1.1Platform Specific Notes
  • 2Creating a Windows Executable
    • 2.1Platform Specific Instructions
      • 2.1.1Windows
  • 3Creating a macOS Application
  • 4Distribution for Linux
  • 5Android

Create a .love-file

Please note that some operating systems use case-sensitive paths. To avoid unnecessary hassle make sure that the path specifications you use in code matches that of your folders and files.

To create a .love-file you have to create a zip file of the whole game directory. Make sure that your main.lua is in the root of the archive, e.g. if you have

then you must ensure the zip file contains

and not the directory SuperGame.

Once you have your zip file you simply rename the ending from .zip to .love and you are done!

Run Apk On Mac

If you're using a case-insensitive file system (e.g. Windows), it's advisable to move the .love file to some place other than the folder where your game is, and test again. This will reveal any case sensitivity problems that other users may run into when trying to run your game. If it's run in the same folder, it will find there the files that it can't find in the .love file, so you have to move it before testing. A good place to move it is a folder within your game directory, e.g. love/MyGame.love.

Platform Specific Notes

Windows

Windows supports creation of zip files out of the box via right-click menu. For detailed instructions see Compress and uncompress files (zip files).

macOS

Inside the game folder, select the game files and folders, right-click/Ctrl+click and pick Compress n items. Then rename the resulting .zip file to have a .love ending.

Alternatively, you can use the terminal. Navigate inside the game folder and run:

Linux

Assuming your current directory is SuperGame/ you can create the .love file from command line directly using

Creating a Windows Executable

Once you have packed your game into a .love file you can create a game executable that directly runs your game.

For this you have to append your .love file to the love.exe file that comes with the official LÖVE .zip file. The resulting file is your game executable.

Once you have your game executable you can pack it together with all the other DLL files of the official LÖVE .zip file into a new .zip file and share this with the world.

Note: Some people do not have a 64-bit version of Windows, so it is a good idea to either distribute both 32- and 64-bit versions of your game, or only distribute a 32-bit version.

Platform Specific Instructions

Windows

To create your game executable under windows use the command line to run

Note: You may have to run the command as an administrator on your computer. You can do this by going to WindowsSystem32 and right clicking on cmd.exe and selecting the option Run as administrator. After this, you must type cd C:Program FilesLOVE (or whatever your default love directory is), then you may continue as normal.

Alternatively you can create a .bat (e.g. create_game_exe.bat) file with the contents

and then you can simply drag your SuperGame.love file onto the .bat file and it will create the file SuperGame.love.exe which you could then use for distribution.

If you are using PowerShell instead of cmd, then the command used is a little bit different:

This method creates a fused game.

Windows icon

You can use your own icon images using tools like for example the freeware Resource Hacker.

Video tutorial and step-by-step instructions are available.

Linux / OS X

You can create the windows executable from Linux and OS X using the command line.

First download the official zipped 32 or 64 bit executable (not Buy starcraft 2 wings of liberty. the installer) from https://www.love2d.org/. 32 bit games can run on 64bit Windows systems but not vice versa, so to save time on smaller games, you can provide 32bit only.

Then in the command line/terminal run

to obtain the game executable SuperGame.exe.


When distributing the windows executable you will need to include the dll files that came in the folder of the love.exe you used (so don't mix the 32 bit dll's with the 64 bit dll's). Without these files you will get error message when attempting to run SuperGame.exe on a windows machine.

The contents of your final distribution folder should look something like this:

  • SDL2.dll
  • OpenAL32.dll (note: this file is different in the 64 bit download despite still being called 'OpenAL32.dll')
  • SuperGame.exe
  • license.txt (note: the license requires that it be included in any further distribution)
  • love.dll
  • lua51.dll
  • mpg123.dll
  • msvcp120.dll
  • msvcr120.dll

Creating a macOS Application

For official/commercial distribution (e.g., in the Mac App Store) skip to the next section, Official Distribution and the App Store.

Once you have your game prepared as .love file you can make your game available for macOS users by following the steps below (video tutorial available):

  1. Download and extract the Mac version of LÖVE from the LÖVE homepage
  2. Rename love.app to SuperGame.app
  3. Copy your SuperGame.love to SuperGame.app/Contents/Resources/ (right-click/Ctrl+click and pick 'Show Package Content' on OS X). This will result in the game running in fused mode.
  4. Modify SuperGame.app/Contents/Info.plist (see below for details)
  5. Zip the SuperGame.app folder (e.g. to SuperGame_osx.zip) and distribute it. Enable the -y flag of zip to keep the symlinks.

When modifying SuperGame.app/Contents/Info.plist make sure to change the string values of the following XML-tags:

  • CFBundleIdentifier
  • CFBundleName

and remove the section UTExportedTypeDeclarations which ensures that macOS does not associate all .love files with your app. Overall the changes should be something like this:

Original Info.plistModified Info.plist

Official Distribution and the App Store

Compiling Mac apps requires a Mac running macOS with XCode installed (you can install XCode from the app store).

  1. Download the love source code
  2. Download the required frameworks from here and place them in /Library/Frameworks/.
  3. Open the Xcode project found at platform/xcode/love.xcodeproj. You will build the love-macosx target as described below.
  4. In XCode, Modify the macOS icons in Images.xcassets
  5. In XCode, Update the love-macosx.plist (see instructions above)
  6. Add your .love file to the 'Copy Bundle Resources' Build Phase
  7. Follow Apple's guide for distributing Mac apps

Distribution for Linux

For Linux there is not yet a simple way to distribute your game. The general approach here is to point to the official LÖVE packages at https://www.love2d.org. Once the package is installed, the .love packages are usually automatically executed using the installed LÖVE package or using the command line:

Make sure to include a conf.lua file with at least the LÖVE version used.

A common mistake is trying to fuse the love Linux binary with a love file:

Please keep in mind, while the binary `SuperGame` will run on your machine, and other Linux distros that have the same architecture and similar version libraries, there's a good chance that it will not run on many other Linux distros.

Linux

It has not been yet proven to work in all scenarios, but this a way of distributing your game for Linux.

  1. Download the appropriate Linux version of love (with file extension .tar.gz), either x86_64, or i686. Download Page
  2. Extract the .tar.gz. You can do this by either right clicking the file and pressing 'extract file', or extract it via the command line:
  3. Move your game.love file inside the extracted folder.
  4. Edit the file called love by replacing '$@' with '${LOVE_LAUNCHER_LOCATION}/game.love'

Debian

There is a policy for including LÖVE games in the Debian archive. It can be followed to create a package for a game even if it is not intended to include it in the archive.

AppImages

The AppImage format is a format for packaging applications in a way that allows them to run on a variety of different target systems (base operating systems, distributions) without further modification. The whole kit can be downloaded from here.

In order to package games using AppImage, the libraries and dependencies required by love need to be gathered, which can be done easily using CARE (available packaged in the Ubuntu repositories) by executing:

.

This program makes an archive, which contains the love executable and its dependencies and related files kept in the way of your system.Secondly, the game's .love file needs to be 'fused' by the means shown in the above section. Now, the files need to be placed in the following way in a new directory:

Finally, the directory needs to be converted into an AppImage, using AppImageAssistant available in the kit.More information can be found in the AppImage documentation.

Open Android On Mac

Android

Compiling from source

First clone the android LÖVE project:

(optionally with --depth 1 to save download times)Then, download the Android SDK (API 30) and Android NDK (exactly version 21.3.6528147 or r21d).

Set these environment variables

  • ANDROID_HOME to your Android SDK location.

Put the game (exactly named 'game.love') in the directory (project)/app/src/main/assets (create the directory if necessary).

Change the app launcher name (project)/app/src/embed/AndroidManifest.xml. Change the package name, version code, and version string in (project)/app/build.gradle

For Linux or macOS systems it may be necessary set the executable permission:

And finally to generate the APK, do:

The APK will be in (project)/app/build/outputs/apk/embed/release/app-embed-release-unsigned.apk

And if you need to generate AAB to be uploaded to Play Consode, do:

The AAB will be in (project)/app/build/outputs/bundle/embedRelease/app-embed-release.aab

For more information see the GitHub repository.

Using APKTool

This method is now deprecated as Play Store will mandate Android Application Bundle in 2021 and this method is subject to deletion!

Please see Game Distribution/APKTool for more information.

iOS

Basic instructions for iOS (without fusing) are available at Getting_Started#iOS.

Due to Apple restrictions, fusing for iOS is only possible under macOS!

To fuse your game into the LÖVE engine:

  1. Get iOS source code from love2d.org.
  2. Open platform/xcode/love.xcodeproj with Xcode.
  3. Select love-ios target (not love-macosx)
  4. Select Build Phases of the 'love-ios' target and add your 'game.love' file into Copy Bundle Resources.
  5. Build the project.
  6. Your game should appear on your iOS device as an app.

Open Android Phone On Mac

If you can't find the relevant XCode UI elements, you can refer to video tutorial on YouTube.

Distribution on the web

Publishing as a HTML5 or JavaScript game is possible thanks to TannerRogalsky/love.js. Threads for example are not supported though and playback of course depends on the browser.

A more modern fork of the above project is maintained at Davidobot/love.js and supports LÖVE v11.3.

Community Tools

There are a few tools developed by the community to help with game distribution.

  • makelove, advanced multi-platform tool to fuse your game written in Python 3. Supports Windows and Linux with AppImage.
  • love-release (forum), a Lua script that automates game distribution. Supports Windows, macOS, Debian, Linux, with much more features.
  • boon (forum), a multi-platform, easy to use tool supporting Windows, macOS, Linux.
  • Love Distrubution Pack[sic], a windows-only tool that can create .love files and exes.
  • love-dist, a windows-only tool that can LuaC your files and create an exe.
  • love-export, a fast and simple command-line tool that builds binaries for you. Supports Windows, MacOS, and Linux.

Other Languages

Dansk –Deutsch –English – Español –Français –Indonesia –Italiano –Lietuviškai –Magyar –Nederlands –Polski –Português –Română –Slovenský –Suomi –Svenska –Türkçe –Česky –Ελληνικά –Български –Русский –Српски –Українська –עברית –ไทย –日本語 –正體中文 –简体中文 –Tiếng Việt –한국어
More info

Retrieved from 'https://love2d.org/w/index.php?title=Game_Distribution&oldid=26223'




broken image