Skip to content

Commit

Permalink
1.4.0
Browse files Browse the repository at this point in the history
  • Loading branch information
tuarua committed Aug 1, 2019
1 parent d25ce6e commit c948bd7
Show file tree
Hide file tree
Showing 12 changed files with 116 additions and 76 deletions.
1 change: 0 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
### 1.4.0
- AND: Updated to FreKotlin 1.8.0
- Updated to AIR 33 ARM 64bit
- Remove Android-x86

### 1.3.0
- WIN: C# binaries are now packaged inside the ANE. All of these need to be deleted from your AIRSDK
Expand Down
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,9 @@ You will also need to include the following in your app manifest. Update accordi
</manifest>
```

#### AIR 32 & 33
This ANE is built against AIR 33 SDK. If you wish to use with AIR 32 you will need to replace dx.jar in lib/android/bin/ with [this one](https://github.com/tuarua/Android-ANE-Dependencies/blob/master/AIR32_patch/lib/android/bin/dx.jar?raw=true)

-------------

## iOS
Expand All @@ -118,13 +121,17 @@ bash get_ios_dependencies.sh
This folder, ios_dependencies/device/Frameworks, must be packaged as part of your app when creating the ipa. How this is done will depend on the IDE you are using.
After the ipa is created unzip it and confirm there is a "Frameworks" folder in the root of the .app package.

#### AIR 32 & 33
You should use AIR 32 for iOS builds

### Prerequisites

You will need:

- IntelliJ IDEA / Flash Builder
- AIR 32.0.0.103 or greater
- Android Studio 3 if you wish to edit the Android source
- Xcode 10.1
- wget on macOS
- Powershell on Windows

Expand Down
10 changes: 7 additions & 3 deletions example-mobile/.idea/runConfigurations/iOS_Simulator.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

38 changes: 7 additions & 31 deletions example-mobile/ZipANESample-mobile.iml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
<option name="additionalOptions" value="-swf-version=44" />
</compiler-options>
<packaging-air-desktop />
<packaging-android enabled="true" use-generated-descriptor="false" custom-descriptor-path="$MODULE_DIR$/src/Main-app.xml" package-file-name="Main">
<packaging-android enabled="true" use-generated-descriptor="false" custom-descriptor-path="$MODULE_DIR$/src/Main-app-android.xml" package-file-name="Main">
<files-to-package>
<FilePathAndPathInPackage file-path="$MODULE_DIR$/embed" path-in-package="." />
<FilePathAndPathInPackage file-path="$MODULE_DIR$/system/AppIcon60x60@2x.png" path-in-package="AppIcon60x60@2x.png" />
Expand All @@ -52,32 +52,20 @@
<entry library-name="starling" library-level="project">
<dependency linkage="Merged" />
</entry>
<entry library-name="com.tuarua.frekotlin" library-level="project">
<dependency linkage="Merged" />
</entry>
<entry library-name="ZipANE" library-level="project">
<dependency linkage="Merged" />
</entry>
<entry library-name="com.google.code.gson.gson-2.8.4" library-level="project">
<dependency linkage="Merged" />
</entry>
<entry library-name="com.tuarua.frekotlin-1.8.0" library-level="project">
<dependency linkage="Merged" />
</entry>
<entry library-name="org.jetbrains.kotlinx.kotlinx-coroutines-android-1.2.2" library-level="project">
<dependency linkage="Merged" />
</entry>
</entries>
<sdk name="AIRSDK_33" />
<sdk name="AIRSDK_32" />
</dependencies>
<compiler-options>
<map>
<entry key="compiler.locale" value="en_US" />
</map>
</compiler-options>
<packaging-air-desktop />
<packaging-android enabled="true" use-generated-descriptor="false" custom-descriptor-path="$MODULE_DIR$/src/Main-app.xml" package-file-name="iOS_Simulator" />
<packaging-ios enabled="true" use-generated-descriptor="false" custom-descriptor-path="$MODULE_DIR$/src/Main-app.xml" package-file-name="iOS_Simulator">
<packaging-android use-generated-descriptor="false" />
<packaging-ios enabled="true" use-generated-descriptor="false" custom-descriptor-path="$MODULE_DIR$/src/Main-app-ios.xml" package-file-name="iOS_Simulator">
<files-to-package>
<FilePathAndPathInPackage file-path="$MODULE_DIR$/ios_dependencies/simulator" path-in-package="." />
<FilePathAndPathInPackage file-path="$MODULE_DIR$/src/Assets.car" path-in-package="Assets.car" />
Expand All @@ -93,23 +81,11 @@
<entry library-name="starling" library-level="project">
<dependency linkage="Merged" />
</entry>
<entry library-name="com.tuarua.frekotlin" library-level="project">
<dependency linkage="Merged" />
</entry>
<entry library-name="ZipANE" library-level="project">
<dependency linkage="Merged" />
</entry>
<entry library-name="com.google.code.gson.gson-2.8.4" library-level="project">
<dependency linkage="Merged" />
</entry>
<entry library-name="com.tuarua.frekotlin-1.8.0" library-level="project">
<dependency linkage="Merged" />
</entry>
<entry library-name="org.jetbrains.kotlinx.kotlinx-coroutines-android-1.2.2" library-level="project">
<dependency linkage="Merged" />
</entry>
</entries>
<sdk name="AIRSDK_33" />
<sdk name="AIRSDK_32" />
</dependencies>
<compiler-options>
<map>
Expand All @@ -118,7 +94,7 @@
</compiler-options>
<packaging-air-desktop />
<packaging-android use-generated-descriptor="false" custom-descriptor-path="$MODULE_DIR$/src/Main-app.xml" package-file-name="iOS_Device" />
<packaging-ios enabled="true" use-generated-descriptor="false" custom-descriptor-path="$MODULE_DIR$/src/Main-app.xml" package-file-name="iOS_Device">
<packaging-ios enabled="true" use-generated-descriptor="false" custom-descriptor-path="$MODULE_DIR$/src/Main-app-ios.xml" package-file-name="iOS_Device">
<files-to-package>
<FilePathAndPathInPackage file-path="$MODULE_DIR$/ios_dependencies/device" path-in-package="." />
<FilePathAndPathInPackage file-path="$MODULE_DIR$/src/Assets.car" path-in-package="Assets.car" />
Expand All @@ -136,7 +112,7 @@
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
</content>
<orderEntry type="jdk" jdkName="AIRSDK_33" jdkType="Flex SDK Type (new)" />
<orderEntry type="jdk" jdkName="AIRSDK_32&#9;AIRSDK_33" jdkType="__CompositeFlexSdk__" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" exported="" name="starling" level="project" />
<orderEntry type="library" exported="" name="ZipANE" level="project" />
Expand Down
2 changes: 1 addition & 1 deletion example-mobile/get_android_dependencies.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ $KotlinxCoroutinesVersion = "1.2.2"
$currentDir = (Get-Item -Path ".\" -Verbose).FullName
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
Invoke-WebRequest -Uri https://github.com/tuarua/Zip-ANE/releases/download/$AneVersion/ZipANE.ane?raw=true -OutFile "$currentDir\..\native_extension\ane\ZipANE.ane"
Invoke-WebRequest -OutFile "$currentDir\android_dependencies\com.google.code.gson.gson-$GsonVersion.ane" -Uri https://github.com/tuarua/Android-ANE-Dependencies/blob/master/anes/misc/com.google.code.gson.gson-$GsonVersion-air33.ane?raw=true
Invoke-WebRequest -OutFile "$currentDir\android_dependencies\com.google.code.gson.gson-$GsonVersion.ane" -Uri https://github.com/tuarua/Android-ANE-Dependencies/blob/master/anes/misc/com.google.code.gson.gson-$GsonVersion.ane?raw=true
Invoke-WebRequest -OutFile "$currentDir\android_dependencies\com.tuarua.frekotlin-$FreKotlinVersion.ane" -Uri https://github.com/tuarua/Android-ANE-Dependencies/blob/master/anes/kotlin/com.tuarua.frekotlin-$FreKotlinVersion.ane?raw=true
Invoke-WebRequest -OutFile "$currentDir\android_dependencies\org.jetbrains.kotlinx.kotlinx-coroutines-android-$KotlinxCoroutinesVersion.ane" -Uri https://github.com/tuarua/Android-ANE-Dependencies/blob/master/anes/kotlin/org.jetbrains.kotlinx.kotlinx-coroutines-android-$KotlinxCoroutinesVersion.ane?raw=true

2 changes: 1 addition & 1 deletion example-mobile/get_android_dependencies.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ KotlinxCoroutinesVersion="1.2.2"

wget -O android_dependencies/com.tuarua.frekotlin-$FreKotlinVersion.ane https://github.com/tuarua/Android-ANE-Dependencies/blob/master/anes/kotlin/com.tuarua.frekotlin-$FreKotlinVersion.ane?raw=true
wget -O android_dependencies/org.jetbrains.kotlinx.kotlinx-coroutines-android-$KotlinxCoroutinesVersion.ane https://github.com/tuarua/Android-ANE-Dependencies/blob/master/anes/kotlin/org.jetbrains.kotlinx.kotlinx-coroutines-android-$KotlinxCoroutinesVersion.ane?raw=true
wget -O android_dependencies/com.google.code.gson.gson-$GsonVersion.ane https://github.com/tuarua/Android-ANE-Dependencies/blob/master/anes/misc/com.google.code.gson.gson-$GsonVersion-air33.ane?raw=true
wget -O android_dependencies/com.google.code.gson.gson-$GsonVersion.ane https://github.com/tuarua/Android-ANE-Dependencies/blob/master/anes/misc/com.google.code.gson.gson-$GsonVersion.ane?raw=true
wget -O ../native_extension/ane/ZipANE.ane https://github.com/tuarua/Zip-ANE/releases/download/$AneVersion/ZipANE.ane?raw=true
Original file line number Diff line number Diff line change
Expand Up @@ -78,24 +78,6 @@
</manifestAdditions>
</android>

<!-- iOS specific capabilities -->
<iPhone>
<!-- A list of plist key/value pairs to be added to the application Info.plist -->
<InfoAdditions>
<![CDATA[
<key>UIDeviceFamily</key>
<array>
<!-- iPhone and iPod touch devices -->
<string>1</string>
<!-- iPad devices -->
<string>2</string>
</array>
<key>MinimumOSVersion</key>
<string>9.0</string>
]]>
</InfoAdditions>
<requestedDisplayResolution>high</requestedDisplayResolution>
</iPhone>
<extensions>
<extensionID>com.tuarua.frekotlin</extensionID>
<extensionID>org.jetbrains.kotlinx.kotlinx-coroutines-android</extensionID>
Expand Down
77 changes: 77 additions & 0 deletions example-mobile/src/Main-app-ios.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<application xmlns="http://ns.adobe.com/air/application/32.0">


<!-- A universally unique application identifier. Must be unique across all AIR applications.
Using a reverse DNS-style name as the id is recommended. (Eg. com.example.ExampleApplication.) Required. -->
<id>com.tuarua.zipanesample</id>

<!-- Used as the filename for the application. Required. -->
<filename>ZipANESample</filename>

<!-- The name that is displayed in the AIR application installer.
May have multiple values for each language. See samples or xsd schema file. Optional. -->
<name>ZipANESample</name>

<versionNumber>1.4.0</versionNumber>

<!-- Settings for the application's initial window. Required. -->
<initialWindow>
<!-- The main SWF or HTML file of the application. Required. -->
<!-- Note: In Flash Builder, the SWF reference is set automatically. -->
<content>[This value will be overwritten by Flash Builder in the output app.xml]</content>


<!-- The aspect ratio ("portrait", "landscape", or "any"). Optional. -->
<aspectRatio>portrait</aspectRatio>

<!-- Whether the app will begin auto-orienting on launch. Optional. Default false -->
<autoOrients>false</autoOrients>

<!-- Whether the app launches in full screen. Optional. Mobile only. Default false -->
<!-- (On iOS, this decides if the StatusBar is visible or not.) -->
<fullScreen>true</fullScreen>

<!-- Either auto, cpu, gpu, or direct. Default auto -->
<renderMode>direct</renderMode>

<!-- Whether direct mode allocates storage for depth and stencil buffers. Default false -->
<depthAndStencil>true</depthAndStencil>

<visible>true</visible>
</initialWindow>



<!-- The icon the system uses for the application. For at least one resolution,
specify the path to a PNG file included in the AIR package. Optional. -->
<icon>
<image76x76>AppIcon76x76~ipad.png</image76x76>
<image120x120>AppIcon60x60@2x.png</image120x120>
<image152x152>AppIcon76x76@2x~ipad.png</image152x152>
<image167x167>AppIcon83.5x83.5@2x~ipad.png</image167x167>
<image180x180>AppIcon60x60@3x.png</image180x180>
</icon>

<!-- iOS specific capabilities -->
<iPhone>
<!-- A list of plist key/value pairs to be added to the application Info.plist -->
<InfoAdditions>
<![CDATA[
<key>UIDeviceFamily</key>
<array>
<!-- iPhone and iPod touch devices -->
<string>1</string>
<!-- iPad devices -->
<string>2</string>
</array>
<key>MinimumOSVersion</key>
<string>9.0</string>
]]>
</InfoAdditions>
<requestedDisplayResolution>high</requestedDisplayResolution>
</iPhone>
<extensions>
<extensionID>com.tuarua.ZipANE</extensionID>
</extensions>
</application>
6 changes: 4 additions & 2 deletions native_extension/ane/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ echo "Copying Swift dylibs into place for device."
#Device
if [ -e "$pathtome/platforms/ios/device/Frameworks/$PROJECTNAME$fwSuffix.framework/Frameworks" ]
then
for dylib in "$pathtome/platforms/ios/device/Frameworks/$PROJECTNAME$fwSuffix.framework/Frameworks/*"
for dylib in "$pathtome"/platforms/ios/device/Frameworks/"$PROJECTNAME""$fwSuffix".framework/Frameworks/*
do
mv -f "$dylib" "$pathtome/../../example-mobile/ios_dependencies/device/Frameworks"
done
Expand All @@ -175,7 +175,7 @@ echo "Copying Swift dylibs into place for simulator."
#Simulator
if [ -e "$pathtome/platforms/ios/simulator/Frameworks/$PROJECTNAME$fwSuffix.framework/Frameworks" ]
then
for dylib in "$pathtome/platforms/ios/simulator/Frameworks/$PROJECTNAME$fwSuffix.framework/Frameworks/*"
for dylib in "$pathtome"/platforms/ios/simulator/Frameworks/"$PROJECTNAME""$fwSuffix".framework/Frameworks/*
do
mv -f "$dylib" "$pathtome/../../example-mobile/ios_dependencies/simulator/Frameworks"
done
Expand Down Expand Up @@ -211,6 +211,8 @@ echo "Building ANE."
-platformoptions "$pathtome/platforms/ios/platform.xml" \
-platform iPhone-ARM -C "$pathtome/platforms/ios/device" "library.swf" "Frameworks" lib${PROJECTNAME}.a \
-platformoptions "$pathtome/platforms/ios/platform.xml" \
-platform Android-x86 -C "$pathtome/platforms/android" "library.swf" "classes.jar" com.tuarua.${PROJECTNAME}-res/. \
-platformoptions "$pathtome/platforms/android/platform.xml" \
-platform Android-ARM -C "$pathtome/platforms/android" "library.swf" "classes.jar" com.tuarua.${PROJECTNAME}-res/. \
-platformoptions "$pathtome/platforms/android/platform.xml" \
-platform Android-ARM64 -C "$pathtome/platforms/android" "library.swf" "classes.jar" com.tuarua.${PROJECTNAME}-res/. \
Expand Down
7 changes: 7 additions & 0 deletions native_extension/ane/extension.xml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,13 @@
<platform name="default">
<applicationDeployment/>
</platform>
<platform name="Android-x86">
<applicationDeployment>
<nativeLibrary>classes.jar</nativeLibrary>
<initializer>com.tuarua.ZipANE</initializer>
<finalizer>com.tuarua.ZipANE</finalizer>
</applicationDeployment>
</platform>
<platform name="Android-ARM">
<applicationDeployment>
<nativeLibrary>classes.jar</nativeLibrary>
Expand Down
Loading

0 comments on commit c948bd7

Please sign in to comment.