diff --git a/bin/win/fsnotifier.exe b/bin/win/fsnotifier.exe index d63eef5a9085..4cb76754ab02 100644 Binary files a/bin/win/fsnotifier.exe and b/bin/win/fsnotifier.exe differ diff --git a/bin/win/fsnotifier64.exe b/bin/win/fsnotifier64.exe index c922603f104b..b34f5cb4f521 100644 Binary files a/bin/win/fsnotifier64.exe and b/bin/win/fsnotifier64.exe differ diff --git a/native/fileWatcher/CMakeLists.txt b/native/fileWatcher/CMakeLists.txt new file mode 100644 index 000000000000..f9af42e678a7 --- /dev/null +++ b/native/fileWatcher/CMakeLists.txt @@ -0,0 +1,23 @@ +cmake_minimum_required(VERSION 3.1) +project(WinFsNotifier) + +if(NOT WIN32) + message(FATAL_ERROR "Windows only.") +endif() + +set(BUILD_NUMBER $ENV{BUILD_NUMBER}) +string(TIMESTAMP YEAR "%Y") +if(CMAKE_GENERATOR_PLATFORM STREQUAL "x64") + set(FILE_NAME "fsnotifier64") +else() + set(FILE_NAME "fsnotifier") +endif() + +set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /MT") + +configure_file(${CMAKE_CURRENT_SOURCE_DIR}/fileWatcher3.rc ${CMAKE_CURRENT_BINARY_DIR}/fileWatcher3.rc @ONLY) + +add_executable(WinFsNotifier fileWatcher3.cpp ${CMAKE_CURRENT_BINARY_DIR}/fileWatcher3.rc) +target_link_libraries(WinFsNotifier mpr.lib) + +set_target_properties(WinFsNotifier PROPERTIES OUTPUT_NAME ${FILE_NAME}) \ No newline at end of file diff --git a/native/fileWatcher/build.cmd b/native/fileWatcher/build.cmd new file mode 100644 index 000000000000..e5c714352c95 --- /dev/null +++ b/native/fileWatcher/build.cmd @@ -0,0 +1,14 @@ +@ECHO OFF + +SET BUILD_DIR=%1 +SET PLATFORM=%2 +SET CMAKE=%CMAKE_PATH%\bin\cmake + +IF EXIST "%BUILD_DIR%" RMDIR /S /Q "%BUILD_DIR%" +MKDIR "%BUILD_DIR%" & CD "%BUILD_DIR%" + +"%CMAKE%" -G "Visual Studio 12 2013" -T v120_xp -A "%PLATFORM%" .. +IF ERRORLEVEL 1 EXIT 1 + +"%CMAKE%" --build . --config Release +IF ERRORLEVEL 1 EXIT 2 \ No newline at end of file diff --git a/native/fileWatcher/fileWatcher3.cpp b/native/fileWatcher/fileWatcher3.cpp index c8a9f82cfa2a..a0c9b94d6804 100644 --- a/native/fileWatcher/fileWatcher3.cpp +++ b/native/fileWatcher/fileWatcher3.cpp @@ -1,23 +1,9 @@ -/* - * Copyright 2000-2014 JetBrains s.r.o. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ +// Copyright 2000-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. #include #include -#include #include +#include struct WatchRootInfo { char driveLetter; @@ -453,7 +439,7 @@ void FreeWatchRootsList() { // -- Main - filewatcher protocol --------------------------------------------- -int _tmain(int argc, _TCHAR *argv[]) { +int main(int argc, char *argv[]) { InitializeCriticalSection(&csOutput); for (int i = 0; i < 26; i++) { @@ -505,4 +491,4 @@ int _tmain(int argc, _TCHAR *argv[]) { UpdateRoots(false); DeleteCriticalSection(&csOutput); -} +} \ No newline at end of file diff --git a/native/fileWatcher/fileWatcher3.rc b/native/fileWatcher/fileWatcher3.rc index b61e28182834..44ea5dfbbf0e 100644 --- a/native/fileWatcher/fileWatcher3.rc +++ b/native/fileWatcher/fileWatcher3.rc @@ -1,37 +1,35 @@ -#include - -#define FILE_VERSION 14,0,0,2 -#define FILE_VERSION_STR "14.0.0.2" -#define APP_VERSION 14,0,0,0 -#define APP_VERSION_STR "14" +#define VERSION 14,0,0,@BUILD_NUMBER@ +#define VERSION_STR "14.0.0.@BUILD_NUMBER@\0" +#define FILE_NAME "@FILE_NAME@.exe" +#define COPYRIGHT "Copyright 2000-@YEAR@ JetBrains s.r.o." #pragma code_page(65001) -VS_VERSION_INFO VERSIONINFO -FILEVERSION FILE_VERSION -PRODUCTVERSION APP_VERSION -FILEFLAGSMASK 0 -FILEFLAGS 0 -FILEOS VOS__WINDOWS32 -FILETYPE VFT_APP -FILESUBTYPE 0 +1 VERSIONINFO + FILEVERSION VERSION + PRODUCTVERSION VERSION + FILEFLAGSMASK 0x0L + FILEFLAGS 0x0L + FILEOS 0x4L + FILETYPE 0x2L + FILESUBTYPE 0x0L BEGIN - BLOCK "StringFileInfo" + BLOCK "StringFileInfo" + BEGIN + BLOCK "0000fde9" BEGIN - BLOCK "0000fde9" - BEGIN - VALUE "CompanyName", "JetBrains s.r.o." - VALUE "FileDescription", "Filesystem events processor" - VALUE "FileVersion", FILE_VERSION_STR - VALUE "InternalName", "fsnotifier" - VALUE "LegalCopyright", "Copyright (C) 2008-2015 JetBrains s.r.o." - VALUE "OriginalFilename", "fsnotifier.exe" - VALUE "ProductName", "IntelliJ Platform" - VALUE "ProductVersion", APP_VERSION_STR - END + VALUE "CompanyName", "JetBrains" + VALUE "FileDescription", "Filesystem events processor" + VALUE "FileVersion", VERSION_STR + VALUE "InternalName", FILE_NAME + VALUE "LegalCopyright", COPYRIGHT + VALUE "OriginalFilename", FILE_NAME + VALUE "ProductName", "IntelliJ Platform" + VALUE "ProductVersion", VERSION_STR END - BLOCK "VarFileInfo" - BEGIN - VALUE "Translation", 0, 0xfde9 - END -END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0, 0xfde9 + END +END \ No newline at end of file diff --git a/native/fileWatcher/fileWatcher3.sln b/native/fileWatcher/fileWatcher3.sln deleted file mode 100644 index 0ba0194e7b59..000000000000 --- a/native/fileWatcher/fileWatcher3.sln +++ /dev/null @@ -1,28 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Express 2013 for Windows Desktop -VisualStudioVersion = 12.0.21005.1 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "fileWatcher3", "fileWatcher3.vcxproj", "{0EF2C2DB-0E16-4BC3-9927-9C51AF00EB57}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Win32 = Debug|Win32 - Debug|x64 = Debug|x64 - Release|Win32 = Release|Win32 - Release|x64 = Release|x64 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {0EF2C2DB-0E16-4BC3-9927-9C51AF00EB57}.Debug|Win32.ActiveCfg = Debug|Win32 - {0EF2C2DB-0E16-4BC3-9927-9C51AF00EB57}.Debug|Win32.Build.0 = Debug|Win32 - {0EF2C2DB-0E16-4BC3-9927-9C51AF00EB57}.Debug|x64.ActiveCfg = Debug|x64 - {0EF2C2DB-0E16-4BC3-9927-9C51AF00EB57}.Debug|x64.Build.0 = Debug|x64 - {0EF2C2DB-0E16-4BC3-9927-9C51AF00EB57}.Release|Win32.ActiveCfg = Release|Win32 - {0EF2C2DB-0E16-4BC3-9927-9C51AF00EB57}.Release|Win32.Build.0 = Release|Win32 - {0EF2C2DB-0E16-4BC3-9927-9C51AF00EB57}.Release|x64.ActiveCfg = Release|x64 - {0EF2C2DB-0E16-4BC3-9927-9C51AF00EB57}.Release|x64.Build.0 = Release|x64 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/native/fileWatcher/fileWatcher3.vcxproj b/native/fileWatcher/fileWatcher3.vcxproj deleted file mode 100644 index d6bca3ceb906..000000000000 --- a/native/fileWatcher/fileWatcher3.vcxproj +++ /dev/null @@ -1,175 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {0EF2C2DB-0E16-4BC3-9927-9C51AF00EB57} - fileWatcher3 - Win32Proj - - - - Application - Unicode - true - - - Application - v120_xp - Unicode - true - - - Application - Unicode - - - Application - v120_xp - Unicode - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>12.0.21005.1 - - - $(SolutionDir)$(Configuration)\ - $(Configuration)\ - false - fsnotifier - - - $(SolutionDir)$(Configuration)\ - $(Configuration)\ - false - fsnotifier64 - - - ..\..\bin\win\ - $(Configuration)\ - false - fsnotifier - - - ..\..\bin\win\ - $(Configuration)\ - false - fsnotifier64 - - - - Disabled - WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - - Level3 - EditAndContinue - - - mpr.lib;%(AdditionalDependencies) - true - Console - MachineX86 - - - - - Disabled - WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - - Level3 - EditAndContinue - - - mpr.lib;%(AdditionalDependencies) - true - Console - MachineX64 - - - - - MaxSpeed - true - WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) - MultiThreaded - true - - Level3 - ProgramDatabase - - - mpr.lib;%(AdditionalDependencies) - true - Console - true - true - MachineX86 - - - - - MaxSpeed - true - WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) - MultiThreaded - true - - Level3 - ProgramDatabase - - - mpr.lib;%(AdditionalDependencies) - true - Console - true - true - MachineX64 - - - - - - - - - - - - diff --git a/native/fileWatcher/fileWatcher3.vcxproj.filters b/native/fileWatcher/fileWatcher3.vcxproj.filters deleted file mode 100644 index e6b22705afd1..000000000000 --- a/native/fileWatcher/fileWatcher3.vcxproj.filters +++ /dev/null @@ -1,27 +0,0 @@ - - - - - {4FC737F1-C7A5-4376-A066-2A32D752A2FF} - cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx - - - {93995380-89BD-4b04-88EB-625FBE52EBFB} - h;hpp;hxx;hm;inl;inc;xsd - - - {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} - rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav - - - - - Source Files - - - - - Resource Files - - - \ No newline at end of file