Skip to content

Commit

Permalink
Fix compilation on Windows
Browse files Browse the repository at this point in the history
Increment version
  • Loading branch information
funbiscuit committed May 5, 2020
1 parent 4e28440 commit ccc66b4
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version: 0.3.0.{build}
version: 0.3.1.{build}

image:
- Visual Studio 2017
Expand Down
10 changes: 5 additions & 5 deletions appveyor-build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -26,25 +26,25 @@ for($i = 0; $i -lt $vc_arch.length; $i++){
$cv = $cmd_var[$k]
# create build dir if it was not restored from cache
if(!(test-path "build$cs-$vc")){ mkdir "build$cs-$vc" }
cd "build$cs-$vc"
Set-Location "build$cs-$vc"
cmake -DQT_WIN_PATH="$qt_path" -DWIN32_CONSOLE="$cv" -G "Visual Studio 15 2017$vc_gen_sfx" ..
cmake --build . --config Release
cd ..
Set-Location ..

# create folders for binaries
mkdir "bin$cs-$vc"
mkdir "bin$cs-$vc\platforms"
mkdir "bin$cs-$vc\styles"

# copy executable and dll's
copy "build$cs-$vc\app-gui\Release\spacedisplay_gui.exe" "bin$cs-$vc\spacedisplay.exe"
Move-Item "build$cs-$vc\app-gui\Release\spacedisplay_gui.exe" "bin$cs-$vc\spacedisplay.exe"
for($j = 0; $j -lt $qt_dlls.length; $j++){
$dll = $qt_dlls[$j]
copy "$qt_path\bin\$dll" "bin$cs-$vc\$dll"
Copy-Item "$qt_path\bin\$dll" "bin$cs-$vc\$dll"
}
for($j = 0; $j -lt $qt_plug.length; $j++){
$dll = $qt_plug[$j]
copy "$qt_path\plugins\$dll" "bin$cs-$vc\$dll"
Copy-Item "$qt_path\plugins\$dll" "bin$cs-$vc\$dll"
}
}
}
2 changes: 1 addition & 1 deletion build-win-msvc14_x64.bat
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@ if not exist "bin\" mkdir bin
cd cmake-build-msvc14_x64-release
%cmake_path% "-DQT_WIN_PATH=D:\Qt\5.14.2\msvc2015_64" -G "Visual Studio 14 2015 Win64" ..
%cmake_path% --build . --config Release --target spacedisplay_gui
copy app-gui\Release\spacedisplay_gui.exe ..\bin\spacedisplay_gui.exe
move app-gui\Release\spacedisplay_gui.exe ..\bin\spacedisplay_gui.exe
cd ..
2 changes: 1 addition & 1 deletion build-win-msvc15_x64.bat
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@ if not exist "bin\" mkdir bin
cd cmake-build-msvc15_x64-release
%cmake_path% "-DQT_WIN_PATH=D:\Qt\5.14.2\msvc2017_64" -G "Visual Studio 15 2017 Win64" ..
%cmake_path% --build . --config Release --target spacedisplay_gui
copy app-gui\Release\spacedisplay_gui.exe ..\bin\spacedisplay_gui.exe
move app-gui\Release\spacedisplay_gui.exe ..\bin\spacedisplay_gui.exe
cd ..
4 changes: 2 additions & 2 deletions lib/src/platformutils-win.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ bool PlatformUtils::get_mount_space(const std::string& path, uint64_t& totalSpac

void PlatformUtils::open_folder_in_file_manager(const char* folder_path)
{
auto pars = string_format("/n,\"%s\"", folder_path);
auto pars = Utils::strFormat("/n,\"%s\"", folder_path);
auto parsw = str2wstr(pars);

std::wcout << L"Launch explorer with args: " << parsw << '\n';
Expand All @@ -188,7 +188,7 @@ void PlatformUtils::open_folder_in_file_manager(const char* folder_path)

void PlatformUtils::show_file_in_file_manager(const char* file_path)
{
auto pars = string_format("/select,\"%s\"", file_path);
auto pars = Utils::strFormat("/select,\"%s\"", file_path);
auto parsw = str2wstr(pars);

std::wcout << L"Launch explorer with args: " << parsw << '\n';
Expand Down
2 changes: 1 addition & 1 deletion lib/src/spacewatcher-win.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ void SpaceWatcherWin::readEvents()
// minimum size is 4, so do nothing until we receive it
if(dwords>3)
{
int currentDword=0;
size_t currentDword=0;

while(true)
{
Expand Down

0 comments on commit ccc66b4

Please sign in to comment.