-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Fix build because of recent changes
* Others
- Loading branch information
1 parent
9841e64
commit 272c962
Showing
30 changed files
with
313 additions
and
292 deletions.
There are no files selected for viewing
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 19 additions & 0 deletions
19
app/src/main/java/io/mgba/data/database/converters/GameConverter.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package io.mgba.data.database.converters; | ||
|
||
import java.io.File; | ||
|
||
import androidx.room.TypeConverter; | ||
|
||
public class GameConverter { | ||
@TypeConverter | ||
public static File fromStringToFile(String value) { | ||
return value == null ? null : new File(value); | ||
} | ||
|
||
@TypeConverter | ||
public static String fromFileToString(File value) { | ||
return value == null ? null : value.getAbsolutePath(); | ||
} | ||
|
||
} | ||
|
18 changes: 0 additions & 18 deletions
18
app/src/main/java/io/mgba/data/database/converters/GameConverter.kt
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
113 changes: 113 additions & 0 deletions
113
app/src/main/java/io/mgba/ui/activities/IntroActivity.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,113 @@ | ||
package io.mgba.ui.activities; | ||
|
||
import android.Manifest; | ||
import android.content.Intent; | ||
import android.os.Bundle; | ||
import androidx.annotation.NonNull; | ||
import com.github.paolorotolo.appintro.AppIntro2; | ||
import com.github.paolorotolo.appintro.AppIntroFragment; | ||
import java.util.List; | ||
import androidx.annotation.Nullable; | ||
import androidx.appcompat.app.AppCompatActivity; | ||
import androidx.fragment.app.Fragment; | ||
import io.mgba.model.system.PermissionManager; | ||
import io.mgba.presenter.interfaces.IIntroPresenter; | ||
import io.mgba.presenter.IntroPresenter; | ||
import io.mgba.ui.activities.interfaces.IIntroView; | ||
import io.mgba.utilities.IDependencyInjector; | ||
import io.mgba.mgba; | ||
import permissions.dispatcher.NeedsPermission; | ||
import permissions.dispatcher.OnNeverAskAgain; | ||
import permissions.dispatcher.OnPermissionDenied; | ||
import permissions.dispatcher.OnShowRationale; | ||
import permissions.dispatcher.PermissionRequest; | ||
import permissions.dispatcher.RuntimePermissions; | ||
|
||
@RuntimePermissions | ||
public class IntroActivity extends AppIntro2 implements IIntroView{ | ||
|
||
private IIntroPresenter controller; | ||
|
||
@Override | ||
protected void onCreate(@Nullable Bundle savedInstanceState) { | ||
super.onCreate(savedInstanceState); | ||
|
||
controller = new IntroPresenter(new PermissionManager(this), | ||
(IDependencyInjector) getApplication(), this); | ||
} | ||
|
||
@NeedsPermission(Manifest.permission.WRITE_EXTERNAL_STORAGE) | ||
void showFilePicker() { | ||
controller.showFilePicker(); | ||
} | ||
|
||
@OnShowRationale(Manifest.permission.WRITE_EXTERNAL_STORAGE) | ||
void showRationaleForStorage(final PermissionRequest request) { | ||
controller.showRationaleForStorage(request); | ||
} | ||
|
||
@OnNeverAskAgain(Manifest.permission.WRITE_EXTERNAL_STORAGE) | ||
@OnPermissionDenied(Manifest.permission.WRITE_EXTERNAL_STORAGE) | ||
void onDeniedForStorage(){ | ||
controller.onDeniedForStorage(); | ||
} | ||
|
||
@Override | ||
public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) { | ||
IntroActivityPermissionsDispatcher.onRequestPermissionsResult(this, requestCode, grantResults); | ||
} | ||
|
||
protected void onActivityResult(int requestCode, int resultCode, Intent intent) { | ||
controller.onActivityResult(requestCode, resultCode, intent); | ||
} | ||
|
||
@Override | ||
public void onDonePressed(Fragment currentFragment) { | ||
super.onDonePressed(currentFragment); | ||
IntroActivityPermissionsDispatcher.showFilePickerWithPermissionCheck(this); | ||
} | ||
|
||
@Override | ||
protected void onPause() { | ||
super.onPause(); | ||
controller.onPause(); | ||
} | ||
|
||
@Override | ||
protected void onResume() { | ||
super.onResume(); | ||
controller.onResume(); | ||
} | ||
|
||
@Override | ||
public void addSlides(List<AppIntroFragment> slides) { | ||
for (AppIntroFragment frag : slides) | ||
this.addSlide(frag); | ||
|
||
this.setProgressButtonEnabled(true); | ||
this.setFadeAnimation(); | ||
this.showSkipButton(false); | ||
} | ||
|
||
@Override | ||
public void savePreference(String key, String value) { | ||
((mgba)getApplication()).savePreference(key, value); | ||
} | ||
|
||
@Override | ||
public void savePreference(String key, boolean value) { | ||
((mgba)getApplication()).savePreference(key, value); | ||
} | ||
|
||
@Override | ||
public void showProgressDialog() { | ||
((mgba)getApplication()).showProgressDialog(this); | ||
} | ||
|
||
@Override | ||
public void startActivity(Class<? extends AppCompatActivity> activity) { | ||
Intent it = new Intent(this, activity); | ||
startActivity(it); | ||
finish(); | ||
} | ||
} |
101 changes: 0 additions & 101 deletions
101
app/src/main/java/io/mgba/ui/activities/IntroActivity.kt
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
272c962
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hi bro
i tried your code
i import it to android studio latest version. everything is great till you try to debug or build the apk i get the following errors.
Im kinda interested in your project and want to support it as i can.
looking forward to hear from you regarding this erros
Build command failed.
Error while executing process /Users/mshow/android-sdks/cmake/3.6.4111459/bin/cmake with arguments {--build /Users/mshow/Downloads/mGBA-master4/app/.externalNativeBuild/cmake/debug/arm64-v8a --target mgba}
[1/1] Re-running CMake...
CMake Warning at /Users/mshow/android-sdks/ndk-bundle/build/cmake/android.toolchain.cmake:63 (message):
Using custom NDK path (ANDROID_NDK is set):
/Users/mshow/android-sdks/ndk-bundle
Call Stack (most recent call first):
/Users/mshow/Downloads/mGBA-master4/app/.externalNativeBuild/cmake/debug/arm64-v8a/CMakeFiles/3.6.0-rc2/CMakeSystem.cmake:6 (include)
CMakeLists.txt:2 (project)
-- Could NOT find PkgConfig (missing: PKG_CONFIG_EXECUTABLE)
-- Checking for one of the modules 'libedit'
CMake Warning at CMakeLists.txt:135 (message):
Requested module libedit missing for feature USE_EDITLINE. Feature
disabled.
Call Stack (most recent call first):
CMakeLists.txt:395 (find_feature)
-- Checking for one of the modules 'libavcodec'
CMake Warning at CMakeLists.txt:135 (message):
Requested module libavcodec missing for feature USE_FFMPEG. Feature
disabled.
Call Stack (most recent call first):
CMakeLists.txt:422 (find_feature)
-- Checking for one of the modules 'minizip'
CMake Warning at CMakeLists.txt:135 (message):
Requested module minizip missing for feature USE_MINIZIP. Feature
disabled.
Call Stack (most recent call first):
CMakeLists.txt:424 (find_feature)
-- Checking for one of the modules 'PNG'
CMake Warning at CMakeLists.txt:135 (message):
Requested module PNG missing for feature USE_PNG. Feature disabled.
Call Stack (most recent call first):
CMakeLists.txt:425 (find_feature)
-- Checking for one of the modules 'MagickWand'
CMake Warning at CMakeLists.txt:135 (message):
Requested module MagickWand missing for feature USE_MAGICK. Feature
disabled.
Call Stack (most recent call first):
CMakeLists.txt:427 (find_feature)
-- Checking for one of the modules 'epoxy'
CMake Warning at CMakeLists.txt:135 (message):
Requested module epoxy missing for feature USE_EPOXY. Feature disabled.
Call Stack (most recent call first):
CMakeLists.txt:428 (find_feature)
-- Checking for one of the modules 'libelf'
CMake Warning at CMakeLists.txt:135 (message):
Requested module libelf missing for feature USE_ELF. Feature disabled.
Call Stack (most recent call first):
CMakeLists.txt:431 (find_feature)
-- Build type: Debug
-- Platforms:
-- Game Boy Advance: ON
-- Game Boy: ON
-- Features:
-- Debuggers: ON
-- CLI debugger: OFF
-- GDB stub: ON
-- Video recording: OFF
-- GIF recording: OFF
-- Screenshot/advanced savestate support: OFF
-- ZIP support: OFF
-- 7-Zip support: 0
-- SQLite3 game database: 0
-- ELF loading support: OFF
-- OpenGL support: OpenGL|ES 2
-- Frontends:
-- Qt: OFF
-- SDL (): OFF
-- Profiling: OFF
-- Test harness: OFF
-- Test suite: OFF
-- Python bindings: OFF
-- Examples: OFF
-- Cores:
-- Libretro core: OFF
-- Libraries:
-- Static: OFF
-- Shared: ON
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/mshow/Downloads/mGBA-master4/app/.externalNativeBuild/cmake/debug/arm64-v8a
[1/2] cd /Users/mshow/Downloads/mGBA-master4/app/.externalNativeBuild/cmake/debug/arm64-v8a && /Users/mshow/android-sdks/cmake/3.6.4111459/bin/cmake -DBINARY_NAME=mgba -DCONFIG_FILE=/Users/mshow/Downloads/mGBA-master4/mgba/src/core/version.c.in -DOUT_FILE=/Users/mshow/Downloads/mGBA-master4/app/.externalNativeBuild/cmake/debug/arm64-v8a/version.c -P /Users/mshow/Downloads/mGBA-master4/mgba/version.cmake
[2/2] Linking C shared library /Users/mshow/Downloads/mGBA-master4/app/build/intermediates/cmake/debug/obj/arm64-v8a/libmgba.so
FAILED: : && /Users/mshow/android-sdks/ndk-bundle/toolchains/llvm/prebuilt/darwin-x86_64/bin/clang --target=aarch64-none-linux-android --gcc-toolchain=/Users/mshow/android-sdks/ndk-bundle/toolchains/aarch64-linux-android-4.9/prebuilt/darwin-x86_64 --sysroot=/Users/mshow/android-sdks/ndk-bundle/sysroot -fPIC -isystem /Users/mshow/android-sdks/ndk-bundle/sysroot/usr/include/aarch64-linux-android -D__ANDROID_API__=21 -g -DANDROID -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -Wa,--noexecstack -Wformat -Werror=format-security -Wall -Wextra -Wno-missing-field-initializers -std=c99 -pthread -O0 -fno-limit-debug-info -Wl,--exclude-libs,libgcc.a -Wl,--exclude-libs,libatomic.a --sysroot /Users/mshow/android-sdks/ndk-bundle/platforms/android-21/arch-arm64 -Wl,--build-id -Wl,--warn-shared-textrel -Wl,--fatal-warnings -Wl,--no-undefined -Wl,-z,noexecstack -Qunused-arguments -Wl,-z,relro -Wl,-z,now -shared -Wl,-soname,libmgba.so -o /Users/mshow/Downloads/mGBA-master4/app/build/intermediates/cmake/debug/obj/arm64-v8a/libmgba.so CMakeFiles/mgba.dir/src/core/cache-set.c.o CMakeFiles/mgba.dir/src/core/cheats.c.o CMakeFiles/mgba.dir/src/core/config.c.o CMakeFiles/mgba.dir/src/core/core.c.o CMakeFiles/mgba.dir/src/core/directories.c.o CMakeFiles/mgba.dir/src/core/input.c.o CMakeFiles/mgba.dir/src/core/interface.c.o CMakeFiles/mgba.dir/src/core/library.c.o CMakeFiles/mgba.dir/src/core/lockstep.c.o CMakeFiles/mgba.dir/src/core/log.c.o CMakeFiles/mgba.dir/src/core/map-cache.c.o CMakeFiles/mgba.dir/src/core/mem-search.c.o CMakeFiles/mgba.dir/src/core/rewind.c.o CMakeFiles/mgba.dir/src/core/scripting.c.o CMakeFiles/mgba.dir/src/core/serialize.c.o CMakeFiles/mgba.dir/src/core/sync.c.o CMakeFiles/mgba.dir/src/core/thread.c.o CMakeFiles/mgba.dir/src/core/tile-cache.c.o CMakeFiles/mgba.dir/src/core/timing.c.o CMakeFiles/mgba.dir/src/lr35902/decoder.c.o CMakeFiles/mgba.dir/src/lr35902/isa-lr35902.c.o CMakeFiles/mgba.dir/src/lr35902/lr35902.c.o CMakeFiles/mgba.dir/src/gb/audio.c.o CMakeFiles/mgba.dir/src/gb/cheats.c.o CMakeFiles/mgba.dir/src/gb/core.c.o CMakeFiles/mgba.dir/src/gb/gb.c.o CMakeFiles/mgba.dir/src/gb/io.c.o CMakeFiles/mgba.dir/src/gb/mbc.c.o CMakeFiles/mgba.dir/src/gb/memory.c.o CMakeFiles/mgba.dir/src/gb/overrides.c.o CMakeFiles/mgba.dir/src/gb/serialize.c.o CMakeFiles/mgba.dir/src/gb/sio.c.o CMakeFiles/mgba.dir/src/gb/timer.c.o CMakeFiles/mgba.dir/src/gb/video.c.o CMakeFiles/mgba.dir/src/gb/renderers/cache-set.c.o CMakeFiles/mgba.dir/src/gb/renderers/software.c.o CMakeFiles/mgba.dir/src/arm/arm.c.o CMakeFiles/mgba.dir/src/arm/decoder-arm.c.o CMakeFiles/mgba.dir/src/arm/decoder-thumb.c.o CMakeFiles/mgba.dir/src/arm/decoder.c.o CMakeFiles/mgba.dir/src/arm/isa-arm.c.o CMakeFiles/mgba.dir/src/arm/isa-thumb.c.o CMakeFiles/mgba.dir/src/gba/audio.c.o CMakeFiles/mgba.dir/src/gba/bios.c.o CMakeFiles/mgba.dir/src/gba/cheats.c.o CMakeFiles/mgba.dir/src/gba/core.c.o CMakeFiles/mgba.dir/src/gba/dma.c.o CMakeFiles/mgba.dir/src/gba/gba.c.o CMakeFiles/mgba.dir/src/gba/hardware.c.o CMakeFiles/mgba.dir/src/gba/hle-bios.c.o CMakeFiles/mgba.dir/src/gba/input.c.o CMakeFiles/mgba.dir/src/gba/io.c.o CMakeFiles/mgba.dir/src/gba/matrix.c.o CMakeFiles/mgba.dir/src/gba/memory.c.o CMakeFiles/mgba.dir/src/gba/overrides.c.o CMakeFiles/mgba.dir/src/gba/savedata.c.o CMakeFiles/mgba.dir/src/gba/serialize.c.o CMakeFiles/mgba.dir/src/gba/sharkport.c.o CMakeFiles/mgba.dir/src/gba/sio.c.o CMakeFiles/mgba.dir/src/gba/timer.c.o CMakeFiles/mgba.dir/src/gba/vfame.c.o CMakeFiles/mgba.dir/src/gba/video.c.o CMakeFiles/mgba.dir/src/gba/cheats/codebreaker.c.o CMakeFiles/mgba.dir/src/gba/cheats/gameshark.c.o CMakeFiles/mgba.dir/src/gba/cheats/parv3.c.o CMakeFiles/mgba.dir/src/gba/renderers/cache-set.c.o CMakeFiles/mgba.dir/src/gba/renderers/software-bg.c.o CMakeFiles/mgba.dir/src/gba/renderers/software-mode0.c.o CMakeFiles/mgba.dir/src/gba/renderers/software-obj.c.o CMakeFiles/mgba.dir/src/gba/renderers/video-software.c.o CMakeFiles/mgba.dir/src/util/circle-buffer.c.o CMakeFiles/mgba.dir/src/util/configuration.c.o CMakeFiles/mgba.dir/src/util/crc32.c.o CMakeFiles/mgba.dir/src/util/elf-read.c.o CMakeFiles/mgba.dir/src/util/export.c.o CMakeFiles/mgba.dir/src/util/formatting.c.o CMakeFiles/mgba.dir/src/util/gui.c.o CMakeFiles/mgba.dir/src/util/hash.c.o CMakeFiles/mgba.dir/src/util/patch-fast.c.o CMakeFiles/mgba.dir/src/util/patch-ips.c.o CMakeFiles/mgba.dir/src/util/patch-ups.c.o CMakeFiles/mgba.dir/src/util/patch.c.o CMakeFiles/mgba.dir/src/util/png-io.c.o CMakeFiles/mgba.dir/src/util/ring-fifo.c.o CMakeFiles/mgba.dir/src/util/string.c.o CMakeFiles/mgba.dir/src/util/table.c.o CMakeFiles/mgba.dir/src/util/text-codec.c.o CMakeFiles/mgba.dir/src/util/vfs.c.o CMakeFiles/mgba.dir/version.c.o CMakeFiles/mgba.dir/src/util/vfs/vfs-mem.c.o CMakeFiles/mgba.dir/src/util/vfs/vfs-fifo.c.o CMakeFiles/mgba.dir/src/util/vfs/vfs-fd.c.o CMakeFiles/mgba.dir/src/util/vfs/vfs-dirent.c.o CMakeFiles/mgba.dir/src/platform/posix/memory.c.o CMakeFiles/mgba.dir/src/third-party/inih/ini.c.o CMakeFiles/mgba.dir/src/third-party/blip_buf/blip_buf.c.o CMakeFiles/mgba.dir/src/gba/sio/joybus.c.o CMakeFiles/mgba.dir/src/gba/sio/lockstep.c.o CMakeFiles/mgba.dir/src/gb/sio/lockstep.c.o CMakeFiles/mgba.dir/src/gb/sio/printer.c.o CMakeFiles/mgba.dir/src/debugger/gdb-stub.c.o CMakeFiles/mgba.dir/src/debugger/debugger.c.o CMakeFiles/mgba.dir/src/debugger/parser.c.o CMakeFiles/mgba.dir/src/debugger/symbols.c.o CMakeFiles/mgba.dir/src/debugger/cli-debugger.c.o CMakeFiles/mgba.dir/src/lr35902/debugger/cli-debugger.c.o CMakeFiles/mgba.dir/src/lr35902/debugger/debugger.c.o CMakeFiles/mgba.dir/src/lr35902/debugger/memory-debugger.c.o CMakeFiles/mgba.dir/src/gb/debugger/cli.c.o CMakeFiles/mgba.dir/src/gb/debugger/symbols.c.o CMakeFiles/mgba.dir/src/arm/debugger/cli-debugger.c.o CMakeFiles/mgba.dir/src/arm/debugger/debugger.c.o CMakeFiles/mgba.dir/src/arm/debugger/memory-debugger.c.o CMakeFiles/mgba.dir/src/gba/debugger/cli.c.o CMakeFiles/mgba.dir/src/gba/rr/mgm.c.o CMakeFiles/mgba.dir/src/gba/rr/rr.c.o CMakeFiles/mgba.dir/src/gba/rr/vbm.c.o CMakeFiles/mgba.dir/src/gba/extra/proxy.c.o CMakeFiles/mgba.dir/src/gb/extra/proxy.c.o CMakeFiles/mgba.dir/src/feature/commandline.c.o CMakeFiles/mgba.dir/src/feature/thread-proxy.c.o CMakeFiles/mgba.dir/src/feature/video-logger.c.o -lm -latomic -lm && :
CMakeFiles/mgba.dir/src/util/formatting.c.o: In function
strtof_u': /Users/mshow/Downloads/mGBA-master4/mgba/src/util/formatting.c:67: undefined reference to
strtof_l'CMakeFiles/mgba.dir/src/util/vfs/vfs-fd.c.o: In function
_vfdSync': /Users/mshow/Downloads/mGBA-master4/mgba/src/util/vfs/vfs-fd.c:172: undefined reference to
futimes'clang: error: linker command failed with exit code 1 (use -v to see invocation)
ninja: build stopped: subcommand failed.
272c962
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi,
Yeah about that... I havent started messing with the native emulator part, I just imported the mgba into the project.
So you could try fixing that or if you just want to mess with the UI part, just disable the native build.
272c962
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the reply Andre .
Well like you said the native part give a lots of error. Im new to dealing with native codes as this. Also i want to ask if you're available to fix the native part, i'll support the project if you don't mind with any means until it finished, Im kinda like your work.
could you provide me with your email or your socials media profiles
thanks for your time.