Compare commits

...

17 Commits

Author SHA1 Message Date
LEdoian 36952159b7 Add make option for launching 3 years ago
LEdoian 9059b4fb33 Make the build smaller by using Release configuration 3 years ago
LEdoian 2c45d06842 Add `cleandeploy` target to Makefile 3 years ago
LEdoian ba8c84b7b6 Fix crash
Apparently, `override` was not the correct keyword :-)
3 years ago
LEdoian 9d9227b4ed Add a Makefile 3 years ago
LEdoian 8a1fc15f25 Fix more warnings 3 years ago
LEdoian d4f9eb2ad4 Fix a few warnings 3 years ago
LEdoian 5470a5bbf9 Really add the submodule
Turns out you cannot add the submodule to a patch file.
3 years ago
LEdoian c32cab9ee0 Fix "time" to only contain reasonable values
When a song longer than 24 minutes is in the playlist, the time
attribute of the INI is not parseable, causing a crash of the app.
3 years ago
LEdoian 6372b3da78 Fix bugs in the autogenerating script 3 years ago
LEdoian 8df331fa94 Fix permissions 3 years ago
LEdoian d340e8fc35 Add automatic INI generator 3 years ago
LEdoian 0314ef1389 Add notes from setting up toolchain
I somehow managed to get it working in a VM, so here are some notes…
3 years ago
LEdoian ddcc7e12b8 Add MpcCore as submodule 3 years ago
LEdoian 43fa7bf7b5 Add email to Readme
The email is not seen anywhere on gitea, so it needs to be there explicitly.
3 years ago
LEdoian bd416baf2d Add info about contributing 3 years ago
LEdoian 4ea9544d6e Merge branch 'develop' 3 years ago

3
.gitmodules vendored

@ -0,0 +1,3 @@
[submodule "MpcCore"]
path = MpcCore
url = https://github.com/LEdoian/MpcCore.git

@ -0,0 +1,20 @@
CONF?=/p:Configuration=Release
default: cleanbuild
build:
nuget restore
cd QuickPlay && msbuild /t:Build ${CONF}
deploy: build
cd QuickPlay && msbuild /t:Install ${CONF}
clean:
git clean -fxd
git submodule foreach --recursive git clean -fxd
cleanbuild: clean build
cleandeploy: clean deploy
launch:
adb shell monkey -p cz.ledoian.android.quickplay 1

@ -0,0 +1 @@
Subproject commit 50298b8ca8a2b2256e5af618b8d3ef878c636a7e

