Skip to content

Commit

Permalink
Modernise
Browse files Browse the repository at this point in the history
* Change from C to C++.
* Change default button 4 to button 5.
* Check null pointers.
* 1x scale is enough.
* Add an icon.
* Modernise xcode project file.
* Update readme.
  • Loading branch information
XMhat committed Mar 11, 2024
1 parent 7b88f04 commit 4c06368
Show file tree
Hide file tree
Showing 17 changed files with 225 additions and 164 deletions.
132 changes: 53 additions & 79 deletions PixelScroll.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,35 +3,53 @@
archiveVersion = 1;
classes = {
};
objectVersion = 46;
objectVersion = 54;
objects = {

/* Begin PBXBuildFile section */
C3FC4D7920B9CA1900E1BE93 /* main.c in Sources */ = {isa = PBXBuildFile; fileRef = C3FC4D7820B9CA1900E1BE93 /* main.c */; };
0CA7CAD72B9F843E006F89F8 /* Icon.iconset in Resources */ = {isa = PBXBuildFile; fileRef = 0CA7CAD52B9F843E006F89F8 /* Icon.iconset */; };
0CBE28102B9F711B00381607 /* main.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0CBE280F2B9F711A00381607 /* main.cpp */; };
0CBE28132B9F72F000381607 /* CoreFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0CBE28122B9F72F000381607 /* CoreFoundation.framework */; };
0CBE28152B9F72F600381607 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0CBE28142B9F72F600381607 /* CoreGraphics.framework */; };
/* End PBXBuildFile section */

/* Begin PBXFileReference section */
0CA7CAD52B9F843E006F89F8 /* Icon.iconset */ = {isa = PBXFileReference; lastKnownFileType = folder.iconset; path = Icon.iconset; sourceTree = "<group>"; };
0CBE280F2B9F711A00381607 /* main.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = main.cpp; sourceTree = "<group>"; };
0CBE28122B9F72F000381607 /* CoreFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreFoundation.framework; path = System/Library/Frameworks/CoreFoundation.framework; sourceTree = SDKROOT; };
0CBE28142B9F72F600381607 /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; };
C3FC4D7020B9CA1900E1BE93 /* PixelScroll.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = PixelScroll.app; sourceTree = BUILT_PRODUCTS_DIR; };
C3FC4D7420B9CA1900E1BE93 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
C3FC4D7820B9CA1900E1BE93 /* main.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = main.c; sourceTree = "<group>"; };
/* End PBXFileReference section */

/* Begin PBXFrameworksBuildPhase section */
C3FC4D6D20B9CA1900E1BE93 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
0CBE28152B9F72F600381607 /* CoreGraphics.framework in Frameworks */,
0CBE28132B9F72F000381607 /* CoreFoundation.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */

/* Begin PBXGroup section */
0CBE28112B9F72F000381607 /* Frameworks */ = {
isa = PBXGroup;
children = (
0CBE28142B9F72F600381607 /* CoreGraphics.framework */,
0CBE28122B9F72F000381607 /* CoreFoundation.framework */,
);
name = Frameworks;
sourceTree = "<group>";
};
C3FC4D6720B9CA1900E1BE93 = {
isa = PBXGroup;
children = (
C3FC4D7220B9CA1900E1BE93 /* PixelScroll */,
C3FC4D7120B9CA1900E1BE93 /* Products */,
0CBE28112B9F72F000381607 /* Frameworks */,
);
sourceTree = "<group>";
};
Expand All @@ -46,8 +64,9 @@
C3FC4D7220B9CA1900E1BE93 /* PixelScroll */ = {
isa = PBXGroup;
children = (
0CA7CAD52B9F843E006F89F8 /* Icon.iconset */,
C3FC4D7420B9CA1900E1BE93 /* Info.plist */,
C3FC4D7820B9CA1900E1BE93 /* main.c */,
0CBE280F2B9F711A00381607 /* main.cpp */,
);
path = PixelScroll;
sourceTree = "<group>";
Expand Down Expand Up @@ -78,7 +97,8 @@
C3FC4D6820B9CA1900E1BE93 /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 0620;
BuildIndependentTargetsInParallel = YES;
LastUpgradeCheck = 1530;
ORGANIZATIONNAME = "Emre Yolcu";
TargetAttributes = {
C3FC4D6F20B9CA1900E1BE93 = {
Expand All @@ -88,7 +108,7 @@
};
buildConfigurationList = C3FC4D6B20B9CA1900E1BE93 /* Build configuration list for PBXProject "PixelScroll" */;
compatibilityVersion = "Xcode 3.2";
developmentRegion = English;
developmentRegion = en;
hasScannedForEncodings = 0;
knownRegions = (
en,
Expand All @@ -109,6 +129,7 @@
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
0CA7CAD72B9F843E006F89F8 /* Icon.iconset in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand All @@ -119,7 +140,7 @@
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
C3FC4D7920B9CA1900E1BE93 /* main.c in Sources */,
0CBE28102B9F711B00381607 /* main.cpp in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand All @@ -129,98 +150,50 @@
C3FC4D8B20B9CA1A00E1BE93 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALLOW_TARGET_PLATFORM_SPECIALIZATION = YES;
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
CODE_SIGN_IDENTITY = "-";
COPY_PHASE_STRIP = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_DYNAMIC_NO_PIC = NO;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_PREPROCESSOR_DEFINITIONS = (
"DEBUG=1",
"$(inherited)",
);
GCC_SYMBOLS_PRIVATE_EXTERN = NO;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
MACOSX_DEPLOYMENT_TARGET = 10.9;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = macosx;
CODE_SIGN_IDENTITY = "MS-Design";
INFOPLIST_FILE = PixelScroll/Info.plist;
INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.utilities";
MACOSX_DEPLOYMENT_TARGET = "$(RECOMMENDED_MACOSX_DEPLOYMENT_TARGET)";
PRODUCT_NAME = PixelScroll;
};
name = Debug;
};
C3FC4D8C20B9CA1A00E1BE93 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALLOW_TARGET_PLATFORM_SPECIALIZATION = YES;
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
CODE_SIGN_IDENTITY = "-";
COPY_PHASE_STRIP = NO;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
ENABLE_NS_ASSERTIONS = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
MACOSX_DEPLOYMENT_TARGET = 10.9;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = macosx;
CODE_SIGN_IDENTITY = "MS-Design";
INFOPLIST_FILE = PixelScroll/Info.plist;
INFOPLIST_KEY_LSApplicationCategoryType = "public.app-category.utilities";
MACOSX_DEPLOYMENT_TARGET = "$(RECOMMENDED_MACOSX_DEPLOYMENT_TARGET)";
PRODUCT_NAME = PixelScroll;
};
name = Release;
};
C3FC4D8E20B9CA1A00E1BE93 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
COMBINE_HIDPI_IMAGES = YES;
INFOPLIST_FILE = PixelScroll/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks";
PRODUCT_NAME = "$(TARGET_NAME)";
ASSETCATALOG_COMPILER_APPICON_NAME = PixelScroll/Icon.iconset;
ASSETCATALOG_COMPILER_INCLUDE_ALL_APPICON_ASSETS = NO;
CURRENT_PROJECT_VERSION = 1;
INFOPLIST_KEY_CFBundleDisplayName = PixelScroll;
MARKETING_VERSION = 1.0;
PRODUCT_BUNDLE_IDENTIFIER = msd.pixelscroll;
};
name = Debug;
};
C3FC4D8F20B9CA1A00E1BE93 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
COMBINE_HIDPI_IMAGES = YES;
INFOPLIST_FILE = PixelScroll/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks";
PRODUCT_NAME = "$(TARGET_NAME)";
ASSETCATALOG_COMPILER_APPICON_NAME = PixelScroll/Icon.iconset;
ASSETCATALOG_COMPILER_INCLUDE_ALL_APPICON_ASSETS = NO;
CURRENT_PROJECT_VERSION = 1;
INFOPLIST_KEY_CFBundleDisplayName = PixelScroll;
MARKETING_VERSION = 1.0;
PRODUCT_BUNDLE_IDENTIFIER = msd.pixelscroll;
};
name = Release;
};
Expand All @@ -243,6 +216,7 @@
C3FC4D8F20B9CA1A00E1BE93 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */
};
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>IDEDidComputeMac32BitWarning</key>
<true/>
</dict>
</plist>
78 changes: 78 additions & 0 deletions PixelScroll.xcodeproj/xcshareddata/xcschemes/PixelScroll.xcscheme
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1530"
version = "1.7">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES"
buildArchitectures = "All">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "C3FC4D6F20B9CA1900E1BE93"
BuildableName = "PixelScroll.app"
BlueprintName = "PixelScroll"
ReferencedContainer = "container:PixelScroll.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES"
shouldAutocreateTestPlan = "YES">
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "C3FC4D6F20B9CA1900E1BE93"
BuildableName = "PixelScroll.app"
BlueprintName = "PixelScroll"
ReferencedContainer = "container:PixelScroll.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "C3FC4D6F20B9CA1900E1BE93"
BuildableName = "PixelScroll.app"
BlueprintName = "PixelScroll"
ReferencedContainer = "container:PixelScroll.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
Binary file added PixelScroll/Icon.iconset/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added PixelScroll/Icon.iconset/icon16x16.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added PixelScroll/Icon.iconset/icon_128x128.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added PixelScroll/Icon.iconset/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added PixelScroll/Icon.iconset/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added PixelScroll/Icon.iconset/icon_256x256.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added PixelScroll/Icon.iconset/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added PixelScroll/Icon.iconset/icon_32x32.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added PixelScroll/Icon.iconset/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added PixelScroll/Icon.iconset/icon_512x512.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 6 additions & 4 deletions PixelScroll/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<key>CFBundleIconFile</key>
<string></string>
<key>CFBundleIdentifier</key>
<string>emreyolcu.$(PRODUCT_NAME:rfc1034identifier)</string>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
Expand All @@ -24,13 +24,15 @@
<string>1</string>
<key>LSMinimumSystemVersion</key>
<string>$(MACOSX_DEPLOYMENT_TARGET)</string>
<key>LSUIElement</key>
<true/>
<key>NSHumanReadableCopyright</key>
<string>Copyright © 2018 Emre Yolcu. All rights reserved.</string>
<string>Copyright © 2024 MS-Design, 2018 Emre Yolcu. All rights reserved.</string>
<key>NSMainNibFile</key>
<string>MainMenu</string>
<key>LSUIElement</key>
<true/>
<key>NSPrincipalClass</key>
<string>NSApplication</string>
<key>CFBundleIconFile</key>
<string>Icon</string>
</dict>
</plist>
Loading

0 comments on commit 4c06368

Please sign in to comment.