development <<< haxelib syntax

using haxelib

console/terminal

haxelib update
НЕ ДЕЛАТЬ ТАК!!! обновляет все библиотеки и переключает на последнюю версию. После этого не работает haxeflixel как надо. И надо откатываться на старые версии библиотек при помощи команд "haxelib set [libname/project-name] [version]" . Какие, надо читать где то.
17-01-2018 manual rebuild lime 2.9.1 prebuilded as default and last worked version for haxeflixel , that "lime build android" can create target sdk version 26 (prebuilded lime 2.9.1 version can build only for target sdk version 19), which will minimum version for publish to playstore, in second half of 2018, as say google developer message. The way tested and worked on win7 x64, ubuntu 16.04.3 x64 .

Before you can use only:
-Project.xml <android minimum-sdk-version="9" if="android" /> <android target-sdk-version="19" if="android" />
-AndroidManifest.xml <uses-sdk android:minSdkVersion="9" android:targetSdkVersion="19"/>
After you can use:
-Project.xml <android minimum-sdk-version="9" if="android" /> <android target-sdk-version="26" if="android" />
-AndroidManifest.xml <uses-sdk android:minSdkVersion="9" android:targetSdkVersion="26"/>

original article

win7 x64
jdk 1.8.0_131 (JAVA_HOME C:\Program Files\Java\jdk1.8.0_131)
on the board:
- qdir - free win file manager weblink
- conemu - free improved win console emulator - allow make "rmouse click - ConEmu Here" from any folder weblink
- git - free, will need for comfort download lime source from github weblink
- TortoiseGit - free, will need to comfort create lime 2.9.1(lime 2.9.1 last worked with haxeflixel, at this time, but 5.9.1 is last version of lime) source, for building. Installed with all default settings, auto-recomended for win.
TortoiseGit 2.5.0 - 64-bit weblink
- haxeflixel working environment installed haxe and haxelib libs
-- haxe 3.4.3 win64
-- flixel 4.3.0
-- hxcpp 3.4.64 (last working, but not newest)
-- openfl 3.6.1
-- lime 2.9.1 (haxeflixel prebuilded version of lime, which can't use android api 26 targeting correct)
--- android NDK r9d (android-ndk-r9d-windows-x86_64.zip). Not available on official site(at this moment r10 is oldest available). Googled and used at my own risk. NDK r9d weblink

"Hack" section steps:
1 - "Download Android SDK Tools version 26.0.1":
-- https://developer.android.com/studio/index.html#tos-header
-- click "sdk-tools-windows-3859397.zip", at this moment it's only available version
-- check the box at the bottom page, download zip file, and extract it into prepared comfort folder, as result we have new "tools" folder

2 - "Using Android SDK Tools run sdkmanager platforms;android-26":
-- open conemu inside "... tools\bin\" folder, where placed "sdkmanager.bat" file. Yes , no gui in this version
-- conemu sdkmanager platforms;android-26 , Enter, see big text of license etc and "Accept? (y/N): "
-- conemu "y" Enter, wait few minutes, and after "done", we have new folder "...platforms\android-26"

3 - "Copy <Android SDK Tools path>/platforms/android-26 over to <Android SDK Manager path>/platforms":
-- just copy "android-26" folder. The default place for win is "C:\Development\Android SDK\platforms"

4 - "Using Android SDK Tools run sdkmanager build-tools;26.0.3"
-- open conemu inside "... tools\bin\" folder, where placed "sdkmanager.bat" file.
-- conemu sdkmanager build-tools;26.0.3 , Enter, and after "done", we have new folder "...build-tools\26.0.3"

5 - "Copy <Android SDK Tools path>/build-tools/26.0.3 over to <Android SDK Manager path>/build-tools"
-- just copy "26.0.3" folder. The default place for win is "C:\Development\Android SDK\build-tools"


"Re-compile Lime" section steps:
1 - "Run openfl rebuild hxcpp android -clean"
-- conemu haxelib run openfl rebuild hxcpp android -clean , Enter, wait sometimes

2 - "git clone Lime into /lime (haxelib releases of Lime can't be recompiled)":
-- prepare comfort folder for lime source files for example "C:\GITHUBDOWNLOADS", open it in explorer, right click inside - "Git Clone...",
past "https://github.com/openfl/lime.git" in url, click ok and wait, while git under TortoiseGit control download the lime source from
github. Then "close".

3 - "Checkout the tag containing your version of Lime (2.9.1 in my case)":
-- open in explorer (qdir in my case) "C:\GITHUBDOWNLOADS\lime", right click - TortoiseGit - Switch/Checkout
-- switch to - tag (radiobox) - 2.9.1 - create new branch (checkbox), then "ok", and wait while "success..."

4 - "Update the submodules":
-- press "update submodules"
, no touch/switch anything and just press "ok", wait few minutes, when "success..." press "close". If something will fail(was few times
because wifi internet) then repeat steps from "open in explorer (qdir in my case)..." step

5 - "Rename your current Lime directory, and give its previous name to the cloned one":
-- rename old "2,9,1" folder to "_2,9,1" . Default win7 is "C:\HaxeToolkit\haxe\lib\lime\2,9,1"
-- create new "2,9,1" folder and copy all files and paths from "C:\GITHUBDOWNLOADS\lime"
-- open conemu(or console) in any place
-- console haxelib install format , Enter, wait
-- console haxelib run lime rebuild android -Dlegacy , Enter, wait
-- console haxelib run lime rebuild tools , Enter, wait
Done.

You can make steps 2 3 4 use console one string syntax, without using TortoiseGit:
-- open console inside prepared folder, "rmouse click - ConEmu Here"
-- conemu git clone -b 2.9.1 --recurse-submodules https://github.com/openfl/lime.git openfl_lime , Enter, wait


ubuntu 16.04.3 x64 desktop gnome
haxe 3.2.1
java java-8-openjdk-amd64
user@user-pc:~$ which java
/usr/bin/java

but in my case JAVA_HOME for lime setup android /usr/lib/jvm/java-8-openjdk-amd64 (/bin/java will be added automatically)
-- flixel 4.3.0
-- hxcpp 3.4.64 (last working, but not newest)
-- openfl 3.6.1
-- lime 2.9.1 (haxeflixel prebuilded version of lime, which can't use android api 26 targeting correct)
--- android NDK r9d (android-ndk-r9d-linux-x86_64.zip). Not available on official site(at this moment r10 is oldest available). Googled and used at my own risk. NDK r9d weblink

"Hack" section steps:
1 - "Download Android SDK Tools version 26.0.1":
-- https://developer.android.com/studio/index.html#tos-header
-- click "sdk-tools-linux-3859397.zip", at this moment it's only available version
-- check the box at the bottom page, download zip file, and extract it into prepared comfort folder, as result we have new "tools" folder

2 - "Using Android SDK Tools run sdkmanager platforms;android-26":
-- open terminal inside "... tools/bin/" folder, where placed "sdkmanager" file.
-- terminal ./sdkmanager "platforms;android-26" , Enter, see big text of license etc and "Accept? (y/N): "
-- terminal "y" Enter, wait few minutes, and after "done", we have new folder "...platforms/android-26"

3 - "Copy <Android SDK Tools path>/platforms/android-26 over to <Android SDK Manager path>/platforms":
-- just copy "android-26" folder. The default place for ubuntu is "/opt/android-sdk/platforms"

4 - "Using Android SDK Tools run sdkmanager build-tools;26.0.3"
-- open terminal inside "... tools/bin/" folder, where placed "sdkmanager" file.
-- terminal ./sdkmanager "build-tools;26.0.3" , Enter, and after "done", we have new folder "...build-tools/26.0.3"

5 - "Copy <Android SDK Tools path>/build-tools/26.0.3 over to <Android SDK Manager path>/build-tools"
-- just copy "26.0.3" folder. The default place for linux is "/opt/android-sdk/build-tools"


"Re-compile Lime" section steps:
1 - "Run openfl rebuild hxcpp android -clean"
-- terminal sudo haxelib run openfl rebuild hxcpp android -clean , Enter, wait sometimes

2 - "git clone Lime into /lime (haxelib releases of Lime can't be recompiled)":
3 - "Checkout the tag containing your version of Lime (2.9.1 in my case)":
4 - "Update the submodules":
You can make steps 2 3 4 use terminal one string syntax:
-- open terminal inside prepared folder with full permissions, like user "downloads" etc
-- terminal git clone -b 2.9.1 --recurse-submodules https://github.com/openfl/lime.git openfl_lime , Enter, wait

5 - "Rename your current Lime directory, and give its previous name to the cloned one":
-- terminal sudo nautilus this allow you rename folders etc as root
-- rename old "2,9,1" folder to "_2,9,1" . Default ubuntu is "/usr/share/haxelib/lime/2,9,1"
-- create new "2,9,1" folder and copy all files and paths from ".../oepnfl_lime" to new "2,9,1" folder ("/usr/share/haxelib/lime/2,9,1")
-- terminal sudo haxelib install format , Enter, wait
-- terminal sudo haxelib run lime rebuild android -Dlegacy , Enter, wait
-- terminal sudo haxelib run lime rebuild tools , Enter, wait
Done.
-- terminal sudo rm -rf ~/.local/share/Trash/* , Enter. This only way i can clean the trash, if folders was deleted under root nautilus.
last worked configuration:
haxe 3.4.4 - base for neko,haxelib etc, installed on windows as exe

haxelib libraries:
haxelib flixel 4.3.0
haxelib lime 2.9.1
haxelib openfl 3.6.1
haxelib hxcpp 3.4.64
latest lib versions have bugs and/or create crushes
haxelib svg (2017 have bug - all rendered curves always closed, look like svg path "z" parameter always ingnored... but android and cpp release work done, without this bug)
haxelib update hxcpp
помогло когда ошибки на андроид сборке полезли, как то незаметно версии изменились

haxelib run flixel-tools tpl -n test
создание нового проекта из шаблона в текущей папке короткий синтаксис flixel tpl -n test глючит на линуксе

haxelib run flixel configure C:\hfp\user\projectname -ide vscode
добавляет настройки(папку .vscode) для коректной работы vscode

haxelib run flixel configure . -ide vscode
настраивает все подпапки содержащие Project.xml для коректной работы vscode

console Windows
cd /D d:
сменить диск в консоли... тоже тот еще пиздец после перехода в каталог