@ -5,7 +5,11 @@ VisualStudioVersion = 16.0.31112.23
MinimumVisualStudioVersion = 10.0.40219.1 MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "QuickPlay", "QuickPlay\QuickPlay.csproj", "{FDBCCBF8-7CA5-4719-8CBB-8E33C464B27C}" Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "QuickPlay", "QuickPlay\QuickPlay.csproj", "{FDBCCBF8-7CA5-4719-8CBB-8E33C464B27C}"
EndProject EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MpcCore", "..\..\Third-party\mpcCore\src\MpcCore\MpcCore.csproj", "{D0A5AD05-B98C-45E6-B61D-4700F7AA72CF}" Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "MpcCore", "MpcCore", "{43A22188-E0FB-4486-9623-10D8A1531AAF}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{242948C1-93ED-4D06-9238-B0634318B449}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MpcCore", "MpcCore\src\MpcCore\MpcCore.csproj", "{4E00B1E4-3141-4564-A333-2E8B5F3B0141}"
EndProject EndProject
Global Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution GlobalSection(SolutionConfigurationPlatforms) = preSolution
@ -23,12 +27,12 @@ Global
{FDBCCBF8-7CA5-4719-8CBB-8E33C464B27C}.Release-Stable|Any CPU.ActiveCfg = Release|Any CPU {FDBCCBF8-7CA5-4719-8CBB-8E33C464B27C}.Release-Stable|Any CPU.ActiveCfg = Release|Any CPU
{FDBCCBF8-7CA5-4719-8CBB-8E33C464B27C}.Release-Stable|Any CPU.Build.0 = Release|Any CPU {FDBCCBF8-7CA5-4719-8CBB-8E33C464B27C}.Release-Stable|Any CPU.Build.0 = Release|Any CPU
{FDBCCBF8-7CA5-4719-8CBB-8E33C464B27C}.Release-Stable|Any CPU.Deploy.0 = Release|Any CPU {FDBCCBF8-7CA5-4719-8CBB-8E33C464B27C}.Release-Stable|Any CPU.Deploy.0 = Release|Any CPU
{D0A5AD05-B98C-45E6-B61D-4700F7AA72CF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {4E00B1E4-3141-4564-A333-2E8B5F3B0141}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{D0A5AD05-B98C-45E6-B61D-4700F7AA72CF}.Debug|Any CPU.Build.0 = Debug|Any CPU {4E00B1E4-3141-4564-A333-2E8B5F3B0141}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D0A5AD05-B98C-45E6-B61D-4700F7AA72CF}.Release|Any CPU.ActiveCfg = Release|Any CPU {4E00B1E4-3141-4564-A333-2E8B5F3B0141}.Release|Any CPU.ActiveCfg = Release|Any CPU
{D0A5AD05-B98C-45E6-B61D-4700F7AA72CF}.Release|Any CPU.Build.0 = Release|Any CPU {4E00B1E4-3141-4564-A333-2E8B5F3B0141}.Release|Any CPU.Build.0 = Release|Any CPU
{D0A5AD05-B98C-45E6-B61D-4700F7AA72CF}.Release-Stable|Any CPU.ActiveCfg = Release|Any CPU {4E00B1E4-3141-4564-A333-2E8B5F3B0141}.Release-Stable|Any CPU.ActiveCfg = Debug|Any CPU
{D0A5AD05-B98C-45E6-B61D-4700F7AA72CF}.Release-Stable|Any CPU.Build.0 = Release|Any CPU {4E00B1E4-3141-4564-A333-2E8B5F3B0141}.Release-Stable|Any CPU.Build.0 = Debug|Any CPU
EndGlobalSection EndGlobalSection
GlobalSection(SolutionProperties) = preSolution GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE HideSolutionNode = FALSE
@ -36,4 +40,8 @@ Global
GlobalSection(ExtensibilityGlobals) = postSolution GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {36EE9F92-9FC0-4EEE-A3AA-9EE43A4E2B86} SolutionGuid = {36EE9F92-9FC0-4EEE-A3AA-9EE43A4E2B86}
EndGlobalSection EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{242948C1-93ED-4D06-9238-B0634318B449} = {43A22188-E0FB-4486-9623-10D8A1531AAF}
{4E00B1E4-3141-4564-A333-2E8B5F3B0141} = {242948C1-93ED-4D06-9238-B0634318B449}
EndGlobalSection
EndGlobal EndGlobal

