Skip to content
This repository was archived by the owner on Oct 12, 2018. It is now read-only.

Commit d8e907d

Browse files
committedAug 26, 2017
Mess with scripts
1 parent ab0c4b2 commit d8e907d

File tree

4 files changed

+225
-1
lines changed

4 files changed

+225
-1
lines changed
 

‎Scripts/BuildImage.sh

+51
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
#!/bin/sh
2+
3+
# SignInstaller.sh
4+
# Versioning
5+
#
6+
# Created by Kozlek on 18/07/13.
7+
#
8+
9+
find ./Binaries/ -maxdepth 1 -type f -name "*.dmg" -delete
10+
find ./Binaries/ -maxdepth 1 -type f -name "*.tar.gz" -delete
11+
find ./Binaries/ -maxdepth 1 -type f -name "*.dsa" -delete
12+
find ./Binaries/ -maxdepth 1 -type f -name "*.sha1" -delete
13+
14+
if [ "$1" == "clean" ]
15+
then
16+
exit 0
17+
fi
18+
19+
project_name="HWSensors"
20+
project_version=$(git describe --tags)
21+
last_revision=$(<"./revision.txt")
22+
full_version=${project_version}'.'${last_revision}
23+
24+
# binaries
25+
bin_filename=${project_name}.${full_version}.Binaries.dmg
26+
bin_volumename=${project_name}" Binaries v"${full_version}
27+
hdiutil create -megabytes 10 -fs HFS+ -volname "${bin_volumename}" ./Binaries/TEMP.${bin_filename}
28+
hdiutil attach ./Binaries/TEMP.${bin_filename} -readwrite -mount required
29+
30+
find ./Binaries/ -maxdepth 1 -type d -name "*.app" -exec cp -R {} /Volumes/"${bin_volumename}" \;
31+
find ./Binaries/ -maxdepth 1 -type d -name "*.kext" -exec cp -R {} /Volumes/"${bin_volumename}" \;
32+
33+
hdiutil detach "/Volumes/${bin_volumename}"
34+
hdiutil convert ./Binaries/TEMP.${bin_filename} -format UDZO -imagekey zlib-level=9 -o ./Binaries/${bin_filename}
35+
rm ./Binaries/TEMP.${bin_filename}
36+
37+
# compressed update
38+
dmg_filename=${project_name}.${full_version}.Update.dmg
39+
dmg_volumename=${project_name}" v"${full_version}
40+
hdiutil create -megabytes 10 -fs HFS+ -volname "${dmg_volumename}" ./Binaries/TEMP.${dmg_filename}
41+
hdiutil attach ./Binaries/TEMP.${dmg_filename} -readwrite -mount required
42+
43+
cp ./Binaries/${project_name}.${full_version}.pkg "/Volumes/${dmg_volumename}/HWMonitor.pkg"
44+
45+
hdiutil detach "/Volumes/${dmg_volumename}"
46+
hdiutil convert ./Binaries/TEMP.${dmg_filename} -format UDZO -imagekey zlib-level=9 -o ./Binaries/${dmg_filename}
47+
rm ./Binaries/TEMP.${dmg_filename}
48+
openssl="/usr/bin/openssl"
49+
dsa_signature=$(${openssl} dgst -sha1 -binary < ./Binaries/${dmg_filename} | ${openssl} dgst -dss1 -sign ./Appcast/dsa_priv.pem | ${openssl} enc -base64)
50+
echo ${dsa_signature} > ./Binaries/${dmg_filename}.sha1
51+

‎Versioning And Distribution.xcodeproj/project.pbxproj

+94-1
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
7EBA20C517ED59C6008E54C5 /* PreBuild.sh */ = {isa = PBXFileReference; lastKnownFileType = text.script.sh; path = PreBuild.sh; sourceTree = "<group>"; };
2424
7EBA20C617ED59C6008E54C5 /* SignApp.sh */ = {isa = PBXFileReference; lastKnownFileType = text.script.sh; path = SignApp.sh; sourceTree = "<group>"; };
2525
7EBA20C717ED59C6008E54C5 /* SignInstaller.sh */ = {isa = PBXFileReference; lastKnownFileType = text.script.sh; path = SignInstaller.sh; sourceTree = "<group>"; };
26+
7EE1EBBD1F5179F2004108A6 /* BuildImage.sh */ = {isa = PBXFileReference; lastKnownFileType = text.script.sh; path = BuildImage.sh; sourceTree = "<group>"; };
2627
7EEB2D6E1847F2A2008B6D1C /* preinstall */ = {isa = PBXFileReference; lastKnownFileType = text; path = preinstall; sourceTree = "<group>"; };
2728
/* End PBXFileReference section */
2829

