SDL: https://github.com/freeors/SDL. Rose has included the generated *.lib/.dll/.a of SDL library. If you do not want to go deep into these SDL's libraries, for example set a breakpoint to debug, you can not download it.
Note the location of Rose and SDL when place, same as below. (, 下载次数: 2455)
上传
点击文件名下载附件
Step 2: Compile and Run Studio
After downloading Rose, there is a app named Studio. Please compile Studio. How to compile see the 3th floor(Windows), 4th floor(iOS) and 5th floor(Android).
Step 3: New app to Work Kit
Download Rose will generate apps-res, apps-src locally, they are collectively known as work kit. Next, new app on Windows, detail operation: 1)Run Rose Studio. 2)Right mouse click on the left side of the top node of the work kit. 3)Press "New app ..." on pop-up menu. Below assume your created app is "hello".
Step 4: Develop other platform's version: Android, iOS
Run Studio, export "hello" package, it will genenate "hello-res", "hello-src" on directory same level as the work kit.
(, 下载次数: 2687)
上传
点击文件名下载附件
Reference the #4th floor, compile hello.app on iOS.
Reference the #5th floor, compile hello.apk on Android.
Upgrade SDK
Download lastest Rose and generate Studio. Run Studio.
Right mouse click on the left side of the top node of the work kit. Press "Import app ...".
Compile
In order to compile, requires Visual Studio 2017 or later.
In "Configuration Manager", "Active solution configuration" select Release, "Active solution platform" select Win32. Although it is release, you can still use breakpoints to debug.
1. SDL
After downloading Rose, necessary SDL development library has placed on the <linker>/windows. If you don't want to recompile them, can skip this part, and go to "2. studio.exe" directly.
sdl2.dll: Open and compile <SDL>/SDL2-2.0.7/VisualC/SDL.sln.
sdl2_image.dll: Open and compile <SDL>/SDL2_image-2.0.1/VisualC/SDL_image.sln.
sdl2_mixer.dll: Open and compile <SDL>/SDL2_mixer-2.0.1/Visual/SDL_mixer.sln.
sdl2_ttf.dll: Open and compile <SDL>/SDL2_ttf-2.0.14/VisualC/SDL_ttf.sln.
2. studio.exe
chromium.lib: open and compile <SDL>/chromium/projectfiles/vc/chromium.sln. In "Configuration Manager", "Active solution configuration" select Release, "Active solution platform" select Win32.
studio.exe: open and compile <apps-src>/apps/projectfiles/VC/studio.sln.
Run
1. Copy necessary dll
By this time, if successful, there are SDL2.dll, SDL2_ttf.dll, SDL2_mixer.dll, SDL2_net.dll, SDL2_image.dll, studio.exe in <apps-src>/apps/projectfiles/vc/Release. In order to run, you should copy other necessary dll to, necessary dll include libfreetype-6.dll, libjpeg-9.dll, libogg-0.dll, libpng16-16.dll, libtiff-5.dll, libvorbis-0.dll, libvorbisfile-3.dll, libwebp-4.dll, mikmod.dll, smpeg.dll zlib1.dll. You can copy them from resource packet.
2. Connect Resource Packet
In order to run by Vistual Studio Command, need set Command Arguments. Below is relative setting. (, 下载次数: 2468)
上传
点击文件名下载附件
It indicats Resource Pakcet is located in apps-res that is same parent as apps-src.
3. Run
"Debug"--"Start Debuging" or "Start Without Debuging" 作者: ancientcc 时间: 2016-7-5 21:08 标题: XCode 9.3(iOS) 本帖最后由 ancientcc 于 2018-4-7 14:44 编辑
Directory structure on iOS is different from Windows and Android, below is one shapshot. First, you require to create this directory structure on Mac OS X. For simplicity, you can use the menu command: "Tools"---"Create iOS work kit...". (, 下载次数: 2650)
上传
点击文件名下载附件
blesmart, kingdom, sesame, sleep, studio: Private directory of the the 5 developing app. Below "2. studio.app" show its detail contents.
external: same as "external" on Windows.
librose: same as "librose" on Windows.
SDL: same as "SDL" on Windows.
linker: same as "linker" on Windows.
scripts: same as "scripts" on Windows.
Compile
1. SDL
After downloading Rose, necessary SDL development library has placed on the <linker>/ios. If you don't want to recompile them, can skip this part, and go to "2. studio.app" directly.
libSDL.a: Open and compile <SDL>/SDL2-2.0.4/Xcode-iOS/SDL/SDLiPhoneOS.xcodeproj.
libogg.a: open and compile <SDL>/libogg-1.3.0/Xcode-iPhoneOS/Ogg.xcodeproj. Copy libogg.a to <SDL>/SDL2_mixer-2.0.1/Xcode-iOS/lib/-iphoneos(-iphonesimulator, if simulator) manually.
libvorbis.a, libvorbisfile.a: Open and compile <SDL>/libvorbis-1.3.2/Xcode-iPhoneOS/Vorbis.xcodeproj. Copy libvorbis.a and libvorbisfile.a to <SDL>/SDL2_mixer-2.0.1/Xcode-iOS/lib/-iphoneos(-iphonesimulator, if simulator) manually.
libSDL_mixer.a: Open and compile <SDL>/SDL2_mixer-2.0.1/Xcode-iOS/SDL_mixer.xcodeproj
libSDL_image.a: Open and compile <SDL>/SDL2_image-2.0.1/Xcode-iOS/SDL_image.xcodeproj.
libSDL_ttf.a: Open and compile <SDL>/SDL2_ttf-2.0.14/Xcode-iOS/SDL_ttf.xcodeproj.
2. studio.app (, 下载次数: 2681)
上传
点击文件名下载附件
studio: Private source code of Studio app. Same as "<apps-src>/apps/studio" on Widnows.
app-studio, data, fonts, translations, xwml: Resource packet of Studio app. Same as Windows.
How to Compile
Except libogg.a, libvorbis.a, libvorbisfile.a, copy all *.so when compile SDL to <linker>/ios/lib.
Open <studio>/projectfiles/Xcode-iOS/studio.xcodeproj.
If studio.xcodeproj is just automatically generated by Studio Rose, "src" group is empty. You need to add the app's private source file to the group. Detail steps: 1) Right click on the "src" group, select "Add Files to studio..." on the pop-up menu. 2)On the pop-up window, view "Option", make sure to select "Create groups", add then. (, 下载次数: 2633)
上传
点击文件名下载附件
(, 下载次数: 2671)
上传
点击文件名下载附件
compile.
Run
By this time, there is studio.app. Make it to ipa.
作者: ancientcc 时间: 2016-7-5 21:08 标题: Android Studio 3.0.1 + NDK-r16b(Android) 本帖最后由 ancientcc 于 2018-3-27 09:15 编辑
You need not install cygwin. It use window's "cmd" utility.
Please use the built-in entry in Android Studio to install the NDK: “File”-“Project Structure…”-“SDK Location”.
To now, I can not custom resource directory desired to package into the APK, which means that in order to be packaged into APK, you must put resource in directory named <app>/src/main/assets/res(res is Rose requirement). And they are copier of "<app>-res", for reducing size, they will not be uploaded to GitHub. Please make sure that the assets/res is copied. "Po" directory can be ignored when copying. For simplicity, you can use the menu command: "Copy resource to android's apk...".
Below is one shapshot of assets/res. (, 下载次数: 2471)
上传
点击文件名下载附件
Open <apps-src>/scripts/android_set_variable.bat, update path of NDK variable according to you PC. This sample assume you place downloaded Rose at c:/apps-res and c:/apps-src.
set NDK=c:\Users\ancientli\AppData\Local\Android\sdk\ndk-bundle
set _APP_SRC=c:\apps-src
set SCRITPS=C:\apps-src\scripts
set SDL_sdl=c:\apps-src\SDL\SDL2-2.0.5\android
set SDL_image=c:\apps-src\SDL\SDL2_image-2.0.1\android
set SDL_mixer=c:\apps-src\SDL\SDL2_mixer-2.0.1\android
set SDL_ttf=c:\apps-src\SDL\SDL2_ttf-2.0.14\android
set studio=c:\apps-src\apps\projectfiles\android
复制代码
Execute "cmd" utility, run this bat.
cd c:\apps-src\apps\scripts
android_set_variable.bat
复制代码
1. Compile
1. SDL
After downloading Rose, necessary SDL development library has placed on the <linker>/android. If you don't want to recompile them, can skip this part, and go to "2. libmain.so" directly.
libSDL2.so
cd %SDL_sdl%
%NDK%/ndk-build
复制代码
Copy *.so to ndk lib diectory.
cd %SCRIPTS%
android_2_ndk.bat
复制代码
Remark: there is maybe error when copy libgettext.so, libSDL2_image.so, libSDL2_mixer.so, libSDL2_net.so, libSDL2_ttf.so, ignore them.
libSDL2_image.so
cd %SDL_image%
%NDK%/ndk-build
复制代码
libSDL2_mixer.so
cd %SDL_mixer%
%NDK%/ndk-build
复制代码
libSDL2_ttf.so
cd %SDL_ttf%
%NDK%/ndk-build
复制代码
2. libmain.so
Copy *.so to ndk lib diectory.
cd %SCRIPTS%
android_2_ndk.bat
复制代码
Remark: Should no error.
libmain.so
cd %studio%
%NDK%/ndk-build
复制代码
2. Generate and run studio.apk
Copy *.so to <projectfiles>/android/app/libs/armeabi.
cd %SCRIPTS%
android_2_app.bat %studio%
复制代码
Run Android Studio
Enter "Welcome to Android Studio", select "Open an existing Android Studio project".
"Open File or Project"--locate to <projectfiles>/android. Open.
Connect Android device, "Run"--"Run 'app'", will generat sutdio.apk in <projectfiles>/android/app/build/outputs/apk, and can debug it.