protected against distributing file with non-LGPL3 content
This commit is contained in:
1 parent
5704a8d4cd
commit
ff98d2c5c2
4 files changed
+27
-14
No files matched your search
@@ -0,0 +1,15 @@
|
|||||||
|
;; #LAYOUT# M65 BASIC_1 #TAKE
|
||||||
|
;; #LAYOUT# * * #IGNORE
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
!ifdef HAS_NOLGPL3_WARN {
|
||||||
|
|
||||||
|
str_nonlgpl3_warn:
|
||||||
|
|
||||||
|
!byte $0D, $0D, $0D, $0D
|
||||||
|
!pet "build contains non-lgpl3 code"
|
||||||
|
!byte $0D
|
||||||
|
!pet " *** do not distribute ***"
|
||||||
|
!byte $0D, $0D, $00
|
||||||
|
}
|
||||||
@@ -108,16 +108,3 @@ INITMSG_revision:
|
|||||||
lda #<rom_revision_basic_string
|
lda #<rom_revision_basic_string
|
||||||
ldy #>rom_revision_basic_string
|
ldy #>rom_revision_basic_string
|
||||||
jmp STROUT
|
jmp STROUT
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
!ifdef HAS_NOLGPL3_WARN {
|
|
||||||
|
|
||||||
str_nonlgpl3_warn:
|
|
||||||
|
|
||||||
!byte $0D, $0D, $0D, $0D
|
|
||||||
!pet "build contains non-lgpl3 code"
|
|
||||||
!byte $0D
|
|
||||||
!pet " *** do not distribute ***"
|
|
||||||
!byte $0D, $0D, $00
|
|
||||||
}
|
|
||||||
@@ -107,4 +107,4 @@ initmsg_real:
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
!ifdef HAS_NOLGPL3_WARN { !error "HAS_NOLGPL3_WARN not implemented"
|
!ifdef HAS_NOLGPL3_WARN { !error "HAS_NOLGPL3_WARN not implemented" }
|
||||||
@@ -71,6 +71,7 @@ const std::vector<uint8_t> STR_SNAPSHOT = { 0x28, 0x44, 0x45, 0x56, 0x45, 0x4C,
|
|||||||
const std::vector<uint8_t> STR_DOSDATE = { 0x4F, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58 };
|
const std::vector<uint8_t> STR_DOSDATE = { 0x4F, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58 };
|
||||||
|
|
||||||
const std::string STR_DEV = "DEV.";
|
const std::string STR_DEV = "DEV.";
|
||||||
|
const std::string STR_BLOCK = "DO NOT DISTRIBUTE";
|
||||||
|
|
||||||
//
|
//
|
||||||
// Command and enviroment line settings
|
// Command and enviroment line settings
|
||||||
@@ -357,6 +358,16 @@ void ROMFile::readSrcFile()
|
|||||||
|
|
||||||
if (!srcFile.good()) ERROR(std::string("unable to read ROM file '") + srcFileNamePath + "'");
|
if (!srcFile.good()) ERROR(std::string("unable to read ROM file '") + srcFileNamePath + "'");
|
||||||
srcFile.close();
|
srcFile.close();
|
||||||
|
|
||||||
|
// Check if it is OK to distribute the file
|
||||||
|
|
||||||
|
for (size_t idx = 0; idx < srcFileContent.size() - STR_BLOCK.size(); idx++)
|
||||||
|
{
|
||||||
|
if (memcmp(&srcFileContent[idx], STR_BLOCK.c_str(), STR_BLOCK.size()) == 0)
|
||||||
|
{
|
||||||
|
ERROR(std::string("not allowed to distribute ROM file '") + srcFileNamePath + "'");
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void ROMFile::readDstFile()
|
void ROMFile::readDstFile()
|
||||||
|
|||||||
Reference in new issue
Block a user