Skip to content

Instantly share code, notes, and snippets.

@therocco
Last active November 1, 2019 18:57
Show Gist options
  • Save therocco/5c63658906eee57a88976bbc0cb8a514 to your computer and use it in GitHub Desktop.
Save therocco/5c63658906eee57a88976bbc0cb8a514 to your computer and use it in GitHub Desktop.

wine setup

After installing the PackageManager via wine edit the file $HOME/.wine/drive_c/users/$(whoami)/MagicLeap/PackageManager/package-manager.ini using your favorite text editor and add the following arguments.

-Dprism.order=j2d
-Dsun.java2d.d3d=false

Now you should be able to start the PackageManager and bypass the blank black screen.

Environment Setup

In your terminal enter the following

source $HOME/.wine/drive_c/users/$(whoami)/MagicLeap/mlsdk/v0.22.0/envsetup.sh
export MLCERT=<path_to_cert>

Install Python 3.5

If you're using Ubuntu 18.04+ you can install Python 3.5 via the following terminal commands

sudo add-apt-repository ppa:deadsnakes/ppa
sudo apt-get update
sudo apt-get install python3.5

Once you've installed Python 3.5 you will need to symlink it to your mlsdk folder and add an extra file to get the Windows binaries working for building.

ln -s /bin/python3.5 $HOME/.wine/drive_c/users/$(whoami)/MagicLeap/mlsdk/v0.22.0/tools/python3/bin/python3.5

Make Windows Binaries executable

chmod a+x $HOME/.wine/drive_c/users/$(whoami)/MagicLeap/mlsdk/v0.22.0/tools/tools/mldb/mldb.bash
ln -s $HOME/.wine/drive_c/users/$(whoami)/MagicLeap/mlsdk/v0.22.0/tools/mldb/mldb.bash $HOME/.wine/drive_c/users/$(whoami)/MagicLeap/mlsdk/v0.22.0/tools/mldb/mldb
echo "wine $HOME/.wine/drive_c/users/$(whoami)/MagicLeap/mlsdk/v0.22.0/tools/signer/sign-file.exe" > $HOME/.wine/drive_c/users/$(whoami)/MagicLeap/mlsdk/v0.22.0/tools/signer/sign-file
chmod a+x $HOME/.wine/drive_c/users/$(whoami)/MagicLeap/mlsdk/v0.22.0/tools/signer/sign-file
echo "wine $HOME/.wine/drive_c/users/$(whoami)/MagicLeap/mlsdk/v0.22.0/tools/toolchains/bin/aarch64-linux-android-cpp.exe" > $HOME/.wine/drive_c/users/$(whoami)/MagicLeap/mlsdk/v0.22.0/tools/toolchains/bin/aarch64-linux-android-cpp
chmod a+x $HOME/.wine/drive_c/users/$(whoami)/MagicLeap/mlsdk/v0.22.0/tools/toolchains/bin/aarch64-linux-android-cpp
echo "wine $HOME/.wine/drive_c/users/$(whoami)/MagicLeap/mlsdk/v0.22.0/tools/toolchains/bin/aarch64-linux-android-as.exe" > $HOME/.wine/drive_c/users/$(whoami)/MagicLeap/mlsdk/v0.22.0/tools/toolchains/bin/aarch64-linux-android-as
chmod a+x $HOME/.wine/drive_c/users/$(whoami)/MagicLeap/mlsdk/v0.22.0/tools/toolchains/bin/aarch64-linux-android-as
echo "wine $HOME/.wine/drive_c/users/$(whoami)/MagicLeap/mlsdk/v0.22.0/tools/toolchains/bin/aarch64-linux-android-gcc-ar.exe" > $HOME/.wine/drive_c/users/$(whoami)/MagicLeap/mlsdk/v0.22.0/tools/toolchains/bin/aarch64-linux-android-gcc-ar
chmod a+x $HOME/.wine/drive_c/users/$(whoami)/MagicLeap/mlsdk/v0.22.0/tools/toolchains/bin/aarch64-linux-android-gcc-ar
echo "wine $HOME/.wine/drive_c/users/$(whoami)/MagicLeap/mlsdk/v0.22.0/tools/toolchains/bin/aarch64-linux-android-objcopy.exe" > $HOME/.wine/drive_c/users/$(whoami)/MagicLeap/mlsdk/v0.22.0/tools/toolchains/bin/aarch64-linux-android-objcopy
chmod a+x $HOME/.wine/drive_c/users/$(whoami)/MagicLeap/mlsdk/v0.22.0/tools/toolchains/bin/aarch64-linux-android-objcopy
echo "wine $HOME/.wine/drive_c/users/$(whoami)/MagicLeap/mlsdk/v0.22.0/tools/toolchains/bin/aarch64-linux-android-strip.exe" > $HOME/.wine/drive_c/users/$(whoami)/MagicLeap/mlsdk/v0.22.0/tools/toolchains/bin/aarch64-linux-android-strip
chmod a+x $HOME/.wine/drive_c/users/$(whoami)/MagicLeap/mlsdk/v0.22.0/tools/toolchains/bin/aarch64-linux-android-strip

NOTES:

You should now be able to run mabu from your terminal but you might encounter a few bugs trying to push apps to the ML1 headset. Still working on some debugging to get a MagicScript app to deploy.

@NoahSchiffman
Copy link

@OliverEvans96 - I Was referring to authentication where-in the user is able to execute a command on the device. and authenticate their app on-board their device using MLDB with wine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment