Skip to content

Commit

Permalink
Merge pull request #11 from reupen/vs2019
Browse files Browse the repository at this point in the history
Update to VS 2019 and update dependencies
  • Loading branch information
reupen authored Feb 2, 2020
2 parents 2afb552 + db1ad2d commit a967df6
Show file tree
Hide file tree
Showing 42 changed files with 662 additions and 102 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

* Fixed a possible 'Unsupported file format' error on iOS 4 devices when playlists have been modified on the device
* Added support for playlist changes made on the device on iOS 4 devices
* Compiled with Visual Studio 2019 16.4
* Updated to foobar2000 SDK 2019-12-27

## 0.7.1

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

http://yuo.be/ipod_manager

[![Build status](https://ci.appveyor.com/api/projects/status/dfrgvwsfrlet8d2r/branch/master?svg=true)](https://ci.appveyor.com/project/reupen/ipod-manager/branch/master)
[![Build status](https://reupen.visualstudio.com/Columns%20UI/_apis/build/status/reupen.ipod_manager?branchName=master)](https://reupen.visualstudio.com/Columns%20UI/_build/latest?definitionId=7&branchName=master)

The iPod manager source code (contained in the `foo_dop` folder) is released under the Lesser GNU Public Licence (see COPYING and COPYING.LESSER).

Expand Down
14 changes: 0 additions & 14 deletions appveyor.yml

This file was deleted.

27 changes: 27 additions & 0 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
jobs:
- job: build
displayName: Build
strategy:
matrix:
Debug:
configuration: Debug
Release:
configuration: Release
pool:
vmImage: windows-2019
steps:
- checkout: self
submodules: recursive
- powershell: |
Set-PSDebug -Trace 1
vcpkg version
vcpkg integrate install
vcpkg install ms-gsl
displayName: Install dependencies
- task: VSBuild@1
displayName: Build
inputs:
solution: vc16/ipod_manager.sln
platform: Win32
configuration: $(configuration)
msbuildArgs: /m
8 changes: 4 additions & 4 deletions dop-sdk/dop-sdk.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -17,26 +17,26 @@
<PropertyGroup Label="Globals">
<ProjectGuid>{4E751798-E95B-4837-878F-E4732D2A2807}</ProjectGuid>
<RootNamespace>dop</RootNamespace>
<WindowsTargetPlatformVersion>10.0.15063.0</WindowsTargetPlatformVersion>
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release (Dynamic Link)|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<PlatformToolset>v141</PlatformToolset>
<PlatformToolset>v142</PlatformToolset>
<UseOfMfc>false</UseOfMfc>
<CharacterSet>Unicode</CharacterSet>
<WholeProgramOptimization>true</WholeProgramOptimization>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<PlatformToolset>v141</PlatformToolset>
<PlatformToolset>v142</PlatformToolset>
<UseOfMfc>false</UseOfMfc>
<CharacterSet>Unicode</CharacterSet>
<WholeProgramOptimization>true</WholeProgramOptimization>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<PlatformToolset>v141</PlatformToolset>
<PlatformToolset>v142</PlatformToolset>
<UseOfMfc>false</UseOfMfc>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
Expand Down
2 changes: 1 addition & 1 deletion fbh
Submodule fbh updated 6 files
+2 −3 config_object.h
+35 −0 config_var.h
+1 −1 console.h
+7 −23 fbh.vcxproj
+3 −2 fcl.h
+7 −6 sort.h
8 changes: 4 additions & 4 deletions foo_dop/browse.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ bool g_rename(pfc::string8 * text,HWND parent)
{
rename_param param;
param.m_text = text;
return !!uDialogBox(IDD_RENAME_PLAYLIST,parent,g_RenameProc,(LPARAM)(&param));
return !!DialogBoxParam(mmh::get_current_instance(), MAKEINTRESOURCE(IDD_RENAME_PLAYLIST), parent, g_RenameProc, (LPARAM)(&param));
}


Expand All @@ -266,7 +266,7 @@ void t_browser::on_exit()
{
sync.release();
pfc::refcounted_object_ptr_t<ipod_browse_dialog> p_test = new ipod_browse_dialog(this);
HWND wnd = uCreateDialog(IDD_BROWSE, core_api::get_main_window(), ipod_browse_dialog::g_DialogProc, (LPARAM)p_test.get_ptr());
HWND wnd = CreateDialogParam(mmh::get_current_instance(), MAKEINTRESOURCE(IDD_BROWSE), core_api::get_main_window(), ipod_browse_dialog::g_DialogProc, (LPARAM)p_test.get_ptr());
ShowWindow(wnd, SW_SHOWNORMAL);
////m_this = this;
}
Expand Down Expand Up @@ -639,7 +639,7 @@ BOOL ipod_browse_dialog::DialogProc(HWND wnd,UINT msg,WPARAM wp,LPARAM lp)
rule.action = (1<<24)|(1<<0);
editor.m_rules.rules.add_item(rule);
editor.init(m_library);
if (uDialogBox(IDD_SMART, wnd, &t_smart_playlist_editor::g_DialogProc, (LPARAM)&editor))
if (DialogBoxParam(mmh::get_current_instance(), MAKEINTRESOURCE(IDD_SMART), wnd, &t_smart_playlist_editor::g_DialogProc, (LPARAM)&editor))
{
t_uint64 parentid = NULL;
if (p_node->m_type == ipod_tree_entry_t::type_folder)
Expand Down Expand Up @@ -705,7 +705,7 @@ BOOL ipod_browse_dialog::DialogProc(HWND wnd,UINT msg,WPARAM wp,LPARAM lp)
else if (cmd == ID_EDIT_SMART)
{
t_smart_playlist_editor editor(m_library, p_node->m_playlist->smart_playlist_data, p_node->m_playlist->smart_playlist_rules, p_node->m_playlist->sort_order, p_node->m_playlist->sort_direction!=0, p_node->m_playlist->id);
if (uDialogBox(IDD_SMART, wnd, &t_smart_playlist_editor::g_DialogProc, (LPARAM)&editor))
if (DialogBoxParam(mmh::get_current_instance(), MAKEINTRESOURCE(IDD_SMART), wnd, &t_smart_playlist_editor::g_DialogProc, (LPARAM)&editor))
{
p_node->m_playlist->smart_playlist_data = editor.m_data;
p_node->m_playlist->smart_playlist_rules = editor.m_rules;
Expand Down
2 changes: 1 addition & 1 deletion foo_dop/config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -389,7 +389,7 @@ class t_config_dop : public preferences_page
public:
HWND create(HWND parent)
{
return uCreateDialog(IDD_HOST,parent,g_DialogProc, (LPARAM)this);
return CreateDialogParam(mmh::get_current_instance(), MAKEINTRESOURCE(IDD_HOST), parent, g_DialogProc, (LPARAM)this);
}
const char * get_name() {return "iPod Manager";}
static const GUID guid;
Expand Down
2 changes: 1 addition & 1 deletion foo_dop/config_behaviour.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class t_config_tab4 : public preferences_tab {
public:
HWND create(HWND parent)
{
return uCreateDialog(IDD_BEHAVIOUR, parent, g_DialogProc, (LPARAM)this);
return CreateDialogParam(mmh::get_current_instance(), MAKEINTRESOURCE(IDD_BEHAVIOUR), parent, g_DialogProc, (LPARAM)this);
}
const char * get_name() { return "Behaviour"; }
virtual bool get_help_url(pfc::string_base & p_out)
Expand Down
7 changes: 2 additions & 5 deletions foo_dop/config_conversion.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,6 @@ void encoder_manager_t::sort_encoder_list()
//for (t_size i=0; i<count; i++)
// console::formatter() << index << " " << index << " " << permuation_inverse[index] << " " << permuation[index];
}
else
m_encoder_list_view.update_window();

}
}

Expand Down Expand Up @@ -130,7 +127,7 @@ BOOL encoder_manager_t::DialogProc(HWND wnd, UINT msg, WPARAM wp, LPARAM lp)
const char * p_name = "<enter name>";
t_size index = settings::encoder_list.add_item(settings::conversion_preset_t(p_name, "", "", "", settings::conversion_preset_t::bps_32));
uih::ListView::InsertItem item;
item.m_subitems.append_single(p_name);
item.m_subitems.emplace_back(p_name);

m_encoder_list_view.insert_items(index, 1, &item);
m_encoder_list_view.set_item_selected_single(index);
Expand Down Expand Up @@ -455,7 +452,7 @@ void encoder_manager_t::encoder_list_view_t::notify_save_inline_edit(const char
pfc::list_t<uih::ListView::InsertItem> items;
items.set_count(1);
{
items[0].m_subitems.append_single(settings::encoder_list[m_edit_index].m_name);
items[0].m_subitems.emplace_back(settings::encoder_list[m_edit_index].m_name);
}
replace_items(m_edit_index, items);
g_sort_converstion_encoders();
Expand Down
10 changes: 5 additions & 5 deletions foo_dop/config_conversion.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ class encoder_manager_t {
SetActiveWindow(m_wnd);
else
{
m_wnd = uCreateDialog(IDD_ENCODER_MANAGER, wnd_owner, g_DialogProc, (LPARAM)this);
m_wnd = CreateDialogParam(mmh::get_current_instance(), MAKEINTRESOURCE(IDD_ENCODER_MANAGER), wnd_owner, g_DialogProc, (LPARAM)this);
ShowWindow(m_wnd, SW_SHOWNORMAL);
}
return m_wnd;
Expand All @@ -52,7 +52,7 @@ class encoder_manager_t {
{
for (t_size n = 0, count = p_items.get_count(); n<count; n++)
{
p_items[n].m_subitems.append_single(settings::encoder_list[n].m_name);
p_items[n].m_subitems.emplace_back(settings::encoder_list[n].m_name);
}
}
void populate()
Expand All @@ -69,7 +69,7 @@ class encoder_manager_t {
pfc::list_t<uih::ListView::InsertItem> items;
items.set_count(count);
get_insert_items(items);
replace_items(0, items, false);
replace_items(0, items);
}
private:
void notify_on_initialisation()
Expand Down Expand Up @@ -177,7 +177,7 @@ class t_config_tab_conversion : public preferences_tab {
EnableWindow(m_wnd_conversion_thread_count_spin, b_enable && settings::conversion_use_custom_thread_count);
EnableWindow(m_wnd_conversion_thread_count, b_enable && settings::conversion_use_custom_thread_count);
SendMessage(m_wnd_conversion_thread_count_spin, UDM_SETPOS32, 0,
settings::conversion_use_custom_thread_count ? settings::conversion_custom_thread_count : GetOptimalWorkerThreadCount());
settings::conversion_use_custom_thread_count ? settings::conversion_custom_thread_count : std::thread::hardware_concurrency());
}

void on_convert_files_change()
Expand Down Expand Up @@ -213,7 +213,7 @@ class t_config_tab_conversion : public preferences_tab {
public:
HWND create(HWND parent)
{
return uCreateDialog(IDD_CONVERSION, parent, g_DialogProc, (LPARAM)this);
return CreateDialogParam(mmh::get_current_instance(), MAKEINTRESOURCE(IDD_CONVERSION), parent, g_DialogProc, (LPARAM)this);
}
const char * get_name() { return "Conversion"; }
virtual bool get_help_url(pfc::string_base & p_out)
Expand Down
10 changes: 5 additions & 5 deletions foo_dop/config_database.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ void t_config_tab1::get_insert_items(t_size base, t_size count, pfc::list_t<uih:
items.set_count(count);
for (i = 0; i<count; i++)
{
items[i].m_subitems.append_single(g_mappings[base + i].m_field);
items[i].m_subitems.append_single(g_mappings[base + i].m_value.get_ptr());
items[i].m_subitems.emplace_back(g_mappings[base + i].m_field);
items[i].m_subitems.emplace_back(g_mappings[base + i].m_value.get_ptr());
}
}

Expand Down Expand Up @@ -109,7 +109,7 @@ BOOL t_config_tab1::DialogProc(HWND wnd, UINT msg, WPARAM wp, LPARAM lp)
}
break;
case WM_DESTROY:
m_field_list.remove_items(bit_array_true(), false);
m_field_list.remove_items(bit_array_true());
m_field_list.destroy();
break;
}
Expand Down Expand Up @@ -159,8 +159,8 @@ void t_config_tab1::t_list_view_filter::notify_save_inline_edit(const char * val
pfc::list_t<uih::ListView::InsertItem> items;
items.set_count(1);
{
items[0].m_subitems.append_single(g_mappings[m_edit_index].m_field);
items[0].m_subitems.append_single(value);
items[0].m_subitems.emplace_back(g_mappings[m_edit_index].m_field);
items[0].m_subitems.emplace_back(value);
}
replace_items(m_edit_index, items);
}
Expand Down
2 changes: 1 addition & 1 deletion foo_dop/config_database.h
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ class t_config_tab1 : public preferences_tab {
public:
HWND create(HWND parent)
{
return uCreateDialog(IDD_CONFIG, parent, g_DialogProc, (LPARAM)this);
return CreateDialogParam(mmh::get_current_instance(), MAKEINTRESOURCE(IDD_CONFIG), parent, g_DialogProc, (LPARAM)this);
}
const char * get_name() { return "Database"; }
virtual bool get_help_url(pfc::string_base & p_out)
Expand Down
2 changes: 1 addition & 1 deletion foo_dop/config_features.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ class t_config_tab2 : public preferences_tab {
public:
HWND create(HWND parent)
{
return uCreateDialog(IDD_TOOLS, parent, g_DialogProc, (LPARAM)this);
return CreateDialogParam(mmh::get_current_instance(), MAKEINTRESOURCE(IDD_TOOLS), parent, g_DialogProc, (LPARAM)this);
}
const char * get_name() { return "iPod Features"; }
virtual bool get_help_url(pfc::string_base & p_out)
Expand Down
2 changes: 1 addition & 1 deletion foo_dop/config_ios.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class t_config_tab3 : public preferences_tab {
public:
HWND create(HWND parent)
{
return uCreateDialog(IDD_MOBILE, parent, g_DialogProc, (LPARAM)this);
return CreateDialogParam(mmh::get_current_instance(), MAKEINTRESOURCE(IDD_MOBILE), parent, g_DialogProc, (LPARAM)this);
}
const char * get_name() { return "Mobile Devices"; }
virtual bool get_help_url(pfc::string_base & p_out)
Expand Down
2 changes: 1 addition & 1 deletion foo_dop/file_adder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -663,7 +663,7 @@ void ipod_add_files::run (ipod_device_ptr_ref_t p_ipod, const pfc::list_base_con
}
}
conversion_manager_t p_converter;
t_size threadCount = p_mappings.conversion_use_custom_thread_count ? settings::conversion_custom_thread_count : GetOptimalWorkerThreadCount();
t_size threadCount = p_mappings.conversion_use_custom_thread_count ? settings::conversion_custom_thread_count : std::thread::hardware_concurrency();
if (threadCount<1) threadCount =1;
p_converter.initialise(entries, p_mappings,threadCount);
p_converter.run(p_ipod, p_mappings, p_status, progress_index, count_nodups*3, p_abort);
Expand Down
18 changes: 10 additions & 8 deletions foo_dop/foo_dop.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,18 @@
<PropertyGroup Label="Globals">
<ProjectGuid>{4AC26C54-BE51-4FDB-A115-6E2F2B3650E1}</ProjectGuid>
<RootNamespace>foo_dop</RootNamespace>
<WindowsTargetPlatformVersion>10.0.15063.0</WindowsTargetPlatformVersion>
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<PlatformToolset>v141</PlatformToolset>
<PlatformToolset>v142</PlatformToolset>
<UseOfMfc>false</UseOfMfc>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<PlatformToolset>v141</PlatformToolset>
<PlatformToolset>v142</PlatformToolset>
<UseOfMfc>false</UseOfMfc>
<CharacterSet>Unicode</CharacterSet>
<WholeProgramOptimization>true</WholeProgramOptimization>
Expand All @@ -45,12 +45,12 @@
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<OutDir>$(SolutionDir)$(Configuration)\</OutDir>
<IntDir>$(SolutionDir)$(Configuration)\$(ProjectName)\</IntDir>
<IncludePath>$(IncludePath);$(SolutionDir)</IncludePath>
<IncludePath>$(VC_IncludePath);$(WindowsSDK_IncludePath);$(ProjectDir)..\foobar2000;$(ProjectDir)..;</IncludePath>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<OutDir>$(SolutionDir)$(Configuration)\</OutDir>
<IntDir>$(SolutionDir)$(Configuration)\$(ProjectName)\</IntDir>
<IncludePath>$(IncludePath);$(SolutionDir)</IncludePath>
<IncludePath>$(VC_IncludePath);$(WindowsSDK_IncludePath);$(ProjectDir)..\foobar2000;$(ProjectDir)..;</IncludePath>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Midl>
Expand Down Expand Up @@ -173,6 +173,9 @@
<ClInclude Include="sqlite.h" />
<ClInclude Include="sync.h" />
<ClInclude Include="sync_logic.h" />
<ClInclude Include="vendored\bitreader_helper.h" />
<ClInclude Include="vendored\file_move_helper.h" />
<ClInclude Include="vendored\mp3_utils.h" />
<ClInclude Include="writer.h" />
<ClInclude Include="writer_sort_helpers.h" />
<ClInclude Include="zlib.h" />
Expand Down Expand Up @@ -240,6 +243,8 @@
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Create</PrecompiledHeader>
</ClCompile>
<ClCompile Include="sync.cpp" />
<ClCompile Include="vendored\file_move_helper.cpp" />
<ClCompile Include="vendored\mp3_utils.cpp" />
<ClCompile Include="video_tagger.cpp" />
<ClCompile Include="video_thumbnailer.cpp" />
<ClCompile Include="writer.cpp" />
Expand Down Expand Up @@ -271,9 +276,6 @@
<ProjectReference Include="..\foobar2000\foobar2000_component_client\foobar2000_component_client.vcxproj">
<Project>{71ad2674-065b-48f5-b8b0-e1f9d3892081}</Project>
</ProjectReference>
<ProjectReference Include="..\foobar2000\helpers\foobar2000_sdk_helpers.vcxproj">
<Project>{ee47764e-a202-4f85-a767-abdab4aff35f}</Project>
</ProjectReference>
<ProjectReference Include="..\foobar2000\SDK\foobar2000_SDK.vcxproj">
<Project>{e8091321-d79d-4575-86ef-064ea1a4a20d}</Project>
</ProjectReference>
Expand Down
18 changes: 18 additions & 0 deletions foo_dop/foo_dop.vcxproj.filters
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,9 @@
<Filter Include="Mobile Device">
<UniqueIdentifier>{8a92fd48-f296-4120-9540-581a1729e486}</UniqueIdentifier>
</Filter>
<Filter Include="Vendored">
<UniqueIdentifier>{b1a9bd2a-73dc-4968-9f2f-90ff9487fbce}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
<ClInclude Include="chapter.h">
Expand Down Expand Up @@ -211,6 +214,15 @@
<ClInclude Include="stdafx.h">
<Filter>Component</Filter>
</ClInclude>
<ClInclude Include="vendored\file_move_helper.h">
<Filter>Vendored</Filter>
</ClInclude>
<ClInclude Include="vendored\mp3_utils.h">
<Filter>Vendored</Filter>
</ClInclude>
<ClInclude Include="vendored\bitreader_helper.h">
<Filter>Vendored</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<ClCompile Include="itunesdb.cpp">
Expand Down Expand Up @@ -410,6 +422,12 @@
<ClCompile Include="reader_playlists.cpp">
<Filter>Backend Operations</Filter>
</ClCompile>
<ClCompile Include="vendored\file_move_helper.cpp">
<Filter>Vendored</Filter>
</ClCompile>
<ClCompile Include="vendored\mp3_utils.cpp">
<Filter>Vendored</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<Image Include="folder.ico">
Expand Down
Loading

0 comments on commit a967df6

Please sign in to comment.