@@ -86,8 +87,9 @@
8687
7EBA20C517ED59C6008E54C5 /* PreBuild.sh */,
8788
7E72E369181B94DA002165DD /* SignKexts.sh */,
8889
7EBA20C617ED59C6008E54C5 /* SignApp.sh */,
89-
7EBA20C717ED59C6008E54C5 /* SignInstaller.sh */,
90+
7EE1EBBD1F5179F2004108A6 /* BuildImage.sh */,
9091
7EBA20C217ED59C6008E54C5 /* BuildInstaller.sh */,
92+
7EBA20C717ED59C6008E54C5 /* SignInstaller.sh */,
9193
);
9294
path = Scripts;
9395
sourceTree = "<group>";
@@ -173,13 +175,34 @@
173175
passBuildSettingsInEnvironment = 0;
174176
productName = "Sign Application";
175177
};
178+
7EE1EBBE1F517A51004108A6 /* Build Image */ = {
179+
isa = PBXLegacyTarget;
180+
buildArgumentsString = "./Scripts/BuildImage.sh ${ACTION}";
181+
buildConfigurationList = 7EE1EBBF1F517A51004108A6 /* Build configuration list for PBXLegacyTarget "Build Image" */;
182+
buildPhases = (
183+
);
184+
buildToolPath = /bin/sh;
185+
buildWorkingDirectory = "${SOURCE_ROOT}";
186+
dependencies = (
187+
);
188+
name = "Build Image";
189+
passBuildSettingsInEnvironment = 0;
190+
productName = "Build Image";
191+
};
176192
/* End PBXLegacyTarget section */
177193

178194
/* Begin PBXProject section */
179195
7EB7E70A17834A740071B3F0 /* Project object */ = {
180196
isa = PBXProject;
181197
attributes = {
182198
LastUpgradeCheck = 0810;
199+
TargetAttributes = {
200+
7EE1EBBE1F517A51004108A6 = {
201+
CreatedOnToolsVersion = 8.3.3;
202+
DevelopmentTeam = R3YQC22TX8;
203+
ProvisioningStyle = Automatic;
204+
};
205+
};
183206
};
184207
buildConfigurationList = 7EB7E70D17834A740071B3F0 /* Build configuration list for PBXProject "Versioning And Distribution" */;
185208
compatibilityVersion = "Xcode 3.2";
@@ -196,6 +219,7 @@
196219
7E2ACD8B1791B4510061C677 /* Pre-Build */,
197220
7E43CE05179742D3001E3636 /* Sign Apps */,
198221
7E72E36A181B94F5002165DD /* Sign Kexts */,
222+
7EE1EBBE1F517A51004108A6 /* Build Image */,
199223
7E2ACD911791B54B0061C677 /* Build Installer */,
200224
7E43CE09179742DB001E3636 /* Sign Installer */,
201225
);
@@ -595,6 +619,67 @@
595619
};
596620
name = Release;
597621
};
622+
7EE1EBC01F517A51004108A6 /* Debug */ = {
623+
isa = XCBuildConfiguration;
624+
buildSettings = {
625+
ALWAYS_SEARCH_USER_PATHS = NO;
626+
CLANG_ANALYZER_NONNULL = YES;
627+
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
628+
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
629+
CLANG_CXX_LIBRARY = "libc++";
630+
CLANG_ENABLE_MODULES = YES;
631+
CLANG_ENABLE_OBJC_ARC = YES;
632+
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
633+
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
634+
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
635+
COPY_PHASE_STRIP = NO;
636+
DEBUGGING_SYMBOLS = YES;
637+
DEBUG_INFORMATION_FORMAT = dwarf;
638+
DEVELOPMENT_TEAM = R3YQC22TX8;
639+
GCC_C_LANGUAGE_STANDARD = gnu99;
640+
GCC_DYNAMIC_NO_PIC = NO;
641+
GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
642+
GCC_OPTIMIZATION_LEVEL = 0;
643+
GCC_PREPROCESSOR_DEFINITIONS = (
644+
"DEBUG=1",
645+
"$(inherited)",
646+
);
647+
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
648+
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
649+
MTL_ENABLE_DEBUG_INFO = YES;
650+
OTHER_CFLAGS = "";
651+
OTHER_LDFLAGS = "";
652+
PRODUCT_NAME = "$(TARGET_NAME)";
653+
};
654+
name = Debug;
655+
};
656+
7EE1EBC11F517A51004108A6 /* Release */ = {
657+
isa = XCBuildConfiguration;
658+
buildSettings = {
659+
ALWAYS_SEARCH_USER_PATHS = NO;
660+
CLANG_ANALYZER_NONNULL = YES;
661+
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
662+
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
663+
CLANG_CXX_LIBRARY = "libc++";
664+
CLANG_ENABLE_MODULES = YES;
665+
CLANG_ENABLE_OBJC_ARC = YES;
666+
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
667+
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
668+
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
669+
COPY_PHASE_STRIP = NO;
670+
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
671+
DEVELOPMENT_TEAM = R3YQC22TX8;
672+
ENABLE_NS_ASSERTIONS = NO;
673+
GCC_C_LANGUAGE_STANDARD = gnu99;
674+
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
675+
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
676+
MTL_ENABLE_DEBUG_INFO = NO;
677+
OTHER_CFLAGS = "";
678+
OTHER_LDFLAGS = "";
679+
PRODUCT_NAME = "$(TARGET_NAME)";
680+
};
681+
name = Release;
682+
};
598683
/* End XCBuildConfiguration section */
599684

600685
/* Begin XCConfigurationList section */
@@ -652,6 +737,14 @@
652737
defaultConfigurationIsVisible = 0;
653738
defaultConfigurationName = Release;
654739
};
740+
7EE1EBBF1F517A51004108A6 /* Build configuration list for PBXLegacyTarget "Build Image" */ = {
741+
isa = XCConfigurationList;
742+
buildConfigurations = (
743+
7EE1EBC01F517A51004108A6 /* Debug */,
744+
7EE1EBC11F517A51004108A6 /* Release */,
745+
);
746+
defaultConfigurationIsVisible = 0;
747+
};
655748
/* End XCConfigurationList section */
656749
};
657750
rootObject = 7EB7E70A17834A740071B3F0 /* Project object */;
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<Scheme
3+
LastUpgradeVersion = "0830"
4+
version = "1.3">
5+
<BuildAction
6+
parallelizeBuildables = "YES"
7+
buildImplicitDependencies = "YES">
8+
<BuildActionEntries>
9+
<BuildActionEntry
10+
buildForTesting = "YES"
11+
buildForRunning = "YES"
12+
buildForProfiling = "YES"
13+
buildForArchiving = "YES"
14+
buildForAnalyzing = "YES">
15+
<BuildableReference
16+
BuildableIdentifier = "primary"
17+
BlueprintIdentifier = "7EE1EBBE1F517A51004108A6"
18+
BuildableName = "Build Image"
19+
BlueprintName = "Build Image"
20+
ReferencedContainer = "container:Versioning And Distribution.xcodeproj">
21+
</BuildableReference>
22+
</BuildActionEntry>
23+
</BuildActionEntries>
24+
</BuildAction>
25+
<TestAction
26+
buildConfiguration = "Debug"
27+
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
28+
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
29+
shouldUseLaunchSchemeArgsEnv = "YES">
30+
<Testables>
31+
</Testables>
32+
<AdditionalOptions>
33+
</AdditionalOptions>
34+
</TestAction>
35+
<LaunchAction
36+
buildConfiguration = "Debug"
37+
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
38+
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
39+
launchStyle = "0"
40+
useCustomWorkingDirectory = "NO"
41+
ignoresPersistentStateOnLaunch = "NO"
42+
debugDocumentVersioning = "YES"
43+
debugServiceExtension = "internal"
44+
allowLocationSimulation = "YES">
45+
<MacroExpansion>
46+
<BuildableReference
47+
BuildableIdentifier = "primary"
48+
BlueprintIdentifier = "7EE1EBBE1F517A51004108A6"
49+
BuildableName = "Build Image"
50+
BlueprintName = "Build Image"
51+
ReferencedContainer = "container:Versioning And Distribution.xcodeproj">
52+
</BuildableReference>
53+
</MacroExpansion>
54+
<AdditionalOptions>
55+
</AdditionalOptions>
56+
</LaunchAction>
57+
<ProfileAction
58+
buildConfiguration = "Release"
59+
shouldUseLaunchSchemeArgsEnv = "YES"
60+
savedToolIdentifier = ""
61+
useCustomWorkingDirectory = "NO"
62+
debugDocumentVersioning = "YES">
63+
<MacroExpansion>
64+
<BuildableReference
65+
BuildableIdentifier = "primary"
66+
BlueprintIdentifier = "7EE1EBBE1F517A51004108A6"
67+
BuildableName = "Build Image"
68+
BlueprintName = "Build Image"
69+
ReferencedContainer = "container:Versioning And Distribution.xcodeproj">
70+
</BuildableReference>
71+
</MacroExpansion>
72+
</ProfileAction>
73+
<AnalyzeAction
74+
buildConfiguration = "Debug">
75+
</AnalyzeAction>
76+
<ArchiveAction
77+
buildConfiguration = "Release"
78+
revealArchiveInOrganizer = "YES">
79+
</ArchiveAction>
80+
</Scheme>

0 commit comments

Comments
 (0)
This repository has been archived.