@ -89,7 +89,7 @@ namespace QuickPlay
{ {
var i = new Intent("com.google.zxing.client.android.SCAN"); var i = new Intent("com.google.zxing.client.android.SCAN");
StartActivityForResult(i, 0); StartActivityForResult(i, 0);
} catch (ActivityNotFoundException e) { } catch (ActivityNotFoundException) {
Toast.MakeText(this, "You need ZXing Barcode scanner for this", ToastLength.Long).Show(); Toast.MakeText(this, "You need ZXing Barcode scanner for this", ToastLength.Long).Show();
} }
}); });
@ -152,7 +152,7 @@ namespace QuickPlay
await currentPlayer.Play(song); await currentPlayer.Play(song);
} }
public async void OnResume() protected new async void OnResume()
{ {
base.OnResume(); base.OnResume();
@ -170,7 +170,7 @@ namespace QuickPlay
// Refresh player info // Refresh player info
OnPlayerUpdate(); OnPlayerUpdate();
} }
public void OnDestroy() protected new void OnDestroy()
{ {
base.OnDestroy(); base.OnDestroy();

@ -42,7 +42,7 @@
<AndroidEnableProfiledAot>false</AndroidEnableProfiledAot> <AndroidEnableProfiledAot>false</AndroidEnableProfiledAot>
<BundleAssemblies>false</BundleAssemblies> <BundleAssemblies>false</BundleAssemblies>
<AndroidKeyStore>false</AndroidKeyStore> <AndroidKeyStore>false</AndroidKeyStore>
<AndroidUseAapt2>false</AndroidUseAapt2> <AndroidUseAapt2>true</AndroidUseAapt2>
<AndroidHttpClientHandlerType>Xamarin.Android.Net.AndroidClientHandler</AndroidHttpClientHandlerType> <AndroidHttpClientHandlerType>Xamarin.Android.Net.AndroidClientHandler</AndroidHttpClientHandlerType>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
@ -134,12 +134,6 @@
<Version>28.0.0.3</Version> <Version>28.0.0.3</Version>
</PackageReference> </PackageReference>
</ItemGroup> </ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\Third-party\mpcCore\src\MpcCore\MpcCore.csproj">
<Project>{d0a5ad05-b98c-45e6-b61d-4700f7aa72cf}</Project>
<Name>MpcCore</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup> <ItemGroup>
<AndroidResource Include="Resources\drawable-mdpi\material_settings.png" /> <AndroidResource Include="Resources\drawable-mdpi\material_settings.png" />
</ItemGroup> </ItemGroup>
@ -235,6 +229,9 @@
<SubType>Designer</SubType> <SubType>Designer</SubType>
</AndroidResource> </AndroidResource>
</ItemGroup> </ItemGroup>
<ItemGroup>
<ProjectReference Include="..\MpcCore\src\MpcCore\MpcCore.csproj" />
</ItemGroup>
<Import Project="$(MSBuildExtensionsPath)\Xamarin\Android\Xamarin.Android.CSharp.targets" /> <Import Project="$(MSBuildExtensionsPath)\Xamarin\Android\Xamarin.Android.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it. <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets. Other similar extension points exist, see Microsoft.Common.targets.
@ -243,4 +240,4 @@
<Target Name="AfterBuild"> <Target Name="AfterBuild">
</Target> </Target>
--> -->
</Project> </Project>

File diff suppressed because it is too large Load Diff

@ -115,3 +115,14 @@ The far future
--- ---
- [ ] Editing the player config right on the device (with INI file export) - [ ] Editing the player config right on the device (with INI file export)
- [ ] Tests. (The code should be testable, but no tests has been written yet.) - [ ] Tests. (The code should be testable, but no tests has been written yet.)
Contributing
====
Please write me an [email](mailto:quickplaygt@pokemon.ledoian.cz), similar to how Linux kernel development works. In
the unlikely case you have an account on my Gitea you may submit issues and
pull requests directly.
(I would like to allow for some kind of federated Gitea accounts like
[ForgeFed](https://github.com/forgefed), but that is not possible at the
moment.)

@ -0,0 +1,23 @@
# Here are several notes on how I managed to get xamarin.android working.
# OS: Linux Mint 20.3 Mate x86_64
# Downloaded Android Studio, Added Mono, installed a lot of random packages, Android SDKs, etc.
# Xamarin.Android taken from the pipeline artifact
# Did some weird hacks with environment (TODO)
# Did awful things to the dotnet instalation:
# SO: https://askubuntu.com/questions/1177970/how-to-develop-for-android-with-xamarin
for x in /usr/lib/xamarin.android/xbuild/*; do ln -s $x /usr/share/dotnet/sdk/6.0.200/`basename $x`; done
for x in /usr/lib/xamarin.android/xbuild-frameworks/*; do ln -s $x /usr/share/dotnet/packs/`basename $x`; done
# Found some commands to be semi-working
dotnet build -p:TargetFrameworkRootPath=/usr/lib/xamarin.android/xbuild-frameworks/
nuget restore # In solution directory
msbuild /t:Build,Install # In project directory
# Launch yourself...
clean:
git clean -fxd `git rev-parse --show-toplevel`
git submodule foreach --recursive git clean -fxd

@ -0,0 +1,17 @@
#!/bin/bash
set -euo pipefail
# This script takes current playlist as `mpc` sees it and converts it into
# QuickPlay INI sections.
# Use at own risk :-)
mpc -f '[[%artist% - ]%title%]#|%file%' playlist | while IFS='|' read title file; do
if test -z "$title"; then
title="$(basename "$file")"
fi
# Unfortunately, the "time" attribute is currently required
echo -e "[$title]\npath = $file\ntime = 2:00\n"
done
Loading…
Cancel
Save