简体   繁体   English

如何改善/更改原始的Gluon Charm Down Services,并在我的应用程序中使用它?

[英]How can I improve/make changes to the orginal Gluon Charm Down Services and use it in my app?

I am using Gluon Mobile so that I can use javafx to build applications to iOS and Android. 我正在使用Gluon Mobile,以便可以使用javafx将应用程序构建到iOS和Android。 I wonder how I can change/improve on the existing Charm Down library of services that are available: http://gluonhq.com/products/mobile/charm-down/ 我不知道如何更改/改进现有的Charm Down服务库: http : //gluonhq.com/products/mobile/charm-down/

In my case specifically I need to take images that cover the whole screen on mobile. 以我为例,我需要拍摄覆盖移动设备整个屏幕的图像。 How can images taking up the whole screen be taken on Android and iPhone? 如何在Android和iPhone上拍摄占据整个屏幕的图像? And so I am looking to make edits to the VideoService and the PicturesService . 所以我想对VideoServicePicturesService进行编辑。 By altering and building onto these existing services I hope to avoid alot of work that has already been done. 通过更改和构建这些现有服务,我希望避免进行很多工作。

How can I edit existing services in Charm Down and use it in my app? 如何在Charm Down中编辑现有服务并在我的应用程序中使用它?

If you check the Charm Down repository overview, you will find the required instructions for building your own version. 如果查看Charm Down 存储库概述,则将找到构建自己的版本所需的说明。

These are the requisites in case you want to fork Gluon Charm Down and build your local version: 这些是您要派生Gluon Charm Down并构建本地版本的必要条件:

  • A recent version of JDK 8 JDK 8的最新版本
  • Gradle 2.2 or superior. Gradle 2.2或更高版本。

To build the Android Services: 要构建Android服务:

  • Android SDK: the android SDK must be downloaded. Android SDK:必须下载android SDK。 The required Android platform is android-25. 所需的Android平台为android-25。

  • ANDROID_HOME has to be defined as an environment variable, typically by adding it as a gradle property to ~/.gradle/gradle.properties . 必须将ANDROID_HOME定义为环境变量,通常将其作为gradle属性添加到~/.gradle/gradle.properties

  • Extras/Android Support Repository and Extras/Google Repository that can be installed with the Android SDK Manager. 可以与Android SDK Manager一起安装的Extras / Android支持存储库和Extras / Google存储库。

To build the iOS Services: 要构建iOS服务:

  • A Mac with with MacOS X 10.11.5 or superior 装有MacOS X 10.11.5或更高版本的Mac
  • XCode 8.x or superior XCode 8.x或更高版本

Once you have the above requisites, clone the repository from here: 满足上述条件后,请从此处克隆存储库:

hg clone https://bitbucket.org/gluon-oss/charm-down

(You might need to sign in in Bitbucket). (您可能需要登录Bitbucket)。

Open the project with your IDE. 用您的IDE打开项目。

NetBeans中的魅力

Before modifying any of the services try to build it, install it and use them in your project. 在修改任何服务之前,请尝试对其进行构建,安装并在项目中使用它们。

To build the Charm Down services, on the project's root, run on command line: 要构建Charm Down服务,请在项目的根目录上,在命令行上运行:

./gradlew clean build

降低魅力

If you want to install them, run: 如果要安装它们,请运行:

./gradlew clean install

When the process finishes successfully, the different services are installed in your local .m2 maven repository. 该过程成功完成后,将在本地.m2 maven存储库中安装不同的服务。

.m2

All these required jars can be added to a Gluon Mobile project by including mavenLocal() in the list of repositories and the snapshot version ( currently 3.7.0-SNAPSHOT , but this could be changed as well): 通过在存储库列表和快照版本( 当前为 3.7.0-SNAPSHOT ,但也可以更改mavenLocal()中包括mavenLocal() ,可以将所有这些必需的jar添加到mavenLocal() Mobile项目中:

repositories {
    mavenLocal()
    jcenter()
    maven {
        url 'http://nexus.gluonhq.com/nexus/content/repositories/releases'
    }
}

jfxmobile {
    downConfig {
        version = '3.7.0-SNAPSHOT'
        plugins 'display', 'lifecycle', 'pictures', 'statusbar', 'storage'
    }
}

测试项目

Tip: there are too many services that you don't want to modify, so you can comment out some of them from the settings.gradle file, mainly to reduce the building time. 提示:不想修改的服务太多,因此您可以从settings.gradle文件中注释掉其中一些,主要是为了减少构建时间。

Once everything is settled properly, you can start modifying the source code as you need. 一切妥当解决后,您可以根据需要开始修改源代码。 Anytime you want to check your changes, just run ./gradlew install and then deploy and run your project. ./gradlew install您要检查更改时,只需运行./gradlew install ,然后部署并运行您的项目即可。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何使用构成 Gluon 项目的 iOS、Android、桌面(和主)的 Gluon 文件夹? - How to use Gluon folders of iOS, android, desktop (And main) that make up a Gluon project? 如何在Gluon Mobile项目中更改jdk? - How do I alter jdk in my Gluon Mobile project? 我不知道我为Gluon Start做错了什么 - I dont know what i make wrong for the Gluon Start 我可以同时使用 jcenter() 和 mavenCentral() 在我的应用程序中实现 Firebase 吗? - Can I use both jcenter() and mavenCentral() to implement Firebase in my app? 如何将Google Play服务引入我的libGDX Gradle项目? - How can I bring Google play services into my libGDX Gradle project? 我如何使我的应用程序运行并解决此错误 - How can i made my app run and solve this error 如何在我的 Unity 项目中翻译 google-services.json 以便我的 firebase 集成在 buidl 中工作? - How can I translate the google-services.json in my Unity project so that my firebase integration works in an buidl? 我可以将OSGi Mocks与声明式服务注释一起使用吗 - Can I use OSGi Mocks with Declarative Services Annotations 如何在doLast gradle构建中使用已编译的类? - How can I use my compiled classes in doLast gradle build? 如何在Gradle插件上使用PSI / UAST - How can I use PSI/UAST on my Gradle plugin
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM